Merge pull request from gnuboard:HeuJung/issue625
fix(core,templates): 의존성 보안 버전 정비 및 감사 사각 해소
This commit is contained in:
commit
f094a5f3fc
228 files changed
+139387
-53027
No files matched your search
@@ -461,6 +461,26 @@ Icon 은 `<i>` 글리프라 박스 크기가 곧 `font-size` 다. `w-N h-N` 은
|
||||
> 상세: [module-assets.md](docs/extension/module-assets.md) "사용자 추가 에셋", [static-asset-publishing.md](docs/backend/static-asset-publishing.md)
|
||||
> 정적 검사가 외부 자산 URL 과 번들 확장의 `custom/` 배포를 차단한다. 서술자 형태와 교체 2경로 보존은 테스트가 잠근다.
|
||||
|
||||
### 의존성 감사 신호는 거짓일 수 있다
|
||||
|
||||
`npm audit --omit=dev` 는 **`dependencies` 에 선언된 것만** 본다. 실행에 쓰이는 라이브러리가 `devDependencies` 에 있으면 그 패키지는 검사 대상에서 통째로 빠지고, 취약점이 있어도 감사는 0건을 돌려준다. "운영 의존성 취약점 없음" 이라는 완료 조건이 취약한 상태로도 충족된 것처럼 보인다.
|
||||
|
||||
동봉(vendored) 제3자 자산은 더 나아가 **어떤 잠금파일에도 없어** 감사 도구가 원리상 볼 수 없다. 그 안에 재번들된 라이브러리가 브라우저로 나간다.
|
||||
|
||||
| ❌ 금지 | ✅ 올바른 사용 |
|
||||
|--------|---------------|
|
||||
| 런타임 소스가 import 하는 패키지를 `devDependencies` 에만 선언 | `dependencies` 로 선언 — 검사 대상에 들어가야 감사 신호가 사실이 된다 |
|
||||
| 루트 잠금파일만 감사하고 완료 선언 | 확장의 잠금파일까지 전수 (`php artisan security:audit-dependencies`) — 루트만 보면 확장 전부가 사각이다 |
|
||||
| 동봉 자산을 감사 범위에 들었다고 간주 | 잠금파일에 없으므로 **사람이 확인한다** — 점검 명령이 목록으로 노출한다 |
|
||||
| 잠금만 올리고 재빌드를 생략 | 브라우저가 받는 버전은 커밋된 `dist/` 가 정한다 — 잠금 갱신 후 반드시 재빌드·재게시 |
|
||||
| "점검 대상 0" 과 "점검 불가" 를 같은 문구로 보고 | 구분 보고 — 뭉뚱그리면 운영자가 "전부 정상" 으로 읽는다 |
|
||||
| 동봉 자산 버전을 여러 곳에 적고 상향 시 일부만 갱신 | 모든 기재(디렉토리 · 의존성 핀 · 복사 스크립트 · 소스 상수 · 테스트 어서션)를 한 버전으로 — 하나만 어긋나도 그 자산이 404 가 되는데 빌드와 테스트는 통과한다 |
|
||||
| 상류가 못 고치는 잔여 취약을 감사에서 가리기(`overrides` 로 무마) | 잔여는 **하한과 사유를 기록**하고 그 아래로 내려가는 것만 막는다 — 가리면 그 지점이 영원히 보이지 않는다 |
|
||||
|
||||
이 결함군은 예외도 로그도 남기지 않는다. 취약한 라이브러리가 정상 동작하고 감사가 0건을 보고하는 것이 유일한 증상이다. 정적 검사가 앞의 두 항목을 차단하고, 출하 산출물의 정화기 버전과 점검 명령의 모집단은 테스트가 고정한다.
|
||||
|
||||
> 상세: [module-assets.md](docs/extension/module-assets.md), [cheatsheet.md](docs/cheatsheet.md)
|
||||
|
||||
### 프록시 뒤 요청은 스킴·IP 를 스스로 증명하지 않는다
|
||||
|
||||
TLS 가 앞단에서 종단되고 앱에는 HTTP 로 전달되는 구성(AWS ALB, CloudFront, Cloudflare, nginx/Apache 리버스 프록시, ngrok)에서 신뢰할 프록시가 지정되지 않으면 Laravel 은 `X-Forwarded-*` 를 전부 무시한다. 요청 객체가 평문 HTTP 로 인식되어 `asset()`/`url()` 이 `http://` 를 만들고(HTTPS 페이지에서 혼합 콘텐츠로 차단 → **사이트 전체 백지**), `$request->ip()` 가 프록시 IP 가 되어 통보 IP 화이트리스트·rate limit·IP 기록·GeoIP 가 동시에 무너진다.
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
- AWS ALB·CloudFront·Cloudflare·nginx 처럼 HTTPS 를 앞단에서 처리하고 사이트에는 HTTP 로 전달하는 구성을 지원합니다. `.env` 에 `TRUSTED_PROXIES` 를 지정하면 사이트가 접속 주소를 올바르게 인식해 화면이 정상 표시되고, 게시글 작성 IP·로그인 시도 제한·결제 통보 수신도 실제 방문자 기준으로 동작합니다. 지정하지 않으면 종전과 동일하게 동작합니다. (#124 @lyg-kaban 님께서 건의해주셨습니다.)
|
||||
- 프록시 뒤에서 구동 중인데 신뢰 프록시가 지정되지 않았으면 관리자 대시보드가 그 사실을 알립니다. 환경설정 > 고급 에서 사이트가 인식한 접속 방식과 방문자 IP 를 확인할 수 있고, 서버에서 `php artisan trusted-proxy:status` 로도 확인할 수 있으며, 설치 마법사도 설치 단계에서 함께 안내합니다. HTTPS 를 쓰지 않는 사이트도 대상입니다 — 이 경우 화면은 정상이지만 방문자 IP 기록과 결제 통보 수신이 어긋나 있어도 드러나지 않기 때문입니다. (#124 @lyg-kaban 님께서 건의해주셨습니다.)
|
||||
- 사이트 설정 문제로 화면 구성 파일이 브라우저에 차단된 경우, 네트워크 오류와 구분되는 안내를 표시합니다. 새로고침해도 낫지 않는 상황이므로 [새로고침] 버튼을 두지 않으며, 원인과 조치 방법은 운영자가 확인할 수 있도록 브라우저 콘솔에 남깁니다. (#124 @lyg-kaban 님께서 건의해주셨습니다.)
|
||||
- 사이트가 쓰는 외부 라이브러리의 알려진 취약점을 한 번에 점검하는 명령이 추가되었습니다. `php artisan security:audit-dependencies` 로 코어와 설치된 모든 확장을 함께 확인할 수 있고, 개발 대시보드에서도 실행할 수 있습니다. 점검 도구가 원리상 볼 수 없는 동봉 라이브러리는 버전 목록으로 함께 표시해 운영자가 직접 확인할 수 있게 했습니다. (#126 @jiwonpapa 님께서 제보해주셨습니다.)
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -29,6 +30,8 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- 실제 화면 동작에 쓰이는 라이브러리(axios·laravel-echo·pusher-js)가 개발용으로 분류돼 있어 보안 점검에서 빠지던 문제를 수정했습니다. 이제 점검 대상에 포함되며, 함께 확인된 axios 취약점도 1.20.0 으로 올려 해소했습니다. (#126 @jiwonpapa 님께서 제보해주셨습니다.)
|
||||
- 서버측 라이브러리 guzzle·commonmark 의 알려진 취약점 12건을 해소했습니다. 결제·본인인증·알림 발송처럼 외부와 통신하는 경로가 이 라이브러리를 사용합니다. (#126 @jiwonpapa 님께서 제보해주셨습니다.)
|
||||
- 초기 화면 파일을 명령줄과 웹이 번갈아 만들 때, 나중에 생기는 하위 폴더가 한쪽 계정 전용으로 남아 다른 쪽이 쓰지 못하던 문제를 수정했습니다. 게시 폴더가 그룹 권한을 하위 폴더에 물려주도록 정리합니다(Linux·macOS).
|
||||
- 확장 설치가 의존성·버전 검사에서 실패해도 복사된 파일이 남아, 목록에도 보이지 않는 디렉토리가 쌓이던 문제를 수정했습니다. 실패한 설치는 이번에 만든 파일을 되돌립니다(이미 설치돼 있던 확장을 다시 설치하다 실패한 경우에는 기존 파일을 건드리지 않습니다).
|
||||
- 사이트 첫 접속 시 확장 캐시 버전이 어긋나 있으면 라우트·다국어 데이터를 두 번 내려받던 문제를 수정했습니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
|
||||
|
||||
@@ -0,0 +1,482 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
/**
|
||||
* 의존성 취약점 전수 점검 커맨드 (#126)
|
||||
*
|
||||
* 이 저장소는 잠금파일이 60개 가까이 흩어져 있다 — 코어 하나와 확장 수십 개가 각자
|
||||
* `package-lock.json` / `composer.lock` 을 갖는다. 루트만 감사하면 확장 전부가 사각이
|
||||
* 되는데, 그 사각은 오류도 경고도 남기지 않는다: 취약한 라이브러리가 정상 동작하는 것이
|
||||
* 유일한 증상이다.
|
||||
*
|
||||
* 동봉(vendored) 자산은 어떤 잠금파일에도 없어 `npm audit` 이 **원리상** 볼 수 없다.
|
||||
* 그 축은 판정하지 않고 목록으로 노출한다 — 사람이 봐야 하는 대상이기 때문이다.
|
||||
*
|
||||
* 종료 코드: 취약점이 하나라도 있으면 비-0. 비-0 은 "커맨드 실행 실패" 가 아니라
|
||||
* **조치 대상 발견 신호**다.
|
||||
*/
|
||||
class SecurityAuditDependenciesCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*/
|
||||
protected $signature = 'security:audit-dependencies
|
||||
{--json : 결과를 JSON 으로 출력합니다}
|
||||
{--npm-only : npm 잠금파일만 점검합니다}
|
||||
{--composer-only : composer 잠금파일만 점검합니다}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*/
|
||||
protected $description = '저장소의 모든 잠금파일(npm·composer) 운영 의존성 취약점을 점검합니다 (취약점 발견 시 비-0 종료)';
|
||||
|
||||
/** 잠금파일 탐색에서 제외할 경로 조각 */
|
||||
private const EXCLUDED_SEGMENTS = ['node_modules', 'vendor', '_pending', 'storage'];
|
||||
|
||||
/** 개별 감사 프로세스 제한 시간(초) */
|
||||
private const PROCESS_TIMEOUT = 300;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int 취약점이 없으면 0, 있으면 1
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$npmOnly = (bool) $this->option('npm-only');
|
||||
$composerOnly = (bool) $this->option('composer-only');
|
||||
|
||||
$results = [];
|
||||
|
||||
if (! $composerOnly) {
|
||||
foreach ($this->lockFiles('package-lock.json') as $lock) {
|
||||
$results[] = $this->auditNpm($lock);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $npmOnly) {
|
||||
foreach ($this->lockFiles('composer.lock') as $lock) {
|
||||
$results[] = $this->auditComposer($lock);
|
||||
}
|
||||
}
|
||||
|
||||
$vendored = $this->vendoredAssets();
|
||||
|
||||
if ($this->option('json')) {
|
||||
$this->line((string) json_encode([
|
||||
'results' => $results,
|
||||
'vendored_assets' => $vendored,
|
||||
'totals' => $this->totals($results),
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
return $this->totals($results)['vulnerable'] > 0 ? self::FAILURE : self::SUCCESS;
|
||||
}
|
||||
|
||||
$this->renderTable($results);
|
||||
$this->renderVendored($vendored);
|
||||
|
||||
$totals = $this->totals($results);
|
||||
|
||||
$this->line('');
|
||||
|
||||
if ($totals['unmeasurable'] > 0) {
|
||||
$this->warn(sprintf(
|
||||
'점검 불가 %d건 — 감사 도구가 실행되지 않았습니다. "취약점 없음" 과 다릅니다.',
|
||||
$totals['unmeasurable']
|
||||
));
|
||||
}
|
||||
|
||||
if ($totals['vulnerable'] === 0) {
|
||||
$this->info(sprintf(
|
||||
'운영 의존성 취약점 0건 (감사 %d개 / 대상 없음 %d개 / 발견 %d개 잠금파일).',
|
||||
$totals['audited'],
|
||||
$totals['empty'],
|
||||
$totals['checked']
|
||||
));
|
||||
|
||||
return $totals['unmeasurable'] > 0 ? self::FAILURE : self::SUCCESS;
|
||||
}
|
||||
|
||||
$this->error(sprintf(
|
||||
'%d개 잠금파일에서 운영 의존성 취약점이 발견되었습니다 (총 %d건).',
|
||||
$totals['vulnerable'],
|
||||
$totals['advisories']
|
||||
));
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 저장소에서 잠금파일을 전수 탐색합니다.
|
||||
*
|
||||
* @param string $fileName 잠금파일 이름
|
||||
* @return array<int, string> 잠금파일 절대 경로 목록
|
||||
*/
|
||||
private function lockFiles(string $fileName): array
|
||||
{
|
||||
$root = base_path();
|
||||
$found = [];
|
||||
|
||||
// 제외 디렉토리는 **내려가기 전에** 잘라낸다. 파일 단계에서 거르면 `node_modules`
|
||||
// 수만 개를 전부 훑고 나서 버리게 되어 한 번 실행에 수 분이 걸린다.
|
||||
$directories = new \RecursiveDirectoryIterator($root, \FilesystemIterator::SKIP_DOTS);
|
||||
$pruned = new \RecursiveCallbackFilterIterator(
|
||||
$directories,
|
||||
function (\SplFileInfo $entry): bool {
|
||||
if (! $entry->isDir()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return ! in_array($entry->getFilename(), self::EXCLUDED_SEGMENTS, true);
|
||||
}
|
||||
);
|
||||
|
||||
foreach (new \RecursiveIteratorIterator($pruned) as $entry) {
|
||||
if (! $entry->isFile() || $entry->getFilename() !== $fileName) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$found[] = $entry->getPathname();
|
||||
}
|
||||
|
||||
sort($found);
|
||||
|
||||
return $found;
|
||||
}
|
||||
|
||||
/**
|
||||
* npm 잠금파일 하나를 감사합니다.
|
||||
*
|
||||
* @param string $lockPath 잠금파일 절대 경로
|
||||
* @return array{target: string, kind: string, status: string, advisories: int, severities: array<string,int>, detail: string}
|
||||
*/
|
||||
private function auditNpm(string $lockPath): array
|
||||
{
|
||||
if ($this->isEmptyLock($lockPath, ['packages', 'dependencies'])) {
|
||||
return $this->emptyLock($lockPath, 'npm');
|
||||
}
|
||||
|
||||
$dir = dirname($lockPath);
|
||||
$process = $this->runProcess(['npm', 'audit', '--omit=dev', '--json'], $dir);
|
||||
$decoded = json_decode($process['output'], true);
|
||||
|
||||
if (! is_array($decoded) || ! isset($decoded['metadata']['vulnerabilities'])) {
|
||||
return $this->unmeasurable($lockPath, 'npm', trim($process['error']) ?: 'npm audit 출력을 해석할 수 없습니다.');
|
||||
}
|
||||
|
||||
$severities = array_filter(
|
||||
array_map('intval', $decoded['metadata']['vulnerabilities']),
|
||||
static fn (int $count, string $key): bool => $count > 0 && $key !== 'total',
|
||||
ARRAY_FILTER_USE_BOTH
|
||||
);
|
||||
$total = (int) ($decoded['metadata']['vulnerabilities']['total'] ?? 0);
|
||||
|
||||
return [
|
||||
'target' => $this->relative($lockPath),
|
||||
'kind' => 'npm',
|
||||
'status' => $total > 0 ? 'vulnerable' : 'clean',
|
||||
'advisories' => $total,
|
||||
'severities' => $severities,
|
||||
'detail' => $total > 0 ? implode(', ', array_keys($decoded['vulnerabilities'] ?? [])) : '',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* composer 잠금파일 하나를 감사합니다.
|
||||
*
|
||||
* @param string $lockPath 잠금파일 절대 경로
|
||||
* @return array{target: string, kind: string, status: string, advisories: int, severities: array<string,int>, detail: string}
|
||||
*/
|
||||
private function auditComposer(string $lockPath): array
|
||||
{
|
||||
if ($this->isEmptyLock($lockPath, ['packages', 'packages-dev'])) {
|
||||
return $this->emptyLock($lockPath, 'composer');
|
||||
}
|
||||
|
||||
$dir = dirname($lockPath);
|
||||
$process = $this->runProcess(['composer', 'audit', '--locked', '--no-dev', '--format=json'], $dir);
|
||||
$decoded = json_decode($this->firstJsonObject($process['output']), true);
|
||||
|
||||
if (! is_array($decoded) || ! array_key_exists('advisories', $decoded)) {
|
||||
return $this->unmeasurable($lockPath, 'composer', trim($process['error']) ?: 'composer audit 출력을 해석할 수 없습니다.');
|
||||
}
|
||||
|
||||
$severities = [];
|
||||
$total = 0;
|
||||
|
||||
foreach ($decoded['advisories'] as $advisories) {
|
||||
foreach ((array) $advisories as $advisory) {
|
||||
$total++;
|
||||
$severity = (string) ($advisory['severity'] ?? 'unknown');
|
||||
$severities[$severity] = ($severities[$severity] ?? 0) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'target' => $this->relative($lockPath),
|
||||
'kind' => 'composer',
|
||||
'status' => $total > 0 ? 'vulnerable' : 'clean',
|
||||
'advisories' => $total,
|
||||
'severities' => $severities,
|
||||
'detail' => $total > 0 ? implode(', ', array_keys($decoded['advisories'])) : '',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 잠금파일이 의존성을 하나도 담고 있지 않은지 판정합니다.
|
||||
*
|
||||
* 확장 대부분은 composer 의존성이 없어 빈 잠금을 갖는다. 그 상태에서 감사 도구는
|
||||
* "설치본이 없다" 는 오류를 내는데, 그것을 점검 불가로 세면 조치할 것이 없는 대상이
|
||||
* 24건씩 경고로 쌓여 진짜 점검 불가를 가린다.
|
||||
*
|
||||
* @param string $lockPath 잠금파일 절대 경로
|
||||
* @param array<int, string> $keys 의존성이 담기는 최상위 키
|
||||
* @return bool
|
||||
*/
|
||||
private function isEmptyLock(string $lockPath, array $keys): bool
|
||||
{
|
||||
$decoded = json_decode((string) @file_get_contents($lockPath), true);
|
||||
|
||||
if (! is_array($decoded)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($keys as $key) {
|
||||
$entries = $decoded[$key] ?? [];
|
||||
|
||||
if (! is_array($entries)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// npm 잠금의 `packages` 는 루트 자신을 빈 문자열 키로 항상 담는다 — 그것만 있으면
|
||||
// 빈 것이다. composer 잠금의 `packages` 는 리스트라 키가 정수이므로 건드리지 않는다.
|
||||
$meaningful = array_filter(
|
||||
array_keys($entries),
|
||||
static fn ($name): bool => $name !== ''
|
||||
);
|
||||
|
||||
if ($meaningful !== []) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 의존성이 없는 잠금파일을 기록합니다.
|
||||
*
|
||||
* @param string $lockPath 잠금파일 절대 경로
|
||||
* @param string $kind npm|composer
|
||||
* @return array{target: string, kind: string, status: string, advisories: int, severities: array<string,int>, detail: string}
|
||||
*/
|
||||
private function emptyLock(string $lockPath, string $kind): array
|
||||
{
|
||||
return [
|
||||
'target' => $this->relative($lockPath),
|
||||
'kind' => $kind,
|
||||
'status' => 'empty',
|
||||
'advisories' => 0,
|
||||
'severities' => [],
|
||||
'detail' => '의존성 없음',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 감사 도구를 실행할 수 없었던 대상을 기록합니다.
|
||||
*
|
||||
* "점검 불가" 는 "취약점 없음" 과 다르다 — 뭉뚱그리면 운영자가 정상으로 읽는다.
|
||||
*
|
||||
* @param string $lockPath 잠금파일 절대 경로
|
||||
* @param string $kind npm|composer
|
||||
* @param string $reason 사유
|
||||
* @return array{target: string, kind: string, status: string, advisories: int, severities: array<string,int>, detail: string}
|
||||
*/
|
||||
private function unmeasurable(string $lockPath, string $kind, string $reason): array
|
||||
{
|
||||
return [
|
||||
'target' => $this->relative($lockPath),
|
||||
'kind' => $kind,
|
||||
'status' => 'unmeasurable',
|
||||
'advisories' => 0,
|
||||
'severities' => [],
|
||||
'detail' => mb_substr($reason, 0, 200),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 외부 명령을 실행합니다 ( 과 충돌하지 않도록 이름을 분리).
|
||||
*
|
||||
* @param array<int, string> $command 명령과 인자
|
||||
* @param string $cwd 작업 디렉토리
|
||||
* @return array{output: string, error: string, exit: int}
|
||||
*/
|
||||
private function runProcess(array $command, string $cwd): array
|
||||
{
|
||||
$process = new Process($command, $cwd, null, null, self::PROCESS_TIMEOUT);
|
||||
|
||||
try {
|
||||
$process->run();
|
||||
} catch (\Throwable $e) {
|
||||
return ['output' => '', 'error' => $e->getMessage(), 'exit' => -1];
|
||||
}
|
||||
|
||||
return [
|
||||
'output' => $process->getOutput(),
|
||||
'error' => $process->getErrorOutput(),
|
||||
'exit' => (int) $process->getExitCode(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 앞쪽 잡음을 걷어내고 첫 JSON 객체만 남깁니다.
|
||||
*
|
||||
* composer 는 오토로드 경고를 표준출력에 함께 흘릴 수 있다.
|
||||
*
|
||||
* @param string $output 명령 출력
|
||||
* @return string JSON 문자열 (없으면 빈 문자열)
|
||||
*/
|
||||
private function firstJsonObject(string $output): string
|
||||
{
|
||||
$start = strpos($output, '{');
|
||||
|
||||
return $start === false ? '' : substr($output, $start);
|
||||
}
|
||||
|
||||
/**
|
||||
* 동봉 제3자 자산의 버전 디렉토리를 나열합니다.
|
||||
*
|
||||
* 감사 도구가 원리상 볼 수 없는 축이므로 판정하지 않고 노출만 한다.
|
||||
*
|
||||
* @return array<int, array{extension: string, library: string, versions: array<int, string>}>
|
||||
*/
|
||||
private function vendoredAssets(): array
|
||||
{
|
||||
$rows = [];
|
||||
|
||||
foreach (['templates', 'modules', 'plugins'] as $kind) {
|
||||
foreach ([$kind.'/*/dist/vendor', $kind.'/_bundled/*/dist/vendor'] as $pattern) {
|
||||
foreach ((array) glob(base_path($pattern), GLOB_ONLYDIR) as $vendorRoot) {
|
||||
foreach ((array) glob($vendorRoot.'/*', GLOB_ONLYDIR) as $libDir) {
|
||||
$versions = array_map(
|
||||
'basename',
|
||||
(array) glob($libDir.'/*', GLOB_ONLYDIR)
|
||||
);
|
||||
|
||||
$rows[] = [
|
||||
'extension' => $this->relative(dirname($vendorRoot, 2)),
|
||||
'library' => basename($libDir),
|
||||
'versions' => array_values($versions),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 결과 집계를 계산합니다.
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $results 감사 결과
|
||||
* @return array{checked: int, vulnerable: int, unmeasurable: int, advisories: int}
|
||||
*/
|
||||
private function totals(array $results): array
|
||||
{
|
||||
return [
|
||||
'checked' => count($results),
|
||||
'audited' => count(array_filter($results, static fn (array $r): bool => in_array($r['status'], ['clean', 'vulnerable'], true))),
|
||||
'empty' => count(array_filter($results, static fn (array $r): bool => $r['status'] === 'empty')),
|
||||
'vulnerable' => count(array_filter($results, static fn (array $r): bool => $r['status'] === 'vulnerable')),
|
||||
'unmeasurable' => count(array_filter($results, static fn (array $r): bool => $r['status'] === 'unmeasurable')),
|
||||
'advisories' => array_sum(array_column($results, 'advisories')),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 결과 표를 출력합니다.
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $results 감사 결과
|
||||
* @return void
|
||||
*/
|
||||
private function renderTable(array $results): void
|
||||
{
|
||||
$this->line('');
|
||||
$this->line('<options=bold>의존성 취약점 점검 (운영 의존성 기준)</>');
|
||||
$this->line('');
|
||||
|
||||
$rows = [];
|
||||
|
||||
foreach ($results as $result) {
|
||||
$severities = [];
|
||||
|
||||
foreach ($result['severities'] as $severity => $count) {
|
||||
$severities[] = $severity.' '.$count;
|
||||
}
|
||||
|
||||
$rows[] = [
|
||||
$result['kind'],
|
||||
$result['target'],
|
||||
match ($result['status']) {
|
||||
'clean' => '이상 없음',
|
||||
'empty' => '대상 없음',
|
||||
'vulnerable' => '취약',
|
||||
default => '점검 불가',
|
||||
},
|
||||
$result['advisories'] > 0 ? (string) $result['advisories'] : '-',
|
||||
$severities === [] ? ($result['detail'] !== '' ? mb_substr($result['detail'], 0, 60) : '-') : implode(', ', $severities),
|
||||
];
|
||||
}
|
||||
|
||||
$this->table(['종류', '대상', '상태', '건수', '내역'], $rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 동봉 자산 목록을 출력합니다.
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $vendored 동봉 자산 목록
|
||||
* @return void
|
||||
*/
|
||||
private function renderVendored(array $vendored): void
|
||||
{
|
||||
$this->line('');
|
||||
$this->line('<options=bold>동봉 제3자 자산 (감사 도구가 볼 수 없는 축 — 사람이 확인)</>');
|
||||
$this->line('');
|
||||
|
||||
if ($vendored === []) {
|
||||
$this->line(' (없음)');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->table(
|
||||
['확장', '라이브러리', '버전 디렉토리'],
|
||||
array_map(
|
||||
static fn (array $row): array => [
|
||||
$row['extension'],
|
||||
$row['library'],
|
||||
$row['versions'] === [] ? '(버전 디렉토리 없음)' : implode(', ', $row['versions']),
|
||||
],
|
||||
$vendored
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 저장소 상대 경로로 바꿉니다.
|
||||
*
|
||||
* @param string $path 절대 경로
|
||||
* @return string
|
||||
*/
|
||||
private function relative(string $path): string
|
||||
{
|
||||
$base = base_path().DIRECTORY_SEPARATOR;
|
||||
|
||||
return str_replace('\\', '/', str_starts_with($path, $base) ? substr($path, strlen($base)) : $path);
|
||||
}
|
||||
}
|
||||
Generated
+49
-49
@@ -1178,22 +1178,22 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.12.3",
|
||||
"version": "7.15.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3"
|
||||
"reference": "ee80339fd9177ba44c49cdb653ff02a4d1106b9a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9aa17bcdd777ee31df9fc83c337ca4ca2340def3",
|
||||
"reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee80339fd9177ba44c49cdb653ff02a4d1106b9a",
|
||||
"reference": "ee80339fd9177ba44c49cdb653ff02a4d1106b9a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^2.5",
|
||||
"guzzlehttp/psr7": "^2.12.3",
|
||||
"guzzlehttp/promises": "^2.5.3",
|
||||
"guzzlehttp/psr7": "^2.13.1",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
||||
@@ -1205,8 +1205,8 @@
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"ext-curl": "*",
|
||||
"guzzle/client-integration-tests": "3.0.2",
|
||||
"guzzlehttp/test-server": "^0.5.1",
|
||||
"guzzle/client-integration-tests": "3.0.3",
|
||||
"guzzlehttp/test-server": "^0.7",
|
||||
"php-http/message-factory": "^1.1",
|
||||
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||
@@ -1286,7 +1286,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.12.3"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.15.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1302,20 +1302,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-06-23T15:29:02+00:00"
|
||||
"time": "2026-08-24T09:21:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.5.0",
|
||||
"version": "2.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "4360e982f87f5f258bf872d094647791db2f4c8e"
|
||||
"reference": "cde49999552d185d64715fe9c1f77a2aadd2f9f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/4360e982f87f5f258bf872d094647791db2f4c8e",
|
||||
"reference": "4360e982f87f5f258bf872d094647791db2f4c8e",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/cde49999552d185d64715fe9c1f77a2aadd2f9f1",
|
||||
"reference": "cde49999552d185d64715fe9c1f77a2aadd2f9f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1370,7 +1370,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.5.0"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1386,20 +1386,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-06-02T12:23:43+00:00"
|
||||
"time": "2026-08-24T09:11:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.12.3",
|
||||
"version": "2.13.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d"
|
||||
"reference": "95e7828100de18b4e269fb1703be530082d5166d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
|
||||
"reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/95e7828100de18b4e269fb1703be530082d5166d",
|
||||
"reference": "95e7828100de18b4e269fb1703be530082d5166d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1489,7 +1489,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.12.3"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.13.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1505,7 +1505,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-06-23T15:21:08+00:00"
|
||||
"time": "2026-08-24T09:13:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/uri-template",
|
||||
@@ -2277,16 +2277,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
"version": "2.8.2",
|
||||
"version": "2.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/commonmark.git",
|
||||
"reference": "59fb075d2101740c337c7216e3f32b36c204218b"
|
||||
"reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/59fb075d2101740c337c7216e3f32b36c204218b",
|
||||
"reference": "59fb075d2101740c337c7216e3f32b36c204218b",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d2d1aa8b35e072966c89bc0c66cf926e56767dc4",
|
||||
"reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2308,8 +2308,8 @@
|
||||
"github/gfm": "0.29.0",
|
||||
"michelf/php-markdown": "^1.4 || ^2.0",
|
||||
"nyholm/psr7": "^1.5",
|
||||
"phpstan/phpstan": "^1.8.2",
|
||||
"phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0",
|
||||
"phpstan/phpstan": "^2.0.0",
|
||||
"phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0 || ^12.0.0 || ^13.0.0",
|
||||
"scrutinizer/ocular": "^1.8.1",
|
||||
"symfony/finder": "^5.3 | ^6.0 | ^7.0 || ^8.0",
|
||||
"symfony/process": "^5.4 | ^6.0 | ^7.0 || ^8.0",
|
||||
@@ -2323,7 +2323,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.9-dev"
|
||||
"dev-main": "2.11-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2380,7 +2380,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-03-19T13:16:38+00:00"
|
||||
"time": "2026-08-11T16:06:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/config",
|
||||
@@ -3280,16 +3280,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
"version": "v1.3.5",
|
||||
"version": "v1.3.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/schema.git",
|
||||
"reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002"
|
||||
"reference": "c54350438cd6914616f790a49cb424605f421562"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002",
|
||||
"reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002",
|
||||
"url": "https://api.github.com/repos/nette/schema/zipball/c54350438cd6914616f790a49cb424605f421562",
|
||||
"reference": "c54350438cd6914616f790a49cb424605f421562",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3341,22 +3341,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/schema/issues",
|
||||
"source": "https://github.com/nette/schema/tree/v1.3.5"
|
||||
"source": "https://github.com/nette/schema/tree/v1.3.6"
|
||||
},
|
||||
"time": "2026-02-23T03:47:12+00:00"
|
||||
"time": "2026-08-16T21:58:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v4.1.4",
|
||||
"version": "v4.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7"
|
||||
"reference": "b043439dbdf954e6c28b5ea7e34b0100f83165e0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
|
||||
"reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/b043439dbdf954e6c28b5ea7e34b0100f83165e0",
|
||||
"reference": "b043439dbdf954e6c28b5ea7e34b0100f83165e0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3376,7 +3376,7 @@
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "to use Image",
|
||||
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
|
||||
"ext-iconv": "to use Strings::chr(), ord() and reverse()",
|
||||
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
|
||||
"ext-json": "to use Nette\\Utils\\Json",
|
||||
"ext-mbstring": "to use Strings::lower() etc...",
|
||||
@@ -3432,9 +3432,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v4.1.4"
|
||||
"source": "https://github.com/nette/utils/tree/v4.1.5"
|
||||
},
|
||||
"time": "2026-05-11T20:49:54+00:00"
|
||||
"time": "2026-07-17T23:02:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -5303,16 +5303,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v3.7.0",
|
||||
"version": "v3.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b"
|
||||
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b",
|
||||
"reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5350,7 +5350,7 @@
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5370,7 +5370,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-04-13T15:52:40+00:00"
|
||||
"time": "2026-06-05T06:23:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/error-handler",
|
||||
|
||||
Generated
+149
-77
@@ -523,12 +523,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@hono/node-server": {
|
||||
"version": "1.19.7",
|
||||
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.7.tgz",
|
||||
"integrity": "sha512-vUcD0uauS7EU2caukW8z5lJKtoGMokxNbJtBiwHgpqxEXokaHCBkQUmCHhjFB1VUTWdqj25QoMkMKzgjq+uhrw==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.1.tgz",
|
||||
"integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.14.1"
|
||||
"node": ">=20"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hono": "^4"
|
||||
@@ -820,12 +820,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk": {
|
||||
"version": "1.25.1",
|
||||
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.1.tgz",
|
||||
"integrity": "sha512-yO28oVFFC7EBoiKdAn+VqRm+plcfv4v0xp6osG/VsCB0NlPZWi87ajbCZZ8f/RvOFLEu7//rSRmuZZ7lMoe3gQ==",
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz",
|
||||
"integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hono/node-server": "^1.19.7",
|
||||
"@hono/node-server": "^1.19.9 || ^2.0.5",
|
||||
"ajv": "^8.17.1",
|
||||
"ajv-formats": "^3.0.1",
|
||||
"content-type": "^1.0.5",
|
||||
@@ -833,14 +833,15 @@
|
||||
"cross-spawn": "^7.0.5",
|
||||
"eventsource": "^3.0.2",
|
||||
"eventsource-parser": "^3.0.0",
|
||||
"express": "^5.0.1",
|
||||
"express-rate-limit": "^7.5.0",
|
||||
"jose": "^6.1.1",
|
||||
"express": "^5.2.1",
|
||||
"express-rate-limit": "^8.2.1",
|
||||
"hono": "^4.11.4",
|
||||
"jose": "^6.1.3",
|
||||
"json-schema-typed": "^8.0.2",
|
||||
"pkce-challenge": "^5.0.0",
|
||||
"raw-body": "^3.0.0",
|
||||
"zod": "^3.25 || ^4.0",
|
||||
"zod-to-json-schema": "^3.25.0"
|
||||
"zod-to-json-schema": "^3.25.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -900,9 +901,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
|
||||
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
|
||||
"version": "8.20.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
|
||||
"integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
@@ -962,20 +963,20 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
|
||||
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
|
||||
"integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "^3.1.2",
|
||||
"content-type": "^1.0.5",
|
||||
"content-type": "^2.0.0",
|
||||
"debug": "^4.4.3",
|
||||
"http-errors": "^2.0.0",
|
||||
"iconv-lite": "^0.7.0",
|
||||
"http-errors": "^2.0.1",
|
||||
"iconv-lite": "^0.7.2",
|
||||
"on-finished": "^2.4.1",
|
||||
"qs": "^6.14.0",
|
||||
"raw-body": "^3.0.1",
|
||||
"type-is": "^2.0.1"
|
||||
"qs": "^6.15.2",
|
||||
"raw-body": "^3.0.2",
|
||||
"type-is": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -985,6 +986,19 @@
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/content-type": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
|
||||
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
|
||||
@@ -1054,9 +1068,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/content-disposition": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
|
||||
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
|
||||
"integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -1224,9 +1238,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
|
||||
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
@@ -1375,10 +1389,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/express-rate-limit": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz",
|
||||
"integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==",
|
||||
"version": "8.6.2",
|
||||
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.6.2.tgz",
|
||||
"integrity": "sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.4.3",
|
||||
"ip-address": "^10.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
@@ -1408,9 +1426,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-uri": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
|
||||
"integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
|
||||
"version": "3.1.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.6.tgz",
|
||||
"integrity": "sha512-7Ical1vFEMr0onbVzEDIreM22I4khW+fzyQPwvAFWBp1iwdshSZRsL4jjRvPG9JP1uiqMHRto+YU6R2/CzDz5Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
@@ -1561,9 +1579,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
|
||||
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
@@ -1579,11 +1597,10 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/hono": {
|
||||
"version": "4.11.3",
|
||||
"resolved": "https://registry.npmjs.org/hono/-/hono-4.11.3.tgz",
|
||||
"integrity": "sha512-PmQi306+M/ct/m5s66Hrg+adPnkD5jiO6IjA7WhWw0gSBSo1EcRegwuI1deZ+wd5pzCGynCcn2DprnE4/yEV4w==",
|
||||
"version": "4.13.5",
|
||||
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.5.tgz",
|
||||
"integrity": "sha512-O6+/eCYRkzzzy0rPWwKLiGBR1nFuUPZynnwjxN1MBA62NNqbT0wQEzQyK2gSO5yDIDB336sXQleAhOHrzlYyKw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
}
|
||||
@@ -1609,9 +1626,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz",
|
||||
"integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz",
|
||||
"integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
@@ -1650,6 +1667,15 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ip-address": {
|
||||
"version": "10.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.5.0.tgz",
|
||||
"integrity": "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||
@@ -1724,12 +1750,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
||||
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz",
|
||||
"integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
@@ -1785,12 +1815,32 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
|
||||
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz",
|
||||
"integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"content-type": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/negotiator/node_modules/content-type": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
|
||||
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
@@ -1863,9 +1913,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
||||
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
||||
"version": "8.4.2",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
|
||||
"integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -1992,12 +2042,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.14.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||
"version": "6.15.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
|
||||
"integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
"es-define-property": "^1.0.1",
|
||||
"side-channel": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
@@ -2013,12 +2064,16 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz",
|
||||
"integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
@@ -2210,14 +2265,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
|
||||
"integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"object-inspect": "^1.13.4",
|
||||
"side-channel-list": "^1.0.1",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
@@ -2229,13 +2284,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-list": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
||||
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
|
||||
"integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3"
|
||||
"object-inspect": "^1.13.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2374,17 +2429,34 @@
|
||||
}
|
||||
},
|
||||
"node_modules/type-is": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
||||
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
|
||||
"integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"content-type": "^1.0.5",
|
||||
"content-type": "^2.0.0",
|
||||
"media-typer": "^1.1.0",
|
||||
"mime-types": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
"node": ">= 18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/type-is/node_modules/content-type": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
|
||||
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
|
||||
@@ -299,6 +299,23 @@ php artisan g7:bench --profile=sirsoft-ecommerce/orders --json # 기계 판독
|
||||
php artisan g7:bench --profile=sirsoft-ecommerce/order_create --allow-write
|
||||
```
|
||||
|
||||
### 의존성 취약점 점검 Artisan 커맨드
|
||||
|
||||
```bash
|
||||
# 저장소의 모든 잠금파일(npm·composer) 운영 의존성 취약점 전수 점검.
|
||||
# 루트만 감사하면 확장 전부가 사각이 되므로 하위 잠금파일까지 순회한다.
|
||||
php artisan security:audit-dependencies # 전체 (npm + composer)
|
||||
php artisan security:audit-dependencies --npm-only # npm 잠금파일만
|
||||
php artisan security:audit-dependencies --composer-only # composer 잠금파일만
|
||||
php artisan security:audit-dependencies --json # 기계 판독용
|
||||
```
|
||||
|
||||
취약점이 발견되면 **비-0 으로 종료**한다. 이는 실행 실패가 아니라 조치 대상이 있다는 신호다.
|
||||
|
||||
출력의 "대상 없음" 은 의존성이 없는 잠금파일이고, "점검 불가" 는 감사 도구가 실행되지 않은 것이다 — 후자는 "취약점 없음" 과 다르다.
|
||||
|
||||
동봉(vendored) 제3자 자산은 어떤 잠금파일에도 없어 감사 도구가 원리상 볼 수 없다. 그 축은 판정하지 않고 목록으로 함께 출력하므로 사람이 확인한다.
|
||||
|
||||
### API 문서 Artisan 커맨드
|
||||
|
||||
```bash
|
||||
|
||||
@@ -306,6 +306,27 @@ Composer 설치 방식을 선택할 때만 필요하다.
|
||||
|
||||
---
|
||||
|
||||
### 5.2 의존성 보안 버전
|
||||
|
||||
의존성 취약점은 `php artisan security:audit-dependencies` 로 전수 점검한다. 저장소의 모든
|
||||
잠금파일(npm · composer)을 순회하며, 취약점이 있으면 비-0 으로 종료한다.
|
||||
|
||||
메이저 상향을 보류한 패키지는 사유와 **최소 보안 버전**을 아래에 남긴다. 기록 없는 보류는
|
||||
그 지점이 잊히는 것과 같다.
|
||||
|
||||
| 패키지 | 현재 | 보류 사유 | 최소 보안 버전 |
|
||||
|---|---|---|---|
|
||||
| `guzzlehttp/guzzle` | 7.15.x | 8.x 는 `aws/aws-sdk-php` · `laravel/framework` · `pusher/pusher-php-server` 의 제약이 막는다. 상위 패키지가 8.x 를 지원하기 전에는 올릴 수 없다 | **7.15.2** |
|
||||
| `ckeditor5` | 43.3.1 | 다섯 개 메이저를 건너뛰는 상향이라 초기화 설정·툴바 재구성과 글쓰기/이미지 업로드 전 경로 재검수를 수반한다. 별도 작업으로 분리한다. CDN 의존은 이미 자체 서빙으로 해소되어 있다 | 상향 작업에서 확정 |
|
||||
| `monaco-editor` 내장 `dompurify` | 3.4.8 | monaco 가 자기 배포 번들에 정화기를 인라인하므로 소비자가 버전을 고를 수 없다. 배포된 최신본(0.56.0)이 담은 것이 3.4.8 이다. 상류가 새 정화기를 담은 판을 내면 함께 올린다 | **3.4.13** (상류 대기) |
|
||||
| `vite` (확장 빌드 툴체인) | 5.4.x | 8.x 는 메이저 상향이며 확장 스물넷의 빌드 설정을 동시에 옮겨야 한다. 빌드 도구라 배포 산출물에 실리지 않아 최종 사용자 노출면이 없다 | **8.2.2** |
|
||||
| `vitest` (확장 테스트 툴체인) | 2.1.x | 4.x 는 메이저 상향이며 테스트 API 변경으로 확장 열여덟의 테스트를 동시에 손봐야 한다. 테스트 실행기 전용이라 배포·런타임 노출면이 없다 | **4.1.11** |
|
||||
|
||||
동봉(vendored) 제3자 자산은 어떤 잠금파일에도 없어 감사 도구가 원리상 볼 수 없다. 점검
|
||||
명령이 그 목록을 함께 출력하므로 사람이 확인한다.
|
||||
|
||||
---
|
||||
|
||||
## 6. 프로덕션 데몬 프로세스
|
||||
|
||||
프로덕션 환경에서 상시 실행해야 하는 프로세스:
|
||||
|
||||
Generated
+139
-165
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "dev-g7",
|
||||
"name": "g7_2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -8,7 +8,10 @@
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"axios": "^1.20.0",
|
||||
"immer": "^11.1.3",
|
||||
"laravel-echo": "^2.2.6",
|
||||
"pusher-js": "^8.4.0-rc2",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"zustand": "^5.0.9"
|
||||
@@ -24,13 +27,10 @@
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"@vitejs/plugin-react": "^5.1.0",
|
||||
"@vitest/ui": "^4.1.8",
|
||||
"axios": "^1.11.0",
|
||||
"concurrently": "^9.0.1",
|
||||
"happy-dom": "^20.0.10",
|
||||
"jsdom": "^27.1.0",
|
||||
"laravel-echo": "^2.2.6",
|
||||
"laravel-vite-plugin": "^2.0.0",
|
||||
"pusher-js": "^8.4.0-rc2",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"vite": "^7.0.4",
|
||||
"vitest": "^4.1.8"
|
||||
@@ -1424,7 +1424,6 @@
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
||||
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
@@ -1658,6 +1657,66 @@
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": {
|
||||
"version": "1.5.0",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.1.0",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": {
|
||||
"version": "1.5.0",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.1.0",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
|
||||
"version": "1.0.7",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/core": "^1.5.0",
|
||||
"@emnapi/runtime": "^1.5.0",
|
||||
"@tybys/wasm-util": "^0.10.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": {
|
||||
"version": "0.10.1",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "0BSD",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
|
||||
"version": "4.1.16",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.16.tgz",
|
||||
@@ -2128,19 +2187,43 @@
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
|
||||
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
|
||||
"dev": true,
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz",
|
||||
"integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.4",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
"follow-redirects": "^1.16.0",
|
||||
"form-data": "^4.0.6",
|
||||
"https-proxy-agent": "^5.0.1",
|
||||
"proxy-from-env": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/axios/node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/axios/node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
@@ -2201,7 +2284,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -2311,7 +2393,6 @@
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
@@ -2423,7 +2504,6 @@
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
@@ -2448,7 +2528,6 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
@@ -2486,7 +2565,6 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
@@ -2512,67 +2590,23 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/engine.io-client": {
|
||||
"version": "6.6.3",
|
||||
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz",
|
||||
"integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==",
|
||||
"dev": true,
|
||||
"version": "6.6.6",
|
||||
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.6.tgz",
|
||||
"integrity": "sha512-iY6QdftLQ9pyiPoX082bpf/u1UewnOaJrtJIF9T0++QB34lZrj0uP+Q/bj8AlUsAxqhnkTV2BS8SBZSxOmoV5Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@socket.io/component-emitter": "~3.1.0",
|
||||
"debug": "~4.3.1",
|
||||
"debug": "~4.4.1",
|
||||
"engine.io-parser": "~5.2.1",
|
||||
"ws": "~8.17.1",
|
||||
"ws": "~8.21.0",
|
||||
"xmlhttprequest-ssl": "~2.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/engine.io-client/node_modules/debug": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
||||
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/engine.io-client/node_modules/ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/engine.io-parser": {
|
||||
"version": "5.2.3",
|
||||
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
||||
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
@@ -2610,7 +2644,6 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2620,7 +2653,6 @@
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2634,10 +2666,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"dev": true,
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
|
||||
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
@@ -2650,7 +2681,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
||||
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -2767,10 +2797,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.11",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
|
||||
"integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
|
||||
"dev": true,
|
||||
"version": "1.16.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
|
||||
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -2788,17 +2817,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
|
||||
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
|
||||
"dev": true,
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
|
||||
"integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"es-set-tostringtag": "^2.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"mime-types": "^2.1.12"
|
||||
"hasown": "^2.0.4",
|
||||
"mime-types": "^2.1.35"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
@@ -2823,7 +2851,6 @@
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -2853,7 +2880,6 @@
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
@@ -2878,7 +2904,6 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
@@ -2892,7 +2917,6 @@
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2937,7 +2961,6 @@
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2950,7 +2973,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
@@ -2963,10 +2985,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
|
||||
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
@@ -3160,10 +3181,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-echo": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/laravel-echo/-/laravel-echo-2.2.6.tgz",
|
||||
"integrity": "sha512-KuCldOrE8qbm0CVDBgc6FiX3VuReDu1C1xaS891KqwEUg9NT/Op03iiZqTWeVd0/WJ4H95q2pe9QEDJlwb/FPw==",
|
||||
"dev": true,
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/laravel-echo/-/laravel-echo-2.3.4.tgz",
|
||||
"integrity": "sha512-rpALCIK1uw2SrttcK9P5JzItt5I85RcfXQKUNnkcorzhtKeXi5GS0PVFFBH8ppNo8wnbdBKuD1EtIHgTbXo9FQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
@@ -3489,7 +3509,6 @@
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -3506,7 +3525,6 @@
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
@@ -3516,7 +3534,6 @@
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
@@ -3549,7 +3566,6 @@
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
@@ -3736,11 +3752,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
|
||||
"integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
@@ -3753,10 +3771,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pusher-js": {
|
||||
"version": "8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-8.4.0.tgz",
|
||||
"integrity": "sha512-wp3HqIIUc1GRyu1XrP6m2dgyE9MoCsXVsWNlohj0rjSkLf+a0jLvEyVubdg58oMk7bhjBWnFClgp8jfAa6Ak4Q==",
|
||||
"dev": true,
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-8.5.0.tgz",
|
||||
"integrity": "sha512-V7uzGi9bqOOOyM/6IkJdpFyjGZj7llz1v0oWnYkZKcYLvbz6VcHVLmzKqkvegjuMumpfIEKGLmWHwFb39XFCpw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tweetnacl": "^1.0.3"
|
||||
@@ -3766,7 +3783,6 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
|
||||
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==",
|
||||
"dev": true,
|
||||
"license": "Unlicense"
|
||||
},
|
||||
"node_modules/react": {
|
||||
@@ -3966,15 +3982,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/socket.io-client": {
|
||||
"version": "4.8.1",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz",
|
||||
"integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==",
|
||||
"dev": true,
|
||||
"version": "4.8.3",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz",
|
||||
"integrity": "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@socket.io/component-emitter": "~3.1.0",
|
||||
"debug": "~4.3.2",
|
||||
"debug": "~4.4.1",
|
||||
"engine.io-client": "~6.6.1",
|
||||
"socket.io-parser": "~4.2.4"
|
||||
},
|
||||
@@ -3982,59 +3997,20 @@
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/socket.io-client/node_modules/debug": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
||||
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/socket.io-parser": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
||||
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
||||
"dev": true,
|
||||
"version": "4.2.7",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.7.tgz",
|
||||
"integrity": "sha512-IH/iSeO9T6gz1KkFleGDWkG9N3dl4jXVYUtMhIqH10Md0ttMer8nUNWiP1DKuNrybD2xBrixLJdCC9J6ECoYkg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@socket.io/component-emitter": "~3.1.0",
|
||||
"debug": "~4.3.1"
|
||||
"debug": "~4.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/socket.io-parser/node_modules/debug": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
||||
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
@@ -4583,10 +4559,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.18.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
||||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
"dev": true,
|
||||
"version": "8.21.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz",
|
||||
"integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
@@ -4625,7 +4600,6 @@
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz",
|
||||
"integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
|
||||
+3
-3
@@ -32,13 +32,10 @@
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"@vitejs/plugin-react": "^5.1.0",
|
||||
"@vitest/ui": "^4.1.8",
|
||||
"axios": "^1.11.0",
|
||||
"concurrently": "^9.0.1",
|
||||
"happy-dom": "^20.0.10",
|
||||
"jsdom": "^27.1.0",
|
||||
"laravel-echo": "^2.2.6",
|
||||
"laravel-vite-plugin": "^2.0.0",
|
||||
"pusher-js": "^8.4.0-rc2",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"vite": "^7.0.4",
|
||||
"vitest": "^4.1.8"
|
||||
@@ -47,7 +44,10 @@
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"axios": "^1.20.0",
|
||||
"immer": "^11.1.3",
|
||||
"laravel-echo": "^2.2.6",
|
||||
"pusher-js": "^8.4.0-rc2",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"zustand": "^5.0.9"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
function ze(e,t){return function(){return e.apply(t,arguments)}}const{toString:ht}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:re,toStringTag:Je}=Symbol,se=(e=>t=>{const n=ht.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>se(t)===e),oe=e=>t=>typeof t===e,{isArray:M}=Array,I=oe("undefined");function V(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ve=P("ArrayBuffer");function mt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ve(e.buffer),t}const yt=oe("string"),T=oe("function"),We=oe("number"),W=e=>e!==null&&typeof e=="object",bt=e=>e===!0||e===!1,Y=e=>{if(se(e)!=="object")return!1;const t=we(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Je in e)&&!(re in e)},wt=e=>{if(!W(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Et=P("Date"),gt=P("File"),Rt=P("Blob"),St=P("FileList"),Ot=e=>W(e)&&T(e.pipe),Tt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=se(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},At=P("URLSearchParams"),[xt,Ct,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(P),Ft=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(V(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ke(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const D=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ve=e=>!I(e)&&e!==D;function pe(){const{caseless:e,skipUndefined:t}=ve(this)&&this||{},n={},r=(s,i)=>{const o=e&&Ke(n,i)||i;Y(n[o])&&Y(s)?n[o]=pe(n[o],s):Y(s)?n[o]=pe({},s):M(s)?n[o]=s.slice():(!t||!I(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&K(arguments[s],r);return n}const _t=(e,t,n,{allOwnKeys:r}={})=>(K(t,(s,i)=>{n&&T(s)?e[i]=ze(s,n):e[i]=s},{allOwnKeys:r}),e),Ut=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Bt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&we(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Dt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!We(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&we(Uint8Array)),qt=(e,t)=>{const r=(e&&e[re]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Ht=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},It=P("HTMLFormElement"),Mt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$t=P("RegExp"),Xe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};K(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},zt=e=>{Xe(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Jt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return M(e)?r(e):r(String(e).split(t)),n},Vt=()=>{},Wt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kt(e){return!!(e&&T(e.append)&&e[Je]==="FormData"&&e[re])}const vt=e=>{const t=new Array(10),n=(r,s)=>{if(W(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=M(r)?[]:{};return K(r,(o,c)=>{const d=n(o,s+1);!I(d)&&(i[c]=d)}),t[s]=void 0,i}}return r};return n(e,0)},Xt=P("AsyncFunction"),Gt=e=>e&&(W(e)||T(e))&&T(e.then)&&T(e.catch),Ge=((e,t)=>e?setImmediate:t?((n,r)=>(D.addEventListener("message",({source:s,data:i})=>{s===D&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),D.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(D.postMessage)),Qt=typeof queueMicrotask<"u"?queueMicrotask.bind(D):typeof process<"u"&&process.nextTick||Ge,Zt=e=>e!=null&&T(e[re]),a={isArray:M,isArrayBuffer:Ve,isBuffer:V,isFormData:Tt,isArrayBufferView:mt,isString:yt,isNumber:We,isBoolean:bt,isObject:W,isPlainObject:Y,Line truncated
|
||||
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&yn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_e=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(ee):String(e)}function wn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const En=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ue(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function gn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Rn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let A=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,d,f){const l=J(d);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=ee(c))}const o=(c,d)=>a.forEach(c,(f,l)=>i(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!En(t))o(bn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return wn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=J(o),o){const c=a.findKey(r,o);c&&(!n||ue(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ue(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=ee(s),delete n[i];return}const c=t?gn(i):String(i).trim();c!==i&&delete n[i],n[c]=ee(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[_e]=this[_e]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=J(o);r[c]||(Rn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(A);function fe(e,t){const n=this||v,r=t||n,s=A.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function st(e){return!!(e&&e.__CANCEL__)}function $(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits($,y,{__CANCEL__:!0});function ot(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Sn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function On(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[i];o||(o=f),n[s]=d,r[s]=f;let h=i,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o<t)return;const R=l&&f-l;return R?Math.round(b*1e3/R):void 0}}function Tn(e,t){let n=0,r=1e3/t,s,i;const o=(f,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const l=Date.now(),h=l-n;h>=r?o(f,l):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const ne=(e,t,n=3)=>{let r=0;const s=On(50,250);return Tn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-r,f=s(d),l=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-o)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Ue=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Le=e=>(...t)=>a.asap(()=>e(...t)),An=S.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,S.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,xn=S.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Cn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function it(e,t,n){let r=!Cn(t);return e&&(r||n==!1)?Nn(e,t):t}const Be=e=>e instanceof A?{...e}:e;function q(e,t){t=t||{};const n={};function r(f,l,h,b){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:b},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(f,l,h,b){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,l,h,b)}function i(f,l){if(!a.isUndefined(l))return r(void 0,l)}function o(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function c(f,l,h){if(h in t)return r(f,l);if(h in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(f,l,h)=>s(Be(f),Be(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){const h=d[l]||s,b=h(e[l],t[l],l);a.isUndefined(b)&&h!==c||(n[l]=b)}),n}const at=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=A.from(o),t.url=tt(it(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,h])=>{f.includes(l.toLowerCase())&&o.set(l,h)})}}if(S.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&An(t.url))){const d=s&&i&&xn.read(i);d
Line truncated
|
||||
`+o.map(Ie).join(`
|
||||
`):" "+Ie(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s},adapters:ye};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $(null,e)}function Me(e){return de(e),e.headers=A.from(e.headers),e.data=fe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lt.getAdapter(e.adapter||v.adapter,e)(e).then(function(r){return de(e),r.data=fe.call(e,e.transformResponse,r),r.headers=A.from(r.headers),r},function(r){return st(r)||(de(e),r&&r.response&&(r.response.data=fe.call(e,e.transformResponse,r.response),r.response.headers=A.from(r.response.headers))),Promise.reject(r)})}const ut="1.12.2",ae={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $e={};ae.transitional=function(t,n,r){function s(i,o){return"[Axios v"+ut+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!$e[o]&&($e[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ae.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Hn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],d=c===void 0||o(c,i,e);if(d!==!0)throw new y("option "+i+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const te={assertOptions:Hn,validators:ae},_=te.validators;let j=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Fe,response:new Fe}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||||
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:_.spelling("baseURL"),withXsrfToken:_.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=A.concat(o,i);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[Me.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h<b;)l=l.then(u[h++],u[h++]);return l}b=c.length;let R=n;for(;h<b;){const u=c[h++],m=c[h++];try{R=u(R)}catch(p){m.call(this,p);break}}try{l=Me.call(this,R)}catch(u){return Promise.reject(u)}for(h=0,b=f.length;h<b;)l=l.then(f[h++],f[h++]);return l}getUri(t){t=q(this.defaults,t);const n=it(t.baseURL,t.url,t.allowAbsoluteUrls);return tt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){j.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}j.prototype[t]=n(),j.prototype[t+"Form"]=n(!0)});let In=class ft{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new $(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ft(function(s){t=s}),cancel:t}}};function Mn(e){return function(n){return e.apply(null,n)}}function $n(e){return a.isObject(e)&&e.isAxiosError===!0}const be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(be).forEach(([e,t])=>{be[t]=e});function dt(e){const t=new j(e),n=ze(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return dt(q(e,s))},n}const w=dt(v);w.Axios=j;w.CanceledError=$;w.CancelToken=In;w.isCancel=st;w.VERSION=ut;w.toFormData=ie;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=Mn;w.isAxiosError=$n;w.mergeConfig=q;w.AxiosHeaders=A;w.formToJSON=e=>rt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=lt.getAdapter;w.HttpStatusCode=be;w.default=w;const{Axios:Vn,AxiosError:Wn,CanceledError:Kn,isCancel:vn
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
/*! tailwindcss v4.1.16 | 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-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Instrument Sans",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(8Line truncated
|
||||
@@ -0,0 +1,9 @@
|
||||
function Ot(e,t){return function(){return e.apply(t,arguments)}}const{toString:rn}=Object.prototype,{getPrototypeOf:v}=Object,{iterator:he,toStringTag:St}=Symbol,de=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_t=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),At=(e,t,n)=>e===Object.prototype||!n&&t===null,sn=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(_t(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},pe=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const s=v(n);if(At(n,s,n===e))return!1;if(de(n,t))return!0;n=s}return!1},on=(e,t)=>e!=null&&pe(e,t)?e[t]:void 0,an=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=v(e);if(t===null&&sn(e))return e;const n=Object.create(null),r=Object.create(null),s=[];let o=e;for(;o!=null&&s.indexOf(o)===-1;){s.push(o);const i=o===e?t:v(o);if(At(o,i,o===e))break;const c=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(o));for(const l of c)_t(l)||de(r,l)||(n[l]=e[l],r[l]=!0);o=i}return n},We=(e=>t=>{const n=rn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),j=e=>(e=e.toLowerCase(),t=>We(t)===e),xe=e=>t=>typeof t===e,{isArray:Y}=Array,ee=xe("undefined");function se(e){return e!==null&&!ee(e)&&e.constructor!==null&&!ee(e.constructor)&&F(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pt=j("ArrayBuffer");function cn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pt(e.buffer),t}const ln=xe("string"),F=xe("function"),Tt=xe("number"),oe=e=>e!==null&&typeof e=="object",un=e=>e===!0||e===!1,Oe=e=>{if(!oe(e))return!1;const t=v(e);return(t===null||t===Object.prototype||v(t)===null)&&!pe(e,St)&&!pe(e,he)},fn=e=>{if(!oe(e)||se(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dn=j("Date"),pn=j("File"),hn=e=>!!(e&&typeof e.uri<"u"),mn=e=>e&&typeof e.getParts<"u",yn=j("Blob"),bn=j("FileList"),wn=j("Set"),gn=e=>oe(e)&&F(e.pipe);function En(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const nt=En(),rt=typeof nt.FormData<"u"?nt.FormData:void 0,Rn=e=>{if(!e)return!1;if(rt&&e instanceof rt)return!0;const t=v(e);if(!t||t===Object.prototype||!F(e.append))return!1;const n=We(e);return n==="formdata"||n==="object"&&F(e.toString)&&e.toString()==="[object FormData]"},On=j("URLSearchParams"),[Sn,_n,An,Pn]=["ReadableStream","Request","Response","Headers"].map(j),Tn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function me(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Y(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(se(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function xt(e,t){if(se(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=e=>!ee(e)&&e!==Q;function Me(...e){const{caseless:t,skipUndefined:n}=Ct(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&xt(r,i)||i,l=de(r,c)?r[c]:void 0;Oe(l)&&Oe(o)?r[c]=Me(l,o):Oe(o)?r[c]=Me({},o):Y(o)?r[c]=o.slice():(!n||!ee(o))&&(r[c]=o)};for(let o=0,i=e.length;o<i;o++){const c=e[o];if(!c||se(c)||(me(c,s),typeof c!="object"||Y(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let d=0;d<l.length;d++){const f=l[d];qn.call(c,f)&&s(c[f],f)}}return r}const xn=(e,t,n,{allOwnKeys:r}={})=>(me(t,(s,o)=>{n&&F(s)?Object.defineProperty(e,o,{__proto__:null,value:Ot(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Cn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Dn=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ln=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Un=e=>{if(!e)return null;if(Y(e))return e;let t=e.length;if(!Tt(t))return null;const n=new Array(t);for(;Line truncated
|
||||
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const c=a.hasOwnProp(t,n);!n||c&&a.hasOwnProp(Qn,n)||(n==="set-cookie"?c?t[n].push(r):t[n]=[r]:t[n]=c?t[n]+", "+r:r)}),t};function Yn(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const er=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),tr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ve(e,t){return a.isArray(e)?e.map(n=>Ve(n,t)):Yn(String(e).replace(t,""))}const nr=e=>Ve(e,er),rr=e=>Ve(e,tr);function Ut(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=rr(n)}),t}const st=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function Se(e){return e===!1||e==null?e:a.isArray(e)?e.map(Se):nr(String(e))}function sr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const or=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fe(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function ir(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const s=e.charCodeAt(r);if(s===34||s===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function ar(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(c){const l=Fe(n.slice(r,c)),d=l.indexOf("=");if(d<1)return;const f=Fe(l.slice(0,d));if(!or.test(f))return;const p=f.toLowerCase();if(p==="__proto__"||p==="constructor"||p==="prototype")return;const y=Fe(l.slice(d+1));t[p]=ir(y)}for(let c=0;c<n.length;c++){const l=n.charCodeAt(c);s?o?o=!1:l===92?o=!0:l===34&&(s=!1):l===34?s=!0:(l===44||l===59)&&(i(c),r=c+1)}return i(n.length),t}const cr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Be(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function lr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ur(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,d){const f=le(l);if(!f)return;const p=a.findKey(s,f);(!p||s[p]===void 0||d===!0||d===void 0&&s[p]!==!1)&&(s[p||l]=Se(c))}const i=(c,l)=>a.forEach(c,(d,f)=>o(d,f,l));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!cr(t))i(Zn(t),n);else if(a.isObject(t)&&a.isSafeIterable(t)){let c=Object.create(null),l,d;for(const f of t){if(!a.isArray(f))throw new TypeError("Object iterator must return a key-value pair");d=f[0],a.hasOwnProp(c,d)?(l=c[d],c[d]=a.isArray(l)?[...l,f[1]]:[l,f[1]]):c[d]=f[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=le(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return sr(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=le(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Be(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=le(i),i){const c=a.findKey(r,i);c&&(!n||Be(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Be(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Se(s),delete n[o];return}const c=t?lr(o):String(o).trim();c!==o&&delete n[o],n[c]=Se(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){const t=this.get("set-cookie");return a.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return ar(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[st]=this[st]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=le(i);r[c]||(ur(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(U.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(U);const Pe="[REDACTED ****]";function fr(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function dr(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof U&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const d=s(c);a.isUndefined(d)||(i[l]=d)});else{if(!a.isPlainObject(o)&&fr(o))return r.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const d=n.has(c.toLowerCase())?Pe:s(l);a.isUndefined(d)||(i[c]=d)}}return r.pop(),i};return s(e)}function ot(e){try{return String(e)}catch{return""}}function pr(e){return e.errors.map(n=>{try{return n&&n.message?ot(n.message):ot(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let h=class Ft extends Error{static from(t,n,r,s,o,i){let c=t.message;!c&&a.isArray(t.errors)&&t.errors.length&&(c=pr(t));const l=new Ft(c,n||t.code,r,s,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?dr(t,n):a.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const hr=null,Bt=100;function $e(e){return a.isPlainObject(e)||a.isArray(e)}function jt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function je(e,t,n){return e?e.concat(t).map(function(s,o){return s=jt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function mr(e){return a.isArray(e)&&!e.some($e)}const yr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Ce(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(m,g)=>{const b=a.getSafeProp(n,m);return a.isUndefined(b)?g:b},s=r("metaTokens",!0),o=r("visitor")||S,i=r("dots",!1),c=r("indexes",!1),l=r("Blob")||typeof Blob<"u"&&Blob,d=r("maxDepth",Bt),f=l&&a.isSpecCompliantForm(t),p=[];if(!a.isFunction(o))throw new TypeError("visitor must be a function");function y(m){if(m===null)return"";if(a.isDate(m))return m.toISOString();if(a.isBoolean(m))return m.toString();if(!f&&a.isBlob(m))throw new h("Blob is not supported. Use a Buffer instead.");if(a.isArrayBuffer(m)||a.isTypedArray(m)){if(f&&typeof l=="function")return new l([m]);throw new h("Blob is not supported. Use a Buffer instead.",h.ERR_NOT_SUPPORT)}return m}function E(m){if(m>d)throw new h("Object is too deeply nested ("+m+" levels). Max depth: "+d,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function R(m,g){if(d===1/0)return JSON.stringify(m);const b=[];return JSON.stringify(m,function(N,_){if(!a.isObject(_))return _;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(_),E(g+b.length-1),_})}function S(m,g,b){let T=m;if(a.isReactNative(t)&&a.isReactNativeBlob(m))return t.append(je(b,g,i),y(m)),!1;if(m&&!b&&typeof m=="object"){if(a.endsWith(g,"{}"))g=s?g:g.slice(0,-2),m=R(m,1);else if(a.isArray(m)&&mr(m)||(a.isFileList(m)||a.endsWith(g,"[]"))&&(T=a.toArray(m)))return g=jt(g),T.forEach(function(_,k){!(a.isUndefined(_)||_===null)&&t.append(c===!0?j
Line truncated
|
||||
`+i.map(Et).join(`
|
||||
`):" "+Et(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+c,h.ERR_NOT_SUPPORT)}return s}const Gt={getAdapter:ls,adapters:Ge};function qe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function He(e){const t=a.toSafeFlatObject(e);return qe(t),t.headers=U.from(a.getSafeProp(t,"headers")),t.data=Ie.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Gt.getAdapter(t.adapter||ye.adapter,t)(t).then(function(s){qe(t),t.response=s;try{s.data=Ie.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=U.from(s.headers),s},function(s){if(!zt(s)&&(qe(t),s&&s.response)){t.response=s.response;try{s.response.data=Ie.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=U.from(s.response.headers)}return Promise.reject(s)})}const Ne={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ne[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Rt={};Ne.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Xe+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new h(s(i," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!Rt[i]&&(Rt[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Ne.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function us(e,t,n){if(typeof e!="object"||e===null)throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new h("option "+o+" must be "+l,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const _e={assertOptions:us,validators:Ne},L=_e.validators;let Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ct,response:new ct}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack;let i="";if(typeof o=="string"){const c=o.indexOf(`
|
||||
`);i=c===-1?"":o.slice(c+1)}if(!r.stack)r.stack=i;else if(i){const c=i.indexOf(`
|
||||
`),l=c===-1?-1:i.indexOf(`
|
||||
`,c+1),d=l===-1?"":i.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
|
||||
`+i)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&_e.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean),legacyInterceptorReqResOrdering:L.transitional(L.boolean),advertiseZstdAcceptEncoding:L.transitional(L.boolean),validateStatusUndefinedResolves:L.transitional(L.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:_e.assertOptions(s,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_e.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(a.getSafeProp(n,"method")||a.getSafeProp(this.defaults,"method")||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach($t.concat("common"),R=>{delete o[R]}),n.headers=U.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;l=l&&S.synchronous;const P=n.transitional||ve;P&&P.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const d=[];this.interceptors.response.forEach(function(S){d.push(S.fulfilled,S.rejected)});let f,p=0,y;if(!l){const R=[He.bind(this),void 0];for(R.unshift(...c),R.push(...d),y=R.length,f=Promise.resolve(n);p<y;)f=f.then(R[p++],R[p++]);return f}y=c.length;let E=n;for(;p<y;){const R=c[p++],S=c[p++];try{E=R?R(E):E}catch(P){if(!S){f=Promise.reject(P);break}try{const u=S.call(this,P);a.isThenable(u)&&(f=Promise.resolve(u).then(()=>He.call(this,E)))}catch(u){f=Promise.reject(u)}break}}if(!f)try{f=He.call(this,E)}catch(R){f=Promise.reject(R)}for(p=0,y=d.length;p<y;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=te(this.defaults,t);const n=Jt(t.baseURL,t.url,t.allowAbsoluteUrls,t);return kt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:r&&a.hasOwnProp(r,"data")?r.data:void 0}))}});a.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,i,c){return this.request(te(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Z.prototype[t]=n(),t!=="query"&&(Z.prototype[t+"Form"]=n(!0))});let fs=class Qt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new be(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qt(function(s){t=s}),cancel:t}}};function ds(e){return function(n){return e.apply(null,n)}}function ps(e){return a.isObject(e)&&e.isAxiosError===!0}const Ae={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
/*! tailwindcss v4.1.16 | 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-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Instrument Sans",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7Line truncated
|
||||
@@ -1 +1 @@
|
||||
@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-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-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-yellow-400:oklch(85.2% .199 91.936);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-green-400:oklch(79.2% .209 151.711);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:Line truncated
|
||||
/*! tailwindcss v4.1.16 | 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-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-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-yellow-400:oklch(85.2% .199 91.936);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-green-400:oklch(79.2% .209 151.711);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-6xl:72rem;--text-xs:.Line truncated
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
var NM=Object.defineProperty;var MM=(dn,i,u)=>i in dn?NM(dn,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):dn[i]=u;var Ni=(dn,i,u)=>MM(dn,typeof i!="symbol"?i+"":i,u);(function(dn,i,u,Cn){"use strict";function Lt(){const e=typeof window<"u"?window.G7Core?.__runtime:void 0;if(!e)throw new Error("[layout-editor] window.G7Core.__runtime 이 없습니다. 코어 번들(template-engine.min.js)이 편집기 번들보다 먼저 로드되어야 합니다.");return e}const Mi=Lt();Mi.TranslationProvider;const tt=Mi.useTranslation;Mi.TranslationReactContext;function rt(){return typeof window>"u"?null:window.__g7Devtools??null}function El(e,t){const n=rt();if(!n?.trackEditorState)return;const o={templateIdentifier:e.templateIdentifier,editMode:e.editMode,selectedRoutePath:e.selectedRoute?.path??null,selectedLayoutName:e.selectedRoute?.layoutName??null,routeTreeSize:e.routeTree.length,isRouteTreeCollapsed:e.isRouteTreeCollapsed,locale:e.locale,previewDevice:e.previewDevice,previewZoom:e.previewZoom,lastAction:t,timestamp:Date.now()};try{n.trackEditorState(o)}catch{}}function Xh(){const e=rt();if(e?.clearEditorStateData)try{e.clearEditorStateData()}catch{}}function Jh(e){const t=rt();if(t?.trackEditorSampleMatch)try{t.trackEditorSampleMatch(e)}catch{}}function Zh(){const e=rt();if(e?.clearEditorSampleData)try{e.clearEditorSampleData()}catch{}}function Qh(e){const t=rt();if(t?.trackEditorHistoryEntry)try{t.trackEditorHistoryEntry(e)}catch{}}function Rh(){const e=rt();if(e?.clearEditorHistoryData)try{e.clearEditorHistoryData()}catch{}}function Il(e){const t=rt();if(t?.trackEditorSelection)try{t.trackEditorSelection(e)}catch{}}function ey(){const e=rt();if(e?.clearEditorSelectionData)try{e.clearEditorSelectionData()}catch{}}function dr(e){const t=rt();if(t?.trackEditorPropertyPatch)try{t.trackEditorPropertyPatch(e)}catch{}}function $n(e){const t=rt();if(t?.trackEditorDnd)try{t.trackEditorDnd(e)}catch{}}function ty(){const e=rt();if(e?.clearEditorDndData)try{e.clearEditorDndData()}catch{}}function st(e){const t=rt();if(t?.trackEditorDocument)try{t.trackEditorDocument(e)}catch{}}function ny(){const e=rt();if(e?.clearEditorDocumentData)try{e.clearEditorDocumentData()}catch{}}function oy(e){const t=rt();if(t?.trackEditorSpecMerge)try{t.trackEditorSpecMerge(e)}catch{}}function ry(){const e=rt();if(e?.clearEditorSpecMergeData)try{e.clearEditorSpecMergeData()}catch{}}function Li(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t}function Et(e){const t=rt();if(t?.trackEditorI18n)try{t.trackEditorI18n(e)}catch{}}function iy(){const e=rt();if(e?.clearEditorI18nData)try{e.clearEditorI18nData()}catch{}}function Al(e){const t=rt();if(t?.trackPageState)try{t.trackPageState(e)}catch{}}function sy(){const e=rt();if(e?.clearPageStateData)try{e.clearPageStateData()}catch{}}const Tl="g7le.routeTree.collapsed";function ay(){if(typeof window>"u")return!1;try{return window.localStorage?.getItem(Tl)==="1"}catch{return!1}}function ly(e){if(!(typeof window>"u"))try{window.localStorage?.setItem(Tl,e?"1":"0")}catch{}}function dy(e,t){return{templateIdentifier:e,routeTree:[],routesError:null,selectedRoute:null,isRouteTreeCollapsed:ay(),editMode:"route",returnRoute:null,returnEditMode:null,locale:t,previewDevice:"desktop",previewZoom:1,previewCustomWidth:1024,previewColorScheme:"light",history:{canUndo:!1,canRedo:!1},isPaletteOpen:!1,availableStates:[],activeStateId:null,layoutVersions:{},extensionVersions:{}}}function cy(e,t){switch(t.type){case"SET_ROUTE_TREE":return{...e,routeTree:t.tree,routesError:null};case"SET_ROUTES_ERROR":return{...e,routesError:t.error};case"SELECT_ROUTE":return{...e,editMode:"route",selectedRoute:t.route,returnRoute:null,returnEditMode:null};case"TOGGLE_ROUTE_TREE":return{...e,isRouteTreeCollapsed:!e.isRouteTreeCollapsed};case"SET_LOCALE":return{...e,locale:t.locale};case"ENTER_BASE_EDIT":return{...e,editMode:"base",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__base__/${t.layoutName}`,layoutName:t.layoutName}};case"EXIT_BASE_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_MODAL_EDIT":return{...e,editMode:"modal",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__modal__/${t.modalId}`,layoutName:t.hostLayout}};case"EXIT_MODAL_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_EXTENSION_EDIT":return{...e,editMode:"extension",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__extension__/${t.extensionId}`,layoutName:t.extensionHost??null}};case"SET_RETURN_ROUTE":return e.editMode==="route"||e.returnRoute!==null?e:{...e,returnRoute:t.route};case"EXIT_EXTENSION_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_ITERATION_ITEM_EDIT":return{...e,editMode:"iteration_item",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,returnEditMode:e.ediLine truncated
|
||||
var NM=Object.defineProperty;var MM=(dn,i,u)=>i in dn?NM(dn,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):dn[i]=u;var Ni=(dn,i,u)=>MM(dn,typeof i!="symbol"?i+"":i,u);(function(dn,i,u,Cn){"use strict";function Lt(){const e=typeof window<"u"?window.G7Core?.__runtime:void 0;if(!e)throw new Error("[layout-editor] window.G7Core.__runtime 이 없습니다. 코어 번들(template-engine.min.js)이 편집기 번들보다 먼저 로드되어야 합니다.");return e}const Mi=Lt();Mi.TranslationProvider;const tt=Mi.useTranslation;Mi.TranslationReactContext;function rt(){return typeof window>"u"?null:window.__g7Devtools??null}function El(e,t){const n=rt();if(!n?.trackEditorState)return;const o={templateIdentifier:e.templateIdentifier,editMode:e.editMode,selectedRoutePath:e.selectedRoute?.path??null,selectedLayoutName:e.selectedRoute?.layoutName??null,routeTreeSize:e.routeTree.length,isRouteTreeCollapsed:e.isRouteTreeCollapsed,locale:e.locale,previewDevice:e.previewDevice,previewZoom:e.previewZoom,lastAction:t,timestamp:Date.now()};try{n.trackEditorState(o)}catch{}}function Xh(){const e=rt();if(e?.clearEditorStateData)try{e.clearEditorStateData()}catch{}}function Jh(e){const t=rt();if(t?.trackEditorSampleMatch)try{t.trackEditorSampleMatch(e)}catch{}}function Zh(){const e=rt();if(e?.clearEditorSampleData)try{e.clearEditorSampleData()}catch{}}function Qh(e){const t=rt();if(t?.trackEditorHistoryEntry)try{t.trackEditorHistoryEntry(e)}catch{}}function Rh(){const e=rt();if(e?.clearEditorHistoryData)try{e.clearEditorHistoryData()}catch{}}function Il(e){const t=rt();if(t?.trackEditorSelection)try{t.trackEditorSelection(e)}catch{}}function ey(){const e=rt();if(e?.clearEditorSelectionData)try{e.clearEditorSelectionData()}catch{}}function dr(e){const t=rt();if(t?.trackEditorPropertyPatch)try{t.trackEditorPropertyPatch(e)}catch{}}function $n(e){const t=rt();if(t?.trackEditorDnd)try{t.trackEditorDnd(e)}catch{}}function ty(){const e=rt();if(e?.clearEditorDndData)try{e.clearEditorDndData()}catch{}}function st(e){const t=rt();if(t?.trackEditorDocument)try{t.trackEditorDocument(e)}catch{}}function ny(){const e=rt();if(e?.clearEditorDocumentData)try{e.clearEditorDocumentData()}catch{}}function oy(e){const t=rt();if(t?.trackEditorSpecMerge)try{t.trackEditorSpecMerge(e)}catch{}}function ry(){const e=rt();if(e?.clearEditorSpecMergeData)try{e.clearEditorSpecMergeData()}catch{}}function Li(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t}function Et(e){const t=rt();if(t?.trackEditorI18n)try{t.trackEditorI18n(e)}catch{}}function iy(){const e=rt();if(e?.clearEditorI18nData)try{e.clearEditorI18nData()}catch{}}function Al(e){const t=rt();if(t?.trackPageState)try{t.trackPageState(e)}catch{}}function sy(){const e=rt();if(e?.clearPageStateData)try{e.clearPageStateData()}catch{}}const Tl="g7le.routeTree.collapsed";function ay(){if(typeof window>"u")return!1;try{return window.localStorage?.getItem(Tl)==="1"}catch{return!1}}function ly(e){if(!(typeof window>"u"))try{window.localStorage?.setItem(Tl,e?"1":"0")}catch{}}function dy(e,t){return{templateIdentifier:e,routeTree:[],routesError:null,selectedRoute:null,isRouteTreeCollapsed:ay(),editMode:"route",returnRoute:null,returnEditMode:null,locale:t,previewDevice:"desktop",previewZoom:1,previewCustomWidth:1024,previewColorScheme:"light",history:{canUndo:!1,canRedo:!1},isPaletteOpen:!1,availableStates:[],activeStateId:null,layoutVersions:{},extensionVersions:{}}}function cy(e,t){switch(t.type){case"SET_ROUTE_TREE":return{...e,routeTree:t.tree,routesError:null};case"SET_ROUTES_ERROR":return{...e,routesError:t.error};case"SELECT_ROUTE":return{...e,editMode:"route",selectedRoute:t.route,returnRoute:null,returnEditMode:null};case"TOGGLE_ROUTE_TREE":return{...e,isRouteTreeCollapsed:!e.isRouteTreeCollapsed};case"SET_LOCALE":return{...e,locale:t.locale};case"ENTER_BASE_EDIT":return{...e,editMode:"base",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__base__/${t.layoutName}`,layoutName:t.layoutName}};case"EXIT_BASE_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_MODAL_EDIT":return{...e,editMode:"modal",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__modal__/${t.modalId}`,layoutName:t.hostLayout}};case"EXIT_MODAL_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_EXTENSION_EDIT":return{...e,editMode:"extension",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__extension__/${t.extensionId}`,layoutName:t.extensionHost??null}};case"SET_RETURN_ROUTE":return e.editMode==="route"||e.returnRoute!==null?e:{...e,returnRoute:t.route};case"EXIT_EXTENSION_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_ITERATION_ITEM_EDIT":return{...e,editMode:"iteration_item",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,returnEditMode:e.ediLine truncated
|
||||
"keyword": "",
|
||||
"page": 1
|
||||
}`,shapeErrorKey:"layout_editor.json_block.must_be_object",validate:x=>{const $=Object.keys(x??{}).filter(S=>!Ds(S));return $.length?a("layout_editor.json_block.invalid_keys",{keys:$.join(", ")}):null}}):i.jsxs(i.Fragment,{children:[v.length===0?i.jsx("p",{"data-testid":`g7le-initstate-${e}-empty`,style:jS,children:a("layout_editor.initstate.no_values")}):v.map(x=>{const S=j0(y,r,x)==="inherited",C=e==="isolated"&&l[x];return i.jsx(_S,{scope:e,itemKey:x,value:o[x],inherited:S,isOrphan:!!C,onChangeValue:T=>_(x,T),onRemove:()=>w(x),t:a},x)}),i.jsxs("div",{style:MS,children:[i.jsx("input",{type:"text","data-testid":`g7le-initstate-${e}-add-name`,value:d,placeholder:a("layout_editor.initstate.value_name"),onChange:x=>{c(x.target.value),b&&g(null)},onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),k())},"aria-invalid":b?!0:void 0,style:{...LS,...b?PS:null}}),i.jsx("select",{"data-testid":`g7le-initstate-${e}-add-kind`,value:p,onChange:x=>f(x.target.value),"aria-label":a("layout_editor.initstate.value_kind"),style:BS,children:mS.map(x=>i.jsx("option",{value:x.kind,children:a(x.labelKey)},x.kind))}),i.jsxs("button",{type:"button","data-testid":`g7le-initstate-${e}-add`,onClick:k,style:WS,children:["+ ",a("layout_editor.initstate.add_value")]})]}),b?i.jsx("p",{"data-testid":`g7le-initstate-${e}-add-error`,style:OS,children:b}):null]})]})}function _S({scope:e,itemKey:t,value:n,inherited:o,isOrphan:r,onChangeValue:s,onRemove:a,t:l}){const[d,c]=u.useState(!1);let p;try{p=JSON.stringify(n,null,2)??String(n)}catch{p=String(n)}return i.jsxs("div",{"data-testid":`g7le-initstate-${e}-item-${t}`,style:AS,children:[i.jsxs("div",{style:TS,children:[o?i.jsx("span",{"data-testid":`g7le-initstate-inherited-${t}`,style:DS,children:"🔗"}):null,i.jsx("code",{style:zS,children:t}),i.jsx("span",{style:{flex:1}}),i.jsx("button",{type:"button","data-testid":`g7le-initstate-code-${t}`,onClick:()=>c(f=>!f),style:Vs,"aria-label":l("layout_editor.value_tree.show_source"),title:l("layout_editor.value_tree.show_source"),children:"</>"}),o?i.jsx("button",{type:"button","data-testid":`g7le-initstate-revert-${t}`,onClick:a,style:Vs,children:l("layout_editor.initstate.revert")}):i.jsx("button",{type:"button","data-testid":`g7le-initstate-remove-${t}`,onClick:a,style:Vs,"aria-label":l("layout_editor.init_actions.remove"),children:"✕"})]}),d?i.jsx("pre",{"data-testid":`g7le-initstate-code-block-${t}`,style:FS,children:p}):null,i.jsx(zn,{value:n,onChange:s,t:l,path:t,scope:e}),r?i.jsxs("p",{"data-testid":`g7le-initstate-isolated-orphan-${t}`,style:NS,children:["⚠ ",l("layout_editor.initstate.isolated_orphan")]}):null]})}const xS={display:"flex",flexDirection:"column",gap:14,minWidth:0},wS={margin:0,fontSize:13,fontWeight:700,color:"#0f172a"},kS={margin:0,fontSize:11,color:"#1d4ed8",background:"#eff6ff",padding:"6px 8px",borderRadius:6},SS={display:"flex",flexDirection:"column",gap:8,padding:10,border:"1px solid #e2e8f0",borderRadius:10,minWidth:0},CS={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},$S={fontSize:12,fontWeight:700,color:"#475569"},ES={margin:0,fontSize:11,color:"#94a3b8"},IS={padding:"2px 8px",fontSize:11,border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer"},AS={display:"flex",flexDirection:"column",gap:4,padding:"6px 8px",border:"1px solid #f1f5f9",borderRadius:6,minWidth:0},TS={display:"flex",alignItems:"center",gap:6},DS={fontSize:12},zS={fontSize:12,color:"#0f172a",fontFamily:"monospace"},Vs={border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer",fontSize:11,padding:"2px 6px"},NS={margin:0,fontSize:11,color:"#b45309",background:"#fef3c7",padding:"4px 6px",borderRadius:6},MS={display:"flex",gap:6,alignItems:"center"},LS={padding:"4px 8px",fontSize:12,border:"1px solid #cbd5e1",borderRadius:6},PS={border:"1px solid #dc2626"},OS={margin:0,fontSize:11,color:"#dc2626"},BS={padding:"4px 8px",fontSize:12,border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#0f172a"},WS={padding:"2px 10px",fontSize:11,border:"1px dashed #94a3b8",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer"},jS={margin:0,fontSize:12,color:"#94a3b8"},HS={margin:0,fontSize:11,color:"#94a3b8"},FS={margin:"2px 0",padding:"6px 8px",fontSize:11,fontFamily:"monospace",color:"#0f172a",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:6,whiteSpace:"pre-wrap",wordBreak:"break-all",overflowX:"auto"},KS={self:"layout_editor.error_rows.source_self",inherited:"layout_editor.error_rows.source_inherited",template:"layout_editor.error_rows.source_template",none:"layout_editor.error_rows.source_none"};function Us({value:e,onChange:t,t:n,codes:o,mode:r="local",sourceOf:s,renderActionList:a,testIdPrefix:l="g7le-error-rows"}){const d=o??Object.keys(e),c=u.useCallback((f,b)=>{t({...e,[f]:b})},[e,t]),p=u.useCallback(f=>{const b={...e};delete b[f],t(b)},[e,t]);return i.jsx("div",{className:l,"data-testid":l,children:d.map(f=>{const b=e[f],g=
Line truncated
|
||||
"page": "{{query.page ?? 1}}"
|
||||
}`,shapeErrorKey:"layout_editor.data_sources.error.params_object",invalidErrorKey:"layout_editor.data_sources.error.params_json",t:n,onChange:I=>_(L=>L&&{...L,paramsRawValue:I??{},paramsRawValid:!0}),onValidityChange:I=>_(L=>L&&{...L,paramsRawValid:I})}):i.jsxs("div",{"data-testid":"g7le-data-sources-field-params",children:[y.paramRows.length===0&&i.jsx("p",{"data-testid":"g7le-ds-params-empty",style:QC,children:n("layout_editor.data_sources.field.params_empty")}),i.jsx(Pr,{value:y.paramRows.map(I=>({key:I.key,value:I.value})),onChange:I=>_({...y,paramRows:I.map(L=>({key:L.key??"",value:L.value??""}))}),keyField:"key",valueField:"value",t:n,candidates:d,testidPrefix:"g7le-ds-params-kv",keyPlaceholder:n("layout_editor.data_sources.field.param_key_placeholder"),valuePlaceholder:"{{query.page ?? 1}}",addLabel:n("layout_editor.data_sources.field.param_add")}),(()=>{const I=Zs(y.paramRows);return Object.keys(I).length===0?null:i.jsxs("div",{style:Pu,children:[i.jsxs("button",{type:"button","data-testid":"g7le-ds-params-preview-toggle","aria-expanded":x,onClick:()=>$(L=>!L),style:Ou,children:[x?"▴":"▾"," ",n("layout_editor.data_sources.field.params_preview")]}),x&&i.jsx("pre",{"data-testid":"g7le-ds-params-preview",style:{...Bu,marginTop:4},children:JSON.stringify(I,null,2)})]})})()]}),i.jsx("div",{style:{fontSize:11,color:"#94a3b8",marginTop:4},children:n("layout_editor.data_sources.field.params_hint")})]}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.fallback")}),y.fallbackEnabled?i.jsxs("div",{"data-testid":"g7le-data-sources-field-fallback",style:{display:"flex",flexDirection:"column",gap:6},children:[i.jsx(zn,{value:y.fallbackValue===void 0?{}:y.fallbackValue,onChange:I=>_({...y,fallbackValue:I}),t:n,path:"fallback",scope:"ds-fallback",renderStringLeaf:I=>i.jsx(Ke,{value:I.value,onChange:I.onChange,t:n,candidates:d,testidPrefix:I.testidPrefix})}),(()=>{const I=y.fallbackValue===void 0?{}:y.fallbackValue;return i.jsxs("div",{style:Pu,children:[i.jsxs("button",{type:"button","data-testid":"g7le-ds-fallback-preview-toggle","aria-expanded":S,onClick:()=>C(L=>!L),style:Ou,children:[S?"▴":"▾"," ",n("layout_editor.data_sources.field.fallback_preview")]}),S&&i.jsx("pre",{"data-testid":"g7le-ds-fallback-preview",style:{...Bu,marginTop:4},children:JSON.stringify(I,null,2)})]})})(),i.jsx("button",{type:"button","data-testid":"g7le-data-sources-field-fallback-clear",onClick:()=>_({...y,fallbackEnabled:!1,fallbackValue:void 0}),style:{...rn,padding:"2px 8px",fontSize:11,alignSelf:"flex-start",color:"#dc2626",borderColor:"#fecaca"},children:n("layout_editor.data_sources.field.fallback_clear")})]}):i.jsxs("button",{type:"button","data-testid":"g7le-data-sources-field-fallback-add",onClick:()=>_({...y,fallbackEnabled:!0,fallbackValue:{}}),style:{...rn,padding:"4px 10px",display:"block"},children:["+ ",n("layout_editor.data_sources.field.fallback_add")]})]}),y.type==="websocket"&&i.jsxs("div",{"data-testid":"g7le-ds-ws-section",style:Mo,children:[i.jsx("div",{style:Lo,children:n("layout_editor.data_sources.section.websocket")}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.channel")}),i.jsx("input",{"data-testid":"g7le-ds-ws-channel",style:jt,value:y.channel,onChange:I=>_({...y,channel:I.target.value}),placeholder:"core.admin.dashboard"})]}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.event")}),i.jsx("input",{"data-testid":"g7le-ds-ws-event",style:jt,value:y.event,onChange:I=>_({...y,event:I.target.value}),placeholder:"dashboard.stats.updated"})]}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.channel_type")}),i.jsx("select",{"data-testid":"g7le-ds-ws-channeltype",style:jt,value:y.channel_type,onChange:I=>_({...y,channel_type:I.target.value}),children:GC.map(I=>i.jsx("option",{value:I,children:I},I))})]}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.target_source")}),i.jsx("input",{"data-testid":"g7le-ds-ws-target",style:jt,value:y.target_source,onChange:I=>_({...y,target_source:I.target.value}),list:"g7le-ds-ws-target-list"}),i.jsx("datalist",{id:"g7le-ds-ws-target-list",children:h.filter(I=>I.id!==y.id).map(I=>typeof I.id=="string"?i.jsx("option",{value:I.id},I.id):null)})]}),i.jsxs("div",{style:ut,children:[i.jsx("label",{style:ct,children:n("layout_editor.data_sources.field.on_receive")}),i.jsx("div",{"data-testid":"g7le-ds-ws-onreceive",children:i.jsx(Gt,{actions:y.onReceive,onChange:I=>_({...y,onReceive:I}),t:n,recipes:s,candidatePools:N,chipContext:"payload",actionChipCandidates:l?.actionChipCandidates??null,testIdPrefix:"g7le-ds-onreceive-list"})})]})]}),i.jsxs("div",{style:Mo,children:[i.jsx("div",{style:Lo,children:n("layout_editor.data_sources.section.on_success")}),i.jsx("div",{"data-testid":"g7le-ds-onsuccess",children:i.j
Line truncated
|
||||
`).split(`
|
||||
`);return t.length>0&&t[t.length-1]===""&&t.pop(),t}const Zu=4e3;function D$(e,t,n=3){const o=Ju(e),r=Ju(t);let s=0;const a=Math.min(o.length,r.length);for(;s<a&&o[s]===r[s];)s++;let l=0;const d=Math.min(o.length,r.length)-s;for(;l<d&&o[o.length-1-l]===r[r.length-1-l];)l++;const c=o.slice(s,o.length-l),p=r.slice(s,r.length-l);if(c.length>Zu||p.length>Zu)return{hunks:[],addedCount:-1,removedCount:-1,identical:!1};const f=A$(c,p),b=T$(c,p,f),g=[];let m=s,h=s,v=0,y=0;for(let k=0;k<s;k++)g.push({kind:"context",oldLine:k+1,newLine:k+1,content:o[k]});for(const k of b)k.kind==="context"?(m++,h++,g.push({kind:"context",oldLine:m,newLine:h,content:k.content})):k.kind==="remove"?(m++,y++,g.push({kind:"remove",oldLine:m,newLine:null,content:k.content})):(h++,v++,g.push({kind:"add",oldLine:null,newLine:h,content:k.content}));for(let k=0;k<l;k++){const x=o.length-l+k,$=r.length-l+k;g.push({kind:"context",oldLine:x+1,newLine:$+1,content:o[x]})}const _=v===0&&y===0;return{hunks:z$(g,n),addedCount:v,removedCount:y,identical:_}}function z$(e,t){const n=[];for(let r=0;r<e.length;r++)e[r].kind!=="context"&&n.push(r);if(n.length===0)return[];const o=[];for(const r of n){const s=Math.max(0,r-t),a=Math.min(e.length-1,r+t),l=o[o.length-1];l&&s<=l.end+1?l.end=Math.max(l.end,a):o.push({start:s,end:a})}return o.map(r=>{const s=e.slice(r.start,r.end+1);let a=0,l=0,d=0,c=0;for(const g of s)g.oldLine!==null&&(a===0&&(a=g.oldLine),d++),g.newLine!==null&&(l===0&&(l=g.newLine),c++);const p=a||(d===0?0:1),f=l||(c===0?0:1);return{header:`@@ -${p},${d} +${f},${c} @@`,oldStart:p,oldCount:d,newStart:f,newCount:c,lines:s}})}function Qu(e){return JSON.stringify(Rs(e),null,2)}function Rs(e){if(Array.isArray(e))return e.map(Rs);if(e&&typeof e=="object"){const t=e,n={};for(const o of Object.keys(t).sort())n[o]=Rs(t[o]);return n}return e}const N$={display:"flex",flexDirection:"column",height:"100%",minHeight:0},M$={display:"flex",alignItems:"center",gap:8,padding:"12px 16px",borderBottom:"1px solid #e2e8f0",background:"#f8fafc"},L$={display:"inline-flex",alignItems:"center",gap:4,padding:"4px 10px",borderRadius:6,border:"1px solid #cbd5e1",background:"#ffffff",color:"#0f172a",fontSize:12,fontWeight:600,cursor:"pointer",outline:"none"},P$={marginLeft:"auto",border:"none",background:"transparent",fontSize:16,color:"#64748b",cursor:"pointer",outline:"none"},O$={display:"flex",alignItems:"center",gap:12,padding:"8px 16px",borderBottom:"1px solid #e2e8f0",background:"#ffffff",fontSize:12,fontWeight:600},B$={flex:1,minHeight:0,overflow:"auto",background:"#ffffff",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:12,lineHeight:1.5},Ru={padding:"24px 12px",textAlign:"center",color:"#94a3b8",fontSize:13},W$={padding:"2px 12px",background:"#f1f5f9",color:"#64748b",borderTop:"1px solid #e2e8f0",borderBottom:"1px solid #e2e8f0",userSelect:"none"};function j$(e){return e==="add"?{row:{background:"#e6ffed"},gutter:{background:"#cdffd8",color:"#22863a"},sign:"+",signColor:"#22863a"}:e==="remove"?{row:{background:"#ffeef0"},gutter:{background:"#ffdce0",color:"#b31d28"},sign:"-",signColor:"#b31d28"}:{row:{background:"#ffffff"},gutter:{background:"#f8fafc",color:"#94a3b8"},sign:" ",signColor:"#94a3b8"}}const ep={display:"inline-block",width:44,textAlign:"right",padding:"0 6px",color:"#94a3b8",userSelect:"none",borderRight:"1px solid #e2e8f0",whiteSpace:"nowrap"};function H$({oldVersion:e,newVersion:t,oldContent:n,newContent:o,t:r,onBack:s,onClose:a}){const l=u.useMemo(()=>{const c=Qu(n),p=Qu(o);return D$(c,p)},[n,o]),d=l.addedCount<0;return i.jsxs("div",{className:"g7le-version-diff","data-testid":"g7le-version-diff",style:N$,children:[i.jsxs("div",{"data-modal-drag-handle":!0,style:M$,children:[i.jsxs("button",{type:"button",onClick:s,style:L$,"data-testid":"g7le-version-diff-back",children:["← ",r("layout_editor.version_history.diff_back")]}),i.jsx("span",{style:{fontSize:14,fontWeight:700},"data-testid":"g7le-version-diff-title",children:r("layout_editor.version_history.diff_title",{old:e,new:t})}),i.jsx("button",{type:"button","aria-label":r("layout_editor.version_history.close"),onClick:a,style:P$,"data-testid":"g7le-version-diff-close",children:"✕"})]}),!d&&i.jsxs("div",{style:O$,"data-testid":"g7le-version-diff-summary",children:[i.jsx("span",{style:{color:"#16a34a"},"data-testid":"g7le-version-diff-added",children:r("layout_editor.version_history.added",{count:Math.max(0,l.addedCount)})}),i.jsx("span",{style:{color:"#dc2626"},"data-testid":"g7le-version-diff-removed",children:r("layout_editor.version_history.removed",{count:Math.max(0,l.removedCount)})})]}),i.jsx("div",{style:B$,children:d?i.jsx("div",{style:Ru,"data-testid":"g7le-version-diff-too-large",children:r("layout_editor.version_history.diff_too_large")}):l.identical?i.jsx("div",{style:Ru,"data-testid":"g7le-version-diff-identical",children:r("layout_editor.version_history.diff_identical")}):l.hunks.map((c,p)=>i.jsxs("div",{"data-testid":`gLine truncated
|
||||
`);return t.length>0&&t[t.length-1]===""&&t.pop(),t}const Zu=4e3;function D$(e,t,n=3){const o=Ju(e),r=Ju(t);let s=0;const a=Math.min(o.length,r.length);for(;s<a&&o[s]===r[s];)s++;let l=0;const d=Math.min(o.length,r.length)-s;for(;l<d&&o[o.length-1-l]===r[r.length-1-l];)l++;const c=o.slice(s,o.length-l),p=r.slice(s,r.length-l);if(c.length>Zu||p.length>Zu)return{hunks:[],addedCount:-1,removedCount:-1,identical:!1};const f=A$(c,p),b=T$(c,p,f),g=[];let m=s,h=s,v=0,y=0;for(let k=0;k<s;k++)g.push({kind:"context",oldLine:k+1,newLine:k+1,content:o[k]});for(const k of b)k.kind==="context"?(m++,h++,g.push({kind:"context",oldLine:m,newLine:h,content:k.content})):k.kind==="remove"?(m++,y++,g.push({kind:"remove",oldLine:m,newLine:null,content:k.content})):(h++,v++,g.push({kind:"add",oldLine:null,newLine:h,content:k.content}));for(let k=0;k<l;k++){const x=o.length-l+k,$=r.length-l+k;g.push({kind:"context",oldLine:x+1,newLine:$+1,content:o[x]})}const _=v===0&&y===0;return{hunks:z$(g,n),addedCount:v,removedCount:y,identical:_}}function z$(e,t){const n=[];for(let r=0;r<e.length;r++)e[r].kind!=="context"&&n.push(r);if(n.length===0)return[];const o=[];for(const r of n){const s=Math.max(0,r-t),a=Math.min(e.length-1,r+t),l=o[o.length-1];l&&s<=l.end+1?l.end=Math.max(l.end,a):o.push({start:s,end:a})}return o.map(r=>{const s=e.slice(r.start,r.end+1);let a=0,l=0,d=0,c=0;for(const g of s)g.oldLine!==null&&(a===0&&(a=g.oldLine),d++),g.newLine!==null&&(l===0&&(l=g.newLine),c++);const p=a||(d===0?0:1),f=l||(c===0?0:1);return{header:`@@ -${p},${d} +${f},${c} @@`,oldStart:p,oldCount:d,newStart:f,newCount:c,lines:s}})}function Qu(e){return JSON.stringify(Rs(e),null,2)}function Rs(e){if(Array.isArray(e))return e.map(Rs);if(e&&typeof e=="object"){const t=e,n={};for(const o of Object.keys(t).sort())n[o]=Rs(t[o]);return n}return e}const N$={display:"flex",flexDirection:"column",height:"100%",minHeight:0},M$={display:"flex",alignItems:"center",gap:8,padding:"12px 16px",borderBottom:"1px solid #e2e8f0",background:"#f8fafc"},L$={display:"inline-flex",alignItems:"center",gap:4,padding:"4px 10px",borderRadius:6,border:"1px solid #cbd5e1",background:"#ffffff",color:"#0f172a",fontSize:12,fontWeight:600,cursor:"pointer",outline:"none"},P$={marginLeft:"auto",border:"none",background:"transparent",fontSize:16,color:"#64748b",cursor:"pointer",outline:"none"},O$={display:"flex",alignItems:"center",gap:12,padding:"8px 16px",borderBottom:"1px solid #e2e8f0",background:"#ffffff",fontSize:12,fontWeight:600},B$={flex:1,minHeight:0,overflow:"auto",background:"#ffffff",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:12,lineHeight:1.5},Ru={padding:"24px 12px",textAlign:"center",color:"#94a3b8",fontSize:13},W$={padding:"2px 12px",background:"#f1f5f9",color:"#64748b",borderTop:"1px solid #e2e8f0",borderBottom:"1px solid #e2e8f0",userSelect:"none"};function j$(e){return e==="add"?{row:{background:"#e6ffed"},gutter:{background:"#cdffd8",color:"#22863a"},sign:"+",signColor:"#22863a"}:e==="remove"?{row:{background:"#ffeef0"},gutter:{background:"#ffdce0",color:"#b31d28"},sign:"-",signColor:"#b31d28"}:{row:{background:"#ffffff"},gutter:{background:"#f8fafc",color:"#94a3b8"},sign:" ",signColor:"#94a3b8"}}const ep={display:"inline-block",width:44,textAlign:"right",padding:"0 6px",color:"#94a3b8",userSelect:"none",borderRight:"1px solid #e2e8f0",whiteSpace:"nowrap"};function H$({oldVersion:e,newVersion:t,oldContent:n,newContent:o,t:r,onBack:s,onClose:a}){const l=u.useMemo(()=>{const c=Qu(n),p=Qu(o);return D$(c,p)},[n,o]),d=l.addedCount<0;return i.jsxs("div",{className:"g7le-version-diff","data-testid":"g7le-version-diff",style:N$,children:[i.jsxs("div",{"data-modal-drag-handle":!0,style:M$,children:[i.jsxs("button",{type:"button",onClick:s,style:L$,"data-testid":"g7le-version-diff-back",children:["← ",r("layout_editor.version_history.diff_back")]}),i.jsx("span",{style:{fontSize:14,fontWeight:700},"data-testid":"g7le-version-diff-title",children:r("layout_editor.version_history.diff_title",{old:e,new:t})}),i.jsx("button",{type:"button","aria-label":r("layout_editor.version_history.close"),onClick:a,style:P$,"data-testid":"g7le-version-diff-close",children:"✕"})]}),!d&&i.jsxs("div",{style:O$,"data-testid":"g7le-version-diff-summary",children:[i.jsx("span",{style:{color:"#16a34a"},"data-testid":"g7le-version-diff-added",children:r("layout_editor.version_history.added",{count:Math.max(0,l.addedCount)})}),i.jsx("span",{style:{color:"#dc2626"},"data-testid":"g7le-version-diff-removed",children:r("layout_editor.version_history.removed",{count:Math.max(0,l.removedCount)})})]}),i.jsx("div",{style:B$,children:d?i.jsx("div",{style:Ru,"data-testid":"g7le-version-diff-too-large",children:r("layout_editor.version_history.diff_too_large")}):l.identical?i.jsx("div",{style:Ru,"data-testid":"g7le-version-diff-identical",children:r("layout_editor.version_history.diff_identical")}):l.hunks.map((c,p)=>i.jsxs("div",{"data-testid":`gLine truncated
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},a2={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function l2(e){let{announcements:t=a2,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=s2}=e;const{announce:s,announcement:a}=o2(),l=oi("DndLiveRegion"),[d,c]=u.useState(!1);if(u.useEffect(()=>{c(!0)},[]),r2(u.useMemo(()=>({onDragStart(f){let{active:b}=f;s(t.onDragStart({active:b}))},onDragMove(f){let{active:b,over:g}=f;t.onDragMove&&s(t.onDragMove({active:b,over:g}))},onDragOver(f){let{active:b,over:g}=f;s(t.onDragOver({active:b,over:g}))},onDragEnd(f){let{active:b,over:g}=f;s(t.onDragEnd({active:b,over:g}))},onDragCancel(f){let{active:b,over:g}=f;s(t.onDragCancel({active:b,over:g}))}}),[s,t])),!d)return null;const p=u.createElement(u.Fragment,null,u.createElement(t2,{id:o,value:r.draggable}),u.createElement(n2,{id:l,announcement:a}));return n?Cn.createPortal(p,n):p}var it;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(it||(it={}));function si(){}function d2(e,t){return u.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function c2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const Ht=Object.freeze({x:0,y:0});function u2(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function p2(e,t){const n=ii(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function f2(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function g2(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function h2(e){let{left:t,top:n,height:o,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+o},{x:t+r,y:n+o}]}function y2(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function b2(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=r-o,l=s-n;if(o<r&&n<s){const d=t.width*t.height,c=e.width*e.height,p=a*l,f=p/(d+c-p);return Number(f.toFixed(4))}return 0}const m2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const s of o){const{id:a}=s,l=n.get(a);if(l){const d=b2(l,t);d>0&&r.push({id:a,data:{droppableContainer:s,value:d}})}}return r.sort(g2)};function v2(e,t){const{top:n,left:o,bottom:r,right:s}=t;return n<=e.y&&e.y<=r&&o<=e.x&&e.x<=s}const _2=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:o}=e;if(!o)return[];const r=[];for(const s of t){const{id:a}=s,l=n.get(a);if(l&&v2(o,l)){const c=h2(l).reduce((f,b)=>f+u2(o,b),0),p=Number((c/4).toFixed(4));r.push({id:a,data:{droppableContainer:s,value:p}})}}return r.sort(f2)};function x2(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Yp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ht}function w2(e){return function(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),s=1;s<o;s++)r[s-1]=arguments[s];return r.reduce((a,l)=>({...a,top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),{...n})}}const k2=w2(1);function Xp(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function S2(e,t,n){const o=Xp(t);if(!o)return e;const{scaleX:r,scaleY:s,x:a,y:l}=o,d=e.left-a-(1-r)*parseFloat(n),c=e.top-l-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),p=r?e.width/r:e.width,f=s?e.height/s:e.height;return{width:p,height:f,top:c,right:d+p,bottom:c+f,left:d}}const C2={ignoreTransform:!1};function Vo(e,t){t===void 0&&(t=C2);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:p}=xt(e).getComputedStyle(e);c&&(n=S2(n,c,p))}const{top:o,left:r,width:s,height:a,bottom:l,right:d}=n;return{top:o,left:r,width:s,height:a,bottom:l,right:d}}function Jp(e){return Vo(e,{ignoreTransform:!0})}function $2(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function E2(e,t){return t===void 0&&(t=xt(e).getComputedStyle(e)),t.position==="fixed"}function I2(e,t){t===void 0&&(t=xt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const s=t[r];return typeof s=="string"?n.test(s):!1})}function pa(e,t){const n=[];
Line truncated
|
||||
`:"",e.message]})]}),i.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,flexWrap:"wrap"},children:[e.kind==="unauthorized"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-signin",onClick:a,style:qa,children:t("layout_editor.access_error.action.sign_in")}),e.kind==="forbidden"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-home",onClick:r,style:qa,children:t("layout_editor.access_error.action.go_home")}),(e.kind==="not_found"||e.kind==="server_error"||e.kind==="network"||e.kind==="unknown")&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-retry",onClick:s,style:qa,children:t("layout_editor.access_error.action.retry")}),e.kind!=="unauthorized"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-home-secondary",onClick:r,style:Y4,children:t("layout_editor.access_error.action.go_admin_home")})]})]})]})}const qa={padding:"8px 16px",background:"#2563eb",color:"#fff",border:"1px solid #1d4ed8",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},Y4={padding:"8px 16px",background:"#fff",color:"#475569",border:"1px solid #cbd5e1",borderRadius:6,fontSize:13,fontWeight:500,cursor:"pointer"};function X4(e){const t=window;if(typeof t>"u")return{getSnapshot:()=>({globalState:{},localState:{}}),restore:()=>{}};const n=t.G7Core||{},o={templateApp:t.__templateApp,g7CoreState:n.state,g7CoreDispatch:n.dispatch,g7CoreData:n.data,g7CoreModal:n.modal,g7CoreToast:n.toast};let r={...e.initialGlobalState??{}};r._local||(r._local={});const s=[],a=()=>{const c={globalState:{...r},localState:{...r._local??{}}};for(const p of s)try{p(r)}catch{}e.onChange?.(c)},l={},d={getGlobalState:()=>r,setGlobalState:(c,p)=>{typeof c=="function"?r=c(r):r={...r,...c},a()},onGlobalStateChange:c=>(s.push(c),()=>{const p=s.indexOf(c);p>=0&&s.splice(p,1)}),get globalState(){return r},getActionDispatcher:()=>e.actionDispatcher,getDataSource:c=>l[c]??null,setDataSource:(c,p)=>{l[c]=p},refetchDataSource:async c=>null,updateDataSourceItem:(c,p,f)=>l[c]??null,getLocale:()=>e.locale,changeLocale:c=>{},getRouter:()=>({navigate:()=>{},replace:()=>{},push:()=>{}}),updateQueryParams:()=>{}};return t.__templateApp=d,n&&typeof n.dispatch=="function"&&(n.dispatch=(c,p)=>{try{return e.actionDispatcher.executeAction(c,p??{})}catch{return}}),n&&typeof n.modal=="object"&&n.modal!==null&&(n.modal={...n.modal,open:()=>{},close:()=>{},closeAll:()=>{}}),n&&typeof n.toast=="object"&&n.toast!==null&&(n.toast={...n.toast,push:()=>{},dismiss:()=>{}}),{getSnapshot:()=>({globalState:{...r},localState:{...r._local??{}}}),restore:()=>{t.__templateApp===d&&(t.__templateApp=o.templateApp),t.G7Core&&(o.g7CoreState!==void 0&&(t.G7Core.state=o.g7CoreState),o.g7CoreDispatch!==void 0&&(t.G7Core.dispatch=o.g7CoreDispatch),o.g7CoreData!==void 0&&(t.G7Core.data=o.g7CoreData),o.g7CoreModal!==void 0&&(t.G7Core.modal=o.g7CoreModal),o.g7CoreToast!==void 0&&(t.G7Core.toast=o.g7CoreToast)),s.length=0}}}const J4=new Set(["id","userId","postId","orderId","productId","categoryId","commentId","noticeId","inquiryId","addressId","wishlistId","notificationId","roleId","menuId"]);function Z4(e){if(!e)return{};const t={},n=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;let o;for(;(o=n.exec(e))!==null;){const r=o[1];t[r]=Q4(r)}return t}function Q4(e){return J4.has(e)||/Id$|_id$/.test(e)?"1":"sample"}const R4=mo("LayoutEditor");function Ro(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function _i(e){if(Array.isArray(e))return e.map(t=>_i(t));if(Ro(e)){const t={};for(const[n,o]of Object.entries(e))t[n]=_i(o);return t}return e}function kg(e,t="",n=new Set){for(const[o,r]of Object.entries(e)){const s=t?`${t}.${o}`:o;Ro(r)?kg(r,s,n):n.add(s)}return n}function Sg(e,t,n,o,r,s=""){for(const[a,l]of Object.entries(t)){const d=s?`${s}.${a}`:a;if(n.has(d)){r(`[LayoutEditor] sampleGlobal key conflict: extension '${o}' override of core key '${d}' ignored`);continue}const c=e[a];Ro(l)&&Ro(c)?Sg(c,l,n,o,r,d):e[a]=_i(l)}}function Ga(e){const t=e.warn??(r=>R4.warn(r)),n=_i(e.coreSeed??{});e.isGuestOnly&&"currentUser"in n&&delete n.currentUser;const o=kg(n);for(const r of e.sources)Ro(r.sampleGlobal)&&Sg(n,r.sampleGlobal,o,r.id,t);return e.isGuestOnly&&"currentUser"in n&&delete n.currentUser,n}function eD(e){const t={};if(!e||typeof e!="object"||Array.isArray(e))return t;for(const[n,o]of Object.entries(e))n.startsWith("$")&&(t[n]=o);return t}function tD(e){const t={};if(!e||typeof e!="object"||Array.isArray(e))return t;for(const[n,o]of Object.entries(e))n.startsWith("$")||(t[n]=o);return t}function nD(e){if(typeof e!="string")return null;const t=/^\s*\{\{\s*([\s\S]*?)\s*\}\}\s*$/.exec(e);if(!t)return null;let n=t[1];const o=n.indexOf("??");return o>=0&&(n=n.slice(0,o)),n=n.replace(/\?\./g,".").replace(/\s+/g,""),n===""||!/^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/.test(n)?null:n.split(".")}function oD(e,t){const n=nD(t);if(!n||n.length===0)return e;let o=e;for(let a=0;a<n.length;a++){if(o==null||typeof o!="obj
Line truncated
|
||||
`},a2={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function l2(e){let{announcements:t=a2,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=s2}=e;const{announce:s,announcement:a}=o2(),l=oi("DndLiveRegion"),[d,c]=u.useState(!1);if(u.useEffect(()=>{c(!0)},[]),r2(u.useMemo(()=>({onDragStart(f){let{active:b}=f;s(t.onDragStart({active:b}))},onDragMove(f){let{active:b,over:g}=f;t.onDragMove&&s(t.onDragMove({active:b,over:g}))},onDragOver(f){let{active:b,over:g}=f;s(t.onDragOver({active:b,over:g}))},onDragEnd(f){let{active:b,over:g}=f;s(t.onDragEnd({active:b,over:g}))},onDragCancel(f){let{active:b,over:g}=f;s(t.onDragCancel({active:b,over:g}))}}),[s,t])),!d)return null;const p=u.createElement(u.Fragment,null,u.createElement(t2,{id:o,value:r.draggable}),u.createElement(n2,{id:l,announcement:a}));return n?Cn.createPortal(p,n):p}var it;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(it||(it={}));function si(){}function d2(e,t){return u.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function c2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const Ht=Object.freeze({x:0,y:0});function u2(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function p2(e,t){const n=ii(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function f2(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function g2(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function h2(e){let{left:t,top:n,height:o,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+o},{x:t+r,y:n+o}]}function y2(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function b2(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=r-o,l=s-n;if(o<r&&n<s){const d=t.width*t.height,c=e.width*e.height,p=a*l,f=p/(d+c-p);return Number(f.toFixed(4))}return 0}const m2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const s of o){const{id:a}=s,l=n.get(a);if(l){const d=b2(l,t);d>0&&r.push({id:a,data:{droppableContainer:s,value:d}})}}return r.sort(g2)};function v2(e,t){const{top:n,left:o,bottom:r,right:s}=t;return n<=e.y&&e.y<=r&&o<=e.x&&e.x<=s}const _2=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:o}=e;if(!o)return[];const r=[];for(const s of t){const{id:a}=s,l=n.get(a);if(l&&v2(o,l)){const c=h2(l).reduce((f,b)=>f+u2(o,b),0),p=Number((c/4).toFixed(4));r.push({id:a,data:{droppableContainer:s,value:p}})}}return r.sort(f2)};function x2(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Yp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ht}function w2(e){return function(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),s=1;s<o;s++)r[s-1]=arguments[s];return r.reduce((a,l)=>({...a,top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),{...n})}}const k2=w2(1);function Xp(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function S2(e,t,n){const o=Xp(t);if(!o)return e;const{scaleX:r,scaleY:s,x:a,y:l}=o,d=e.left-a-(1-r)*parseFloat(n),c=e.top-l-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),p=r?e.width/r:e.width,f=s?e.height/s:e.height;return{width:p,height:f,top:c,right:d+p,bottom:c+f,left:d}}const C2={ignoreTransform:!1};function Vo(e,t){t===void 0&&(t=C2);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:p}=xt(e).getComputedStyle(e);c&&(n=S2(n,c,p))}const{top:o,left:r,width:s,height:a,bottom:l,right:d}=n;return{top:o,left:r,width:s,height:a,bottom:l,right:d}}function Jp(e){return Vo(e,{ignoreTransform:!0})}function $2(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function E2(e,t){return t===void 0&&(t=xt(e).getComputedStyle(e)),t.position==="fixed"}function I2(e,t){t===void 0&&(t=xt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const s=t[r];return typeof s=="string"?n.test(s):!1})}function pa(e,t){const n=[];
Line truncated
|
||||
`:"",e.message]})]}),i.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,flexWrap:"wrap"},children:[e.kind==="unauthorized"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-signin",onClick:a,style:qa,children:t("layout_editor.access_error.action.sign_in")}),e.kind==="forbidden"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-home",onClick:r,style:qa,children:t("layout_editor.access_error.action.go_home")}),(e.kind==="not_found"||e.kind==="server_error"||e.kind==="network"||e.kind==="unknown")&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-retry",onClick:s,style:qa,children:t("layout_editor.access_error.action.retry")}),e.kind!=="unauthorized"&&i.jsx("button",{type:"button","data-testid":"g7le-access-error-action-home-secondary",onClick:r,style:Y4,children:t("layout_editor.access_error.action.go_admin_home")})]})]})]})}const qa={padding:"8px 16px",background:"#2563eb",color:"#fff",border:"1px solid #1d4ed8",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},Y4={padding:"8px 16px",background:"#fff",color:"#475569",border:"1px solid #cbd5e1",borderRadius:6,fontSize:13,fontWeight:500,cursor:"pointer"};function X4(e){const t=window;if(typeof t>"u")return{getSnapshot:()=>({globalState:{},localState:{}}),restore:()=>{}};const n=t.G7Core||{},o={templateApp:t.__templateApp,g7CoreState:n.state,g7CoreDispatch:n.dispatch,g7CoreData:n.data,g7CoreModal:n.modal,g7CoreToast:n.toast};let r={...e.initialGlobalState??{}};r._local||(r._local={});const s=[],a=()=>{const c={globalState:{...r},localState:{...r._local??{}}};for(const p of s)try{p(r)}catch{}e.onChange?.(c)},l={},d={getGlobalState:()=>r,setGlobalState:(c,p)=>{typeof c=="function"?r=c(r):r={...r,...c},a()},onGlobalStateChange:c=>(s.push(c),()=>{const p=s.indexOf(c);p>=0&&s.splice(p,1)}),get globalState(){return r},getActionDispatcher:()=>e.actionDispatcher,getDataSource:c=>l[c]??null,setDataSource:(c,p)=>{l[c]=p},refetchDataSource:async c=>null,updateDataSourceItem:(c,p,f)=>l[c]??null,getLocale:()=>e.locale,changeLocale:c=>{},getRouter:()=>({navigate:()=>{},replace:()=>{},push:()=>{}}),updateQueryParams:()=>{}};return t.__templateApp=d,n&&typeof n.dispatch=="function"&&(n.dispatch=(c,p)=>{try{return e.actionDispatcher.executeAction(c,p??{})}catch{return}}),n&&typeof n.modal=="object"&&n.modal!==null&&(n.modal={...n.modal,open:()=>{},close:()=>{},closeAll:()=>{}}),n&&typeof n.toast=="object"&&n.toast!==null&&(n.toast={...n.toast,push:()=>{},dismiss:()=>{}}),{getSnapshot:()=>({globalState:{...r},localState:{...r._local??{}}}),restore:()=>{t.__templateApp===d&&(t.__templateApp=o.templateApp),t.G7Core&&(o.g7CoreState!==void 0&&(t.G7Core.state=o.g7CoreState),o.g7CoreDispatch!==void 0&&(t.G7Core.dispatch=o.g7CoreDispatch),o.g7CoreData!==void 0&&(t.G7Core.data=o.g7CoreData),o.g7CoreModal!==void 0&&(t.G7Core.modal=o.g7CoreModal),o.g7CoreToast!==void 0&&(t.G7Core.toast=o.g7CoreToast)),s.length=0}}}const J4=new Set(["id","userId","postId","orderId","productId","categoryId","commentId","noticeId","inquiryId","addressId","wishlistId","notificationId","roleId","menuId"]);function Z4(e){if(!e)return{};const t={},n=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;let o;for(;(o=n.exec(e))!==null;){const r=o[1];t[r]=Q4(r)}return t}function Q4(e){return J4.has(e)||/Id$|_id$/.test(e)?"1":"sample"}const R4=mo("LayoutEditor");function Ro(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function _i(e){if(Array.isArray(e))return e.map(t=>_i(t));if(Ro(e)){const t={};for(const[n,o]of Object.entries(e))t[n]=_i(o);return t}return e}function kg(e,t="",n=new Set){for(const[o,r]of Object.entries(e)){const s=t?`${t}.${o}`:o;Ro(r)?kg(r,s,n):n.add(s)}return n}function Sg(e,t,n,o,r,s=""){for(const[a,l]of Object.entries(t)){const d=s?`${s}.${a}`:a;if(n.has(d)){r(`[LayoutEditor] sampleGlobal key conflict: extension '${o}' override of core key '${d}' ignored`);continue}const c=e[a];Ro(l)&&Ro(c)?Sg(c,l,n,o,r,d):e[a]=_i(l)}}function Ga(e){const t=e.warn??(r=>R4.warn(r)),n=_i(e.coreSeed??{});e.isGuestOnly&&"currentUser"in n&&delete n.currentUser;const o=kg(n);for(const r of e.sources)Ro(r.sampleGlobal)&&Sg(n,r.sampleGlobal,o,r.id,t);return e.isGuestOnly&&"currentUser"in n&&delete n.currentUser,n}function eD(e){const t={};if(!e||typeof e!="object"||Array.isArray(e))return t;for(const[n,o]of Object.entries(e))n.startsWith("$")&&(t[n]=o);return t}function tD(e){const t={};if(!e||typeof e!="object"||Array.isArray(e))return t;for(const[n,o]of Object.entries(e))n.startsWith("$")||(t[n]=o);return t}function nD(e){if(typeof e!="string")return null;const t=/^\s*\{\{\s*([\s\S]*?)\s*\}\}\s*$/.exec(e);if(!t)return null;let n=t[1];const o=n.indexOf("??");return o>=0&&(n=n.slice(0,o)),n=n.replace(/\?\./g,".").replace(/\s+/g,""),n===""||!/^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/.test(n)?null:n.split(".")}function oD(e,t){const n=nD(t);if(!n||n.length===0)return e;let o=e;for(let a=0;a<n.length;a++){if(o==null||typeof o!="obj
Line truncated
|
||||
+69
-23
@@ -1,23 +1,63 @@
|
||||
var Tk=Object.defineProperty;var kk=(Xt,ea,ta)=>ea in Xt?Tk(Xt,ea,{enumerable:!0,configurable:!0,writable:!0,value:ta}):Xt[ea]=ta;var M=(Xt,ea,ta)=>kk(Xt,typeof ea!="symbol"?ea+"":ea,ta);(function(Xt){"use strict";function ea(s,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in s)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(s,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}function ta(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var gd={exports:{}},We={};var Eg;function Ow(){if(Eg)return We;Eg=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=S&&H[S]||H["@@iterator"],typeof H=="function"?H:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function L(H,T,ce){this.props=H,this.context=T,this.refs=A,this.updater=ce||_}L.prototype.isReactComponent={},L.prototype.setState=function(H,T){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,T,"setState")},L.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function $(){}$.prototype=L.prototype;function k(H,T,ce){this.props=H,this.context=T,this.refs=A,this.updater=ce||_}var O=k.prototype=new $;O.constructor=k,x(O,L.prototype),O.isPureReactComponent=!0;var P=Array.isArray;function G(){}var B={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function pe(H,T,ce){var de=ce.ref;return{$$typeof:s,type:H,key:T,ref:de!==void 0?de:null,props:ce}}function Se(H,T){return pe(H.type,T,H.props)}function we(H){return typeof H=="object"&&H!==null&&H.$$typeof===s}function Ue(H){var T={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ce){return T[ce]})}var Fe=/\/+/g;function qe(H,T){return typeof H=="object"&&H!==null&&H.key!=null?Ue(""+H.key):T.toString(36)}function wt(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(G,G):(H.status="pending",H.then(function(T){H.status==="pending"&&(H.status="fulfilled",H.value=T)},function(T){H.status==="pending"&&(H.status="rejected",H.reason=T)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function J(H,T,ce,de,be){var ie=typeof H;(ie==="undefined"||ie==="boolean")&&(H=null);var xe=!1;if(H===null)xe=!0;else switch(ie){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(H.$$typeof){case s:case e:xe=!0;break;case m:return xe=H._init,J(xe(H._payload),T,ce,de,be)}}if(xe)return be=be(H),xe=de===""?"."+qe(H,0):de,P(be)?(ce="",xe!=null&&(ce=xe.replace(Fe,"$&/")+"/"),J(be,T,ce,"",function(Me){return Me})):be!=null&&(we(be)&&(be=Se(be,ce+(be.key==null||H&&H.key===be.key?"":(""+be.key).replace(Fe,"$&/")+"/")+xe)),T.push(be)),1;xe=0;var _e=de===""?".":de+":";if(P(H))for(var Te=0;Te<H.length;Te++)de=H[Te],ie=_e+qe(de,Te),xe+=J(de,T,ce,ie,be);else if(Te=v(H),typeof Te=="function")for(H=Te.call(H),Te=0;!(de=H.next()).done;)de=de.value,ie=_e+qe(de,Te++),xe+=J(de,T,ce,ie,be);else if(ie==="object"){if(typeof H.then=="function")return J(wt(H),T,ce,de,be);throw T=String(H),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return xe}function fe(H,T,ce){if(H==null)return H;var de=[],be=0;return J(H,de,"","",function(ie){return T.call(ce,ie,be++)}),de}function Le(H){if(H._status===-1){var T=H._result;T=T(),T.then(function(ce){(H._status===0||H._status===-1)&&(H._status=1,H._result=ce)},function(ce){(H._status===0||H._status===-1)&&(H._status=2,H._result=ce)}),H._status===-1&&(H._status=0,H._result=T)}if(H._status===1)return H._result.default;throw H._result}var Z=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},ge={map:fe,forEach:function(H,T,Line truncated
|
||||
var pR=Object.defineProperty;var gR=(tn,ea,ta)=>ea in tn?pR(tn,ea,{enumerable:!0,configurable:!0,writable:!0,value:ta}):tn[ea]=ta;var M=(tn,ea,ta)=>gR(tn,typeof ea!="symbol"?ea+"":ea,ta);(function(tn){"use strict";function ea(s,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in s)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(s,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}function ta(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Sd={exports:{}},Ye={};/**
|
||||
* @license React
|
||||
* react.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Rg;function Qw(){if(Rg)return Ye;Rg=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(j){return j===null||typeof j!="object"?null:(j=v&&j[v]||j["@@iterator"],typeof j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function D(j,T,de){this.props=j,this.context=T,this.refs=A,this.updater=de||_}D.prototype.isReactComponent={},D.prototype.setState=function(j,T){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,T,"setState")},D.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function O(){}O.prototype=D.prototype;function k(j,T,de){this.props=j,this.context=T,this.refs=A,this.updater=de||_}var L=k.prototype=new O;L.constructor=k,x(L,D.prototype),L.isPureReactComponent=!0;var B=Array.isArray;function q(){}var z={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function he(j,T,de){var fe=de.ref;return{$$typeof:s,type:j,key:T,ref:fe!==void 0?fe:null,props:de}}function we(j,T){return he(j.type,T,j.props)}function ve(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function Ue(j){var T={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(de){return T[de]})}var Fe=/\/+/g;function Ge(j,T){return typeof j=="object"&&j!==null&&j.key!=null?Ue(""+j.key):T.toString(36)}function _t(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(q,q):(j.status="pending",j.then(function(T){j.status==="pending"&&(j.status="fulfilled",j.value=T)},function(T){j.status==="pending"&&(j.status="rejected",j.reason=T)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function Q(j,T,de,fe,Ae){var se=typeof j;(se==="undefined"||se==="boolean")&&(j=null);var ge=!1;if(j===null)ge=!0;else switch(se){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(j.$$typeof){case s:case e:ge=!0;break;case m:return ge=j._init,Q(ge(j._payload),T,de,fe,Ae)}}if(ge)return Ae=Ae(j),ge=fe===""?"."+Ge(j,0):fe,B(Ae)?(de="",ge!=null&&(de=ge.replace(Fe,"$&/")+"/"),Q(Ae,T,de,"",function(Ie){return Ie})):Ae!=null&&(ve(Ae)&&(Ae=we(Ae,de+(Ae.key==null||j&&j.key===Ae.key?"":(""+Ae.key).replace(Fe,"$&/")+"/")+ge)),T.push(Ae)),1;ge=0;var $e=fe===""?".":fe+":";if(B(j))for(var Te=0;Te<j.length;Te++)fe=j[Te],se=$e+Ge(fe,Te),ge+=Q(fe,T,de,se,Ae);else if(Te=S(j),typeof Te=="function")for(j=Te.call(j),Te=0;!(fe=j.next()).done;)fe=fe.value,se=$e+Ge(fe,Te++),ge+=Q(fe,T,de,se,Ae);else if(se==="object"){if(typeof j.then=="function")return Q(_t(j),T,de,fe,Ae);throw T=String(j),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ge}function ue(j,T,de){if(j==null)return j;var fe=[],Ae=0;return Q(j,fe,"","",function(se){return T.call(de,se,Ae++)}),fe}function Oe(j){if(j._status===-1){var T=j._result;T=T(),T.then(function(de){(j._status===0||j._status===-1)&&(j._status=1,j._result=de)},function(de){(j._status===0||j._status===-1)&&(j._status=2,j._result=de)}),j._status===-1&&(j._status=0,j._result=T)}if(j._status===1)return j._result.default;throw j._result}var ee=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},me={map:ue,forEach:function(j,T,de){ue(j,function(){T.apply(this,arguments)},de)},count:function(j){var T=0;return ue(j,function(){T++}),T},toArray:function(j){return ue(j,function(T){return T})||[]},only:function(j){if(!ve(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Ye.Activity=y,Ye.Children=me,Ye.Component=D,Ye.Fragment=n,Ye.Profiler=i,Ye.PureComponent=k,Ye.StrictMode=r,Ye.Suspense=f,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(j){return z.H.useMemoCache(j)}},Ye.cache=function(j){return function(){return j.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Line truncated
|
||||
* @license React
|
||||
* scheduler.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Og;function Zw(){return Og||(Og=1,(function(s){function e(Q,ue){var Oe=Q.length;Q.push(ue);e:for(;0<Oe;){var ee=Oe-1>>>1,me=Q[ee];if(0<i(me,ue))Q[ee]=ue,Q[Oe]=me,Oe=ee;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ue=Q[0],Oe=Q.pop();if(Oe!==ue){Q[0]=Oe;e:for(var ee=0,me=Q.length,j=me>>>1;ee<j;){var T=2*(ee+1)-1,de=Q[T],fe=T+1,Ae=Q[fe];if(0>i(de,Oe))fe<me&&0>i(Ae,de)?(Q[ee]=Ae,Q[fe]=Oe,ee=fe):(Q[ee]=de,Q[T]=Oe,ee=T);else if(fe<me&&0>i(Ae,Oe))Q[ee]=Ae,Q[fe]=Oe,ee=fe;else break e}}return ue}function i(Q,ue){var Oe=Q.sortIndex-ue.sortIndex;return Oe!==0?Oe:Q.id-ue.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;s.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();s.unstable_now=function(){return c.now()-d}}var f=[],h=[],m=1,y=null,v=3,S=!1,_=!1,x=!1,A=!1,D=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function L(Q){for(var ue=n(h);ue!==null;){if(ue.callback===null)r(h);else if(ue.startTime<=Q)r(h),ue.sortIndex=ue.expirationTime,e(f,ue);else break;ue=n(h)}}function B(Q){if(x=!1,L(Q),!_)if(n(f)!==null)_=!0,q||(q=!0,Ue());else{var ue=n(h);ue!==null&&_t(B,ue.startTime-Q)}}var q=!1,z=-1,W=5,he=-1;function we(){return A?!0:!(s.unstable_now()-he<W)}function ve(){if(A=!1,q){var Q=s.unstable_now();he=Q;var ue=!0;try{e:{_=!1,x&&(x=!1,O(z),z=-1),S=!0;var Oe=v;try{t:{for(L(Q),y=n(f);y!==null&&!(y.expirationTime>Q&&we());){var ee=y.callback;if(typeof ee=="function"){y.callback=null,v=y.priorityLevel;var me=ee(y.expirationTime<=Q);if(Q=s.unstable_now(),typeof me=="function"){y.callback=me,L(Q),ue=!0;break t}y===n(f)&&r(f),L(Q)}else r(f);y=n(f)}if(y!==null)ue=!0;else{var j=n(h);j!==null&&_t(B,j.startTime-Q),ue=!1}}break e}finally{y=null,v=Oe,S=!1}ue=void 0}}finally{ue?Ue():q=!1}}}var Ue;if(typeof k=="function")Ue=function(){k(ve)};else if(typeof MessageChannel<"u"){var Fe=new MessageChannel,Ge=Fe.port2;Fe.port1.onmessage=ve,Ue=function(){Ge.postMessage(null)}}else Ue=function(){D(ve,0)};function _t(Q,ue){z=D(function(){Q(s.unstable_now())},ue)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(Q){Q.callback=null},s.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<Q?Math.floor(1e3/Q):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var ue=3;break;default:ue=v}var Oe=v;v=ue;try{return Q()}finally{v=Oe}},s.unstable_requestPaint=function(){A=!0},s.unstable_runWithPriority=function(Q,ue){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var Oe=v;v=Q;try{return ue()}finally{v=Oe}},s.unstable_scheduleCallback=function(Q,ue,Oe){var ee=s.unstable_now();switch(typeof Oe=="object"&&Oe!==null?(Oe=Oe.delay,Oe=typeof Oe=="number"&&0<Oe?ee+Oe:ee):Oe=ee,Q){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=Oe+me,Q={id:m++,callback:ue,priorityLevel:Q,startTime:Oe,expirationTime:me,sortIndex:-1},Oe>ee?(Q.sortIndex=Oe,e(h,Q),n(f)===null&&Q===n(h)&&(x?(O(z),z=-1):x=!0,_t(B,Oe-ee))):(Q.sortIndex=me,e(f,Q),_||S||(_=!0,q||(q=!0,Ue()))),Q},s.unstable_shouldYield=we,s.unstable_wrapCallback=function(Q){var ue=v;return function(){var Oe=v;v=ue;try{return Q.apply(this,arguments)}finally{v=Oe}}}})(_d)),_d}var Lg;function e0(){return Lg||(Lg=1,Ed.exports=Zw()),Ed.exports}var Ad={exports:{}},_n={};/**
|
||||
* @license React
|
||||
* react-dom.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var $g;function t0(){if($g)return _n;$g=1;var s=wd();function e(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:m}}var c=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,_n.createPortal=function(f,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return l(f,h,null,m)},_n.flushSync=function(f){var h=c.T,m=r.p;try{if(c.T=null,r.p=2,f)return f()}finally{c.T=h,r.p=m,r.d.f()}},_n.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},_n.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},_n.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var m=h.as,y=d(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:S}):m==="script"&&r.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_n.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=d(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},_n.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=d(m,h.crossOrigin);r.d.L(f,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_n.preloadModule=function(f,h){if(typeof f=="string")if(h){var m=d(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},_n.requestFormReset=function(f){r.d.r(f)},_n.unstable_batchedUpdates=function(f,h){return f(h)},_n.useFormState=function(f,h,m){return c.H.useFormState(f,h,m)},_n.useFormStatus=function(){return c.H.useHostTransitionStatus()},_n.version="19.2.0",_n}var Mg;function Ng(){if(Mg)return Ad.exports;Mg=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),Ad.exports=t0(),Ad.exports}/**
|
||||
* @license React
|
||||
* react-dom-client.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Ig;function n0(){if(Ig)return uo;Ig=1;var s=e0(),e=wd(),n=Ng();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function l(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function c(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function d(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(l(t)!==t)throw Error(r(188))}function h(t){var a=t.alternate;if(!a){if(a=l(t),a===null)throw Error(r(188));return a!==t?null:t}for(var o=t,u=a;;){var p=o.return;if(p===null)break;var g=p.alternate;if(g===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===o)return f(p),t;if(g===u)return f(p),a;g=g.sibling}throw Error(r(188))}if(o.return!==u.return)o=p,u=g;else{for(var w=!1,R=p.child;R;){if(R===o){w=!0,o=p,u=g;break}if(R===u){w=!0,u=p,o=g;break}R=R.sibling}if(!w){for(R=g.child;R;){if(R===o){w=!0,o=g,u=p;break}if(R===u){w=!0,u=g,o=p;break}R=R.sibling}if(!w)throw Error(r(189))}}if(o.alternate!==u)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?t:a}function m(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=m(t),a!==null)return a;t=t.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),he=Symbol.for("react.activity"),we=Symbol.for("react.memo_cache_sentinel"),ve=Symbol.iterator;function Ue(t){return t===null||typeof t!="object"?null:(t=ve&&t[ve]||t["@@iterator"],typeof t=="function"?t:null)}var Fe=Symbol.for("react.client.reference");function Ge(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Fe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case D:return"Profiler";case A:return"StrictMode";case B:return"Suspense";case q:return"SuspenseList";case he:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case _:return"Portal";case k:return t.displayName||"Context";case O:return(t._context.displayName||"Context")+".Consumer";case L:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return a=t.displayName||null,a!==null?a:Ge(t.type)||"Memo";case W:a=t._payload,t=t._init;try{return Ge(t(a))}catch{}}return null}var _t=Array.isArray,Q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe={pending:!1,data:null,method:null,action:null},ee=[],me=-1;function j(t){return{current:t}}function T(t){0>me||(t.current=ee[me],ee[me]=null,me--)}function de(t,a){me++,ee[me]=t.current,t.current=a}var fe=j(null),Ae=j(null),se=j(null),ge=j(null);function $e(t,a){switch(de(se,a),de(Ae,t),de(fe,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?bw(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=bw(a),t=vw(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}T(fe),de(fe,t)}function Te(){T(fe),T(Ae),T(se)}function Ie(t){t.memoizedState!==null&&de(ge,t);var a=fe.current,o=vw(a,t.type);a!==o&&(de(Ae,t),de(fe,o))}function xt(t){Ae.current===t&&(T(fe),T(Ae)),ge.current===t&&(T(ge),Vl._currentValue=Oe)}var rt,gt;function at(t){if(rt===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);rt=a&&a[1]||"",gt=-1<o.stack.indexOf(`
|
||||
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||
`+Ct+t+Ot}var rn=!1;function Kt(t,a){if(!t||rn)return"";rn=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(te){var Q=te}Reflect.construct(t,[],le)}else{try{le.call()}catch(te){Q=te}t.call(le.prototype)}}else{try{throw Error()}catch(te){Q=te}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(te){if(te&&Q&&typeof te.stack=="string")return[te.stack,Q.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),w=g[0],R=g[1];if(w&&R){var z=w.split(`
|
||||
`+rt+t+gt}var Yt=!1;function jt(t,a){if(!t||Yt)return"";Yt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(te){var J=te}Reflect.construct(t,[],le)}else{try{le.call()}catch(te){J=te}t.call(le.prototype)}}else{try{throw Error()}catch(te){J=te}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),w=g[0],R=g[1];if(w&&R){var U=w.split(`
|
||||
`),X=R.split(`
|
||||
`);for(p=u=0;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===z.length||p===X.length)for(u=z.length-1,p=X.length-1;1<=u&&0<=p&&z[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(z[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||z[u]!==X[p]){var re=`
|
||||
`+z[u].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=u&&0<=p);break}}}finally{rn=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?ht(o):""}function It(t,a){switch(t.tag){case 26:case 27:case 5:return ht(t.type);case 16:return ht("Lazy");case 13:return t.child!==a&&a!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return Kt(t.type,!1);case 11:return Kt(t.type.render,!1);case 1:return Kt(t.type,!0);case 31:return ht("Activity");default:return""}}function Fr(t){try{var a="",o=null;do a+=It(t,o),o=t,t=t.return;while(t);return a}catch(u){return`
|
||||
`);for(p=u=0;u<U.length&&!U[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===U.length||p===X.length)for(u=U.length-1,p=X.length-1;1<=u&&0<=p&&U[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(U[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||U[u]!==X[p]){var re=`
|
||||
`+U[u].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=u&&0<=p);break}}}finally{Yt=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?at(o):""}function bt(t,a){switch(t.tag){case 26:case 27:case 5:return at(t.type);case 16:return at("Lazy");case 13:return t.child!==a&&a!==null?at("Suspense Fallback"):at("Suspense");case 19:return at("SuspenseList");case 0:case 15:return jt(t.type,!1);case 11:return jt(t.type.render,!1);case 1:return jt(t.type,!0);case 31:return at("Activity");default:return""}}function Be(t){try{var a="",o=null;do a+=bt(t,o),o=t,t=t.return;while(t);return a}catch(u){return`
|
||||
Error generating stack: `+u.message+`
|
||||
`+u.stack}}var hn=Object.prototype.hasOwnProperty,an=s.unstable_scheduleCallback,pn=s.unstable_cancelCallback,Wn=s.unstable_shouldYield,Vr=s.unstable_requestPaint,qt=s.unstable_now,ki=s.unstable_getCurrentPriorityLevel,la=s.unstable_ImmediatePriority,gn=s.unstable_UserBlockingPriority,Dn=s.unstable_NormalPriority,nt=s.unstable_LowPriority,In=s.unstable_IdlePriority,mn=s.log,ca=s.unstable_setDisableYieldValue,lr=null,sn=null;function _n(t){if(typeof mn=="function"&&ca(t),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(lr,t)}catch{}}var on=Math.clz32?Math.clz32:ue,F=Math.log,se=Math.LN2;function ue(t){return t>>>=0,t===0?32:31-(F(t)/se|0)|0}var ee=256,ve=262144,he=4194304;function Ee(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ae(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~g,u!==0?p=Ee(u):(w&=R,w!==0?p=Ee(w):o||(o=R&~t,o!==0&&(p=Ee(o))))):(R=u&~g,R!==0?p=Ee(R):w!==0?p=Ee(w):o||(o=u&~t,o!==0&&(p=Ee(o)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,o=a&-a,g>=o||g===32&&(o&4194048)!==0)?a:p}function Ve(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ke(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ne(){var t=he;return he<<=1,(he&62914560)===0&&(he=4194304),t}function Re(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function et(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function He(t,a,o,u,p,g){var w=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var R=t.entanglements,z=t.expirationTimes,X=t.hiddenUpdates;for(o=w&~o;0<o;){var re=31-on(o),le=1<<re;R[re]=0,z[re]=-1;var Q=X[re];if(Q!==null)for(X[re]=null,re=0;re<Q.length;re++){var te=Q[re];te!==null&&(te.lane&=-536870913)}o&=~le}u!==0&&Ge(t,u,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~a))}function Ge(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-on(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&261930}function Ce(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-on(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function je(t,a){var o=a&-a;return o=(o&42)!==0?1:tt(o),(o&(t.suspendedLanes|a))!==0?0:o}function tt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function At(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Mt(){var t=fe.p;return t!==0?t:(t=window.event,t===void 0?32:ww(t.type))}function On(t,a){var o=fe.p;try{return fe.p=t,a()}finally{fe.p=o}}var jt=Math.random().toString(36).slice(2),Ht="__reactFiber$"+jt,An="__reactProps$"+jt,za="__reactContainer$"+jt,Ko="__reactEvents$"+jt,ih="__reactListeners$"+jt,qc="__reactHandles$"+jt,Kr="__reactResources$"+jt,Ri="__reactMarker$"+jt;function Wo(t){delete t[Ht],delete t[An],delete t[Ko],delete t[ih],delete t[qc]}function Ua(t){var a=t[Ht];if(a)return a;for(var o=t.parentNode;o;){if(a=o[za]||o[Ht]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=iw(t);t!==null;){if(o=t[Ht])return o;t=iw(t)}return a}t=o,o=t.parentNode}return null}function Wr(t){if(t=t[Ht]||t[za]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function ua(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Pa(t){var a=t[Kr];return a||(a=t[Kr]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Jt(t){t[Ri]=!0}var Gc=new Set,Fc={};function Rr(t,a){Ba(t,a),Ba(t+"Capture",a)}function Ba(t,a){for(Fc[t]=a,t=0;t<a.length;t++)Gc.add(a[t])}var sh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u
Line truncated
|
||||
`).replace(YT,"")}function YS(t,a){return a=WS(a),WS(t)===a}function Tt(t,a,o,u,p,g){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Va(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Va(t,""+u);break;case"className":Di(t,"class",u);break;case"tabIndex":Di(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Di(t,o,u);break;case"style":Qc(t,u,g);break;case"data":if(a!=="object"){Di(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=cr(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(a!=="input"&&Tt(t,a,"name",p.name,p,null),Tt(t,a,"formEncType",p.formEncType,p,null),Tt(t,a,"formMethod",p.formMethod,p,null),Tt(t,a,"formTarget",p.formTarget,p,null)):(Tt(t,a,"encType",p.encType,p,null),Tt(t,a,"method",p.method,p,null),Tt(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=cr(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Dr);break;case"onScroll":u!=null&&at("scroll",t);break;case"onScrollEnd":u!=null&&at("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=cr(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":at("beforetoggle",t),at("toggle",t),jn(t,"popover",u);break;case"xlinkActuate":yn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":yn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":yn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":yn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":yn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":yn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":yn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":yn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":yn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":jn(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=dh.get(o)||o,jn(t,o,u))}}function ig(t,a,o,u,p,g){switch(o){case"style":Qc(t,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Va(t,u):(typeof u=="number"||typeof u=="bigint")&&Va(t,""+u);break;case"onScroll":u!=null&&at("scroll",t);break;case"onScrollEnd":u!=null&&at("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Dr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||
`;break;case"t":l+=" ";break;case"r":l+="\r";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="\v";break;case"0":l+="\0";break;case"\\":l+="\\";break;case"`":l+="`";break;case"$":l+="$";break;default:l+=d;break}n+=2;continue}if(c==="`")return r.push(l),{quasis:r,exprs:i,end:n+1};if(c==="$"&&s[n+1]==="{"){r.push(l),l="",n+=2;const d=n;let f=1;for(;n<s.length&&f>0;){const h=s[n];if(h==="{")f++,n++;else if(h==="}"){if(f--,f===0)break;n++}else h==='"'||h==="'"?n=o0(s,n,h):h==="`"?n=Kg(s,n).end:n++}if(f!==0)throw new Error("Unterminated ${...} in template literal");i.push(s.slice(d,n)),n++;continue}l+=c,n++}throw new Error(`Unterminated template literal at position ${e}`)}function l0(s){const e=[];let n=0;const r=s.length,i=l=>n+l<r?s[n+l]:"";for(;n<r;){const l=s[n];if(l===" "||l===" "||l===`
|
||||
`||l==="\r"||l==="\f"||l==="\v"){n++;continue}if(vi(l)||l==="."&&vi(i(1))){const h=n;for(;n<r&&vi(s[n]);)n++;if(s[n]===".")for(n++;n<r&&vi(s[n]);)n++;if(s[n]==="e"||s[n]==="E"){if(n++,(s[n]==="+"||s[n]==="-")&&n++,!vi(s[n]))throw new Error(`Invalid number literal at position ${h}`);for(;n<r&&vi(s[n]);)n++}const m=s.slice(h,n);e.push({type:"num",value:Number(m),pos:h});continue}if(l==='"'||l==="'"){const h=n,m=l;n++;let y="";for(;n<r&&s[n]!==m;)if(s[n]==="\\"){n++;const S=s[n];switch(S){case"n":y+=`
|
||||
`;break;case"t":y+=" ";break;case"r":y+="\r";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;case"0":y+="\0";break;case"\\":y+="\\";break;case"'":y+="'";break;case'"':y+='"';break;case"`":y+="`";break;default:y+=S;break}n++}else y+=s[n],n++;if(n>=r)throw new Error(`Unterminated string literal at position ${h}`);n++,e.push({type:"str",value:y,pos:h});continue}if(i0(l)){const h=n;for(n++;n<r&&s0(s[n]);)n++;e.push({type:"ident",value:s.slice(h,n),pos:h});continue}if(l==="`"){const h=Kg(s,n);e.push({type:"template",value:"",pos:n,quasis:h.quasis,exprs:h.exprs}),n=h.end;continue}const c=n,d=s.substr(n,2);if(s.substr(n,3)==="..."){e.push({type:"punct",value:"...",pos:c}),n+=3;continue}switch(l){case"=":{i(1)===">"?(e.push({type:"punct",value:"=>",pos:c}),n+=2):i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"===",pos:c}),n+=3):(e.push({type:"punct",value:"==",pos:c}),n+=2):(e.push({type:"punct",value:"=",pos:c}),n+=1);continue}case"!":{i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"!==",pos:c}),n+=3):(e.push({type:"punct",value:"!=",pos:c}),n+=2):(e.push({type:"punct",value:"!",pos:c}),n+=1);continue}case"<":{if(i(1)==="=")e.push({type:"punct",value:"<=",pos:c}),n+=2;else{if(i(1)==="<")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:"<",pos:c}),n+=1}continue}case">":{if(i(1)==="=")e.push({type:"punct",value:">=",pos:c}),n+=2;else{if(i(1)===">")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:">",pos:c}),n+=1}continue}case"&":{if(i(1)==="&")e.push({type:"punct",value:"&&",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"|":{if(i(1)==="|")e.push({type:"punct",value:"||",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"?":{i(1)==="."&&!vi(i(2))?(e.push({type:"punct",value:"?.",pos:c}),n+=2):i(1)==="?"?(e.push({type:"punct",value:"??",pos:c}),n+=2):(e.push({type:"punct",value:"?",pos:c}),n+=1);continue}case"+":{if(i(1)==="+")throw new Error("Increment operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"+",pos:c}),n+=1;continue}case"-":{if(i(1)==="-")throw new Error("Decrement operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"-",pos:c}),n+=1;continue}case"*":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");if(i(1)==="*")throw new Error("Exponentiation operator is not supported");e.push({type:"punct",value:"*",pos:c}),n+=1;continue}case"/":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"/",pos:c}),n+=1;continue}case"%":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"%",pos:c}),n+=1;continue}case"~":case"^":throw new Error("Bitwise operators are not allowed");case".":case":":case"(":case")":case"[":case"]":case"{":case"}":case",":e.push({type:"punct",value:l,pos:c}),n+=1;continue;case";":e.push({type:"punct",value:";",pos:c}),n+=1;continue;default:throw new Error(`Unexpected character "${l}" at position ${c}`)}}return e}const c0={"??":1,"||":1,"&&":2,"===":3,"!==":3,"==":3,"!=":3,"<":4,">":4,"<=":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6},u0=new Set(["??","||","&&"]);class d0{constructor(e){M(this,"tokens");M(this,"pos",0);this.tokens=e}atEnd(){return this.pos>=this.tokens.length}peek(e=0){const n=this.pos+e;return n<this.tokens.length?this.tokens[n]:null}next(){if(this.atEnd())throw new Error("Unexpected end of expression");return this.tokens[this.pos++]}isPunct(e,n=0){const r=this.peek(n);return!!r&&r.type==="punct"&&r.value===e}expectPunct(e){const n=this.peek();if(!n||n.type!=="punct"||n.value!==e)throw new Error(`Expected "${e}" but found "${n?n.value:"<end>"}"`);this.pos++}parseExpression(){const e=this.tryParseArrow();return e||this.parseTernary()}tryParseArrow(){const e=this.pos,n=this.peek();if(!n)return null;if(n.type==="ident"&&this.isPunct("=>",1)&&!Jl.has(String(n.value))){this.pos+=1,this.pos+=1;const{body:r,isBlock:i}=this.parseArrowBody();return{type:"Arrow",params:[{name:String(n.value),default:null}],body:r,isBlock:i}}if(n.type==="punct"&&n.value==="("){this.pos+=1;const r=this.tryParseParamList();if(r&&this.isPunct(")")&&(this.pos+=1,this.isPunct("=>"))){this.pos+=1;const{body:i,isBlock:l}=this.parseArrowBody();return{type:"Arrow",params:r,body:i,isBlock:l}}return this.pos=e,null}return this.pos=e,null}tryParseParamList(){const e=[];if(this.isPunct(")"))return e;for(;;){const n=this.peek();let r=null,i;if(n&&n.type==="punct"&&n.value==="["){const c=this.tryParseArrayPattern();if(!c)return null;i=c}else if(n&&n.type==="ident"&&!Jl.has(String(n.value)))r=String(n.value),this.pos+=1;else return null;let l=null;if(this.isPunct("=")&&(this.pos+=1,l=this.parseExpression()),e.push(i?{name:r,elements:i,default:l}:{name:r,default:l}),this.isPunct(",")){this.pos+=1;continue}Line truncated
|
||||
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim(),!(!n||e[n]&&lC[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function uC(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}const dC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function tf(s,e){return K.isArray(s)?s.map(n=>tf(n,e)):uC(String(s).replace(e,""))}const hC=s=>tf(s,dC),pC=s=>tf(s,fC);function ym(s){const e=Object.create(null);return K.forEach(s.toJSON(),(n,r)=>{e[r]=pC(n)}),e}const bm=Symbol("internals");function Eo(s){return s&&String(s).trim().toLowerCase()}function sc(s){return s===!1||s==null?s:K.isArray(s)?s.map(sc):hC(String(s))}function gC(s){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(s);)e[r[1]]=r[2];return e}const mC=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function nf(s,e,n,r,i){if(K.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!K.isString(e)){if(K.isString(r))return e.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(e)}}function yC(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bC(s,e){const n=K.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+n,{__proto__:null,value:function(i,l,c){return this[r].call(this,e,i,l,c)},configurable:!0})})}let Rn=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function l(d,f,h){const m=Eo(f);if(!m)throw new Error("header name must be a non-empty string");const y=K.findKey(i,m);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||f]=sc(d))}const c=(d,f)=>K.forEach(d,(h,m)=>l(h,m,f));if(K.isPlainObject(e)||e instanceof this.constructor)c(e,n);else if(K.isString(e)&&(e=e.trim())&&!mC(e))c(cC(e),n);else if(K.isObject(e)&&K.isIterable(e)){let d={},f,h;for(const m of e){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[h=m[0]]=(f=d[h])?K.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}c(d,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=Eo(e),e){const r=K.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return gC(i);if(K.isFunction(n))return n.call(this,i,r);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Eo(e),e){const r=K.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nf(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function l(c){if(c=Eo(c),c){const d=K.findKey(r,c);d&&(!n||nf(r,r[d],d,n))&&(delete r[d],i=!0)}}return K.isArray(e)?e.forEach(l):l(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!e||nf(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){const n=this,r={};return K.forEach(this,(i,l)=>{const c=K.findKey(r,l);if(c){n[c]=sc(i),delete n[l];return}const d=e?yC(l):String(l).trim();d!==l&&delete n[l],n[d]=sc(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return K.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[bm]=this[bm]={accessors:{}}).accessors,i=this.prototype;function l(c){const d=Eo(c);r[d]||(bC(i,c),r[d]=!0)}return K.isArray(e)?e.forEach(l):l(e),this}};Rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Rn.prototype,({value:s},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[n]=r}}}),K.freezeMethods(Rn);const vC="[REDACTED ****]";function SC(s){if(K.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(K.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function wC(s,e){const n=new Set(e.map(l=>String(l).toLowerCase())),r=[],i=l=>{if(l===null||typeof l!="object"||K.isBuffer(l))return l;if(r.indexOf(l)!==-1)return;l instanceof Rn&&(l=l.toJSON()),r.push(l);let c;if(K.isArray(l))c=[],l.forEach((d,f)=>{const h=i(d);K.isUndefined(h)||(c[f]=h)});else{if(!K.isPlainObject(l)&&SC(l))return r.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const h=n.has(d.toLowerCase())?vC:i(f);K.isUndefined(h)||(c[d]=h)}}return r.pop(),c};return i(s)}let Oe=class kw extends Error{static from(e,n,r,i,l,c){const d=new kw(e.message,n||e.code,r,i,l);return d.cause=e,d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),c&&Object.assign(d,c),d}constructor(e,n,r,i,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&K.hasOwnProp(e,"redact")?e.redact:void 0,r=K.isArray(n)&&n.length>0?wC(e,n):K.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Oe.ERR_BAD_OPTION="ERR_BAD_OPTION",Oe.ECONNABORTED="ECONNABORTED",Oe.ETIMEDOUT="ETIMEDOUT",Oe.ECONNREFUSED="ECONNREFUSED",Oe.ERR_NETWORK="ERR_NETWORK",Oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Oe.ERR_DEPRECATED="ERR_DEPRECATED",Oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Oe.ERR_CANCELED="ERR_CANCELED",Oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Oe.ERR_INVALID_URL="ERR_INVALID_URL",Oe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const CC=null;function rf(s){return K.isPlainObject(s)||K.isArray(s)}function vm(s){return K.endsWith(s,"[]")?s.slice(0,-2):s}function af(s,e,n){return s?s.concat(e).map(function(i,l){return i=vm(i),!n&&l?"["+i+"]":i}).join(n?".":""):e}function EC(s){return K.isArray(s)&&!s.some(rf)}const _C=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function oc(s,e,n){if(!K.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,L){return!K.isUndefined(L[A])});const r=n.metaTokens,i=n.visitor||y,l=n.dots,c=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?100:n.maxDepth,h=d&&K.isSpecCompliantForm(e);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(K.isDate(x))return x.toISOString();if(K.isBoolean(x))return x.toString();if(!h&&K.isBlob(x))throw new Oe("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(x)||K.isTypedArray(x)?h&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function y(x,A,L){let $=x;if(K.isReactNative(e)&&K.isReactNativeBlob(x))return e.append(af(L,A,l),m(x)),!1;if(x&&!L&&typeof x=="object"){if(K.endsWith(A,"{}"))A=r?A:A.slice(0,-2),x=JSON.stringify(x);else if(K.isArray(x)&&EC(x)||(K.isFileList(x)||K.endsWith(A,"[]"))&&($=K.toArray(x)))return A=vm(A),$.forEach(function(O,P){!(K.isUndefined(O)||O===null)&&e.append(c===!0?af([A],P,l):c===null?A:A+"[]",m(O))}),!1}return rf(x)?!0:(e.append(af(L,A,l),m(x)),!1)}const S=[],v=Object.assign(_C,{defaultVisitor:y,convertValue:m,isVisitable:rf});function _(x,A,L=0){if(!K.isUndefined(x)){if(L>f)throw new Oe("Object is too deeply nested ("+L+" levels). Max depth: "+f,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(S.indexOf(x)!==-1)throw Error("Circular reference detected in "+A.join("."));S.push(x),K.forEach(x,function(k,O){(!(K.isUndefined(k)||k===null)&&i.call(e,k,K.isString(O)?O.trim():O,A,v))===!0&&_(k,A?A.concat(O):[O],L+1)}),S.pop()}}if(!K.isObject(s))throw new TypeError("data must be an object");return _(s),e}function Sm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(s).replace(/[!'()~]|%20/g,function(r){return e[r]})}
Line truncated
|
||||
`+c.map(Im).join(`
|
||||
`):" "+Im(c[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i}const jm={getAdapter:ZC,adapters:ff};function hf(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Ao(null,s)}function Hm(s){return hf(s),s.headers=Rn.from(s.headers),s.data=uf.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),jm.getAdapter(s.adapter||_o.adapter,s)(s).then(function(r){hf(s),s.response=r;try{r.data=uf.call(s,s.transformResponse,r)}finally{delete s.response}return r.headers=Rn.from(r.headers),r},function(r){if(!Am(r)&&(hf(s),r&&r.response)){s.response=r.response;try{r.response.data=uf.call(s,s.transformResponse,r.response)}finally{delete s.response}r.response.headers=Rn.from(r.response.headers)}return Promise.reject(r)})}const uc={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{uc[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const zm={};uc.transitional=function(e,n,r){function i(l,c){return"[Axios v"+df+"] Transitional option '"+l+"'"+c+(r?". "+r:"")}return(l,c,d)=>{if(e===!1)throw new Oe(i(c," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!zm[c]&&(zm[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,c,d):!0}},uc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function eE(s,e,n){if(typeof s!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let i=r.length;for(;i-- >0;){const l=r[i],c=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(c){const d=s[l],f=d===void 0||c(d,l,s);if(f!==!0)throw new Oe("option "+l+" must be "+f,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+l,Oe.ERR_BAD_OPTION)}}const dc={assertOptions:eE,validators:uc},ar=dc.validators;let Ei=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Em,response:new Em}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=(()=>{if(!i.stack)return"";const c=i.stack.indexOf(`
|
||||
`);return c===-1?"":i.stack.slice(c+1)})();try{if(!r.stack)r.stack=l;else if(l){const c=l.indexOf(`
|
||||
`),d=c===-1?-1:l.indexOf(`
|
||||
`,c+1),f=d===-1?"":l.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
|
||||
`+l)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ci(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&dc.assertOptions(r,{silentJSONParsing:ar.transitional(ar.boolean),forcedJSONParsing:ar.transitional(ar.boolean),clarifyTimeoutError:ar.transitional(ar.boolean),legacyInterceptorReqResOrdering:ar.transitional(ar.boolean)},!1),i!=null&&(K.isFunction(i)?n.paramsSerializer={serialize:i}:dc.assertOptions(i,{encode:ar.function,serialize:ar.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),dc.assertOptions(n,{baseUrl:ar.spelling("baseURL"),withXsrfToken:ar.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=l&&K.merge(l.common,l[n.method]);l&&K.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete l[_]}),n.headers=Rn.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;f=f&&x.synchronous;const A=n.transitional||of;A&&A.legacyInterceptorReqResOrdering?d.unshift(x.fulfilled,x.rejected):d.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let m,y=0,S;if(!f){const _=[Hm.bind(this),void 0];for(_.unshift(...d),_.push(...h),S=_.length,m=Promise.resolve(n);y<S;)m=m.then(_[y++],_[y++]);return m}S=d.length;let v=n;for(;y<S;){const _=d[y++],x=d[y++];try{v=_(v)}catch(A){x.call(this,A);break}}try{m=Hm.call(this,v)}catch(_){return Promise.reject(_)}for(y=0,S=h.length;y<S;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=Ci(this.defaults,e);const n=Rm(e.baseURL,e.url,e.allowAbsoluteUrls);return Cm(n,e.params,e.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(e){Ei.prototype[e]=function(n,r){return this.request(Ci(r||{},{method:e,url:n,data:(r||{}).data}))}}),K.forEach(["post","put","patch","query"],function(e){function n(r){return function(l,c,d){return this.request(Ci(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ei.prototype[e]=n(),e!=="query"&&(Ei.prototype[e+"Form"]=n(!0))});let tE=class Rw{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(d=>{r.subscribe(d),l=d}).then(i);return c.cancel=function(){r.unsubscribe(l)},c},e(function(l,c,d){r.reason||(r.reason=new Ao(l,c,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Rw(function(i){e=i}),cancel:e}}};function nE(s){return function(n){return s.apply(null,n)}}function rE(s){return K.isObject(s)&&s.isAxiosError===!0}const pf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pf).forEach(([s,e])=>{pf[e]=s});function Um(s){const e=new Ei(s),n=om(Ei.prototype.request,e);return K.extend(n,Ei.prototype,e,{allOwnKeys:!0}),K.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Um(Ci(s,i))},n}const Vt=Um(_o);Vt.Axios=Ei,Vt.CanceledError=Ao,Vt.CancelToken=tE,Vt.isCa
Line truncated
|
||||
`+u.stack}}var mt=Object.prototype.hasOwnProperty,Rt=s.unstable_scheduleCallback,Ht=s.unstable_cancelCallback,Tn=s.unstable_shouldYield,ur=s.unstable_requestPaint,Dt=s.unstable_now,Oi=s.unstable_getCurrentPriorityLevel,la=s.unstable_ImmediatePriority,yn=s.unstable_UserBlockingPriority,$n=s.unstable_NormalPriority,it=s.unstable_LowPriority,zn=s.unstable_IdlePriority,bn=s.log,ca=s.unstable_setDisableYieldValue,dr=null,cn=null;function kn(t){if(typeof bn=="function"&&ca(t),cn&&typeof cn.setStrictMode=="function")try{cn.setStrictMode(dr,t)}catch{}}var un=Math.clz32?Math.clz32:ce,V=Math.log,ie=Math.LN2;function ce(t){return t>>>=0,t===0?32:31-(V(t)/ie|0)|0}var Z=256,Se=262144,pe=4194304;function _e(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function xe(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~g,u!==0?p=_e(u):(w&=R,w!==0?p=_e(w):o||(o=R&~t,o!==0&&(p=_e(o))))):(R=u&~g,R!==0?p=_e(R):w!==0?p=_e(w):o||(o=u&~t,o!==0&&(p=_e(o)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,o=a&-a,g>=o||g===32&&(o&4194048)!==0)?a:p}function Ke(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ke(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Me(){var t=pe;return pe<<=1,(pe&62914560)===0&&(pe=4194304),t}function Re(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function tt(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function He(t,a,o,u,p,g){var w=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var R=t.entanglements,U=t.expirationTimes,X=t.hiddenUpdates;for(o=w&~o;0<o;){var re=31-un(o),le=1<<re;R[re]=0,U[re]=-1;var J=X[re];if(J!==null)for(X[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}o&=~le}u!==0&&Ve(t,u,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~a))}function Ve(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-un(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&261930}function Ee(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-un(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function je(t,a){var o=a&-a;return o=(o&42)!==0?1:nt(o),(o&(t.suspendedLanes|a))!==0?0:o}function nt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ot(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Pt(){var t=ue.p;return t!==0?t:(t=window.event,t===void 0?32:Bw(t.type))}function Mn(t,a){var o=ue.p;try{return ue.p=t,a()}finally{ue.p=o}}var qt=Math.random().toString(36).slice(2),Gt="__reactFiber$"+qt,Rn="__reactProps$"+qt,za="__reactContainer$"+qt,Zo="__reactEvents$"+qt,dh="__reactListeners$"+qt,Wc="__reactHandles$"+qt,Kr="__reactResources$"+qt,Li="__reactMarker$"+qt;function el(t){delete t[Gt],delete t[Rn],delete t[Zo],delete t[dh],delete t[Wc]}function Ua(t){var a=t[Gt];if(a)return a;for(var o=t.parentNode;o;){if(a=o[za]||o[Gt]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=xw(t);t!==null;){if(o=t[Gt])return o;t=xw(t)}return a}t=o,o=t.parentNode}return null}function Wr(t){if(t=t[Gt]||t[za]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function ua(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Pa(t){var a=t[Kr];return a||(a=t[Kr]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function nn(t){t[Li]=!0}var Yc=new Set,Xc={};function Or(t,a){Ba(t,a),Ba(t+"Capture",a)}function Ba(t,a){for(Xc[t]=a,t=0;t<a.length;t++)Yc.add(a[t])}var fh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u2
Line truncated
|
||||
`).replace(Ik,"")}function mw(t,a){return a=gw(a),gw(t)===a}function $t(t,a,o,u,p,g){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Va(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Va(t,""+u);break;case"className":$i(t,"class",u);break;case"tabIndex":$i(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":$i(t,o,u);break;case"style":ru(t,u,g);break;case"data":if(a!=="object"){$i(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=fr(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(a!=="input"&&$t(t,a,"name",p.name,p,null),$t(t,a,"formEncType",p.formEncType,p,null),$t(t,a,"formMethod",p.formMethod,p,null),$t(t,a,"formTarget",p.formTarget,p,null)):($t(t,a,"encType",p.encType,p,null),$t(t,a,"method",p.method,p,null),$t(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=fr(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Lr);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=fr(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":ot("beforetoggle",t),ot("toggle",t),Un(t,"popover",u);break;case"xlinkActuate":vn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":vn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":vn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":vn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":vn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":vn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":vn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":vn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":vn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Un(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=yh.get(o)||o,Un(t,o,u))}}function dg(t,a,o,u,p,g){switch(o){case"style":ru(t,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Va(t,u):(typeof u=="number"||typeof u=="bigint")&&Va(t,""+u);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||
`;break;case"t":l+=" ";break;case"r":l+="\r";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="\v";break;case"0":l+="\0";break;case"\\":l+="\\";break;case"`":l+="`";break;case"$":l+="$";break;default:l+=d;break}n+=2;continue}if(c==="`")return r.push(l),{quasis:r,exprs:i,end:n+1};if(c==="$"&&s[n+1]==="{"){r.push(l),l="",n+=2;const d=n;let f=1;for(;n<s.length&&f>0;){const h=s[n];if(h==="{")f++,n++;else if(h==="}"){if(f--,f===0)break;n++}else h==='"'||h==="'"?n=T0(s,n,h):h==="`"?n=Zg(s,n).end:n++}if(f!==0)throw new Error("Unterminated ${...} in template literal");i.push(s.slice(d,n)),n++;continue}l+=c,n++}throw new Error(`Unterminated template literal at position ${e}`)}function k0(s){const e=[];let n=0;const r=s.length,i=l=>n+l<r?s[n+l]:"";for(;n<r;){const l=s[n];if(l===" "||l===" "||l===`
|
||||
`||l==="\r"||l==="\f"||l==="\v"){n++;continue}if(Si(l)||l==="."&&Si(i(1))){const h=n;for(;n<r&&Si(s[n]);)n++;if(s[n]===".")for(n++;n<r&&Si(s[n]);)n++;if(s[n]==="e"||s[n]==="E"){if(n++,(s[n]==="+"||s[n]==="-")&&n++,!Si(s[n]))throw new Error(`Invalid number literal at position ${h}`);for(;n<r&&Si(s[n]);)n++}const m=s.slice(h,n);e.push({type:"num",value:Number(m),pos:h});continue}if(l==='"'||l==="'"){const h=n,m=l;n++;let y="";for(;n<r&&s[n]!==m;)if(s[n]==="\\"){n++;const v=s[n];switch(v){case"n":y+=`
|
||||
`;break;case"t":y+=" ";break;case"r":y+="\r";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;case"0":y+="\0";break;case"\\":y+="\\";break;case"'":y+="'";break;case'"':y+='"';break;case"`":y+="`";break;default:y+=v;break}n++}else y+=s[n],n++;if(n>=r)throw new Error(`Unterminated string literal at position ${h}`);n++,e.push({type:"str",value:y,pos:h});continue}if(A0(l)){const h=n;for(n++;n<r&&x0(s[n]);)n++;e.push({type:"ident",value:s.slice(h,n),pos:h});continue}if(l==="`"){const h=Zg(s,n);e.push({type:"template",value:"",pos:n,quasis:h.quasis,exprs:h.exprs}),n=h.end;continue}const c=n,d=s.substr(n,2);if(s.substr(n,3)==="..."){e.push({type:"punct",value:"...",pos:c}),n+=3;continue}switch(l){case"=":{i(1)===">"?(e.push({type:"punct",value:"=>",pos:c}),n+=2):i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"===",pos:c}),n+=3):(e.push({type:"punct",value:"==",pos:c}),n+=2):(e.push({type:"punct",value:"=",pos:c}),n+=1);continue}case"!":{i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"!==",pos:c}),n+=3):(e.push({type:"punct",value:"!=",pos:c}),n+=2):(e.push({type:"punct",value:"!",pos:c}),n+=1);continue}case"<":{if(i(1)==="=")e.push({type:"punct",value:"<=",pos:c}),n+=2;else{if(i(1)==="<")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:"<",pos:c}),n+=1}continue}case">":{if(i(1)==="=")e.push({type:"punct",value:">=",pos:c}),n+=2;else{if(i(1)===">")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:">",pos:c}),n+=1}continue}case"&":{if(i(1)==="&")e.push({type:"punct",value:"&&",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"|":{if(i(1)==="|")e.push({type:"punct",value:"||",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"?":{i(1)==="."&&!Si(i(2))?(e.push({type:"punct",value:"?.",pos:c}),n+=2):i(1)==="?"?(e.push({type:"punct",value:"??",pos:c}),n+=2):(e.push({type:"punct",value:"?",pos:c}),n+=1);continue}case"+":{if(i(1)==="+")throw new Error("Increment operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"+",pos:c}),n+=1;continue}case"-":{if(i(1)==="-")throw new Error("Decrement operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"-",pos:c}),n+=1;continue}case"*":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");if(i(1)==="*")throw new Error("Exponentiation operator is not supported");e.push({type:"punct",value:"*",pos:c}),n+=1;continue}case"/":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"/",pos:c}),n+=1;continue}case"%":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"%",pos:c}),n+=1;continue}case"~":case"^":throw new Error("Bitwise operators are not allowed");case".":case":":case"(":case")":case"[":case"]":case"{":case"}":case",":e.push({type:"punct",value:l,pos:c}),n+=1;continue;case";":e.push({type:"punct",value:";",pos:c}),n+=1;continue;default:throw new Error(`Unexpected character "${l}" at position ${c}`)}}return e}const R0={"??":1,"||":1,"&&":2,"===":3,"!==":3,"==":3,"!=":3,"<":4,">":4,"<=":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6},D0=new Set(["??","||","&&"]);class O0{constructor(e){M(this,"tokens");M(this,"pos",0);this.tokens=e}atEnd(){return this.pos>=this.tokens.length}peek(e=0){const n=this.pos+e;return n<this.tokens.length?this.tokens[n]:null}next(){if(this.atEnd())throw new Error("Unexpected end of expression");return this.tokens[this.pos++]}isPunct(e,n=0){const r=this.peek(n);return!!r&&r.type==="punct"&&r.value===e}expectPunct(e){const n=this.peek();if(!n||n.type!=="punct"||n.value!==e)throw new Error(`Expected "${e}" but found "${n?n.value:"<end>"}"`);this.pos++}parseExpression(){const e=this.tryParseArrow();return e||this.parseTernary()}tryParseArrow(){const e=this.pos,n=this.peek();if(!n)return null;if(n.type==="ident"&&this.isPunct("=>",1)&&!rc.has(String(n.value))){this.pos+=1,this.pos+=1;const{body:r,isBlock:i}=this.parseArrowBody();return{type:"Arrow",params:[{name:String(n.value),default:null}],body:r,isBlock:i}}if(n.type==="punct"&&n.value==="("){this.pos+=1;const r=this.tryParseParamList();if(r&&this.isPunct(")")&&(this.pos+=1,this.isPunct("=>"))){this.pos+=1;const{body:i,isBlock:l}=this.parseArrowBody();return{type:"Arrow",params:r,body:i,isBlock:l}}return this.pos=e,null}return this.pos=e,null}tryParseParamList(){const e=[];if(this.isPunct(")"))return e;for(;;){const n=this.peek();let r=null,i;if(n&&n.type==="punct"&&n.value==="["){const c=this.tryParseArrayPattern();if(!c)return null;i=c}else if(n&&n.type==="ident"&&!rc.has(String(n.value)))r=String(n.value),this.pos+=1;else return null;let l=null;if(this.isPunct("=")&&(this.pos+=1,l=this.parseExpression()),e.push(i?{name:r,elements:i,default:l}:{name:r,default:l}),this.isPunct(",")){this.pos+=1;continue}Line truncated
|
||||
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim();const d=G.hasOwnProp(e,n);!n||d&&G.hasOwnProp($C,n)||(n==="set-cookie"?d?e[n].push(r):e[n]=[r]:e[n]=d?e[n]+", "+r:r)}),e};function NC(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}const IC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),jC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sf(s,e){return G.isArray(s)?s.map(n=>sf(n,e)):NC(String(s).replace(e,""))}const HC=s=>sf(s,IC),zC=s=>sf(s,jC);function xm(s){const e=Object.create(null);return G.forEach(s.toJSON(),(n,r)=>{e[r]=zC(n)}),e}const Tm=Symbol("internals");function To(s){return s&&String(s).trim().toLowerCase()}function cc(s){return s===!1||s==null?s:G.isArray(s)?s.map(cc):HC(String(s))}function UC(s){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(s);)e[r[1]]=r[2];return e}const PC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function of(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}function BC(s){const e=s.length-1;if(e<1||s.charCodeAt(0)!==34||s.charCodeAt(e)!==34)return s;let n="";for(let r=1;r<e;r++){const i=s.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=e))return s;n+=s[r]}return n}function qC(s){const e=Object.create(null),n=String(s);let r=0,i=!1,l=!1;function c(d){const f=of(n.slice(r,d)),h=f.indexOf("=");if(h<1)return;const m=of(f.slice(0,h));if(!PC.test(m))return;const y=m.toLowerCase();if(y==="__proto__"||y==="constructor"||y==="prototype")return;const v=of(f.slice(h+1));e[y]=BC(v)}for(let d=0;d<n.length;d++){const f=n.charCodeAt(d);i?l?l=!1:f===92?l=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(c(d),r=d+1)}return c(n.length),e}const GC=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function lf(s,e,n,r,i){if(G.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function FC(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function VC(s,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+n,{__proto__:null,value:function(i,l,c){return this[r].call(this,e,i,l,c)},configurable:!0})})}let An=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function l(d,f,h){const m=To(f);if(!m)return;const y=G.findKey(i,m);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||f]=cc(d))}const c=(d,f)=>G.forEach(d,(h,m)=>l(h,m,f));if(G.isPlainObject(e)||e instanceof this.constructor)c(e,n);else if(G.isString(e)&&(e=e.trim())&&!GC(e))c(MC(e),n);else if(G.isObject(e)&&G.isSafeIterable(e)){let d=Object.create(null),f,h;for(const m of e){if(!G.isArray(m))throw new TypeError("Object iterator must return a key-value pair");h=m[0],G.hasOwnProp(d,h)?(f=d[h],d[h]=G.isArray(f)?[...f,m[1]]:[f,m[1]]):d[h]=m[1]}c(d,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=To(e),e){const r=G.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return UC(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=To(e),e){const r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||lf(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function l(c){if(c=To(c),c){const d=G.findKey(r,c);d&&(!n||lf(r,r[d],d,n))&&(delete r[d],i=!0)}}return G.isArray(e)?e.forEach(l):l(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!e||lf(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){const n=this,r={};return G.forEach(this,(i,l)=>{const c=G.findKey(r,l);if(c){n[c]=cc(i),delete n[l];return}const d=e?FC(l):String(l).trim();d!==l&&delete n[l],n[d]=cc(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
||||
`)}getSetCookie(){const e=this.get("set-cookie");return G.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return qC(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Tm]=this[Tm]={accessors:{}}).accessors,i=this.prototype;function l(c){const d=To(c);r[d]||(VC(i,c),r[d]=!0)}return G.isArray(e)?e.forEach(l):l(e),this}};An.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(An.prototype,({value:s},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[n]=r}}}),G.freezeMethods(An);const uc="[REDACTED ****]";function KC(s){if(G.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(G.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function WC(s,e){const n=new Set(e.map(l=>String(l).toLowerCase())),r=[],i=l=>{if(l===null||typeof l!="object"||G.isBuffer(l))return l;if(r.indexOf(l)!==-1)return;l instanceof An&&(l=l.toJSON()),r.push(l);let c;if(G.isArray(l))c=[],l.forEach((d,f)=>{const h=i(d);G.isUndefined(h)||(c[f]=h)});else{if(!G.isPlainObject(l)&&KC(l))return r.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const h=n.has(d.toLowerCase())?uc:i(f);G.isUndefined(h)||(c[d]=h)}}return r.pop(),c};return i(s)}function km(s){try{return String(s)}catch{return""}}function YC(s){return s.errors.map(n=>{try{return n&&n.message?km(n.message):km(n)}catch{return""}}).filter(Boolean).join("; ")||s.name||"AggregateError"}let Ce=class Yw extends Error{static from(e,n,r,i,l,c){let d=e.message;!d&&G.isArray(e.errors)&&e.errors.length&&(d=YC(e));const f=new Yw(d,n||e.code,r,i,l);return Object.defineProperty(f,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),f.name=e.name,e.status!=null&&f.status==null&&(f.status=e.status),c&&Object.assign(f,c),f}constructor(e,n,r,i,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&G.hasOwnProp(e,"redact")?e.redact:void 0,r=G.isArray(n)&&n.length>0?WC(e,n):G.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const XC=null,Rm=100;function cf(s){return G.isPlainObject(s)||G.isArray(s)}function Dm(s){return G.endsWith(s,"[]")?s.slice(0,-2):s}function uf(s,e,n){return s?s.concat(e).map(function(i,l){return i=Dm(i),!n&&l?"["+i+"]":i}).join(n?".":""):e}function JC(s){return G.isArray(s)&&!s.some(cf)}const QC=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function dc(s,e,n){if(!G.isObject(s))throw new TypeError("target must be an object");e=e||new FormData;const r=(O,k)=>{const L=G.getSafeProp(n,O);return G.isUndefined(L)?k:L},i=r("metaTokens",!0),l=r("visitor")||x,c=r("dots",!1),d=r("indexes",!1),f=r("Blob")||typeof Blob<"u"&&Blob,h=r("maxDepth",Rm),m=f&&G.isSpecCompliantForm(e),y=[];if(!G.isFunction(l))throw new TypeError("visitor must be a function");function v(O){if(O===null)return"";if(G.isDate(O))return O.toISOString();if(G.isBoolean(O))return O.toString();if(!m&&G.isBlob(O))throw new Ce("Blob is not supported. Use a Buffer instead.");if(G.isArrayBuffer(O)||G.isTypedArray(O)){if(m&&typeof f=="function")return new f([O]);throw new Ce("Blob is not supported. Use a Buffer instead.",Ce.ERR_NOT_SUPPORT)}return O}function S(O){if(O>h)throw new Ce("Object is too deeply nested ("+O+" levels). Max depth: "+h,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(O,k){if(h===1/0)return JSON.stringify(O);const L=[];return JSON.stringify(O,function(q,z){if(!G.isObject(z))return z;for(;L.length&&L[L.length-1]!==this;)L.pop();return L.push(z),S(k+L.length-1),z})}function x(O,k,L){let B=O;if(G.isReactNative(e)&&G.isReactNativeBlob(O))return e.append(uf(L,k,c),v(O)),!1;if(O&&!L&&typeof O=="object"){if(G.endsWith(k,"{}"))k=i?k:k.slice(0,-2),O=_(O,1);else if(G.isArray(O)&&JC(O)||(G.isFileList(O)||G.endsWith(k,"[]"))&&(B=G.toArray(O)))return k=Dm(k),B.forEach(function(z,W){!(G.isUndefined(z)||z===
Line truncated
|
||||
`+c.map(ay).join(`
|
||||
`):" "+ay(c[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+d,Ce.ERR_NOT_SUPPORT)}return i}const iy={getAdapter:UE,adapters:bf};function vf(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Oo(null,s)}function Sf(s){const e=G.toSafeFlatObject(s);return vf(e),e.headers=An.from(G.getSafeProp(e,"headers")),e.data=gf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),iy.getAdapter(e.adapter||Do.adapter,e)(e).then(function(i){vf(e),e.response=i;try{i.data=gf.call(e,e.transformResponse,i)}finally{delete e.response}return i.headers=An.from(i.headers),i},function(i){if(!Pm(i)&&(vf(e),i&&i.response)){e.response=i.response;try{i.response.data=gf.call(e,e.transformResponse,i.response)}finally{delete e.response}i.response.headers=An.from(i.response.headers)}return Promise.reject(i)})}const pc={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{pc[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const sy={};pc.transitional=function(e,n,r){function i(l,c){return"[Axios v"+yf+"] Transitional option '"+l+"'"+c+(r?". "+r:"")}return(l,c,d)=>{if(e===!1)throw new Ce(i(c," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!sy[c]&&(sy[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,c,d):!0}},pc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function PE(s,e,n){if(typeof s!="object"||s===null)throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let i=r.length;for(;i-- >0;){const l=r[i],c=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(c){const d=s[l],f=d===void 0||c(d,l,s);if(f!==!0)throw new Ce("option "+l+" must be "+f,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+l,Ce.ERR_BAD_OPTION)}}const gc={assertOptions:PE,validators:pc},xn=gc.validators;let xi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Im,response:new Im}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack;let c="";if(typeof l=="string"){const d=l.indexOf(`
|
||||
`);c=d===-1?"":l.slice(d+1)}if(!r.stack)r.stack=c;else if(c){const d=c.indexOf(`
|
||||
`),f=d===-1?-1:c.indexOf(`
|
||||
`,d+1),h=f===-1?"":c.slice(f+1);String(r.stack).endsWith(h)||(r.stack+=`
|
||||
`+c)}}catch{}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ai(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&gc.assertOptions(r,{silentJSONParsing:xn.transitional(xn.boolean),forcedJSONParsing:xn.transitional(xn.boolean),clarifyTimeoutError:xn.transitional(xn.boolean),legacyInterceptorReqResOrdering:xn.transitional(xn.boolean),advertiseZstdAcceptEncoding:xn.transitional(xn.boolean),validateStatusUndefinedResolves:xn.transitional(xn.boolean)},!1),i!=null&&(G.isFunction(i)?n.paramsSerializer={serialize:i}:gc.assertOptions(i,{encode:xn.function,serialize:xn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gc.assertOptions(n,{baseUrl:xn.spelling("baseURL"),withXsrfToken:xn.spelling("withXSRFToken")},!0),n.method=(G.getSafeProp(n,"method")||G.getSafeProp(this.defaults,"method")||"get").toLowerCase();let c=l&&G.merge(l.common,l[n.method]);l&&G.forEach(Um.concat("common"),_=>{delete l[_]}),n.headers=An.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;f=f&&x.synchronous;const A=n.transitional||ff;A&&A.legacyInterceptorReqResOrdering?d.unshift(x.fulfilled,x.rejected):d.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let m,y=0,v;if(!f){const _=[Sf.bind(this),void 0];for(_.unshift(...d),_.push(...h),v=_.length,m=Promise.resolve(n);y<v;)m=m.then(_[y++],_[y++]);return m}v=d.length;let S=n;for(;y<v;){const _=d[y++],x=d[y++];try{S=_?_(S):S}catch(A){if(!x){m=Promise.reject(A);break}try{const D=x.call(this,A);G.isThenable(D)&&(m=Promise.resolve(D).then(()=>Sf.call(this,S)))}catch(D){m=Promise.reject(D)}break}}if(!m)try{m=Sf.call(this,S)}catch(_){m=Promise.reject(_)}for(y=0,v=h.length;y<v;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=Ai(this.defaults,e);const n=Km(e.baseURL,e.url,e.allowAbsoluteUrls,e);return $m(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){xi.prototype[e]=function(n,r){return this.request(Ai(r||{},{method:e,url:n,data:r&&G.hasOwnProp(r,"data")?r.data:void 0}))}}),G.forEach(["post","put","patch","query"],function(e){function n(r){return function(l,c,d){return this.request(Ai(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}xi.prototype[e]=n(),e!=="query"&&(xi.prototype[e+"Form"]=n(!0))});let BE=class Xw{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(d=>{r.subscribe(d),l=d}).then(i);return c.cancel=function(){r.unsubscribe(l)},c},e(function(l,c,d){r.reason||(r.reason=new Oo(l,c,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Xw(function(i){e=i}),cancel:e}}};function qE(s){return function(n){return s.apply(null,n)}}function GE(s){return G.isObject(s)&&s.isAxiosError===!0}const mc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524
Line truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var cy;function YE(){if(cy)return $o;cy=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:s,type:r,key:c,ref:i!==void 0?i:null,props:l}}return $o.Fragment=e,$o.jsx=n,$o.jsxs=n,$o}var uy;function XE(){return uy||(uy=1,Af.exports=YE()),Af.exports}var yt=XE();const JE=ea({__proto__:null,default:ta(yt)},[yt]),xf=pt("ParentContextProvider"),dy=N.createContext(null);let vc=null;function Tf(){vc?(xf.log("[triggerModalParentUpdate] 모달 부모 컨텍스트 업데이트 트리거"),vc()):xf.warn("[triggerModalParentUpdate] Provider가 아직 마운트되지 않음")}const fy=({children:s})=>{const[e,n]=N.useState(0),r=N.useRef(!0),i=N.useCallback(()=>{const c=window.__g7LayoutContextStack||[];return c[c.length-1]?.dataContext},[]);N.useEffect(()=>(r.current=!0,vc=()=>{r.current&&(n(c=>c+1),xf.log("[ParentContextProvider] 버전 업데이트됨"))},()=>{r.current=!1,vc=null}),[]);const l={version:e,getParentDataContext:i};return yt.jsx(dy.Provider,{value:l,children:s})};function QE(){return N.useContext(dy)}const H=pt("ActionDispatcher");function ZE(s,e,n,r){return n||(qg(s)||Id(s)?"$t:core.errors.network_request_failed":r||`Failed to execute action: ${e}`)}const hy=new Set(["navigate","navigateBack","navigateForward","replaceUrl","refresh","logout"]),e_=new Set(["redirect"]);function Wn(){try{return window.G7Core?.devTools}catch{return}}class Vt extends Error{constructor(n,r,i){super(n);M(this,"unknownHandler",!1);this.action=r,this.originalError=i,this.name="ActionError"}}const py={click:"onClick",change:"onChange",input:"onInput",submit:"onSubmit",focus:"onFocus",blur:"onBlur",keydown:"onKeyDown",keyup:"onKeyUp",keypress:"onKeyPress",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",scroll:"onScroll",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",dragenter:"onDragEnter",dragover:"onDragOver",dragleave:"onDragLeave",drop:"onDrop"},Rs=class Rs{constructor(e={},n,r){M(this,"bindingEngine");M(this,"translationEngine");M(this,"translationContext");M(this,"customHandlers",new Map);M(this,"defaultContext");M(this,"globalStateUpdater");M(this,"errorHandlingSetup",!1);M(this,"debounceTimers",new Map);M(this,"pendingDebounceFlushers",new Map);M(this,"debounceAccumulatedValues",new Map);M(this,"globalHeaders",[]);M(this,"namedActions",{});M(this,"previewMode",!1);M(this,"intervals",new Map);this.bindingEngine=new Ln,this.translationEngine=n,this.translationContext=r,this.defaultContext=e,this.registerDefaultHandlers(),this.setupErrorHandling()}setGlobalHeaders(e){this.globalHeaders=e||[]}setNamedActions(e){this.namedActions=e||{};const n=Wn();n?.isEnabled?.()&&n.setNamedActionDefinitions?.(this.namedActions),H.log("[setNamedActions] registered:",Object.keys(this.namedActions))}getNamedActions(){return this.namedActions}setPreviewMode(e){this.previewMode=e,H.log("Preview mode:",e?"enabled":"disabled")}isPreviewMode(){return this.previewMode}static getPreviewSuppressedHandlers(){return hy}static getPreviewSuppressedLayoutFeatures(){return e_}resolveActionRef(e){if(!e.actionRef)return e;const n=this.namedActions[e.actionRef];if(!n)return H.warn(`[resolveActionRef] named action not found: "${e.actionRef}"`),e;const r=Wn();r?.isEnabled?.()&&r.trackNamedActionRef?.({actionRefName:e.actionRef,resolvedHandler:n.handler,timestamp:Date.now()});const{actionRef:i,type:l,key:c,event:d,...f}=e,h={...n,...Object.fromEntries(Object.entries(f).filter(([,m])=>m!==void 0)),type:l??n.type};return c!==void 0&&(h.key=c),d!==void 0&&(h.event=d),h}matchesPattern(e,n){if(n==="*")return!0;const r=n.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${r}$`).test(e)}getMatchingGlobalHeaders(e,n){const r={};for(const i of this.globalHeaders)this.matchesPattern(e,i.pattern)&&Object.entries(i.headers).forEach(([l,c])=>{const d=ds(c,n,{skipCache:!0});d!=null&&d!==""&&(r[l]=String(d))});return r}setupErrorHandling(){if(this.errorHandlingSetup)return;Ar().setActionExecutor(async(n,r)=>{const i={type:"click",handler:n.handler,target:n.target,params:n.params,actions:n.actions},l={data:{...this.defaultContext.data,error:r.error}};return await this.dispatchAction(i,l)}),this.errorHandlingSetup=!0}registerDefaultHandlers(){this.registerHandler("refetchDataSource",async(n,r)=>{const i=n.params?.dataSourceId,l=n.params?.sync;if(!i){H.warn("refetchDataSource: dataSourceId is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.refetch){const c=window.G7Core?.state?.get?.()||{},d={...r.state?._global,...c},f=window.G7Core?.state?.getLocal?.()||{},h=r.data?._local||r.state||{},m={...f,...h},y=r.isolatedContext?.state;H.log("[refetchDataSource] localStateOverride:",m),await window.G7Core.dataSource.refetch(i,{...l?{sync:!0}:{},...d?{globalStateOverride:d}:{},...m?{localStLine truncated
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
@@ -50,11 +90,11 @@ Error generating stack: `+u.message+`
|
||||
justify-content: center;
|
||||
color: #666;
|
||||
transition: background-color 0.2s;
|
||||
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const l=()=>{n.parentNode&&n.parentNode.removeChild(n)};i.onclick=l;const c=d=>{this.isImeComposing(d)||d.key==="Escape"&&(l(),document.removeEventListener("keydown",c))};return document.addEventListener("keydown",c),n.onclick=d=>{d.target===n&&l()},r.appendChild(i),n.appendChild(r),document.body.appendChild(n),{overlay:n,layer:r,closeLayer:l}}getNestedProperty(e,n){return n.split(".").reduce((r,i)=>r&&r[i]!==void 0?r[i]:void 0,e)}async handleSaveToLocalStorage(e,n){const{key:r,value:i}=e;if(!r)return j.error("saveToLocalStorage: key parameter is required"),!1;try{const l=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,l),j.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(l){return j.error("saveToLocalStorage: failed to save",{key:r,error:l}),!1}}async handleLoadFromLocalStorage(e,n){const{key:r,target:i,stateKey:l,defaultValue:c}=e;if(!r)return j.error("loadFromLocalStorage: key parameter is required"),c;try{const d=localStorage.getItem(r);if(d===null)return j.log(`loadFromLocalStorage: no value found for ${r}, using default`),l&&n.setState&&n.setState({[l]:c}),c;let f;try{f=JSON.parse(d)}catch{f=d}return j.log(`loadFromLocalStorage: loaded ${r}`,f),l&&n.setState&&n.setState({[l]:f}),f}catch(d){return j.error("loadFromLocalStorage: failed to load",{key:r,error:d}),c}}async handleCustomAction(e,n){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){j.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}const i=new Ut(`Unknown action handler: ${e.handler}`,e);throw i.unknownHandler=!0,i}return await r(e,n)}resolveParams(e,n){if(!e)return{};const r={};for(const[i,l]of Object.entries(e))i.includes("{{")&&j.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="string"?r[i]=l:Array.isArray(l)?r[i]=l.map(c=>typeof c=="string"&&c.includes("{{")?this.evaluateExpression(c,n):c):typeof l=="object"&&l!==null&&!Array.isArray(l)&&Object.getPrototypeOf(l)!==Object.prototype&&Object.getPrototypeOf(l)!==null?r[i]=l:typeof l=="object"&&l!==null?r[i]=this.resolveParams(l,n):r[i]=l;return r}resolveValue(e,n){return n?this.bindingEngine.resolveBindings(e,n,{skipCache:!0}):e}evaluateExpressions(e,n){let r={};for(const[i,l]of Object.entries(e))if(i==="..."){let c=l;typeof l=="string"&&l.includes("{{")&&(c=this.evaluateExpression(l,n)),c&&typeof c=="object"&&!Array.isArray(c)&&(r={...r,...c})}else typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="object"&&l!==null&&!Array.isArray(l)?r[i]=this.evaluateExpressions(l,n):r[i]=l;return r}evaluateExpressionsIfNeeded(e,n){const r={};for(const[i,l]of Object.entries(e))typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):r[i]=l;return r}evaluateExpression(e,n){if(!n)return e;const r=Da(e);if(r===null){let c=n;if(e.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(c={...n,_global:f})}if(e.includes("_computed")||e.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(c={...c,_computed:f,$computed:f})}return this.bindingEngine.resolveBindings(e,c,{skipCache:!0})}let i=r;i=i.replace(/\$args\.(\d+)/g,"$args[$1]");let l=n;if(i.includes("_global")){const d=window.G7Core?.state?.get()?._global;d&&(l={...n,_global:d})}if(i.includes("_computed")||i.includes("$computed")){const d=window.__g7ActionContext?.computedRef?.current;d&&Object.keys(d).length>0&&(l={...l,_computed:d,$computed:d})}i.includes("_global.modules")&&(j.log("[evaluateExpression] expression:",i),j.log("[evaluateExpression] dataContext._global:",l._global),j.log("[evaluateExpression] dataContext._global?.modules:",l._global?.modules));try{const c=Gn(i)?this.bindingEngine.evaluatePipeExpression(i,l,{skipCache:!0}):this.bindingEngine.evaluateExpression(i,l);return i.includes("_global.modules")&&j.log("[evaluateExpression] result:",c),typeof c=="string"&&c.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(c,this.translationContext,n):c}catch(c){return j.error("Expression evaluation failed:",e,c),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,n){const r={...this.defaultContext,...n,data:{...this.defaultContext.data,...n?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,r.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,r.data)),!confirm(i))return{success:!1}}try{r
Line truncated
|
||||
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const l=()=>{n.parentNode&&n.parentNode.removeChild(n)};i.onclick=l;const c=d=>{this.isImeComposing(d)||d.key==="Escape"&&(l(),document.removeEventListener("keydown",c))};return document.addEventListener("keydown",c),n.onclick=d=>{d.target===n&&l()},r.appendChild(i),n.appendChild(r),document.body.appendChild(n),{overlay:n,layer:r,closeLayer:l}}getNestedProperty(e,n){return n.split(".").reduce((r,i)=>r&&r[i]!==void 0?r[i]:void 0,e)}async handleSaveToLocalStorage(e,n){const{key:r,value:i}=e;if(!r)return H.error("saveToLocalStorage: key parameter is required"),!1;try{const l=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,l),H.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(l){return H.error("saveToLocalStorage: failed to save",{key:r,error:l}),!1}}async handleLoadFromLocalStorage(e,n){const{key:r,target:i,stateKey:l,defaultValue:c}=e;if(!r)return H.error("loadFromLocalStorage: key parameter is required"),c;try{const d=localStorage.getItem(r);if(d===null)return H.log(`loadFromLocalStorage: no value found for ${r}, using default`),l&&n.setState&&n.setState({[l]:c}),c;let f;try{f=JSON.parse(d)}catch{f=d}return H.log(`loadFromLocalStorage: loaded ${r}`,f),l&&n.setState&&n.setState({[l]:f}),f}catch(d){return H.error("loadFromLocalStorage: failed to load",{key:r,error:d}),c}}async handleCustomAction(e,n){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){H.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}const i=new Vt(`Unknown action handler: ${e.handler}`,e);throw i.unknownHandler=!0,i}return await r(e,n)}resolveParams(e,n){if(!e)return{};const r={};for(const[i,l]of Object.entries(e))i.includes("{{")&&H.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="string"?r[i]=l:Array.isArray(l)?r[i]=l.map(c=>typeof c=="string"&&c.includes("{{")?this.evaluateExpression(c,n):c):typeof l=="object"&&l!==null&&!Array.isArray(l)&&Object.getPrototypeOf(l)!==Object.prototype&&Object.getPrototypeOf(l)!==null?r[i]=l:typeof l=="object"&&l!==null?r[i]=this.resolveParams(l,n):r[i]=l;return r}resolveValue(e,n){return n?this.bindingEngine.resolveBindings(e,n,{skipCache:!0}):e}evaluateExpressions(e,n){let r={};for(const[i,l]of Object.entries(e))if(i==="..."){let c=l;typeof l=="string"&&l.includes("{{")&&(c=this.evaluateExpression(l,n)),c&&typeof c=="object"&&!Array.isArray(c)&&(r={...r,...c})}else typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="object"&&l!==null&&!Array.isArray(l)?r[i]=this.evaluateExpressions(l,n):r[i]=l;return r}evaluateExpressionsIfNeeded(e,n){const r={};for(const[i,l]of Object.entries(e))typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):r[i]=l;return r}evaluateExpression(e,n){if(!n)return e;const r=Ra(e);if(r===null){let c=n;if(e.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(c={...n,_global:f})}if(e.includes("_computed")||e.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(c={...c,_computed:f,$computed:f})}return this.bindingEngine.resolveBindings(e,c,{skipCache:!0})}let i=r;i=i.replace(/\$args\.(\d+)/g,"$args[$1]");let l=n;if(i.includes("_global")){const d=window.G7Core?.state?.get()?._global;d&&(l={...n,_global:d})}if(i.includes("_computed")||i.includes("$computed")){const d=window.__g7ActionContext?.computedRef?.current;d&&Object.keys(d).length>0&&(l={...l,_computed:d,$computed:d})}i.includes("_global.modules")&&(H.log("[evaluateExpression] expression:",i),H.log("[evaluateExpression] dataContext._global:",l._global),H.log("[evaluateExpression] dataContext._global?.modules:",l._global?.modules));try{const c=Kn(i)?this.bindingEngine.evaluatePipeExpression(i,l,{skipCache:!0}):this.bindingEngine.evaluateExpression(i,l);return i.includes("_global.modules")&&H.log("[evaluateExpression] result:",c),typeof c=="string"&&c.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(c,this.translationContext,n):c}catch(c){return H.error("Expression evaluation failed:",e,c),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,n){const r={...this.defaultContext,...n,data:{...this.defaultContext.data,...n?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,r.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,r.data)),!confirm(i))return{success:!1}}try{r
Line truncated
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},WE={onDragStart(s){let{active:e}=s;return"Picked up draggable item "+e.id+"."},onDragOver(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(s){let{active:e}=s;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function YE(s){let{announcements:e=WE,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=KE}=s;const{announce:l,announcement:c}=GE(),d=Lo("DndLiveRegion"),[f,h]=N.useState(!1);if(N.useEffect(()=>{h(!0)},[]),FE(N.useMemo(()=>({onDragStart(y){let{active:S}=y;l(e.onDragStart({active:S}))},onDragMove(y){let{active:S,over:v}=y;e.onDragMove&&l(e.onDragMove({active:S,over:v}))},onDragOver(y){let{active:S,over:v}=y;l(e.onDragOver({active:S,over:v}))},onDragEnd(y){let{active:S,over:v}=y;l(e.onDragEnd({active:S,over:v}))},onDragCancel(y){let{active:S,over:v}=y;l(e.onDragCancel({active:S,over:v}))}}),[l,e])),!f)return null;const m=Ye.createElement(Ye.Fragment,null,Ye.createElement(BE,{id:r,value:i.draggable}),Ye.createElement(qE,{id:d,announcement:c}));return n?Ma.createPortal(m,n):m}var nn;(function(s){s.DragStart="dragStart",s.DragMove="dragMove",s.DragEnd="dragEnd",s.DragCancel="dragCancel",s.DragOver="dragOver",s.RegisterDroppable="registerDroppable",s.SetDroppableDisabled="setDroppableDisabled",s.UnregisterDroppable="unregisterDroppable"})(nn||(nn={}));function wc(){}function oy(s,e){return N.useMemo(()=>({sensor:s,options:e??{}}),[s,e])}function XE(){for(var s=arguments.length,e=new Array(s),n=0;n<s;n++)e[n]=arguments[n];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const _r=Object.freeze({x:0,y:0});function ly(s,e){return Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2))}function cy(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return n-r}function JE(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return r-n}function uy(s){let{left:e,top:n,height:r,width:i}=s;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+r},{x:e+i,y:n+r}]}function dy(s,e){if(!s||s.length===0)return null;const[n]=s;return n[e]}function fy(s,e,n){return e===void 0&&(e=s.left),n===void 0&&(n=s.top),{x:e+s.width*.5,y:n+s.height*.5}}const QE=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=fy(e,e.left,e.top),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=ly(fy(f),i);l.push({id:d,data:{droppableContainer:c,value:h}})}}return l.sort(cy)},ZE=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=uy(e),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=uy(f),m=i.reduce((S,v,_)=>S+ly(h[_],v),0),y=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:y}})}}return l.sort(cy)};function e_(s,e){const n=Math.max(e.top,s.top),r=Math.max(e.left,s.left),i=Math.min(e.left+e.width,s.left+s.width),l=Math.min(e.top+e.height,s.top+s.height),c=i-r,d=l-n;if(r<i&&n<l){const f=e.width*e.height,h=s.width*s.height,m=c*d,y=m/(f+h-m);return Number(y.toFixed(4))}return 0}const t_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=[];for(const l of r){const{id:c}=l,d=n.get(c);if(d){const f=e_(d,e);f>0&&i.push({id:c,data:{droppableContainer:l,value:f}})}}return i.sort(JE)};function n_(s,e,n){return{...s,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function hy(s,e){return s&&e?{x:s.left-e.left,y:s.top-e.top}:_r}function r_(s){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];return i.reduce((c,d)=>({...c,top:c.top+s*d.y,bottom:c.bottom+s*d.y,left:c.left+s*d.x,right:c.right+s*d.x}),{...n})}}const a_=r_(1);function i_(s){if(s.startsWith("matrix3d(")){const e=s.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(s.startsWith("matrix(")){const e=s.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function s_(s,e,n){const r=i_(e);if(!r)return s;const{scaleX:i,scaleY:l,x:c,y:d}=r,f=s.left-c-(1-i)*parseFloat(n),h=s.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?s.width/i:s.width,y=l?s.height/l:s.height;return{width:m,height:y,top:h,right:f+m,bottom:h+y,left:f}}const o_={ignoreTransform:!1};function ys(s,e){e===void 0&&(e=o_);let n=s.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:m}=Mn(s).getComputedStyle(s);h&&(n=s_(n,h,m))}const{top:r,left:i,width:l,height:c,bottom:d,right:f}=n;return{top:r,left:i,width:l,height:c,bottom:d,right:f}}function py(s){return ys(s,{ignoreTransform:!0})}function l_(s){const e=s.innerWidth,n=s.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function c_(s,e){return e===void 0&&(e=Mn(s).getComputedStyle(s)),e.position==="fixed"}function u_(s,e){e===void 0&&(e=Mn(s).getComputedStyle(s));const n=/(auto|scroll|overlay)/;return["overflow","overflowX
Line truncated
|
||||
`},N_={onDragStart(s){let{active:e}=s;return"Picked up draggable item "+e.id+"."},onDragOver(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(s){let{active:e}=s;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function I_(s){let{announcements:e=N_,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=M_}=s;const{announce:l,announcement:c}=O_(),d=Ho("DndLiveRegion"),[f,h]=N.useState(!1);if(N.useEffect(()=>{h(!0)},[]),L_(N.useMemo(()=>({onDragStart(y){let{active:v}=y;l(e.onDragStart({active:v}))},onDragMove(y){let{active:v,over:S}=y;e.onDragMove&&l(e.onDragMove({active:v,over:S}))},onDragOver(y){let{active:v,over:S}=y;l(e.onDragOver({active:v,over:S}))},onDragEnd(y){let{active:v,over:S}=y;l(e.onDragEnd({active:v,over:S}))},onDragCancel(y){let{active:v,over:S}=y;l(e.onDragCancel({active:v,over:S}))}}),[l,e])),!f)return null;const m=Xe.createElement(Xe.Fragment,null,Xe.createElement(R_,{id:r,value:i.draggable}),Xe.createElement(D_,{id:d,announcement:c}));return n?Ma.createPortal(m,n):m}var ln;(function(s){s.DragStart="dragStart",s.DragMove="dragMove",s.DragEnd="dragEnd",s.DragCancel="dragCancel",s.DragOver="dragOver",s.RegisterDroppable="registerDroppable",s.SetDroppableDisabled="setDroppableDisabled",s.UnregisterDroppable="unregisterDroppable"})(ln||(ln={}));function xc(){}function ky(s,e){return N.useMemo(()=>({sensor:s,options:e??{}}),[s,e])}function j_(){for(var s=arguments.length,e=new Array(s),n=0;n<s;n++)e[n]=arguments[n];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const xr=Object.freeze({x:0,y:0});function Ry(s,e){return Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2))}function Dy(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return n-r}function H_(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return r-n}function Oy(s){let{left:e,top:n,height:r,width:i}=s;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+r},{x:e+i,y:n+r}]}function Ly(s,e){if(!s||s.length===0)return null;const[n]=s;return n[e]}function $y(s,e,n){return e===void 0&&(e=s.left),n===void 0&&(n=s.top),{x:e+s.width*.5,y:n+s.height*.5}}const z_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=$y(e,e.left,e.top),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=Ry($y(f),i);l.push({id:d,data:{droppableContainer:c,value:h}})}}return l.sort(Dy)},U_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=Oy(e),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=Oy(f),m=i.reduce((v,S,_)=>v+Ry(h[_],S),0),y=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:y}})}}return l.sort(Dy)};function P_(s,e){const n=Math.max(e.top,s.top),r=Math.max(e.left,s.left),i=Math.min(e.left+e.width,s.left+s.width),l=Math.min(e.top+e.height,s.top+s.height),c=i-r,d=l-n;if(r<i&&n<l){const f=e.width*e.height,h=s.width*s.height,m=c*d,y=m/(f+h-m);return Number(y.toFixed(4))}return 0}const B_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=[];for(const l of r){const{id:c}=l,d=n.get(c);if(d){const f=P_(d,e);f>0&&i.push({id:c,data:{droppableContainer:l,value:f}})}}return i.sort(H_)};function q_(s,e,n){return{...s,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function My(s,e){return s&&e?{x:s.left-e.left,y:s.top-e.top}:xr}function G_(s){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];return i.reduce((c,d)=>({...c,top:c.top+s*d.y,bottom:c.bottom+s*d.y,left:c.left+s*d.x,right:c.right+s*d.x}),{...n})}}const F_=G_(1);function V_(s){if(s.startsWith("matrix3d(")){const e=s.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(s.startsWith("matrix(")){const e=s.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function K_(s,e,n){const r=V_(e);if(!r)return s;const{scaleX:i,scaleY:l,x:c,y:d}=r,f=s.left-c-(1-i)*parseFloat(n),h=s.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?s.width/i:s.width,y=l?s.height/l:s.height;return{width:m,height:y,top:h,right:f+m,bottom:h+y,left:f}}const W_={ignoreTransform:!1};function Ss(s,e){e===void 0&&(e=W_);let n=s.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:m}=jn(s).getComputedStyle(s);h&&(n=K_(n,h,m))}const{top:r,left:i,width:l,height:c,bottom:d,right:f}=n;return{top:r,left:i,width:l,height:c,bottom:d,right:f}}function Ny(s){return Ss(s,{ignoreTransform:!0})}function Y_(s){const e=s.innerWidth,n=s.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function X_(s,e){return e===void 0&&(e=jn(s).getComputedStyle(s)),e.position==="fixed"}function J_(s,e){e===void 0&&(e=jn(s).getComputedStyle(s));const n=/(auto|scroll|overlay)/;return["overflow","overflowX
Line truncated
|
||||
<div style="padding: 1rem; border: 2px dashed #ccc; background: #f9f9f9; text-align: center;">
|
||||
<p style="margin: 0; color: #666;">Component not found: <strong>${e}</strong></p>
|
||||
</div>
|
||||
@@ -63,7 +103,7 @@ Error generating stack: `+u.message+`
|
||||
<p style="margin: 0 0 0.5rem 0; color: #c62828; font-weight: bold;">Component Error: ${e}</p>
|
||||
<p style="margin: 0; color: #666; font-size: 0.875rem;">${n?.message||"Unknown error"}</p>
|
||||
</div>
|
||||
`,r}renderErrorState(e,n){const r=n instanceof Error?n.message:String(n),i=n instanceof xr?n.code:"UNKNOWN_ERROR";e.innerHTML=`
|
||||
`,r}renderErrorState(e,n){const r=n instanceof Error?n.message:String(n),i=n instanceof kr?n.code:"UNKNOWN_ERROR";e.innerHTML=`
|
||||
<div class="layout-error" data-error-code="${i}" style="
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
@@ -105,8 +145,14 @@ Error generating stack: `+u.message+`
|
||||
"
|
||||
>페이지 새로고침</button>
|
||||
</div>
|
||||
`,Vn.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Vn.log("Layout data and cache cleared")}}const NA=dt("TranslationContext"),Kf=N.createContext(null),Lc=({children:s,translationEngine:e,translationContext:n})=>{const r=N.useMemo(()=>(l,c)=>{if(c){const d="|"+Object.entries(c).map(([f,h])=>`${f}=${h}`).join("|");return e.translate(l,n,d)}return e.translate(l,n)},[e,n]),i=N.useMemo(()=>({translationEngine:e,translationContext:n,t:r}),[e,n,r]);return ft.jsx(Kf.Provider,{value:i,children:s})},Uy=()=>{const s=N.useContext(Kf);return s||(NA.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},ja=dt("SlotContext"),IA={registerToSlot:()=>{ja.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{ja.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},jA=N.createContext(IA),Wf=({children:s})=>{const e=N.useRef(new Map),n=N.useRef(new Map),r=N.useCallback(m=>{const y=n.current.get(m);y&&y.forEach(S=>{try{S()}catch(v){ja.error(`Slot subscriber error (slotId: ${m}):`,v)}})},[]),i=N.useCallback((m,y,S)=>{if(!m||!y){ja.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const v=e.current.get(m),_=v.get(y);_&&_.registrationKey===S.registrationKey||(v.set(y,S),ja.log(`Component registered to slot: ${y} -> ${m} (order: ${S.order})`),r(m))},[r]),l=N.useCallback((m,y)=>{const S=e.current.get(m);S&&S.has(y)&&(S.delete(y),ja.log(`Component unregistered from slot: ${y} <- ${m}`),S.size===0&&e.current.delete(m),r(m))},[r]),c=N.useCallback(m=>{const y=e.current.get(m);return y?Array.from(y.values()).sort((S,v)=>S.order-v.order):[]},[]),d=N.useCallback((m,y)=>{n.current.has(m)||n.current.set(m,new Set);const S=n.current.get(m);return S.add(y),()=>{S.delete(y),S.size===0&&n.current.delete(m)}},[]),f=N.useCallback(()=>{e.current.forEach((m,y)=>{r(y)}),e.current.clear(),n.current.clear(),ja.log("All slots cleared")},[r]),h=N.useMemo(()=>({registerToSlot:i,unregisterFromSlot:l,getSlotComponents:c,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,l,c,d,f]);return N.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=h,ja.log("SlotContext exposed to window.__slotContextValue"))},[h]),ft.jsx(jA.Provider,{value:h,children:s})};class Yf{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,n){return this.listen(".client-"+e,n)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,n){return this.stopListening(".client-"+e,n)}}class Py{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function HA(s){try{return Reflect.construct(String,[],s),!0}catch{return!1}}class Xf extends Yf{constructor(e,n,r){super(),this.name=n,this.pusher=e,this.options=r,this.eventFormatter=new Py(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,n){return this.on(this.eventFormatter.format(e),n),this}listenToAll(e){return this.subscription.bind_global((n,r)=>{if(n.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),l=n.startsWith(i)?n.substring(i.length+1):"."+n;e(l,r)}),this}stopListening(e,n){return n?this.subscription.unbind(this.eventFormatter.format(e),n):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",n=>{e(n)}),this}on(e,n){return this.subscription.bind(e,n),this}}class By extends Xf{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class zA extends Xf{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class UA extends By{here(e){return this.on("pusher:subscription_succeeded",n=>{e(Object.keys(n.members).map(r=>n.members[r]))}),this}joining(e){return this.on("pusher:member_added",n=>{e(n.info)}),this}whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}leaving(e){return this.on("pusher:member_removed",n=>{e(n.info)}),this}}class qy extends Yf{constructor(e,n,r){super(),this.events={},this.listeners={},this.name=n,this.socket=e,this.options=r,this.eventFormatter=new Py(this.op
Line truncated
|
||||
`);return D!==-1?(this.position+=D+1,C.slice(0,D)):null}isBufferTooLong(b){return this.position===b.length&&b.length>Xo}}var Jo;(function(E){E[E.CONNECTING=0]="CONNECTING",E[E.OPEN=1]="OPEN",E[E.CLOSED=3]="CLOSED"})(Jo||(Jo={}));const cr=Jo;var Dr=1;class Qo{constructor(b,C){this.hooks=b,this.session=ks(1e3)+"/"+eu(8),this.location=Zo(C),this.readyState=cr.CONNECTING,this.openStream()}send(b){return this.sendRaw(JSON.stringify([b]))}ping(){this.hooks.sendHeartbeat(this)}close(b,C){this.onClose(b,C,!0)}sendRaw(b){if(this.readyState===cr.OPEN)try{return ze.createSocketRequest("POST",fa(Ka(this.location,this.session))).start(b),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(b,C,D){this.closeStream(),this.readyState=cr.CLOSED,this.onclose&&this.onclose({code:b,reason:C,wasClean:D})}onChunk(b){if(b.status===200){this.readyState===cr.OPEN&&this.onActivity();var C,D=b.data.slice(0,1);switch(D){case"o":C=JSON.parse(b.data.slice(1)||"{}"),this.onOpen(C);break;case"a":C=JSON.parse(b.data.slice(1)||"[]");for(var I=0;I<C.length;I++)this.onEvent(C[I]);break;case"m":C=JSON.parse(b.data.slice(1)||"null"),this.onEvent(C);break;case"h":this.hooks.onHeartbeat(this);break;case"c":C=JSON.parse(b.data.slice(1)||"[]"),this.onClose(C[0],C[1],!0);break}}}onOpen(b){this.readyState===cr.CONNECTING?(b&&b.hostname&&(this.location.base=Zc(this.location.base,b.hostname)),this.readyState=cr.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(b){this.readyState===cr.OPEN&&this.onmessage&&this.onmessage({data:b})}onActivity(){this.onactivity&&this.onactivity()}onError(b){this.onerror&&this.onerror(b)}openStream(){this.stream=ze.createSocketRequest("POST",fa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",b=>{this.onChunk(b)}),this.stream.bind("finished",b=>{this.hooks.onFinished(this,b)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(b){Te.defer(()=>{this.onError(b),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function Zo(E){var b=/([^\?]*)\/*(\??.*)/.exec(E);return{base:b[1],queryString:b[2]}}function Ka(E,b){return E.base+"/"+b+"/xhr_send"}function fa(E){var b=E.indexOf("?")===-1?"?":"&";return E+b+"t="+ +new Date+"&n="+Dr++}function Zc(E,b){var C=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(E);return C[1]+b+C[3]}function ks(E){return ze.randomInt(E)}function eu(E){for(var b=[],C=0;C<E;C++)b.push(ks(32).toString(32));return b.join("")}const Li=Qo;var Or={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr_streaming"+E.queryString},onHeartbeat:function(E){E.sendRaw("[]")},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const el=Or;var $i={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr"+E.queryString},onHeartbeat:function(){},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){b===200?E.reconnect():E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const Yr=$i;var tl={getRequest:function(E){var b=ze.getXHRAPI(),C=new b;return C.onreadystatechange=C.onprogress=function(){switch(C.readyState){case 3:C.responseText&&C.responseText.length>0&&E.onChunk(C.status,C.responseText);break;case 4:C.responseText&&C.responseText.length>0&&E.onChunk(C.status,C.responseText),E.emit("finished",C.status),E.close();break}},C},abortRequest:function(E){E.onreadystatechange=null,E.abort()}};const Rs=tl;var tu={createStreamingSocket(E){return this.createSocket(el,E)},createPollingSocket(E){return this.createSocket(Yr,E)},createSocket(E,b){return new Li(E,b)},createXHR(E,b){return this.createRequest(Rs,E,b)},createRequest(E,b,C){return new dh(E,b,C)}};const Mi=tu;Mi.createXDR=function(E,b){return this.createRequest(Qc,E,b)};var nu={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:m,DependenciesReceivers:_,getDefaultStrategy:Va,Transports:An,transportConnectionInitializer:uh,HTTPFactory:Mi,TimelineTransport:on,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(E){window.Pusher=E;var b=()=>{this.onDocumentBody(E.ready)};window.JSON?b():x.load("json2",{},b)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:qe,jsonp:mn}},onDocumentBody(E){document.body?E():setTimeout(()=>{this.onDocumentBody(E)},0)},createJSONPRequest(E,b){return new lr(E,b)},createScriptRequest(E){return new ca(E)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var E=this.getXHRAPI();return new E},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Ko},createWebSocket(E){var b=this.getWebSocketAPI();return new b(E)},createSocketRequest(E,b){if(this.isXHRSuppo
Line truncated
|
||||
`,Yn.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Yn.log("Layout data and cache cleared")}}const Cx=pt("TranslationContext"),Zf=N.createContext(null),jc=({children:s,translationEngine:e,translationContext:n})=>{const r=N.useMemo(()=>(l,c)=>{if(c){const d="|"+Object.entries(c).map(([f,h])=>`${f}=${h}`).join("|");return e.translate(l,n,d)}return e.translate(l,n)},[e,n]),i=N.useMemo(()=>({translationEngine:e,translationContext:n,t:r}),[e,n,r]);return yt.jsx(Zf.Provider,{value:i,children:s})},ob=()=>{const s=N.useContext(Zf);return s||(Cx.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},ja=pt("SlotContext"),Ex={registerToSlot:()=>{ja.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{ja.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},_x=N.createContext(Ex),eh=({children:s})=>{const e=N.useRef(new Map),n=N.useRef(new Map),r=N.useCallback(m=>{const y=n.current.get(m);y&&y.forEach(v=>{try{v()}catch(S){ja.error(`Slot subscriber error (slotId: ${m}):`,S)}})},[]),i=N.useCallback((m,y,v)=>{if(!m||!y){ja.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const S=e.current.get(m),_=S.get(y);_&&_.registrationKey===v.registrationKey||(S.set(y,v),ja.log(`Component registered to slot: ${y} -> ${m} (order: ${v.order})`),r(m))},[r]),l=N.useCallback((m,y)=>{const v=e.current.get(m);v&&v.has(y)&&(v.delete(y),ja.log(`Component unregistered from slot: ${y} <- ${m}`),v.size===0&&e.current.delete(m),r(m))},[r]),c=N.useCallback(m=>{const y=e.current.get(m);return y?Array.from(y.values()).sort((v,S)=>v.order-S.order):[]},[]),d=N.useCallback((m,y)=>{n.current.has(m)||n.current.set(m,new Set);const v=n.current.get(m);return v.add(y),()=>{v.delete(y),v.size===0&&n.current.delete(m)}},[]),f=N.useCallback(()=>{e.current.forEach((m,y)=>{r(y)}),e.current.clear(),n.current.clear(),ja.log("All slots cleared")},[r]),h=N.useMemo(()=>({registerToSlot:i,unregisterFromSlot:l,getSlotComponents:c,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,l,c,d,f]);return N.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=h,ja.log("SlotContext exposed to window.__slotContextValue"))},[h]),yt.jsx(_x.Provider,{value:h,children:s})};class th{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,n){return this.listen(".client-"+e,n)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,n){return this.stopListening(".client-"+e,n)}}class lb{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function Ax(s){try{return Reflect.construct(String,[],s),!0}catch{return!1}}class nh extends th{constructor(e,n,r){super(),this.name=n,this.pusher=e,this.options=r,this.eventFormatter=new lb(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,n){return this.on(this.eventFormatter.format(e),n),this}listenToAll(e){return this.subscription.bind_global((n,r)=>{if(n.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),l=n.startsWith(i)?n.substring(i.length+1):"."+n;e(l,r)}),this}stopListening(e,n){return n?this.subscription.unbind(this.eventFormatter.format(e),n):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",n=>{e(n)}),this}on(e,n){return this.subscription.bind(e,n),this}}class cb extends nh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class xx extends nh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class Tx extends cb{here(e){return this.on("pusher:subscription_succeeded",n=>{e(Object.keys(n.members).map(r=>n.members[r]))}),this}joining(e){return this.on("pusher:member_added",n=>{e(n.info)}),this}whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}leaving(e){return this.on("pusher:member_removed",n=>{e(n.info)}),this}}class ub extends th{constructor(e,n,r){super(),this.events={},this.listeners={},this.name=n,this.socket=e,this.options=r,this.eventFormatter=new lb(this.op
Line truncated
|
||||
* Pusher JavaScript Library v8.5.0
|
||||
* https://pusher.com/
|
||||
*
|
||||
* Copyright 2020, Pusher
|
||||
* Released under the MIT licence.
|
||||
*/var gb;function $x(){return gb||(gb=1,(function(s,e){(function(r,i){s.exports=i()})(self,()=>(()=>{var n={594(c,d){var f=this&&this.__extends||(function(){var O=function(k,L){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,q){B.__proto__=q}||function(B,q){for(var z in q)q.hasOwnProperty(z)&&(B[z]=q[z])},O(k,L)};return function(k,L){O(k,L);function B(){this.constructor=k}k.prototype=L===null?Object.create(L):(B.prototype=L.prototype,new B)}})();Object.defineProperty(d,"__esModule",{value:!0});var h=256,m=(function(){function O(k){k===void 0&&(k="="),this._paddingCharacter=k}return O.prototype.encodedLength=function(k){return this._paddingCharacter?(k+2)/3*4|0:(k*8+5)/6|0},O.prototype.encode=function(k){for(var L="",B=0;B<k.length-2;B+=3){var q=k[B]<<16|k[B+1]<<8|k[B+2];L+=this._encodeByte(q>>>18&63),L+=this._encodeByte(q>>>12&63),L+=this._encodeByte(q>>>6&63),L+=this._encodeByte(q>>>0&63)}var z=k.length-B;if(z>0){var q=k[B]<<16|(z===2?k[B+1]<<8:0);L+=this._encodeByte(q>>>18&63),L+=this._encodeByte(q>>>12&63),z===2?L+=this._encodeByte(q>>>6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},O.prototype.maxDecodedLength=function(k){return this._paddingCharacter?k/4*3|0:(k*6+7)/8|0},O.prototype.decodedLength=function(k){return this.maxDecodedLength(k.length-this._getPaddingLength(k))},O.prototype.decode=function(k){if(k.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(k),B=k.length-L,q=new Uint8Array(this.maxDecodedLength(B)),z=0,W=0,he=0,we=0,ve=0,Ue=0,Fe=0;W<B-4;W+=4)we=this._decodeChar(k.charCodeAt(W+0)),ve=this._decodeChar(k.charCodeAt(W+1)),Ue=this._decodeChar(k.charCodeAt(W+2)),Fe=this._decodeChar(k.charCodeAt(W+3)),q[z++]=we<<2|ve>>>4,q[z++]=ve<<4|Ue>>>2,q[z++]=Ue<<6|Fe,he|=we&h,he|=ve&h,he|=Ue&h,he|=Fe&h;if(W<B-1&&(we=this._decodeChar(k.charCodeAt(W)),ve=this._decodeChar(k.charCodeAt(W+1)),q[z++]=we<<2|ve>>>4,he|=we&h,he|=ve&h),W<B-2&&(Ue=this._decodeChar(k.charCodeAt(W+2)),q[z++]=ve<<4|Ue>>>2,he|=Ue&h),W<B-3&&(Fe=this._decodeChar(k.charCodeAt(W+3)),q[z++]=Ue<<6|Fe,he|=Fe&h),he!==0)throw new Error("Base64Coder: incorrect characters for decoding");return q},O.prototype._encodeByte=function(k){var L=k;return L+=65,L+=25-k>>>8&6,L+=51-k>>>8&-75,L+=61-k>>>8&-15,L+=62-k>>>8&3,String.fromCharCode(L)},O.prototype._decodeChar=function(k){var L=h;return L+=(42-k&k-44)>>>8&-h+k-43+62,L+=(46-k&k-48)>>>8&-h+k-47+63,L+=(47-k&k-58)>>>8&-h+k-48+52,L+=(64-k&k-91)>>>8&-h+k-65+0,L+=(96-k&k-123)>>>8&-h+k-97+26,L},O.prototype._getPaddingLength=function(k){var L=0;if(this._paddingCharacter){for(var B=k.length-1;B>=0&&k[B]===this._paddingCharacter;B--)L++;if(k.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},O})();d.Coder=m;var y=new m;function v(O){return y.encode(O)}d.encode=v;function S(O){return y.decode(O)}d.decode=S;var _=(function(O){f(k,O);function k(){return O!==null&&O.apply(this,arguments)||this}return k.prototype._encodeByte=function(L){var B=L;return B+=65,B+=25-L>>>8&6,B+=51-L>>>8&-75,B+=61-L>>>8&-13,B+=62-L>>>8&49,String.fromCharCode(B)},k.prototype._decodeChar=function(L){var B=h;return B+=(44-L&L-46)>>>8&-h+L-45+62,B+=(94-L&L-96)>>>8&-h+L-95+63,B+=(47-L&L-58)>>>8&-h+L-48+52,B+=(64-L&L-91)>>>8&-h+L-65+0,B+=(96-L&L-123)>>>8&-h+L-97+26,B},k})(m);d.URLSafeCoder=_;var x=new _;function A(O){return x.encode(O)}d.encodeURLSafe=A;function D(O){return x.decode(O)}d.decodeURLSafe=D,d.encodedLength=function(O){return y.encodedLength(O)},d.maxDecodedLength=function(O){return y.maxDecodedLength(O)},d.decodedLength=function(O){return y.decodedLength(O)}},978(c,d){var f="utf8: invalid source encoding";function h(m){for(var y=[],v=0;v<m.length;v++){var S=m[v];if(S&128){var _=void 0;if(S<224){if(v>=m.length)throw new Error(f);var x=m[++v];if((x&192)!==128)throw new Error(f);S=(S&31)<<6|x&63,_=128}else if(S<240){if(v>=m.length-1)throw new Error(f);var x=m[++v],A=m[++v];if((x&192)!==128||(A&192)!==128)throw new Error(f);S=(S&15)<<12|(x&63)<<6|A&63,_=2048}else if(S<248){if(v>=m.length-2)throw new Error(f);var x=m[++v],A=m[++v],D=m[++v];if((x&192)!==128||(A&192)!==128||(D&192)!==128)throw new Error(f);S=(S&15)<<18|(x&63)<<12|(A&63)<<6|D&63,_=65536}else throw new Error(f);if(S<_||S>=55296&&S<=57343)throw new Error(f);if(S>=65536){if(S>1114111)throw new Error(f);S-=65536,y.push(String.fromCharCode(55296|S>>10)),S=56320|S&1023}}y.push(String.fromCharCode(S))}return y.join("")}d.D4=h},721(c,d,f){c.exports=f(207).default},207(c,d,f){f.d(d,{default:()=>Ns});class h{constructor(b,C){this.lastId=0,this.prefix=b,this.name=C}create(b){this.lastId++;var C=this.lastId,$=this.prefix+C,I=this.name+"["+C+"]",ne=!1,ye=function(){ne||(b.apply(null,arguments),ne=!0)};return this[C]=ye,{number:C,id:$,name:I,callback:ye}}remove(b){delete this[b.number]}}var m=new h("_pusher_script_","Pusher.ScriptReceivers"),y={VERSION:"8.5.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_hostLine truncated
|
||||
`);return $!==-1?(this.position+=$+1,C.slice(0,$)):null}isBufferTooLong(b){return this.position===b.length&&b.length>nl}}var rl;(function(E){E[E.CONNECTING=0]="CONNECTING",E[E.OPEN=1]="OPEN",E[E.CLOSED=3]="CLOSED"})(rl||(rl={}));const fr=rl;var Lr=1;class al{constructor(b,C){this.hooks=b,this.session=Os(1e3)+"/"+iu(8),this.location=il(C),this.readyState=fr.CONNECTING,this.openStream()}send(b){return this.sendRaw(JSON.stringify([b]))}ping(){this.hooks.sendHeartbeat(this)}close(b,C){this.onClose(b,C,!0)}sendRaw(b){if(this.readyState===fr.OPEN)try{return ze.createSocketRequest("POST",fa(Ka(this.location,this.session))).start(b),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(b,C,$){this.closeStream(),this.readyState=fr.CLOSED,this.onclose&&this.onclose({code:b,reason:C,wasClean:$})}onChunk(b){if(b.status===200){this.readyState===fr.OPEN&&this.onActivity();var C,$=b.data.slice(0,1);switch($){case"o":C=JSON.parse(b.data.slice(1)||"{}"),this.onOpen(C);break;case"a":C=JSON.parse(b.data.slice(1)||"[]");for(var I=0;I<C.length;I++)this.onEvent(C[I]);break;case"m":C=JSON.parse(b.data.slice(1)||"null"),this.onEvent(C);break;case"h":this.hooks.onHeartbeat(this);break;case"c":C=JSON.parse(b.data.slice(1)||"[]"),this.onClose(C[0],C[1],!0);break}}}onOpen(b){this.readyState===fr.CONNECTING?(b&&b.hostname&&(this.location.base=au(this.location.base,b.hostname)),this.readyState=fr.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(b){this.readyState===fr.OPEN&&this.onmessage&&this.onmessage({data:b})}onActivity(){this.onactivity&&this.onactivity()}onError(b){this.onerror&&this.onerror(b)}openStream(){this.stream=ze.createSocketRequest("POST",fa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",b=>{this.onChunk(b)}),this.stream.bind("finished",b=>{this.hooks.onFinished(this,b)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(b){Te.defer(()=>{this.onError(b),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function il(E){var b=/([^\?]*)\/*(\??.*)/.exec(E);return{base:b[1],queryString:b[2]}}function Ka(E,b){return E.base+"/"+b+"/xhr_send"}function fa(E){var b=E.indexOf("?")===-1?"?":"&";return E+b+"t="+ +new Date+"&n="+Lr++}function au(E,b){var C=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(E);return C[1]+b+C[3]}function Os(E){return ze.randomInt(E)}function iu(E){for(var b=[],C=0;C<E;C++)b.push(Os(32).toString(32));return b.join("")}const Ni=al;var $r={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr_streaming"+E.queryString},onHeartbeat:function(E){E.sendRaw("[]")},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const sl=$r;var Ii={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr"+E.queryString},onHeartbeat:function(){},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){b===200?E.reconnect():E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const Yr=Ii;var ol={getRequest:function(E){var b=ze.getXHRAPI(),C=new b;return C.onreadystatechange=C.onprogress=function(){switch(C.readyState){case 3:C.responseText&&C.responseText.length>0&&E.onChunk(C.status,C.responseText);break;case 4:C.responseText&&C.responseText.length>0&&E.onChunk(C.status,C.responseText),E.emit("finished",C.status),E.close();break}},C},abortRequest:function(E){E.onreadystatechange=null,E.abort()}};const Ls=ol;var su={createStreamingSocket(E){return this.createSocket(sl,E)},createPollingSocket(E){return this.createSocket(Yr,E)},createSocket(E,b){return new Ni(E,b)},createXHR(E,b){return this.createRequest(Ls,E,b)},createRequest(E,b,C){return new yh(E,b,C)}};const ji=su;ji.createXDR=function(E,b){return this.createRequest(ru,E,b)};var ou={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:m,DependenciesReceivers:_,getDefaultStrategy:Va,Transports:Rn,transportConnectionInitializer:mh,HTTPFactory:ji,TimelineTransport:un,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(E){window.Pusher=E;var b=()=>{this.onDocumentBody(E.ready)};window.JSON?b():x.load("json2",{},b)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:Ge,jsonp:bn}},onDocumentBody(E){document.body?E():setTimeout(()=>{this.onDocumentBody(E)},0)},createJSONPRequest(E,b){return new dr(E,b)},createScriptRequest(E){return new ca(E)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var E=this.getXHRAPI();return new E},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Zo},createWebSocket(E){var b=this.getWebSocketAPI();return new b(E)},createSocketRequest(E,b){if(this.isXHRSuppo
Line truncated
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -227,4 +273,4 @@ Error generating stack: `+u.message+`
|
||||
`:""}
|
||||
</div>
|
||||
</div>
|
||||
`}static renderFromError(e,n,r,i=!1,l,c,d){let f,h;if(n.userMessageKey.startsWith("$t:"))if(c&&l)try{f=c.translate(n.userMessageKey,l)}catch{f=n.userMessageKey.replace("$t:","")}else f=n.userMessageKey.replace("$t:","");else f=n.userMessageKey;if(d){const m=d;m.details?.apiMessage?h=m.details.apiMessage:m.response?.data?.message&&(h=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:h,icon:n.icon,showStack:n.showStack,stackTrace:n.stack,showReloadButton:n.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const n=document.createElement("div");return n.textContent=e,n.innerHTML}}const bs=dt("Router");class ex{constructor(e){M(this,"routes",[]);M(this,"templateIdentifier");M(this,"eventHandlers",new Map);M(this,"pendingNavigation",null);M(this,"isNavigating",!1);M(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,n){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(n)}async emit(e,...n){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...n)))}async loadRoutes(e){try{const n=e!==void 0&&e>0?e:null,r=await fetch(jr(`/api/templates/${this.templateIdentifier}/routes`,"json",n));if(!r.ok)throw new Error(`Failed to load routes: ${r.statusText}`);const i=await r.json();if(!i.success)throw new Error("Failed to load routes from API");if(i.data&&Array.isArray(i.data.routes))this.routes=i.data.routes,bs.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(n){throw bs.error("Error loading routes:",n),n}}setRoutes(e){this.routes=e,bs.log(`Set ${this.routes.length} routes`)}match(e){const n=this.normalizePathname(e);for(const r of this.routes){const i=this.matchPattern(r.path,n);if(i!==null)return{route:r,params:i}}return null}normalizePathname(e){return e.length>1&&e.endsWith("/")?e.replace(/\/+$/,"")||"/":e}matchPattern(e,n){const r=[];let i=e.replace(/:([^/]+)/g,(f,h)=>(r.push(h),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const l=new RegExp(`^${i}$`),c=n.match(l);if(!c)return null;const d={};return r.forEach((f,h)=>{d[f]=c[h+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,n){return e.auth_type?e.auth_type:n.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,n=window.location.search,r=this.match(e);if(!r){bs.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){bs.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const c=this.getAuthType(r.route,e),d=wr.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===c;if(f||(f=await d.checkAuth(c)),!f){const h=d.getLoginRedirectUrl(c,e+n);bs.log(`Not authenticated, redirecting to: ${h}`),window.location.href=h;return}}const i=new URLSearchParams(n),l={};for(const c of i.keys()){if(c in l)continue;const d=i.getAll(c);d.length>1?l[c]=d:d.length===1&&(c.endsWith("[]")?l[c]=d:l[c]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:l,auth_required:r.route.auth_required,auth_type:r.route.auth_type,meta:r.route.meta})}navigate(e){if(this.isNavigating){this.pendingNavigation=e;return}this.executeNavigation(e)}async executeNavigation(e){this.isNavigating=!0,this.pendingNavigation=null;try{window.history.pushState({},"",e),await this.navigateToCurrentPath()}finally{if(this.isNavigating=!1,this.pendingNavigation){const n=this.pendingNavigation;this.executeNavigation(n)}}}}const tx=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function eb(s){const e=tx.exec(s);return e?{templateIdentifier:e[1]}:null}const Bt=dt("ErrorPageHandler");class nx{constructor(e){M(this,"templateId");M(this,"layoutLoader");M(this,"locale");M(this,"debug");M(this,"renderFunction");M(this,"dataSourceManager");M(this,"globalState");M(this,"errorConfig",null);M(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(jr(`/api/templates/${this.templateId}/config`,"json"));if(!e.ok)return this.debug&&Bt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const n=await e.json();if(!n.success||!n.data)return this.debug&&Bt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=n.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Bt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Bt.log("Error config loaded:",this.error
Line truncated
|
||||
`}static renderFromError(e,n,r,i=!1,l,c,d){let f,h;if(n.userMessageKey.startsWith("$t:"))if(c&&l)try{f=c.translate(n.userMessageKey,l)}catch{f=n.userMessageKey.replace("$t:","")}else f=n.userMessageKey.replace("$t:","");else f=n.userMessageKey;if(d){const m=d;m.details?.apiMessage?h=m.details.apiMessage:m.response?.data?.message&&(h=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:h,icon:n.icon,showStack:n.showStack,stackTrace:n.stack,showReloadButton:n.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const n=document.createElement("div");return n.textContent=e,n.innerHTML}}const ws=pt("Router");class Px{constructor(e){M(this,"routes",[]);M(this,"templateIdentifier");M(this,"eventHandlers",new Map);M(this,"pendingNavigation",null);M(this,"isNavigating",!1);M(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,n){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(n)}async emit(e,...n){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...n)))}async loadRoutes(e){try{const n=e!==void 0&&e>0?e:null,r=await fetch(zr(`/api/templates/${this.templateIdentifier}/routes`,"json",n));if(!r.ok)throw new Error(`Failed to load routes: ${r.statusText}`);const i=await r.json();if(!i.success)throw new Error("Failed to load routes from API");if(i.data&&Array.isArray(i.data.routes))this.routes=i.data.routes,ws.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(n){throw ws.error("Error loading routes:",n),n}}setRoutes(e){this.routes=e,ws.log(`Set ${this.routes.length} routes`)}match(e){const n=this.normalizePathname(e);for(const r of this.routes){const i=this.matchPattern(r.path,n);if(i!==null)return{route:r,params:i}}return null}normalizePathname(e){return e.length>1&&e.endsWith("/")?e.replace(/\/+$/,"")||"/":e}matchPattern(e,n){const r=[];let i=e.replace(/:([^/]+)/g,(f,h)=>(r.push(h),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const l=new RegExp(`^${i}$`),c=n.match(l);if(!c)return null;const d={};return r.forEach((f,h)=>{d[f]=c[h+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,n){return e.auth_type?e.auth_type:n.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,n=window.location.search,r=this.match(e);if(!r){ws.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){ws.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const c=this.getAuthType(r.route,e),d=Er.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===c;if(f||(f=await d.checkAuth(c)),!f){const h=d.getLoginRedirectUrl(c,e+n);ws.log(`Not authenticated, redirecting to: ${h}`),window.location.href=h;return}}const i=new URLSearchParams(n),l={};for(const c of i.keys()){if(c in l)continue;const d=i.getAll(c);d.length>1?l[c]=d:d.length===1&&(c.endsWith("[]")?l[c]=d:l[c]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:l,auth_required:r.route.auth_required,auth_type:r.route.auth_type,meta:r.route.meta})}navigate(e){if(this.isNavigating){this.pendingNavigation=e;return}this.executeNavigation(e)}async executeNavigation(e){this.isNavigating=!0,this.pendingNavigation=null;try{window.history.pushState({},"",e),await this.navigateToCurrentPath()}finally{if(this.isNavigating=!1,this.pendingNavigation){const n=this.pendingNavigation;this.executeNavigation(n)}}}}const Bx=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function wb(s){const e=Bx.exec(s);return e?{templateIdentifier:e[1]}:null}const Wt=pt("ErrorPageHandler");class qx{constructor(e){M(this,"templateId");M(this,"layoutLoader");M(this,"locale");M(this,"debug");M(this,"renderFunction");M(this,"dataSourceManager");M(this,"globalState");M(this,"errorConfig",null);M(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(zr(`/api/templates/${this.templateId}/config`,"json"));if(!e.ok)return this.debug&&Wt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const n=await e.json();if(!n.success||!n.data)return this.debug&&Wt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=n.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Wt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Wt.log("Error config loaded:",this.error
Line truncated
|
||||
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"resources/css/app.css": {
|
||||
"file": "assets/app-wg6V8t2K.css",
|
||||
"file": "assets/app-D1ub6noJ.css",
|
||||
"src": "resources/css/app.css",
|
||||
"isEntry": true,
|
||||
"name": "app",
|
||||
"names": [
|
||||
"app.css"
|
||||
]
|
||||
},
|
||||
"resources/js/app.js": {
|
||||
"file": "assets/app-UyRVujZY.js",
|
||||
"file": "assets/app-DMsN-rLE.js",
|
||||
"name": "app",
|
||||
"src": "resources/js/app.js",
|
||||
"isEntry": true
|
||||
|
||||
@@ -1087,6 +1087,10 @@ if (isset($_GET['ajax_action'])) {
|
||||
<span>신뢰 프록시 점검</span>
|
||||
<span class="text-[10px] opacity-60">(trusted-proxy:status)</span>
|
||||
</button>
|
||||
<button onclick="runCommand('security:audit-dependencies')" class="inline-flex items-center gap-1.5 px-3 py-2 bg-amber-600 hover:bg-amber-700 text-white text-xs font-medium rounded transition-colors">
|
||||
<span>의존성 취약점 점검</span>
|
||||
<span class="text-[10px] opacity-60">(security:audit-dependencies)</span>
|
||||
</button>
|
||||
<button onclick="runCommand('seo:prune-stats')" class="inline-flex items-center gap-1.5 px-3 py-2 bg-amber-600 hover:bg-amber-700 text-white text-xs font-medium rounded transition-colors">
|
||||
<span>SEO 캐시 통계 정리</span>
|
||||
<span class="text-[10px] opacity-60">(seo:prune-stats)</span>
|
||||
@@ -1565,13 +1569,41 @@ if (isset($_GET['ajax_action'])) {
|
||||
}
|
||||
}
|
||||
|
||||
async function runArtisanCommand(command, stepName) {
|
||||
/** 화면이 커맨드 응답을 기다리는 기본 시간 (ms) */
|
||||
const DEFAULT_COMMAND_TIMEOUT = 60000;
|
||||
|
||||
/**
|
||||
* 기본 대기 시간 안에 끝나지 않는 커맨드의 개별 대기 시간 (ms).
|
||||
*
|
||||
* 잠금파일 전수를 레지스트리에 물어보는 점검처럼, 실행 자체가 기본 대기 시간에
|
||||
* 근접하거나 넘는 커맨드가 있다. 화면이 먼저 포기하면 운영자에게는 타임아웃만
|
||||
* 남고 결과가 도달하지 않는다 — 서버에서는 점검이 정상 수행 중인데도 화면만
|
||||
* 보면 "점검이 실패했다" 로 읽힌다.
|
||||
*/
|
||||
const COMMAND_TIMEOUTS = {
|
||||
'security:audit-dependencies': 300000,
|
||||
};
|
||||
|
||||
/**
|
||||
* 커맨드 문자열에서 대기 시간을 정한다. 옵션은 무시하고 커맨드 이름으로만 찾는다.
|
||||
*
|
||||
* @param {string} command 실행할 Artisan 커맨드 (옵션 포함 가능)
|
||||
* @returns {number} 대기 시간 (ms)
|
||||
*/
|
||||
function resolveCommandTimeout(command) {
|
||||
const name = String(command).trim().split(/\s+/)[0];
|
||||
|
||||
return COMMAND_TIMEOUTS[name] ?? DEFAULT_COMMAND_TIMEOUT;
|
||||
}
|
||||
|
||||
async function runArtisanCommand(command, stepName, timeoutMs = null) {
|
||||
const limit = timeoutMs ?? resolveCommandTimeout(command);
|
||||
|
||||
try {
|
||||
const url = `${window.location.pathname}?ajax_action=artisan&command=${encodeURIComponent(command)}`;
|
||||
|
||||
// 타임아웃 설정 (60초)
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), 60000);
|
||||
const timeoutId = setTimeout(() => controller.abort(), limit);
|
||||
|
||||
const response = await fetch(url, { signal: controller.signal });
|
||||
clearTimeout(timeoutId);
|
||||
@@ -1585,7 +1617,7 @@ if (isset($_GET['ajax_action'])) {
|
||||
return { ...result, stepName };
|
||||
} catch (error) {
|
||||
if (error.name === 'AbortError') {
|
||||
return { success: false, output: '⏱️ 타임아웃 (60초 초과)', stepName };
|
||||
return { success: false, output: `⏱️ 타임아웃 (${Math.round(limit / 1000)}초 초과)`, stepName };
|
||||
}
|
||||
return { success: false, output: '❌ ' + error.message, stepName };
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
### Changed
|
||||
|
||||
- 관리자 화면에서 게시물·상품 등의 HTML 본문을 표시할 때 쓰는 정화 라이브러리를 최신 버전으로 고정했습니다. 종전에는 이 라이브러리를 직접 지정하지 않아 다른 구성요소가 딸려 들여온 구버전이 쓰였고, 사용자 템플릿보다 낮은 버전으로 동작했습니다.
|
||||
- 레이아웃 코드 편집기(Monaco)를 0.56.0 으로 올렸습니다. 편집기가 자체적으로 담고 있던 HTML 정화 라이브러리가 크게 뒤처져 있어 함께 개선됩니다. (#126 @jiwonpapa 님께서 제보해주셨습니다.)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ describe('CodeEditor Monaco 폴백', () => {
|
||||
|
||||
const [{ paths }] = loaderState.config.mock.calls[0] as any[];
|
||||
|
||||
expect(paths.vs).toContain('vendor/monaco-editor/0.54.0/vs');
|
||||
expect(paths.vs).toContain('vendor/monaco-editor/0.56.0/vs');
|
||||
expect(paths.vs).not.toMatch(/^https?:/);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var SirsoftAdminBasic=(function(R,h,v,Vn){"use strict";var RA=Object.defineProperty;var eD=(R,h,v)=>h in R?RA(R,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):R[h]=v;var $e=(R,h,v)=>eD(R,typeof h!="symbol"?h+"":h,v);var Xa,Cr;function jb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $=jb(v),Wb=()=>window.G7Core,le=v.forwardRef(({children:e,variant:t="primary",size:n="md",className:r="",...s},o)=>{const i="button",a=Wb()?.style?.mergeClasses?.(i,r)??`${i} ${r}`;return h.jsx("button",{ref:o,className:a,...s,children:e})});le.displayName="Button";const su=v.forwardRef(({accept:e,maxSize:t,onChange:n,onError:r,buttonText:s="Browse",placeholder:o="No file selected",className:i="",disabled:a,...l},c)=>{const d=v.useRef(null),u=c||d,[f,g]=v.useState(""),m={},p={};Object.entries(l).forEach(([x,M])=>{x.startsWith("data-editor-")||x==="id"||x==="onMouseMove"||x==="onMouseLeave"?m[x]=M:p[x]=M});const y=v.useCallback(()=>{!a&&u.current&&u.current.click()},[a,u]),b=v.useCallback(x=>{const M=x.target.files?.[0]||null;if(!M){g(""),n?.({target:{value:null,name:""}});return}if(t&&M.size>t*1024*1024){const S=`File size exceeds ${t}MB limit`;r?.(S),u.current&&(u.current.value=""),g("");return}g(M.name),n?.({target:{value:M,name:M.name}})},[t,n,r,u]),_=v.useCallback(x=>{x.stopPropagation(),u.current&&(u.current.value=""),g(""),n?.({target:{value:null,name:""}})},[n,u]);return h.jsxs("div",{className:`flex items-center gap-2 ${i}`,...m,children:[h.jsx("input",{ref:u,type:"file",accept:e,onChange:b,disabled:a,className:"hidden",...p}),h.jsx("button",{type:"button",onClick:y,disabled:a,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s}),h.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!a&&h.jsx("button",{type:"button",onClick:_,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});su.displayName="FileInput";const Gb=e=>e==="checkbox"?"checkbox":e==="radio"?"radio":"input",Yb=(e,t)=>{const n=Gb(e);return t?t.split(/\s+/).filter(Boolean).includes(n)?t:`${n} ${t}`:n},Et=v.forwardRef(({label:e,error:t,className:n="",onChange:r,onKeyPress:s,value:o,defaultValue:i,type:a="text",checked:l,defaultChecked:c,...d},u)=>{const f=a==="radio"||a==="checkbox",g=Yb(a,n),m=v.useRef(!1),p=v.useRef(null);v.useImperativeHandle(u,()=>p.current);const[y,b]=v.useState(o??i??"");v.useEffect(()=>{if(!f&&!m.current&&o!==void 0){if(p.current&&document.activeElement===p.current)return;b(o)}},[o,f]);const _=v.useCallback(()=>{m.current=!0},[]),x=v.useCallback(E=>{if(m.current=!1,r){const T=E.target.value;b(T);const P=new Event("change",{bubbles:!0});Object.defineProperty(P,"target",{writable:!1,value:{value:T}}),Object.defineProperty(P,"currentTarget",{writable:!1,value:{value:T}}),r(P)}},[r]),M=v.useCallback(E=>{const T=E.target.value;b(T),!m.current&&r&&r(E)},[r]),S=v.useCallback(E=>{m.current||s&&s(E)},[s]),{loadingactions:k,formdata:N,...C}=d;if(f)return h.jsx("input",{ref:p,type:a,className:g,onChange:r,checked:l,defaultChecked:c,value:o,...C});const w=o!==void 0?{value:y}:{defaultValue:i};return h.jsx("input",{ref:p,type:a,className:g,onChange:M,onKeyPress:S,onCompositionStart:_,onCompositionEnd:x,...w,...C})});Et.displayName="Input";const lr=({label:e,error:t,className:n="",onChange:r,value:s,defaultValue:o,...i})=>{const a=v.useRef(!1),l=v.useRef(null),[c,d]=v.useState(s??o??"");v.useEffect(()=>{!a.current&&s!==void 0&&d(s)},[s]);const u=v.useCallback(()=>{a.current=!0},[]),f=v.useCallback(M=>{if(a.current=!1,r){const S=M.target.value;d(S);const k=new Event("change",{bubbles:!0});Object.defineProperty(k,"target",{writable:!1,value:{value:S}}),Object.defineProperty(k,"currentTarget",{writable:!1,value:{value:S}}),r(k)}},[r]),g=v.useCallback(M=>{const S=M.target.value;d(S),!a.current&&r&&r(M)},[r]),{loadingactions:m,formdata:p,...y}=i,b=s!==void 0?{value:c}:{defaultValue:o},x=(n??"").split(/\s+/).filter(Boolean).includes("textarea")?n??"":["textarea",n].filter(Boolean).join(" ");return h.jsx("textarea",{ref:l,className:x,onChange:g,onCompositionStart:u,onCompositionEnd:f,...b,...y})},gn=({children:e,className:t="",...n})=>h.jsx("label",{className:t,...n,children:e}),I=v.forwardRef(({children:e,className:t="",...n},r)=>h.jsx("div",{ref:r,classNameLine truncated
|
||||
var SirsoftAdminBasic=(function(R,h,v,Vn){"use strict";var eD=Object.defineProperty;var tD=(R,h,v)=>h in R?eD(R,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):R[h]=v;var $e=(R,h,v)=>tD(R,typeof h!="symbol"?h+"":h,v);var Xa,Cr;function Wb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $=Wb(v),Gb=()=>window.G7Core,le=v.forwardRef(({children:e,variant:t="primary",size:n="md",className:r="",...s},o)=>{const i="button",a=Gb()?.style?.mergeClasses?.(i,r)??`${i} ${r}`;return h.jsx("button",{ref:o,className:a,...s,children:e})});le.displayName="Button";const ou=v.forwardRef(({accept:e,maxSize:t,onChange:n,onError:r,buttonText:s="Browse",placeholder:o="No file selected",className:i="",disabled:a,...l},c)=>{const d=v.useRef(null),u=c||d,[f,g]=v.useState(""),m={},p={};Object.entries(l).forEach(([x,M])=>{x.startsWith("data-editor-")||x==="id"||x==="onMouseMove"||x==="onMouseLeave"?m[x]=M:p[x]=M});const y=v.useCallback(()=>{!a&&u.current&&u.current.click()},[a,u]),b=v.useCallback(x=>{const M=x.target.files?.[0]||null;if(!M){g(""),n?.({target:{value:null,name:""}});return}if(t&&M.size>t*1024*1024){const S=`File size exceeds ${t}MB limit`;r?.(S),u.current&&(u.current.value=""),g("");return}g(M.name),n?.({target:{value:M,name:M.name}})},[t,n,r,u]),_=v.useCallback(x=>{x.stopPropagation(),u.current&&(u.current.value=""),g(""),n?.({target:{value:null,name:""}})},[n,u]);return h.jsxs("div",{className:`flex items-center gap-2 ${i}`,...m,children:[h.jsx("input",{ref:u,type:"file",accept:e,onChange:b,disabled:a,className:"hidden",...p}),h.jsx("button",{type:"button",onClick:y,disabled:a,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s}),h.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!a&&h.jsx("button",{type:"button",onClick:_,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});ou.displayName="FileInput";const Yb=e=>e==="checkbox"?"checkbox":e==="radio"?"radio":"input",Kb=(e,t)=>{const n=Yb(e);return t?t.split(/\s+/).filter(Boolean).includes(n)?t:`${n} ${t}`:n},Et=v.forwardRef(({label:e,error:t,className:n="",onChange:r,onKeyPress:s,value:o,defaultValue:i,type:a="text",checked:l,defaultChecked:c,...d},u)=>{const f=a==="radio"||a==="checkbox",g=Kb(a,n),m=v.useRef(!1),p=v.useRef(null);v.useImperativeHandle(u,()=>p.current);const[y,b]=v.useState(o??i??"");v.useEffect(()=>{if(!f&&!m.current&&o!==void 0){if(p.current&&document.activeElement===p.current)return;b(o)}},[o,f]);const _=v.useCallback(()=>{m.current=!0},[]),x=v.useCallback(E=>{if(m.current=!1,r){const T=E.target.value;b(T);const P=new Event("change",{bubbles:!0});Object.defineProperty(P,"target",{writable:!1,value:{value:T}}),Object.defineProperty(P,"currentTarget",{writable:!1,value:{value:T}}),r(P)}},[r]),M=v.useCallback(E=>{const T=E.target.value;b(T),!m.current&&r&&r(E)},[r]),S=v.useCallback(E=>{m.current||s&&s(E)},[s]),{loadingactions:k,formdata:N,...C}=d;if(f)return h.jsx("input",{ref:p,type:a,className:g,onChange:r,checked:l,defaultChecked:c,value:o,...C});const w=o!==void 0?{value:y}:{defaultValue:i};return h.jsx("input",{ref:p,type:a,className:g,onChange:M,onKeyPress:S,onCompositionStart:_,onCompositionEnd:x,...w,...C})});Et.displayName="Input";const lr=({label:e,error:t,className:n="",onChange:r,value:s,defaultValue:o,...i})=>{const a=v.useRef(!1),l=v.useRef(null),[c,d]=v.useState(s??o??"");v.useEffect(()=>{!a.current&&s!==void 0&&d(s)},[s]);const u=v.useCallback(()=>{a.current=!0},[]),f=v.useCallback(M=>{if(a.current=!1,r){const S=M.target.value;d(S);const k=new Event("change",{bubbles:!0});Object.defineProperty(k,"target",{writable:!1,value:{value:S}}),Object.defineProperty(k,"currentTarget",{writable:!1,value:{value:S}}),r(k)}},[r]),g=v.useCallback(M=>{const S=M.target.value;d(S),!a.current&&r&&r(M)},[r]),{loadingactions:m,formdata:p,...y}=i,b=s!==void 0?{value:c}:{defaultValue:o},x=(n??"").split(/\s+/).filter(Boolean).includes("textarea")?n??"":["textarea",n].filter(Boolean).join(" ");return h.jsx("textarea",{ref:l,className:x,onChange:g,onCompositionStart:u,onCompositionEnd:f,...b,...y})},gn=({children:e,className:t="",...n})=>h.jsx("label",{className:t,...n,children:e}),I=v.forwardRef(({children:e,className:t="",...n},r)=>h.jsx("div",{ref:r,classNameLine truncated
|
||||
inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium
|
||||
${ue?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}
|
||||
`,children:[h.jsx(ae,{name:"globe",className:"w-3 h-3"}),U(K),ue&&h.jsx(J,{className:"text-red-500 dark:text-red-400",children:"*"}),!ue&&h.jsx(le,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>z(K),disabled:l,children:h.jsx(ae,{name:"xmark",className:"w-3 h-3"})})]}),ue&&Q&&Y()]}),n==="textarea"?h.jsx(lr,{name:`${f}[${K}]`,value:S[K]||"",onChange:me=>D(K,me.target.value),placeholder:ee,required:a&&ue,disabled:l,maxLength:c,rows:d,className:`${se} resize-vertical`}):h.jsx(Et,{type:"text",name:`${f}[${K}]`,value:S[K]||"",onChange:me=>D(K,me.target.value),placeholder:ee,required:a&&ue,disabled:l,maxLength:c,className:ne})]},K)},[f,S,D,i,a,l,c,d,n,U,x,z,Y,b]),W=v.useCallback(K=>{const Q=b?"input input-error":"input",ne=b?"textarea input-error":"textarea",se=`${i}${i?" (":""}${U(K)}${i?")":""}`;return h.jsx(I,{children:n==="textarea"?h.jsx(lr,{name:`${f}[${K}]`,value:S[K]||"",onChange:ue=>D(K,ue.target.value),placeholder:se,required:a&&K===x,disabled:l,maxLength:c,rows:d,className:`${ne} resize-vertical`}):h.jsx(Et,{type:"text",name:`${f}[${K}]`,value:S[K]||"",onChange:ue=>D(K,ue.target.value),placeholder:se,required:a&&K===x,disabled:l,maxLength:c,className:Q})},K)},[f,S,D,i,a,l,c,d,n,x,U,b]),G=()=>h.jsx(I,{className:u,children:h.jsx(I,{className:"space-y-4",children:w.map((K,Q)=>B(K,Q===0))})}),V=()=>h.jsxs(I,{className:u,children:[h.jsxs(I,{className:"flex flex-wrap items-center gap-2 mb-3",children:[w.map(K=>h.jsxs(le,{type:"button",className:`
|
||||
@@ -7,14 +7,14 @@ var SirsoftAdminBasic=(function(R,h,v,Vn){"use strict";var RA=Object.definePrope
|
||||
`,onClick:()=>P(K),children:[h.jsx(ae,{name:"globe",className:"w-3 h-3"}),g?h.jsxs(h.Fragment,{children:[h.jsx(J,{className:"hidden md:inline",children:U(K)}),h.jsx(J,{className:"inline md:hidden",children:K.toUpperCase()})]}):U(K),K===x&&h.jsx(J,{className:"text-red-500 dark:text-red-400",children:"*"}),j(K)&&T!==K&&h.jsx(ae,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),K!==x&&h.jsx(le,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Q=>{Q.stopPropagation(),z(K)},disabled:l,children:h.jsx(ae,{name:"xmark",className:"w-3 h-3"})})]},K)),Y()]}),w.map(K=>h.jsx(I,{className:T===K?"block":"hidden",children:W(K)},K))]}),X=()=>{const K=b?"input input-error":"input",Q=b?"textarea input-error":"textarea";return h.jsx(I,{className:u,children:h.jsxs(I,{className:"flex items-center gap-1",children:[h.jsx(I,{className:"flex items-center shrink-0",children:w.map(ne=>h.jsxs(le,{type:"button",className:`
|
||||
px-2 py-1.5 text-xs font-medium border-y border-l first:rounded-l last:rounded-r last:border-r transition-colors
|
||||
${T===ne?"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}
|
||||
`,onClick:()=>P(ne),title:U(ne),children:[ne.toUpperCase(),ne===x&&h.jsx(J,{className:"text-red-400 ml-0.5",children:"*"})]},ne))}),h.jsx(I,{className:"flex-1 min-w-0",children:n==="textarea"?h.jsx(lr,{name:`${f}[${T}]`,value:S[T]||"",onChange:ne=>D(T,ne.target.value),placeholder:i,required:a&&T===x,disabled:l,maxLength:c,rows:d,className:Q}):h.jsx(Et,{type:"text",name:`${f}[${T}]`,value:S[T]||"",onChange:ne=>D(T,ne.target.value),placeholder:i,required:a&&T===x,disabled:l,maxLength:c,className:K})})]})})};return h.jsxs(I,{className:l?"opacity-50 cursor-not-allowed":void 0,id:p,...y,children:[r==="compact"?X():r==="tabs"?V():G(),b&&m&&h.jsx(J,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:m})]})};fl.displayName="MultilingualInput";const ly=()=>window.G7Core,hl=({checked:e,value:t,onChange:n,disabled:r=!1,label:s,description:o,size:i="md",className:a="",name:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(()=>e??t??!1);v.useEffect(()=>{f(e??t??!1)},[e,t]);const g=_=>{const x=_.target.checked;f(x),n&&!r&&n(_)},p={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[i],y=()=>{if(!r){const _=!u;if(f(_),n){const x=ly();x?.createChangeEvent&&n(x.createChangeEvent({checked:_,name:l}))}}},b=_=>{r||_.key!==" "&&_.key!=="Enter"&&_.key!=="Spacebar"||(_.preventDefault(),y())};return h.jsxs("div",{className:`toggle-container ${a}`,id:c,...d,children:[h.jsxs("div",{className:`toggle-switch-wrapper ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,role:"switch","aria-checked":u,"aria-disabled":r||void 0,"aria-label":s??l,tabIndex:r?-1:0,onKeyDown:b,onClick:_=>{_.preventDefault(),_.stopPropagation(),y()},children:[h.jsx("input",{type:"checkbox",id:l,name:l,checked:u,onChange:g,disabled:r,className:"sr-only peer",tabIndex:-1}),h.jsx("div",{className:`toggle-switch-track ${p.track} ${p.thumb}`})]}),s&&h.jsx("span",{className:`toggle-label ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:y,children:s}),o&&h.jsx("p",{className:"toggle-description",children:o})]})},ei=({status:e,label:t,showIcon:n=!0,iconName:r,className:s="",style:o,id:i,editorAttrs:a})=>{const l={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},c={success:he.CheckCircle,warning:he.ExclamationTriangle,error:he.XCircle,info:he.InfoCircle,pending:he.Clock,default:he.QuestionCircle},d={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},u=r||c[e],f=t||d[e],g=l[e];return h.jsxs(J,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${g} ${s}`,style:o,id:i,...a,children:[n&&h.jsx(ae,{name:u,className:"w-4 h-4"}),h.jsx(J,{children:f})]})},du={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},cy={success:"green",warning:"yellow",danger:"red",error:"red",info:"blue",primary:"blue",secondary:"gray",text:"gray",default:"gray"},uu={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},fu=({color:e,variant:t,text:n,size:r="md",className:s="",style:o,children:i,id:a,editorAttrs:l})=>{const c=e||(t?cy[t]:void 0)||"gray",d=du[c]||du.gray,u=uu[r]||uu.md;return h.jsxs(J,{className:`inline-flex items-center rounded-full font-medium ${u} ${d} ${s}`,style:o,id:a,...l,children:[n,i]})};/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function hu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dy(e){if(Array.isArray(e))return e}function uy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hy(e,t){return dy(e)||uy(e,t)||gy(e,t)||fy()}function gy(e,t){if(e){if(typeof e=="string")return hu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hu(e,t):void 0}}const gu=Object.entries,pu=Object.setPrototypeOf,py=Object.isFrozen,my=Object.getPrototypeOf,by=Object.getOwnPropertyDescriptor;let Tt=Object.freeze,Pt=Object.seal,Rr=Object.create,mu=typeof Reflect<"u"&&Reflect,gl=mu.apply,pl=mu.construct;Tt||(Tt=function(t){return t}),Pt||(Pt=function(t){return t}),gl||(gl=function(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return t.apply(n,s)}),pl||(pl=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new t(...r)});const _r=Mt(Array.prototype.forEach),yy=Mt(Array.prototype.lastIndexOf),bu=Mt(Array.prototype.pop),Hs=Mt(Array.prototype.push),vy=Mt(Array.prototype.splice),es=Array.isArray,Us=Mt(String.prototype.toLowerCase),ml=Mt(String.prototype.toString),yu=Mt(String.prototype.match),Bs=Mt(String.prototype.replace),vu=Mt(String.prototype.indexOf),xy=Mt(String.prototype.trim),wy=Mt(Number.prototype.toString),ky=Mt(Boolean.prototype.toString),xu=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),wu=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),sn=Mt(Object.prototype.hasOwnProperty),js=Mt(Object.prototype.toString),Kt=Mt(RegExp.prototype.test),Er=Cy(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return gl(e,t,r)}}function Cy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return pl(e,n)}}function Ze(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Us;if(pu&&pu(e,null),!es(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const o=n(s);o!==s&&(py(t)||(t[r]=o),s=o)}e[s]=!0}return e}function Sy(e){for(let t=0;t<e.length;t++)sn(e,t)||(e[t]=null);return e}function pn(e){const t=Rr(null);for(const r of gu(e)){var n=hy(r,2);const s=n[0],o=n[1];sn(e,s)&&(es(o)?t[s]=Sy(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=pn(o):t[s]=o)}return t}function _y(e){switch(typeof e){case"string":return e;case"number":return wy(e);case"boolean":return ky(e);case"bigint":return xu?xu(e):"0";case"symbol":return wu?wu(e):"Symbol()";case"undefined":return js(e);case"function":case"object":{if(e===null)return js(e);const t=e,n=Tn(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:js(r)}return js(e)}default:return js(e)}}function Tn(e,t){for(;e!==null;){const r=by(e,t);if(r){if(r.get)return Mt(r.get);if(typeof r.value=="function")return Mt(r.value)}e=my(e)}function n(){return null}return n}function Ey(e){try{return Kt(e,""),!0}catch{return!1}}const ku=Tt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bl=Tt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yl=Tt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),My=Tt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","s
Line truncated
|
||||
`+wt),nt&&(wt=el(wt)),w&&ke?A(wt):wt},t.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fs(ce),pt=!0,Ge=ie,te=fe},t.clearConfig=function(){ar=null,pt=!1,Ge=null,te=null,w=T,E=""},t.isValidAttribute=function(ce,H,q){ar||Fs({});const re=xt(ce),ve=xt(H);return Hb(re,ve,q)},t.addHook=function(ce,H){typeof H=="function"&&sn(G,ce)&&Hs(G[ce],H)},t.removeHook=function(ce,H){if(sn(G,ce)){if(H!==void 0){const q=yy(G[ce],H);return q===-1?void 0:vy(G[ce],q,1)[0]}return bu(G[ce])}},t.removeHooks=function(ce){sn(G,ce)&&(G[ce]=[])},t.removeAllHooks=function(){G=Tu()},t}var Wy=Au();const kl=({content:e,text:t,isHtml:n=!0,className:r="",purifyConfig:s,id:o,editorAttrs:i})=>{const a=t??e??"";if(!a||a.trim()==="")return null;if(!n){const u=`
|
||||
`,onClick:()=>P(ne),title:U(ne),children:[ne.toUpperCase(),ne===x&&h.jsx(J,{className:"text-red-400 ml-0.5",children:"*"})]},ne))}),h.jsx(I,{className:"flex-1 min-w-0",children:n==="textarea"?h.jsx(lr,{name:`${f}[${T}]`,value:S[T]||"",onChange:ne=>D(T,ne.target.value),placeholder:i,required:a&&T===x,disabled:l,maxLength:c,rows:d,className:Q}):h.jsx(Et,{type:"text",name:`${f}[${T}]`,value:S[T]||"",onChange:ne=>D(T,ne.target.value),placeholder:i,required:a&&T===x,disabled:l,maxLength:c,className:K})})]})})};return h.jsxs(I,{className:l?"opacity-50 cursor-not-allowed":void 0,id:p,...y,children:[r==="compact"?X():r==="tabs"?V():G(),b&&m&&h.jsx(J,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:m})]})};fl.displayName="MultilingualInput";const cy=()=>window.G7Core,hl=({checked:e,value:t,onChange:n,disabled:r=!1,label:s,description:o,size:i="md",className:a="",name:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(()=>e??t??!1);v.useEffect(()=>{f(e??t??!1)},[e,t]);const g=_=>{const x=_.target.checked;f(x),n&&!r&&n(_)},p={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[i],y=()=>{if(!r){const _=!u;if(f(_),n){const x=cy();x?.createChangeEvent&&n(x.createChangeEvent({checked:_,name:l}))}}},b=_=>{r||_.key!==" "&&_.key!=="Enter"&&_.key!=="Spacebar"||(_.preventDefault(),y())};return h.jsxs("div",{className:`toggle-container ${a}`,id:c,...d,children:[h.jsxs("div",{className:`toggle-switch-wrapper ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,role:"switch","aria-checked":u,"aria-disabled":r||void 0,"aria-label":s??l,tabIndex:r?-1:0,onKeyDown:b,onClick:_=>{_.preventDefault(),_.stopPropagation(),y()},children:[h.jsx("input",{type:"checkbox",id:l,name:l,checked:u,onChange:g,disabled:r,className:"sr-only peer",tabIndex:-1}),h.jsx("div",{className:`toggle-switch-track ${p.track} ${p.thumb}`})]}),s&&h.jsx("span",{className:`toggle-label ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:y,children:s}),o&&h.jsx("p",{className:"toggle-description",children:o})]})},ei=({status:e,label:t,showIcon:n=!0,iconName:r,className:s="",style:o,id:i,editorAttrs:a})=>{const l={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},c={success:he.CheckCircle,warning:he.ExclamationTriangle,error:he.XCircle,info:he.InfoCircle,pending:he.Clock,default:he.QuestionCircle},d={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},u=r||c[e],f=t||d[e],g=l[e];return h.jsxs(J,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${g} ${s}`,style:o,id:i,...a,children:[n&&h.jsx(ae,{name:u,className:"w-4 h-4"}),h.jsx(J,{children:f})]})},uu={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},dy={success:"green",warning:"yellow",danger:"red",error:"red",info:"blue",primary:"blue",secondary:"gray",text:"gray",default:"gray"},fu={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},hu=({color:e,variant:t,text:n,size:r="md",className:s="",style:o,children:i,id:a,editorAttrs:l})=>{const c=e||(t?dy[t]:void 0)||"gray",d=uu[c]||uu.gray,u=fu[r]||fu.md;return h.jsxs(J,{className:`inline-flex items-center rounded-full font-medium ${u} ${d} ${s}`,style:o,id:a,...l,children:[n,i]})};/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function gu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uy(e){if(Array.isArray(e))return e}function fy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gy(e,t){return uy(e)||fy(e,t)||py(e,t)||hy()}function py(e,t){if(e){if(typeof e=="string")return gu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gu(e,t):void 0}}const pu=Object.entries,mu=Object.setPrototypeOf,my=Object.isFrozen,by=Object.getPrototypeOf,yy=Object.getOwnPropertyDescriptor;let Tt=Object.freeze,Pt=Object.seal,Rr=Object.create,bu=typeof Reflect<"u"&&Reflect,gl=bu.apply,pl=bu.construct;Tt||(Tt=function(t){return t}),Pt||(Pt=function(t){return t}),gl||(gl=function(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return t.apply(n,s)}),pl||(pl=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new t(...r)});const _r=Mt(Array.prototype.forEach),vy=Mt(Array.prototype.lastIndexOf),yu=Mt(Array.prototype.pop),Hs=Mt(Array.prototype.push),xy=Mt(Array.prototype.splice),es=Array.isArray,Us=Mt(String.prototype.toLowerCase),ml=Mt(String.prototype.toString),vu=Mt(String.prototype.match),Bs=Mt(String.prototype.replace),xu=Mt(String.prototype.indexOf),wy=Mt(String.prototype.trim),ky=Mt(Number.prototype.toString),Cy=Mt(Boolean.prototype.toString),wu=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),ku=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),sn=Mt(Object.prototype.hasOwnProperty),js=Mt(Object.prototype.toString),Kt=Mt(RegExp.prototype.test),Er=Sy(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return gl(e,t,r)}}function Sy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return pl(e,n)}}function Ze(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Us;if(mu&&mu(e,null),!es(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const o=n(s);o!==s&&(my(t)||(t[r]=o),s=o)}e[s]=!0}return e}function _y(e){for(let t=0;t<e.length;t++)sn(e,t)||(e[t]=null);return e}function pn(e){const t=Rr(null);for(const r of pu(e)){var n=gy(r,2);const s=n[0],o=n[1];sn(e,s)&&(es(o)?t[s]=_y(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=pn(o):t[s]=o)}return t}function Ey(e){switch(typeof e){case"string":return e;case"number":return ky(e);case"boolean":return Cy(e);case"bigint":return wu?wu(e):"0";case"symbol":return ku?ku(e):"Symbol()";case"undefined":return js(e);case"function":case"object":{if(e===null)return js(e);const t=e,n=Tn(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:js(r)}return js(e)}default:return js(e)}}function Tn(e,t){for(;e!==null;){const r=yy(e,t);if(r){if(r.get)return Mt(r.get);if(typeof r.value=="function")return Mt(r.value)}e=by(e)}function n(){return null}return n}function My(e){try{return Kt(e,""),!0}catch{return!1}}const Cu=Tt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bl=Tt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yl=Tt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ny=Tt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","s
Line truncated
|
||||
`+wt),nt&&(wt=el(wt)),w&&ke?A(wt):wt},t.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fs(ce),pt=!0,Ge=ie,te=fe},t.clearConfig=function(){ar=null,pt=!1,Ge=null,te=null,w=T,E=""},t.isValidAttribute=function(ce,H,q){ar||Fs({});const re=xt(ce),ve=xt(H);return Ub(re,ve,q)},t.addHook=function(ce,H){typeof H=="function"&&sn(G,ce)&&Hs(G[ce],H)},t.removeHook=function(ce,H){if(sn(G,ce)){if(H!==void 0){const q=vy(G[ce],H);return q===-1?void 0:xy(G[ce],q,1)[0]}return yu(G[ce])}},t.removeHooks=function(ce){sn(G,ce)&&(G[ce]=[])},t.removeAllHooks=function(){G=Au()},t}var Gy=Du();const kl=({content:e,text:t,isHtml:n=!0,className:r="",purifyConfig:s,id:o,editorAttrs:i})=>{const a=t??e??"";if(!a||a.trim()==="")return null;if(!n){const u=`
|
||||
whitespace-pre-wrap
|
||||
text-gray-900 dark:text-gray-100
|
||||
font-sans
|
||||
${r}
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:u,id:o,...i,children:a})}const l={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},c=v.useMemo(()=>{const u=s?{...l,...s,FORBID_TAGS:[...l.FORBID_TAGS,...s.FORBID_TAGS||[]],FORBID_ATTR:[...l.FORBID_ATTR,...s.FORBID_ATTR||[]]}:l;return Wy.sanitize(a,u).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(g,m,p,y)=>(p.startsWith("http://")||p.startsWith("https://"))&&!g.includes("rel=")?`<a ${m}href="${p}"${y} rel="noopener noreferrer">`:g)},[a,s]),d=`
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:u,id:o,...i,children:a})}const l={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},c=v.useMemo(()=>{const u=s?{...l,...s,FORBID_TAGS:[...l.FORBID_TAGS,...s.FORBID_TAGS||[]],FORBID_ATTR:[...l.FORBID_ATTR,...s.FORBID_ATTR||[]]}:l;return Gy.sanitize(a,u).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(g,m,p,y)=>(p.startsWith("http://")||p.startsWith("https://"))&&!g.includes("rel=")?`<a ${m}href="${p}"${y} rel="noopener noreferrer">`:g)},[a,s]),d=`
|
||||
prose dark:prose-invert max-w-none
|
||||
prose-p:my-2
|
||||
prose-headings:font-bold prose-headings:mt-6 prose-headings:mb-4
|
||||
@@ -36,22 +36,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
|
||||
after:content-[''] after:block after:clear-both
|
||||
${r}
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:d,dangerouslySetInnerHTML:{__html:c},id:o,...i})},ni=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,Gy={Div:I,Span:J,Button:le,Icon:ae,Checkbox:On,P:kt,A:qr,Label:gn,Input:Et,H1:sl,H2:cr,H3:Xr,H4:ou,Img:Nn,Select:Zr,Textarea:lr,Table:ll,Thead:cl,Tbody:dl,Tfoot:ul,Tr:dr,Th:Qr,Td:rn,MultilingualInput:fl,Toggle:hl,StatusBadge:ei,Badge:fu,HtmlContent:kl,ActionMenu:Vs},Cl=()=>{const e=window.G7Core?.getComponentMap?.();return e&&Object.keys(e).length>0?e:Gy},Sl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Sl(t)).join(", ");if(typeof e=="object"){if(v.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ni.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},Du=(e,t)=>{if(!e)return!0;const n=window.G7Core;return typeof n?.evaluateCondition=="function"?n.evaluateCondition(e,{row:t,item:t,$item:t}):(ni.warn("G7Core.evaluateCondition 미노출 — subRow 조건을 평가할 수 없습니다:",e),!0)},ns=(e,t,n,r="",s)=>{const o=window.G7Core;if(o?.renderItemChildren){const i={row:t,value:n,$value:n};return o.renderItemChildren(e,i,Cl(),r,s?{componentContext:s}:void 0)}return ni.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Iu=(e,t,n)=>e?!e.includes("{{")&&!e.includes("$t:")?e:ns([{type:"basic",name:"Span",text:e}],{},null,t,n):"",_l=(e,t,n="",r)=>{const s=window.G7Core;if(s?.renderItemChildren){const o={row:t,$value:t};return s.renderItemChildren(e,o,Cl(),n,r?{componentContext:r}:void 0)}return ni.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Yy=({id:e,columns:t,data:n,sortable:r=!0,pagination:s=!1,pageSize:o=10,onRowClick:i,className:a="",style:l,sortField:c,sortDirection:d,onSortChange:u,selectable:f=!1,selectedIds:g=[],onSelectionChange:m,idField:p="id",selectionScope:y="free",showColumnSelector:b=!1,visibleColumns:_,onColumnVisibilityChange:x,responsiveBreakpoint:M=768,cardRenderer:S,rowActions:k,onRowAction:N,alwaysShowPagination:C=!1,serverSidePagination:w=!1,serverCurrentPage:E,serverTotalPages:T,serverHasMorePages:P,onPageChange:L,prevText:F,nextText:A,columnSelectorText:D,emptyMessage:O,actionsColumnHeader:z,requiredText:U,selectedCountText:j,showFirstLast:Y=!0,expandable:B=!1,expandedRowIds:W,onExpandChange:G,expandChildren:V,expandedRowRender:X,expandColumnWidth:K="48px",expandIconExpanded:Q=he.ChevronDown,expandIconCollapsed:ne=he.ChevronRight,expandConditionField:se,dynamicColumns:ue,dynamicColumnsInsertAfter:ee,expandContext:me,__componentContext:ie,subRowChildren:de,subRowCondition:fe,subRowClassName:be="px-6 py-2 bg-gray-50 dark:bg-gray-900",subRowRender:ge,footerCells:Ce,footerClassName:je="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:oe,editorAttrs:Te})=>{const Pe=F||void 0,Fe=A||void 0,Ke=D??ts("common.column_selector"),nt=O??ts("common.no_data"),dt=z??ts("common.actions"),We=U??ts("common.required"),pt=j??ts("common.selected_count"),Ge=Z=>j===void 0?ts("common.selected_count",{count:Z}):j.replace(/\{\{count\}\}/g,String(Z)).replace(/\{count\}/g,String(Z)),te=window.G7Core,pe=te?.useControllableState,we=te?.shallowArrayEqual,[xe,ke]=pe?pe(c,null):[c??null,()=>{}],[Be,Le]=pe?pe(d,"asc"):[d??"asc",()=>{}],[ze,Ie]=v.useState(1),[qe,Re]=pe?pe(W,[],G,{isEqual:we}):[W??[],()=>{}],[Ne,Oe]=v.useState(!1),Ue=v.useRef(null),lt=te?.useResponsive,vt=lt?.(),ut=vt?vt.width<M:typeof window<"u"&&window.innerWidth<M,ot=v.useMemo(()=>{if(!ue||!Array.isArray(ue)||ue.length===0)return t;if(ee){const Z=t.findIndex(ye=>ye.field===ee);if(Z!==-1)return[...t.slice(0,Z+1),...ue,...t.slice(Z+1)]}return[...t,...ue]},[t,ue,ee]),[St,et]=v.useState(()=>_&&_.length>0?_:t.filter(Z=>!Z.hidden).map(Z=>Z.field));v.useEffect(()=>{_&&_.length>0&&et(_)},[_]);const Lt=v.useRef("");v.useEffect(()=>{const Z=t.map(ye=>ye.field).join(",");Lt.current&&Z!==Lt.current&&(!_||_.length===0)&&et(t.filter(ye=>!ye.hidden).map(ye=>ye.field)),Lt.current=Z},[t,_]);const Ut=v.useRef([]),Gt=v.useRef(null);v.useEffect(()=>{if(ue&&ue.length>0){const Z=ue.map(ct=>ct.field);if(Gt.current===null&&(Gt.current=_!==void 0&&_.length>0,Gt.current)){Ut.current=Z;return}const ye=Ut.current,_e=Z.filter(ct=>!ye.includes(ct));if(_e.length>0){const ct=_e.filter(Ve=>!St.includes(Ve));if(ct.length>0){const Ve=[...St,...ct];et(Ve),x?.(Ve)}}Ut.current=Z}},[ue]),v.useEffect(()=>{w||Ie(1)},[n,w]),v.useEffect(()=>{const Z=ye=>{Ue.current&&!Ue.current.contains(ye.target)&&Oe(!1)};return Ne&&document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[Ne]);const Yt=v.useMemo(()=>!b&&(!_||_.length===0)?ot.filter(Z=>!Z.hidden):ot.filter(Z=>St.includes(Z.fiel
Line truncated
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:d,dangerouslySetInnerHTML:{__html:c},id:o,...i})},ni=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,Yy={Div:I,Span:J,Button:le,Icon:ae,Checkbox:On,P:kt,A:qr,Label:gn,Input:Et,H1:sl,H2:cr,H3:Xr,H4:iu,Img:Nn,Select:Zr,Textarea:lr,Table:ll,Thead:cl,Tbody:dl,Tfoot:ul,Tr:dr,Th:Qr,Td:rn,MultilingualInput:fl,Toggle:hl,StatusBadge:ei,Badge:hu,HtmlContent:kl,ActionMenu:Vs},Cl=()=>{const e=window.G7Core?.getComponentMap?.();return e&&Object.keys(e).length>0?e:Yy},Sl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Sl(t)).join(", ");if(typeof e=="object"){if(v.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ni.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},Iu=(e,t)=>{if(!e)return!0;const n=window.G7Core;return typeof n?.evaluateCondition=="function"?n.evaluateCondition(e,{row:t,item:t,$item:t}):(ni.warn("G7Core.evaluateCondition 미노출 — subRow 조건을 평가할 수 없습니다:",e),!0)},ns=(e,t,n,r="",s)=>{const o=window.G7Core;if(o?.renderItemChildren){const i={row:t,value:n,$value:n};return o.renderItemChildren(e,i,Cl(),r,s?{componentContext:s}:void 0)}return ni.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Lu=(e,t,n)=>e?!e.includes("{{")&&!e.includes("$t:")?e:ns([{type:"basic",name:"Span",text:e}],{},null,t,n):"",_l=(e,t,n="",r)=>{const s=window.G7Core;if(s?.renderItemChildren){const o={row:t,$value:t};return s.renderItemChildren(e,o,Cl(),n,r?{componentContext:r}:void 0)}return ni.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Ky=({id:e,columns:t,data:n,sortable:r=!0,pagination:s=!1,pageSize:o=10,onRowClick:i,className:a="",style:l,sortField:c,sortDirection:d,onSortChange:u,selectable:f=!1,selectedIds:g=[],onSelectionChange:m,idField:p="id",selectionScope:y="free",showColumnSelector:b=!1,visibleColumns:_,onColumnVisibilityChange:x,responsiveBreakpoint:M=768,cardRenderer:S,rowActions:k,onRowAction:N,alwaysShowPagination:C=!1,serverSidePagination:w=!1,serverCurrentPage:E,serverTotalPages:T,serverHasMorePages:P,onPageChange:L,prevText:F,nextText:A,columnSelectorText:D,emptyMessage:O,actionsColumnHeader:z,requiredText:U,selectedCountText:j,showFirstLast:Y=!0,expandable:B=!1,expandedRowIds:W,onExpandChange:G,expandChildren:V,expandedRowRender:X,expandColumnWidth:K="48px",expandIconExpanded:Q=he.ChevronDown,expandIconCollapsed:ne=he.ChevronRight,expandConditionField:se,dynamicColumns:ue,dynamicColumnsInsertAfter:ee,expandContext:me,__componentContext:ie,subRowChildren:de,subRowCondition:fe,subRowClassName:be="px-6 py-2 bg-gray-50 dark:bg-gray-900",subRowRender:ge,footerCells:Ce,footerClassName:je="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:oe,editorAttrs:Te})=>{const Pe=F||void 0,Fe=A||void 0,Ke=D??ts("common.column_selector"),nt=O??ts("common.no_data"),dt=z??ts("common.actions"),We=U??ts("common.required"),pt=j??ts("common.selected_count"),Ge=Z=>j===void 0?ts("common.selected_count",{count:Z}):j.replace(/\{\{count\}\}/g,String(Z)).replace(/\{count\}/g,String(Z)),te=window.G7Core,pe=te?.useControllableState,we=te?.shallowArrayEqual,[xe,ke]=pe?pe(c,null):[c??null,()=>{}],[Be,Le]=pe?pe(d,"asc"):[d??"asc",()=>{}],[ze,Ie]=v.useState(1),[qe,Re]=pe?pe(W,[],G,{isEqual:we}):[W??[],()=>{}],[Ne,Oe]=v.useState(!1),Ue=v.useRef(null),lt=te?.useResponsive,vt=lt?.(),ut=vt?vt.width<M:typeof window<"u"&&window.innerWidth<M,ot=v.useMemo(()=>{if(!ue||!Array.isArray(ue)||ue.length===0)return t;if(ee){const Z=t.findIndex(ye=>ye.field===ee);if(Z!==-1)return[...t.slice(0,Z+1),...ue,...t.slice(Z+1)]}return[...t,...ue]},[t,ue,ee]),[St,et]=v.useState(()=>_&&_.length>0?_:t.filter(Z=>!Z.hidden).map(Z=>Z.field));v.useEffect(()=>{_&&_.length>0&&et(_)},[_]);const Lt=v.useRef("");v.useEffect(()=>{const Z=t.map(ye=>ye.field).join(",");Lt.current&&Z!==Lt.current&&(!_||_.length===0)&&et(t.filter(ye=>!ye.hidden).map(ye=>ye.field)),Lt.current=Z},[t,_]);const Ut=v.useRef([]),Gt=v.useRef(null);v.useEffect(()=>{if(ue&&ue.length>0){const Z=ue.map(ct=>ct.field);if(Gt.current===null&&(Gt.current=_!==void 0&&_.length>0,Gt.current)){Ut.current=Z;return}const ye=Ut.current,_e=Z.filter(ct=>!ye.includes(ct));if(_e.length>0){const ct=_e.filter(Ve=>!St.includes(Ve));if(ct.length>0){const Ve=[...St,...ct];et(Ve),x?.(Ve)}}Ut.current=Z}},[ue]),v.useEffect(()=>{w||Ie(1)},[n,w]),v.useEffect(()=>{const Z=ye=>{Ue.current&&!Ue.current.contains(ye.target)&&Oe(!1)};return Ne&&document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[Ne]);const Yt=v.useMemo(()=>!b&&(!_||_.length===0)?ot.filter(Z=>!Z.hidden):ot.filter(Z=>St.includes(Z.fiel
Line truncated
|
||||
flex items-center gap-3 p-4 rounded-lg border shadow-lg
|
||||
min-w-[300px] max-w-md
|
||||
transition-all duration-300
|
||||
${s.bg}
|
||||
${n?"opacity-100 translate-y-0":`opacity-0 ${i}`}
|
||||
`,role:"alert",children:[h.jsx(ae,{name:o,className:`w-5 h-5 flex-shrink-0 ${s.text}`}),h.jsx(J,{className:`flex-1 text-sm font-medium ${s.text}`,children:e.message}),h.jsx(le,{onClick:r,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${s.text} focus:outline-none`,"aria-label":mv("common.close_notification"),children:h.jsx(ae,{name:he.Times,className:"w-4 h-4"})})]})},ju=({items:e,separator:t=h.jsx(ae,{name:he.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:r="/",maxItems:s,className:o="",id:i,editorAttrs:a})=>{let c=n?[{label:"Home",href:r},...e]:e,d=c,u=!1;if(s&&c.length>s){u=!0;const f=c.slice(0,1),g=c.slice(-(s-2));d=[...f,...g]}return h.jsx(Jo,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",id:i,...a,children:h.jsx(I,{className:"flex items-center space-x-2",children:d.map((f,g)=>{const m=g===d.length-1,p=g===0;return h.jsxs(v.Fragment,{children:[u&&p&&h.jsxs(h.Fragment,{children:[h.jsx(Wu,{item:f,isLast:!1}),h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),h.jsx(J,{className:"text-gray-500 dark:text-gray-400",children:"..."}),d.length>1&&h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!u||!p)&&h.jsxs(h.Fragment,{children:[h.jsx(Wu,{item:f,isLast:m}),!m&&h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},g)})})})},Wu=({item:e,isLast:t})=>t||!e.href&&!e.onClick?h.jsx(J,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?h.jsx(qr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):h.jsx(qr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),wv=({title:e,description:t,iconName:n,illustrationSrc:r,illustrationAlt:s="Empty state illustration",actions:o=[],className:i="",id:a,editorAttrs:l})=>{const c={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return h.jsxs(I,{className:`flex flex-col items-center justify-center p-8 text-center ${i}`,role:"status","aria-live":"polite",id:a,...l,children:[r?h.jsx(Nn,{src:r,alt:s,className:"w-48 h-48 mb-6 object-contain"}):n?h.jsx(I,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:h.jsx(ae,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,h.jsx(cr,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&h.jsx(kt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&h.jsx(I,{className:"flex flex-wrap gap-3 justify-center",children:o.map((d,u)=>h.jsxs(le,{onClick:d.onClick,className:`
|
||||
`,role:"alert",children:[h.jsx(ae,{name:o,className:`w-5 h-5 flex-shrink-0 ${s.text}`}),h.jsx(J,{className:`flex-1 text-sm font-medium ${s.text}`,children:e.message}),h.jsx(le,{onClick:r,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${s.text} focus:outline-none`,"aria-label":bv("common.close_notification"),children:h.jsx(ae,{name:he.Times,className:"w-4 h-4"})})]})},Wu=({items:e,separator:t=h.jsx(ae,{name:he.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:r="/",maxItems:s,className:o="",id:i,editorAttrs:a})=>{let c=n?[{label:"Home",href:r},...e]:e,d=c,u=!1;if(s&&c.length>s){u=!0;const f=c.slice(0,1),g=c.slice(-(s-2));d=[...f,...g]}return h.jsx(Jo,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",id:i,...a,children:h.jsx(I,{className:"flex items-center space-x-2",children:d.map((f,g)=>{const m=g===d.length-1,p=g===0;return h.jsxs(v.Fragment,{children:[u&&p&&h.jsxs(h.Fragment,{children:[h.jsx(Gu,{item:f,isLast:!1}),h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),h.jsx(J,{className:"text-gray-500 dark:text-gray-400",children:"..."}),d.length>1&&h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!u||!p)&&h.jsxs(h.Fragment,{children:[h.jsx(Gu,{item:f,isLast:m}),!m&&h.jsx(J,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},g)})})})},Gu=({item:e,isLast:t})=>t||!e.href&&!e.onClick?h.jsx(J,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?h.jsx(qr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):h.jsx(qr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),kv=({title:e,description:t,iconName:n,illustrationSrc:r,illustrationAlt:s="Empty state illustration",actions:o=[],className:i="",id:a,editorAttrs:l})=>{const c={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return h.jsxs(I,{className:`flex flex-col items-center justify-center p-8 text-center ${i}`,role:"status","aria-live":"polite",id:a,...l,children:[r?h.jsx(Nn,{src:r,alt:s,className:"w-48 h-48 mb-6 object-contain"}):n?h.jsx(I,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:h.jsx(ae,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,h.jsx(cr,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&h.jsx(kt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&h.jsx(I,{className:"flex flex-wrap gap-3 justify-center",children:o.map((d,u)=>h.jsxs(le,{onClick:d.onClick,className:`
|
||||
px-4 py-2 rounded-md font-medium transition-colors
|
||||
focus:outline-none focus:ring-2 focus:ring-offset-2
|
||||
${c[d.variant||"primary"]}
|
||||
`,children:[d.iconName&&h.jsx(ae,{name:d.iconName,className:"w-4 h-4 mr-2 inline-block"}),d.label]},u))})]})},kv=(e,t)=>window.G7Core?.t?.(e,t)??e,Cv=({id:e,size:t="md",color:n="text-blue-600",fullscreen:r=!1,text:s,className:o="",editorAttrs:i})=>{const a={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},l={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},c=h.jsxs(I,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[h.jsx(I,{className:`
|
||||
`,children:[d.iconName&&h.jsx(ae,{name:d.iconName,className:"w-4 h-4 mr-2 inline-block"}),d.label]},u))})]})},Cv=(e,t)=>window.G7Core?.t?.(e,t)??e,Sv=({id:e,size:t="md",color:n="text-blue-600",fullscreen:r=!1,text:s,className:o="",editorAttrs:i})=>{const a={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},l={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},c=h.jsxs(I,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[h.jsx(I,{className:`
|
||||
${a[t]}
|
||||
border-gray-200 dark:border-gray-700 border-t-current
|
||||
rounded-full animate-spin
|
||||
${n}
|
||||
`,role:"status","aria-label":kv("common.loading")}),s&&h.jsx(J,{className:`${l[t]} ${n} font-medium`,children:s})]});return r?h.jsx(I,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",...i,children:c}):h.jsx(I,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",...i,children:c})},rs=()=>window.G7Core,Tl=(e,t)=>window.G7Core?.t?.(e,t)??e,Sv=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:r=!1,onToggleCollapse:s,className:o="",currentLocale:i,id:a,editorAttrs:l})=>{const[c,d]=v.useState(new Set),[u,f]=v.useState(i||rs()?.locale?.current?.()||"ko"),[g,m]=v.useState(window.location.pathname),p=v.useMemo(()=>{const w=[],E=T=>{for(const P of T)P.url&&w.push(P.url),P.children&&E(P.children)};return E(n),w},[n]),y=v.useCallback(w=>{let E=null;for(const T of p)(w===T||w.startsWith(T+"/"))&&(!E||T.length>E.length)&&(E=T);return E},[p]);v.useEffect(()=>{const w=rs();return w?.state?.subscribe?w.state.subscribe(T=>{const P=T?._global?.locale||w?.locale?.current?.()||"ko";f(P);const L=T?._global?.currentPath||window.location.pathname;m(L)}):void 0},[]),v.useEffect(()=>{const w=()=>{m(window.location.pathname)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),v.useEffect(()=>{i&&f(i)},[i]);const b=(w,E)=>!w||typeof E!="string"?!1:E===w?!0:E.startsWith(w+"/")?y(E)===w:!1,_=(w,E)=>{const T=new Set,P=L=>{for(const F of L)if(F.children&&F.children.length>0){if(P(F.children)||b(F.url,E))return T.add(F.id),!0}else if(b(F.url,E))return!0;return!1};return P(w),T};v.useEffect(()=>{if(n.length>0&&g){const w=_(n,g);w.size>0&&d(E=>new Set([...E,...w]))}},[g,n]);const x=w=>b(w,g),M=w=>w.children?w.children.some(E=>x(E.url)||M(E)):!1,S=w=>{d(E=>{const T=new Set(E);return T.has(w)?T.delete(w):T.add(w),T})},k=w=>typeof w=="string"?w:w[u]||w.en||Object.values(w)[0]||"",N=(w,E)=>{rs()?.dispatch?(w.preventDefault(),rs().navigation?.onComplete(()=>{rs().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),rs().dispatch({handler:"navigate",params:{path:E}})):window.location.href=E},C=(w,E=0,T=!1)=>{const P=w.children&&w.children.length>0,L=c.has(w.id),F=k(w.name),A=E>0,D=x(w.url),O=M(w),z=A?"admin-sidebar-subitem":"admin-sidebar-item",U="admin-sidebar-item-active",j="admin-sidebar-item-active-parent",Y="admin-sidebar-item-default";return h.jsxs(I,{className:A?"relative group":"",children:[A&&h.jsxs(h.Fragment,{children:[!T&&h.jsx(I,{className:"admin-sidebar-tree-line-vertical"}),h.jsx(I,{className:"admin-sidebar-tree-line-curve"})]}),P&&w.url?h.jsxs(I,{className:`
|
||||
`,role:"status","aria-label":Cv("common.loading")}),s&&h.jsx(J,{className:`${l[t]} ${n} font-medium`,children:s})]});return r?h.jsx(I,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",...i,children:c}):h.jsx(I,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",...i,children:c})},rs=()=>window.G7Core,Tl=(e,t)=>window.G7Core?.t?.(e,t)??e,_v=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:r=!1,onToggleCollapse:s,className:o="",currentLocale:i,id:a,editorAttrs:l})=>{const[c,d]=v.useState(new Set),[u,f]=v.useState(i||rs()?.locale?.current?.()||"ko"),[g,m]=v.useState(window.location.pathname),p=v.useMemo(()=>{const w=[],E=T=>{for(const P of T)P.url&&w.push(P.url),P.children&&E(P.children)};return E(n),w},[n]),y=v.useCallback(w=>{let E=null;for(const T of p)(w===T||w.startsWith(T+"/"))&&(!E||T.length>E.length)&&(E=T);return E},[p]);v.useEffect(()=>{const w=rs();return w?.state?.subscribe?w.state.subscribe(T=>{const P=T?._global?.locale||w?.locale?.current?.()||"ko";f(P);const L=T?._global?.currentPath||window.location.pathname;m(L)}):void 0},[]),v.useEffect(()=>{const w=()=>{m(window.location.pathname)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),v.useEffect(()=>{i&&f(i)},[i]);const b=(w,E)=>!w||typeof E!="string"?!1:E===w?!0:E.startsWith(w+"/")?y(E)===w:!1,_=(w,E)=>{const T=new Set,P=L=>{for(const F of L)if(F.children&&F.children.length>0){if(P(F.children)||b(F.url,E))return T.add(F.id),!0}else if(b(F.url,E))return!0;return!1};return P(w),T};v.useEffect(()=>{if(n.length>0&&g){const w=_(n,g);w.size>0&&d(E=>new Set([...E,...w]))}},[g,n]);const x=w=>b(w,g),M=w=>w.children?w.children.some(E=>x(E.url)||M(E)):!1,S=w=>{d(E=>{const T=new Set(E);return T.has(w)?T.delete(w):T.add(w),T})},k=w=>typeof w=="string"?w:w[u]||w.en||Object.values(w)[0]||"",N=(w,E)=>{rs()?.dispatch?(w.preventDefault(),rs().navigation?.onComplete(()=>{rs().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),rs().dispatch({handler:"navigate",params:{path:E}})):window.location.href=E},C=(w,E=0,T=!1)=>{const P=w.children&&w.children.length>0,L=c.has(w.id),F=k(w.name),A=E>0,D=x(w.url),O=M(w),z=A?"admin-sidebar-subitem":"admin-sidebar-item",U="admin-sidebar-item-active",j="admin-sidebar-item-active-parent",Y="admin-sidebar-item-default";return h.jsxs(I,{className:A?"relative group":"",children:[A&&h.jsxs(h.Fragment,{children:[!T&&h.jsx(I,{className:"admin-sidebar-tree-line-vertical"}),h.jsx(I,{className:"admin-sidebar-tree-line-curve"})]}),P&&w.url?h.jsxs(I,{className:`
|
||||
${z}
|
||||
${D?U:O?j:Y}
|
||||
${r?"justify-center":""}
|
||||
@@ -69,31 +69,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
admin-sidebar-item-disabled
|
||||
${r?"justify-center":""}
|
||||
text-left
|
||||
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(yt,{className:w.icon})}),!r&&h.jsx(J,{children:F})]}),!r&&w.module_id&&h.jsx(yt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}),P&&!r&&L&&h.jsx(I,{className:"relative ml-2",children:w.children.map((W,G)=>C(W,E+1,G===w.children.length-1))})]},w.id)};return h.jsxs(I,{className:o,id:a,...l,children:[(e||s)&&h.jsxs(I,{className:"admin-sidebar-header",children:[e&&!r&&h.jsx(Nn,{src:e,alt:t,className:"h-8"}),s&&h.jsx(le,{onClick:s,className:"admin-sidebar-collapse-btn","aria-label":Tl(r?"common.expand_sidebar":"common.collapse_sidebar"),children:h.jsx(yt,{className:`${r?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-slate-600 dark:text-slate-400`})})]}),h.jsx(I,{className:"admin-sidebar-menu-list",children:n.map((w,E)=>C(w,0,E===n.length-1))})]})},Ws=(e,t)=>window.G7Core?.t?.(e,t)??e,_v=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:r,onLogoutClick:s,className:o=""})=>{const[i,a]=v.useState(!1),[l,c]=v.useState(!1),d=v.useRef(null),u=v.useRef(null),f=t.filter(g=>!g.read).length;return v.useEffect(()=>{const g=m=>{d.current&&!d.current.contains(m.target)&&a(!1),u.current&&!u.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),h.jsxs(I,{className:`
|
||||
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(yt,{className:w.icon})}),!r&&h.jsx(J,{children:F})]}),!r&&w.module_id&&h.jsx(yt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}),P&&!r&&L&&h.jsx(I,{className:"relative ml-2",children:w.children.map((W,G)=>C(W,E+1,G===w.children.length-1))})]},w.id)};return h.jsxs(I,{className:o,id:a,...l,children:[(e||s)&&h.jsxs(I,{className:"admin-sidebar-header",children:[e&&!r&&h.jsx(Nn,{src:e,alt:t,className:"h-8"}),s&&h.jsx(le,{onClick:s,className:"admin-sidebar-collapse-btn","aria-label":Tl(r?"common.expand_sidebar":"common.collapse_sidebar"),children:h.jsx(yt,{className:`${r?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-slate-600 dark:text-slate-400`})})]}),h.jsx(I,{className:"admin-sidebar-menu-list",children:n.map((w,E)=>C(w,0,E===n.length-1))})]})},Ws=(e,t)=>window.G7Core?.t?.(e,t)??e,Ev=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:r,onLogoutClick:s,className:o=""})=>{const[i,a]=v.useState(!1),[l,c]=v.useState(!1),d=v.useRef(null),u=v.useRef(null),f=t.filter(g=>!g.read).length;return v.useEffect(()=>{const g=m=>{d.current&&!d.current.contains(m.target)&&a(!1),u.current&&!u.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),h.jsxs(I,{className:`
|
||||
bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-4 flex items-center justify-end gap-4
|
||||
${o}
|
||||
`,children:[h.jsxs(I,{ref:d,className:"relative",children:[h.jsxs(le,{onClick:()=>a(!i),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":Ws("common.notifications"),children:[h.jsx(ae,{name:he.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&h.jsx(J,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:f>9?"9+":f})]}),i&&h.jsxs(I,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsx(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx(J,{className:"font-semibold text-gray-900 dark:text-white",children:Ws("common.notifications")})}),h.jsx(I,{className:"max-h-96 overflow-y-auto",children:t.length===0?h.jsx(I,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:h.jsx(J,{children:Ws("common.no_notifications")})}):t.map(g=>h.jsx(le,{onClick:()=>{g.onClick?.(),n?.(g.id),a(!1)},className:`
|
||||
w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-100 dark:border-gray-700 transition-colors
|
||||
${g.read?"":"bg-blue-50 dark:bg-blue-900/20"}
|
||||
`,children:h.jsxs(I,{className:"flex items-start gap-3",children:[g.iconName&&h.jsx(ae,{name:g.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),h.jsxs(I,{className:"flex-1",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:g.title}),h.jsx(I,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:g.message}),h.jsx(I,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:g.time})]}),!g.read&&h.jsx(J,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},g.id))})]})]}),h.jsxs(I,{ref:u,className:"relative",children:[h.jsxs(le,{onClick:()=>c(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?h.jsx(Nn,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):h.jsx(I,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:h.jsx(ae,{name:he.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),h.jsxs(I,{className:"hidden md:block text-left",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),h.jsx(ae,{name:he.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&h.jsxs(I,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsxs(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),h.jsxs(I,{className:"py-2",children:[h.jsxs(le,{onClick:()=>{r?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[h.jsx(ae,{name:he.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{children:Ws("common.profile_settings")})]}),h.jsxs(le,{onClick:()=>{s?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[h.jsx(ae,{name:he.ArrowRight,className:"w-5 h-5"}),h.jsx(J,{children:Ws("common.logout")})]})]})]})]})]})},Ev=({notifications:e=[],unreadCount:t=0,hasMore:n=!1,loading:r=!1,titleText:s="Notifications",emptyText:o="No notifications",markAllReadText:i="Mark all as read",deleteAllText:a="Delete all",unreadOnlyText:l="Unread only",unreadOnly:c=!1,onNotificationClick:d,onClose:u,onLoadMore:f,onMarkAllRead:g,onDeleteAll:m,onDelete:p,onUnreadOnlyToggle:y,dropdownAlign:b="right",className:_="",id:x,editorAttrs:M})=>{const[S,k]=v.useState(!1),N=v.useRef(null),C=v.useRef(null),w=v.useRef(null),E=v.useRef(null),T=v.useRef(new Set),P=v.useRef(f),L=v.useRef(n),F=v.useRef(r),A=v.useRef(e.length),D=v.useRef(-1);v.useEffect(()=>{P.current=f,L.current=n,F.current=r,A.current=e.length}),v.useEffect(()=>{if(!E.current||!w.current||!S)return;D.current=-1;const j=new IntersectionObserver(([Y])=>{Y.isIntersecting&&(F.current||!L.current||D.current!==A.current&&(D.current=A.current,P.current?.()))},{root:w.current,threshold:.1});return j.observe(E.current),()=>j.disconnect()},[S]),v.useEffect(()=>{if(!w.current||!S)return;const j=new IntersectionObserver(B=>{B.forEach(W=>{const G=W.target.getAttribute("data-notification-id"),V=W.target.getAttribute("data-unread")==="true";G&&V&&W.isIntersecting&&T.current.add(G)})},{root:w.current,threshold:.5});return w.current.querySelectorAll("[data-notification-id]").forEach(B=>j.observe(B)),()=>j.disconnect()},[S,e]);const O=t>0?t:e.filter(j=>!j.read).length,z=v.useCallback(()=>{if(S){if(O>0){const j=Array.from(T.current).filter(Y=>{const B=e.find(W=>String(W.id)===String(Y));return B&&!B.read});j.length>0&&u?.(j)}T.current.clear(),k(!1)}},[S,u,O,e]);v.useEffect(()=>{if(!S)return;const j=Y=>{N.current&&!N.current.contains(Y.target)&&z()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S,z]);const U=v.useCallback(()=>{S?z():k(!0)},[S,z]);return v.useLayoutEffect(()=>{const j=C.current;if(!S||!j)return;j.style.transform="";const Y=j.getBoundingClientRect(),B=typeof window<"u"?window.innerWidth:0;if(Y.width===0&&Y.height===0)return;const W=8;let G=0;Y.right>B-W?G=-(Y.right-(B-W)):Y.left<W&&(G=W-Y.left),G!==0&&(j.style.transform=`translateX(${G}px)`)},[S,b,e.length]),h.jsxs(I,{ref:N,className:`relative ${_}`,id:x,...M,children:[h.jsxs(le,{onClick:U,className:"relative w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":s,children:[h.jsx(ae,{name:he.Bell,className:"text-sm text-slate-500 dark:text-slate-400"}),O>0&&h.jsx(J,{clas
Line truncated
|
||||
`,children:h.jsxs(I,{className:"flex items-start gap-3",children:[g.iconName&&h.jsx(ae,{name:g.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),h.jsxs(I,{className:"flex-1",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:g.title}),h.jsx(I,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:g.message}),h.jsx(I,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:g.time})]}),!g.read&&h.jsx(J,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},g.id))})]})]}),h.jsxs(I,{ref:u,className:"relative",children:[h.jsxs(le,{onClick:()=>c(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?h.jsx(Nn,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):h.jsx(I,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:h.jsx(ae,{name:he.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),h.jsxs(I,{className:"hidden md:block text-left",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),h.jsx(ae,{name:he.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&h.jsxs(I,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsxs(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),h.jsxs(I,{className:"py-2",children:[h.jsxs(le,{onClick:()=>{r?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[h.jsx(ae,{name:he.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{children:Ws("common.profile_settings")})]}),h.jsxs(le,{onClick:()=>{s?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[h.jsx(ae,{name:he.ArrowRight,className:"w-5 h-5"}),h.jsx(J,{children:Ws("common.logout")})]})]})]})]})]})},Mv=({notifications:e=[],unreadCount:t=0,hasMore:n=!1,loading:r=!1,titleText:s="Notifications",emptyText:o="No notifications",markAllReadText:i="Mark all as read",deleteAllText:a="Delete all",unreadOnlyText:l="Unread only",unreadOnly:c=!1,onNotificationClick:d,onClose:u,onLoadMore:f,onMarkAllRead:g,onDeleteAll:m,onDelete:p,onUnreadOnlyToggle:y,dropdownAlign:b="right",className:_="",id:x,editorAttrs:M})=>{const[S,k]=v.useState(!1),N=v.useRef(null),C=v.useRef(null),w=v.useRef(null),E=v.useRef(null),T=v.useRef(new Set),P=v.useRef(f),L=v.useRef(n),F=v.useRef(r),A=v.useRef(e.length),D=v.useRef(-1);v.useEffect(()=>{P.current=f,L.current=n,F.current=r,A.current=e.length}),v.useEffect(()=>{if(!E.current||!w.current||!S)return;D.current=-1;const j=new IntersectionObserver(([Y])=>{Y.isIntersecting&&(F.current||!L.current||D.current!==A.current&&(D.current=A.current,P.current?.()))},{root:w.current,threshold:.1});return j.observe(E.current),()=>j.disconnect()},[S]),v.useEffect(()=>{if(!w.current||!S)return;const j=new IntersectionObserver(B=>{B.forEach(W=>{const G=W.target.getAttribute("data-notification-id"),V=W.target.getAttribute("data-unread")==="true";G&&V&&W.isIntersecting&&T.current.add(G)})},{root:w.current,threshold:.5});return w.current.querySelectorAll("[data-notification-id]").forEach(B=>j.observe(B)),()=>j.disconnect()},[S,e]);const O=t>0?t:e.filter(j=>!j.read).length,z=v.useCallback(()=>{if(S){if(O>0){const j=Array.from(T.current).filter(Y=>{const B=e.find(W=>String(W.id)===String(Y));return B&&!B.read});j.length>0&&u?.(j)}T.current.clear(),k(!1)}},[S,u,O,e]);v.useEffect(()=>{if(!S)return;const j=Y=>{N.current&&!N.current.contains(Y.target)&&z()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S,z]);const U=v.useCallback(()=>{S?z():k(!0)},[S,z]);return v.useLayoutEffect(()=>{const j=C.current;if(!S||!j)return;j.style.transform="";const Y=j.getBoundingClientRect(),B=typeof window<"u"?window.innerWidth:0;if(Y.width===0&&Y.height===0)return;const W=8;let G=0;Y.right>B-W?G=-(Y.right-(B-W)):Y.left<W&&(G=W-Y.left),G!==0&&(j.style.transform=`translateX(${G}px)`)},[S,b,e.length]),h.jsxs(I,{ref:N,className:`relative ${_}`,id:x,...M,children:[h.jsxs(le,{onClick:U,className:"relative w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":s,children:[h.jsx(ae,{name:he.Bell,className:"text-sm text-slate-500 dark:text-slate-400"}),O>0&&h.jsx(J,{clas
Line truncated
|
||||
px-3 py-1.5 text-sm font-medium rounded-md transition-colors
|
||||
${g===x?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
|
||||
${u?"opacity-50 cursor-not-allowed":""}
|
||||
`,children:Yu(x)},x))})]}):h.jsxs(I,{ref:p,className:`relative ${s}`,id:a,...l,children:[h.jsxs(le,{onClick:()=>d(!c),className:i?"flex items-center gap-1.5 px-2.5 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors cursor-pointer":"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-haspopup":"listbox","aria-expanded":c,"aria-label":t,children:[h.jsx(ae,{name:he.Globe,className:i?"w-4 h-4":"w-5 h-5 text-gray-600 dark:text-gray-400"}),i&&h.jsx(J,{className:"font-medium uppercase",children:g}),i&&h.jsx(ae,{name:he.ChevronDown,className:"w-3 h-3"})]}),c&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsx(I,{className:"py-2",children:e.map(x=>h.jsxs(le,{onClick:()=>_(x),disabled:u,className:`
|
||||
`,children:Ku(x)},x))})]}):h.jsxs(I,{ref:p,className:`relative ${s}`,id:a,...l,children:[h.jsxs(le,{onClick:()=>d(!c),className:i?"flex items-center gap-1.5 px-2.5 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors cursor-pointer":"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-haspopup":"listbox","aria-expanded":c,"aria-label":t,children:[h.jsx(ae,{name:he.Globe,className:i?"w-4 h-4":"w-5 h-5 text-gray-600 dark:text-gray-400"}),i&&h.jsx(J,{className:"font-medium uppercase",children:g}),i&&h.jsx(ae,{name:he.ChevronDown,className:"w-3 h-3"})]}),c&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsx(I,{className:"py-2",children:e.map(x=>h.jsxs(le,{onClick:()=>_(x),disabled:u,className:`
|
||||
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
|
||||
${g===x?"bg-gray-50 dark:bg-gray-700":""}
|
||||
${u?"opacity-50 cursor-not-allowed":""}
|
||||
`,children:[h.jsx(J,{className:"text-gray-900 dark:text-white flex-1",children:Yu(x)}),g===x&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},Ov=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:r="",changelogModalId:s,copyrightModalId:o,id:i,editorAttrs:a})=>{const l=v.useCallback(()=>{s&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:s}],onError:[{handler:"openModal",target:s}]}]})},[s]),c=v.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return h.jsx(I,{className:`admin-footer ${r}`,id:i,...a,children:h.jsxs(I,{className:"admin-footer-row",children:[h.jsxs(I,{className:"admin-footer-group",children:[h.jsx(J,{className:o?"admin-footer-link-hover":"",onClick:o?c:void 0,children:e}),t&&h.jsxs(h.Fragment,{children:[h.jsx(J,{className:"hidden md:inline",children:"•"}),h.jsxs(J,{className:`flex-center gap-2 ${s?"admin-footer-link-hover":""}`,onClick:s?l:void 0,children:[h.jsx(ae,{name:he.Tag,className:"w-4 h-4"}),h.jsxs(J,{children:["v",t]})]})]})]}),n.length>0&&h.jsx(I,{className:"flex-center gap-4",children:n.map(d=>h.jsxs(qr,{href:d.url,className:"admin-footer-link",children:[d.iconName&&h.jsx(ae,{name:d.iconName,className:"w-4 h-4"}),h.jsx(J,{children:d.label})]},d.id))})]})})},Tv=({title:e,description:t,breadcrumbItems:n,tabs:r,onTabChange:s,actions:o,className:i="",children:a,id:l,editorAttrs:c})=>{const d=(u="secondary")=>({primary:"page-action-primary",secondary:"page-action-secondary",danger:"page-action-danger",ghost:"page-action-ghost"})[u];return h.jsxs(I,{className:i,id:l,...c,children:[n&&n.length>0&&h.jsx(I,{className:"mb-md",children:h.jsx(ju,{items:n})}),h.jsxs(I,{className:"flex-between mb-lg",children:[h.jsxs(I,{children:[h.jsx(sl,{className:"page-title",children:e}),t&&h.jsx(kt,{className:"page-description",children:t})]}),a?h.jsx(I,{className:"flex-center page-actions",children:a}):o&&o.length>0?h.jsx(I,{className:"page-actions",children:o.map(u=>h.jsxs(le,{onClick:u.onClick,disabled:u.disabled,className:d(u.variant),children:[u.iconName&&h.jsx(ae,{name:u.iconName,className:"icon-md"}),u.variant!=="ghost"&&u.label&&h.jsx(I,{children:u.label})]},u.id))}):null]}),r&&r.length>0&&h.jsx(I,{className:"tab-container",children:r.map(u=>h.jsxs(le,{onClick:()=>s?.(u.value),className:u.active?"tab-btn-active":"tab-btn",children:[h.jsx(I,{children:u.label}),u.badge!==void 0&&h.jsx(I,{className:u.active?"tab-badge-active":"tab-badge",children:u.badge})]},u.id))})]})},Av=()=>window.G7Core,Dv=({title:e,description:t,className:n="",style:r,children:s,id:o,editorAttrs:i})=>{const a="flex items-center justify-between",l=Av()?.style?.mergeClasses?.(a,n)??`${a} ${n}`;return h.jsxs(I,{className:l,style:r,id:o,...i,children:[h.jsxs(I,{children:[e&&h.jsx(cr,{className:"text-base font-semibold text-gray-900 dark:text-white",children:e}),t&&h.jsx(kt,{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:t})]}),s&&h.jsx(I,{className:"flex items-center gap-2",children:s})]})},fr=(e,t)=>window.G7Core?.t?.(e,t)??e,Iv=({image:e,imageAlt:t,vendor:n,name:r,version:s,status:o,updateAvailable:i=!1,latestVersion:a,dependencies:l=[],showLayoutEditButton:c=!1,actions:d=[],onLayoutEditClick:u,className:f="",id:g,editorAttrs:m})=>{const p=b=>({active:"success",inactive:"default",pending:"pending",error:"error"})[b],y=b=>({active:fr("common.status_active"),inactive:fr("common.status_inactive"),pending:fr("common.status_pending"),error:fr("common.status_error")})[b];return h.jsxs(I,{className:`
|
||||
`,children:[h.jsx(J,{className:"text-gray-900 dark:text-white flex-1",children:Ku(x)}),g===x&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},Tv=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:r="",changelogModalId:s,copyrightModalId:o,id:i,editorAttrs:a})=>{const l=v.useCallback(()=>{s&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:s}],onError:[{handler:"openModal",target:s}]}]})},[s]),c=v.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return h.jsx(I,{className:`admin-footer ${r}`,id:i,...a,children:h.jsxs(I,{className:"admin-footer-row",children:[h.jsxs(I,{className:"admin-footer-group",children:[h.jsx(J,{className:o?"admin-footer-link-hover":"",onClick:o?c:void 0,children:e}),t&&h.jsxs(h.Fragment,{children:[h.jsx(J,{className:"hidden md:inline",children:"•"}),h.jsxs(J,{className:`flex-center gap-2 ${s?"admin-footer-link-hover":""}`,onClick:s?l:void 0,children:[h.jsx(ae,{name:he.Tag,className:"w-4 h-4"}),h.jsxs(J,{children:["v",t]})]})]})]}),n.length>0&&h.jsx(I,{className:"flex-center gap-4",children:n.map(d=>h.jsxs(qr,{href:d.url,className:"admin-footer-link",children:[d.iconName&&h.jsx(ae,{name:d.iconName,className:"w-4 h-4"}),h.jsx(J,{children:d.label})]},d.id))})]})})},Av=({title:e,description:t,breadcrumbItems:n,tabs:r,onTabChange:s,actions:o,className:i="",children:a,id:l,editorAttrs:c})=>{const d=(u="secondary")=>({primary:"page-action-primary",secondary:"page-action-secondary",danger:"page-action-danger",ghost:"page-action-ghost"})[u];return h.jsxs(I,{className:i,id:l,...c,children:[n&&n.length>0&&h.jsx(I,{className:"mb-md",children:h.jsx(Wu,{items:n})}),h.jsxs(I,{className:"flex-between mb-lg",children:[h.jsxs(I,{children:[h.jsx(sl,{className:"page-title",children:e}),t&&h.jsx(kt,{className:"page-description",children:t})]}),a?h.jsx(I,{className:"flex-center page-actions",children:a}):o&&o.length>0?h.jsx(I,{className:"page-actions",children:o.map(u=>h.jsxs(le,{onClick:u.onClick,disabled:u.disabled,className:d(u.variant),children:[u.iconName&&h.jsx(ae,{name:u.iconName,className:"icon-md"}),u.variant!=="ghost"&&u.label&&h.jsx(I,{children:u.label})]},u.id))}):null]}),r&&r.length>0&&h.jsx(I,{className:"tab-container",children:r.map(u=>h.jsxs(le,{onClick:()=>s?.(u.value),className:u.active?"tab-btn-active":"tab-btn",children:[h.jsx(I,{children:u.label}),u.badge!==void 0&&h.jsx(I,{className:u.active?"tab-badge-active":"tab-badge",children:u.badge})]},u.id))})]})},Dv=()=>window.G7Core,Iv=({title:e,description:t,className:n="",style:r,children:s,id:o,editorAttrs:i})=>{const a="flex items-center justify-between",l=Dv()?.style?.mergeClasses?.(a,n)??`${a} ${n}`;return h.jsxs(I,{className:l,style:r,id:o,...i,children:[h.jsxs(I,{children:[e&&h.jsx(cr,{className:"text-base font-semibold text-gray-900 dark:text-white",children:e}),t&&h.jsx(kt,{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:t})]}),s&&h.jsx(I,{className:"flex items-center gap-2",children:s})]})},fr=(e,t)=>window.G7Core?.t?.(e,t)??e,Lv=({image:e,imageAlt:t,vendor:n,name:r,version:s,status:o,updateAvailable:i=!1,latestVersion:a,dependencies:l=[],showLayoutEditButton:c=!1,actions:d=[],onLayoutEditClick:u,className:f="",id:g,editorAttrs:m})=>{const p=b=>({active:"success",inactive:"default",pending:"pending",error:"error"})[b],y=b=>({active:fr("common.status_active"),inactive:fr("common.status_inactive"),pending:fr("common.status_pending"),error:fr("common.status_error")})[b];return h.jsxs(I,{className:`
|
||||
bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow
|
||||
${f}
|
||||
`,id:g,...m,children:[e&&h.jsxs(I,{className:"relative",children:[h.jsx(Nn,{src:e,alt:t||fr("common.template_preview",{vendor:n,name:r}),className:"w-full h-48 object-cover"}),h.jsx(I,{className:"absolute top-3 right-3",children:h.jsx(ei,{status:p(o),label:y(o),showIcon:!0})}),i&&h.jsx(I,{className:"absolute top-3 left-3",children:h.jsxs(J,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[h.jsx(ae,{name:he.ExclamationTriangle,className:"w-3 h-3"}),h.jsx(J,{children:fr("common.update_available")})]})})]}),h.jsxs(I,{className:"p-4",children:[h.jsxs(I,{className:"flex items-start justify-between mb-3",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Xr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",r]}),h.jsxs(I,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs(J,{children:["v",s]}),i&&a&&h.jsxs(h.Fragment,{children:[h.jsx(J,{children:"→"}),h.jsxs(J,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",a]})]})]}),!e&&h.jsx(I,{className:"mt-2",children:h.jsx(ei,{status:p(o),label:y(o),showIcon:!0})})]}),d.length>0&&h.jsx(Vs,{items:d,triggerIconName:he.EllipsisVertical,position:"left"})]}),l.length>0&&h.jsxs(I,{className:"mb-3",children:[h.jsxs(kt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[fr("common.dependencies"),":"]}),h.jsx(I,{className:"flex flex-wrap gap-1",children:l.map((b,_)=>h.jsx(J,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:b},_))})]}),c&&u&&h.jsxs(le,{onClick:u,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[h.jsx(ae,{name:he.Edit,className:"w-4 h-4"}),h.jsx(J,{children:fr("common.edit_layout")})]})]})]})},Ku=({type:e,message:t,dismissible:n=!1,onDismiss:r,className:s="",id:o,editorAttrs:i})=>{const a={info:{containerClass:"alert-info",iconClass:"alert-icon-info",textClass:"alert-text-info",icon:he.InfoCircle},success:{containerClass:"alert-success",iconClass:"alert-icon-success",textClass:"alert-text-success",icon:he.CheckCircle},warning:{containerClass:"alert-warning",iconClass:"alert-icon-warning",textClass:"alert-text-warning",icon:he.ExclamationTriangle},error:{containerClass:"alert-error",iconClass:"alert-icon-error",textClass:"alert-text-error",icon:he.TimesCircle}},l=a[e]??a.info;return h.jsxs(I,{className:`${l.containerClass} ${s}`,role:"alert","aria-live":"polite",id:o,...i,children:[h.jsx(ae,{name:l.icon,className:l.iconClass,ariaLabel:`${e} icon`}),h.jsx(kt,{className:l.textClass,children:t}),n&&h.jsx(le,{onClick:r,className:`alert-dismiss ${l.textClass}`,"aria-label":"Close alert",children:h.jsx(ae,{name:he.Times,className:l.iconClass,ariaLabel:"Close"})})]})},Lv=({layoutName:e,onBack:t,onPreview:n,onSave:r,isSaving:s=!1,className:o=""})=>{const i=`
|
||||
`,id:g,...m,children:[e&&h.jsxs(I,{className:"relative",children:[h.jsx(Nn,{src:e,alt:t||fr("common.template_preview",{vendor:n,name:r}),className:"w-full h-48 object-cover"}),h.jsx(I,{className:"absolute top-3 right-3",children:h.jsx(ei,{status:p(o),label:y(o),showIcon:!0})}),i&&h.jsx(I,{className:"absolute top-3 left-3",children:h.jsxs(J,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[h.jsx(ae,{name:he.ExclamationTriangle,className:"w-3 h-3"}),h.jsx(J,{children:fr("common.update_available")})]})})]}),h.jsxs(I,{className:"p-4",children:[h.jsxs(I,{className:"flex items-start justify-between mb-3",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Xr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",r]}),h.jsxs(I,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs(J,{children:["v",s]}),i&&a&&h.jsxs(h.Fragment,{children:[h.jsx(J,{children:"→"}),h.jsxs(J,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",a]})]})]}),!e&&h.jsx(I,{className:"mt-2",children:h.jsx(ei,{status:p(o),label:y(o),showIcon:!0})})]}),d.length>0&&h.jsx(Vs,{items:d,triggerIconName:he.EllipsisVertical,position:"left"})]}),l.length>0&&h.jsxs(I,{className:"mb-3",children:[h.jsxs(kt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[fr("common.dependencies"),":"]}),h.jsx(I,{className:"flex flex-wrap gap-1",children:l.map((b,_)=>h.jsx(J,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:b},_))})]}),c&&u&&h.jsxs(le,{onClick:u,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[h.jsx(ae,{name:he.Edit,className:"w-4 h-4"}),h.jsx(J,{children:fr("common.edit_layout")})]})]})]})},Xu=({type:e,message:t,dismissible:n=!1,onDismiss:r,className:s="",id:o,editorAttrs:i})=>{const a={info:{containerClass:"alert-info",iconClass:"alert-icon-info",textClass:"alert-text-info",icon:he.InfoCircle},success:{containerClass:"alert-success",iconClass:"alert-icon-success",textClass:"alert-text-success",icon:he.CheckCircle},warning:{containerClass:"alert-warning",iconClass:"alert-icon-warning",textClass:"alert-text-warning",icon:he.ExclamationTriangle},error:{containerClass:"alert-error",iconClass:"alert-icon-error",textClass:"alert-text-error",icon:he.TimesCircle}},l=a[e]??a.info;return h.jsxs(I,{className:`${l.containerClass} ${s}`,role:"alert","aria-live":"polite",id:o,...i,children:[h.jsx(ae,{name:l.icon,className:l.iconClass,ariaLabel:`${e} icon`}),h.jsx(kt,{className:l.textClass,children:t}),n&&h.jsx(le,{onClick:r,className:`alert-dismiss ${l.textClass}`,"aria-label":"Close alert",children:h.jsx(ae,{name:he.Times,className:l.iconClass,ariaLabel:"Close"})})]})},Pv=({layoutName:e,onBack:t,onPreview:n,onSave:r,isSaving:s=!1,className:o=""})=>{const i=`
|
||||
flex items-center justify-between gap-4 p-4 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700
|
||||
${o}
|
||||
`.trim().replace(/\s+/g," ");return h.jsxs(I,{className:i,children:[h.jsxs(I,{className:"flex items-center gap-3",children:[h.jsx(le,{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:h.jsx(ae,{name:he.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),h.jsx(cr,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:e})]}),h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(le,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(ae,{name:he.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),h.jsx("span",{children:"미리보기"})]})}),h.jsx(le,{onClick:r,disabled:s,className:`
|
||||
px-4 py-2 rounded-lg transition-colors border-0 cursor-pointer
|
||||
${s?"bg-blue-400 dark:bg-blue-600 cursor-not-allowed":"bg-blue-600 dark:bg-blue-500 hover:bg-blue-700 dark:hover:bg-blue-600"}
|
||||
text-white
|
||||
`.trim().replace(/\s+/g," "),"aria-label":s?"저장 중...":"저장",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(ae,{name:s?he.Spinner:he.Save,className:`text-white ${s?"animate-spin":""}`,ariaLabel:s?"저장 중 아이콘":"저장 아이콘"}),h.jsx("span",{children:s?"저장 중...":"저장"})]})})]})]})},Pv=({files:e,selectedId:t,onSelect:n,className:r=""})=>{const s=a=>{try{const l=new Date(a);if(isNaN(l.getTime()))return a;const c=l.getFullYear(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),g=String(l.getMinutes()).padStart(2,"0");return`${c}-${d}-${u} ${f}:${g}`}catch{return a}},o=a=>{n(a)},i=`
|
||||
`.trim().replace(/\s+/g," "),"aria-label":s?"저장 중...":"저장",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(ae,{name:s?he.Spinner:he.Save,className:`text-white ${s?"animate-spin":""}`,ariaLabel:s?"저장 중 아이콘":"저장 아이콘"}),h.jsx("span",{children:s?"저장 중...":"저장"})]})})]})]})},$v=({files:e,selectedId:t,onSelect:n,className:r=""})=>{const s=a=>{try{const l=new Date(a);if(isNaN(l.getTime()))return a;const c=l.getFullYear(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),g=String(l.getMinutes()).padStart(2,"0");return`${c}-${d}-${u} ${f}:${g}`}catch{return a}},o=a=>{n(a)},i=`
|
||||
w-full
|
||||
${r}
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:i,children:e.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):h.jsx(ol,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(a=>{const l=a.id===t,c=`
|
||||
@@ -106,8 +106,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
`.trim().replace(/\s+/g," "),u=`
|
||||
text-sm
|
||||
${l?"text-blue-700 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(il,{className:c,onClick:()=>o(a.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(a.id))},children:h.jsxs(I,{className:"flex flex-col gap-1",children:[h.jsx(J,{className:d,children:a.name}),h.jsx(J,{className:u,children:s(a.updated_at)})]})},a.id)})})})};function Xu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $v(e){if(Array.isArray(e))return e}function Fv(e,t,n){return(t=Wv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zv(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Vv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qu(Object(n),!0).forEach(function(r){Fv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hv(e,t){if(e==null)return{};var n,r,s=Uv(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function Uv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bv(e,t){return $v(e)||zv(e,t)||Gv(e,t)||Vv()}function jv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wv(e){var t=jv(e,"string");return typeof t=="symbol"?t:t+""}function Gv(e,t){if(e){if(typeof e=="string")return Xu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xu(e,t):void 0}}function Yv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qu(Object(n),!0).forEach(function(r){Yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(s,o){return o(s)},r)}}function Gs(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return t.apply(n,[].concat(s,a))}}}function oi(e){return{}.toString.call(e).includes("Object")}function Xv(e){return!Object.keys(e).length}function Ys(e){return typeof e=="function"}function qv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zv(e,t){return oi(t)||hr("changeType"),Object.keys(t).some(function(n){return!qv(e,n)})&&hr("changeField"),t}function Qv(e){Ys(e)||hr("selectorType")}function Jv(e){Ys(e)||oi(e)||hr("handlerType"),oi(e)&&Object.values(e).some(function(t){return!Ys(t)})&&hr("handlersType")}function Rv(e){e||hr("initialIsRequired"),oi(e)||hr("initialType"),Xv(e)&&hr("initialContent")}function ex(e,t){throw new Error(e[t]||e.default)}var tx={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},hr=Gs(ex)(tx),ii={changes:Zv,selector:Qv,handler:Jv,initial:Rv};function nx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ii.initial(e),ii.handler(t);var n={current:e},r=Gs(ox)(n,t),s=Gs(sx)(n),o=Gs(ii.changes)(e),i=Gs(rx)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return ii.selector(c),c(n.current)}function l(c){Kv(r,s,o,i)(c)}return[a,l]}function rx(e,t){return Ys(t)?t(e.current):t}function sx(e,t){return e.current=Ju(Ju({},e.current),t),t}function ox(e,t,n){return Ys(t)?t(e.current):Object.keys(n).forEach(function(r){var s;return(s=t[r])===null||s===void 0?void 0:s.call(t,e.current[r])}),n}var ix={create:nx},ax={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function lx(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];
Line truncated
|
||||
`.trim().replace(/\s+/g," ");return h.jsx(il,{className:c,onClick:()=>o(a.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(a.id))},children:h.jsxs(I,{className:"flex flex-col gap-1",children:[h.jsx(J,{className:d,children:a.name}),h.jsx(J,{className:u,children:s(a.updated_at)})]})},a.id)})})})};function qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fv(e){if(Array.isArray(e))return e}function zv(e,t,n){return(t=Gv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Hv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zu(Object(n),!0).forEach(function(r){zv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uv(e,t){if(e==null)return{};var n,r,s=Bv(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function Bv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jv(e,t){return Fv(e)||Vv(e,t)||Yv(e,t)||Hv()}function Wv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gv(e){var t=Wv(e,"string");return typeof t=="symbol"?t:t+""}function Yv(e,t){if(e){if(typeof e=="string")return qu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qu(e,t):void 0}}function Kv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ju(Object(n),!0).forEach(function(r){Kv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(s,o){return o(s)},r)}}function Gs(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return t.apply(n,[].concat(s,a))}}}function oi(e){return{}.toString.call(e).includes("Object")}function qv(e){return!Object.keys(e).length}function Ys(e){return typeof e=="function"}function Zv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qv(e,t){return oi(t)||hr("changeType"),Object.keys(t).some(function(n){return!Zv(e,n)})&&hr("changeField"),t}function Jv(e){Ys(e)||hr("selectorType")}function Rv(e){Ys(e)||oi(e)||hr("handlerType"),oi(e)&&Object.values(e).some(function(t){return!Ys(t)})&&hr("handlersType")}function ex(e){e||hr("initialIsRequired"),oi(e)||hr("initialType"),qv(e)&&hr("initialContent")}function tx(e,t){throw new Error(e[t]||e.default)}var nx={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},hr=Gs(tx)(nx),ii={changes:Qv,selector:Jv,handler:Rv,initial:ex};function rx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ii.initial(e),ii.handler(t);var n={current:e},r=Gs(ix)(n,t),s=Gs(ox)(n),o=Gs(ii.changes)(e),i=Gs(sx)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return ii.selector(c),c(n.current)}function l(c){Xv(r,s,o,i)(c)}return[a,l]}function sx(e,t){return Ys(t)?t(e.current):t}function ox(e,t){return e.current=Ru(Ru({},e.current),t),t}function ix(e,t,n){return Ys(t)?t(e.current):Object.keys(n).forEach(function(r){var s;return(s=t[r])===null||s===void 0?void 0:s.call(t,e.current[r])}),n}var ax={create:rx},lx={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function cx(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];
Line truncated
|
||||
You are using deprecated way of configuration.
|
||||
|
||||
Instead of using
|
||||
@@ -116,10 +116,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
monaco.config({ paths: { vs: '...' } })
|
||||
|
||||
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
||||
`},ef=lx(fx)(Ru),hx={config:dx},gx=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,i){return i(o)},s)}};function tf(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],tf(e[n],t[n]))}),Zu(Zu({},e),t)}var px={type:"cancelation",msg:"operation is manually canceled"};function Al(e){var t=!1,n=new Promise(function(r,s){e.then(function(o){return t?s(px):r(o)}),e.catch(s)});return n.cancel=function(){return t=!0},n}var mx=["monaco"],bx=ix.create({config:ax,isInitialized:!1,resolve:null,reject:null,monaco:null}),nf=Bv(bx,2),Ks=nf[0],ai=nf[1];function yx(e){var t=hx.config(e),n=t.monaco,r=Hv(t,mx);ai(function(s){return{config:tf(s.config,r),monaco:n}})}function vx(){var e=Ks(function(t){var n=t.monaco,r=t.isInitialized,s=t.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!e.isInitialized){if(ai({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Al(Dl);if(window.monaco&&window.monaco.editor)return rf(window.monaco),e.resolve(window.monaco),Al(Dl);gx(xx,kx)(Cx)}return Al(Dl)}function xx(e){return document.body.appendChild(e)}function wx(e){var t=document.createElement("script");return e&&(t.src=e),t}function kx(e){var t=Ks(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=wx("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Cx(){var e=Ks(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m;rf(r),e.resolve(r)},function(n){e.reject(n)})}function rf(e){Ks().monaco||ai({monaco:e})}function Sx(){return Ks(function(e){var t=e.monaco;return t})}var Dl=new Promise(function(e,t){return ai({resolve:e,reject:t})}),li={config:yx,init:vx,__getMonacoInstance:Sx},_x={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Il=_x,Ex={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Mx=Ex;function Nx({children:e}){return v.createElement("div",{style:Mx.container},e)}var Ox=Nx,Tx=Ox;function Ax({width:e,height:t,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:i}){return v.createElement("section",{style:{...Il.wrapper,width:e,height:t},...i},!n&&v.createElement(Tx,null,r),v.createElement("div",{ref:s,style:{...Il.fullWidth,...!n&&Il.hide},className:o}))}var Dx=Ax,sf=v.memo(Dx);function Ix(e){v.useEffect(e,[])}var of=Ix;function Lx(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var bn=Lx;function Xs(){}function ss(e,t,n,r){return Px(e,r)||$x(e,t,n,r)}function Px(e,t){return e.editor.getModel(af(e,t))}function $x(e,t,n,r){return e.editor.createModel(t,n,r?af(e,r):void 0)}function af(e,t){return e.Uri.parse(t)}function Fx({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:f="100%",width:g="100%",className:m,wrapperProps:p={},beforeMount:y=Xs,onMount:b=Xs}){let[_,x]=v.useState(!1),[M,S]=v.useState(!0),k=v.useRef(null),N=v.useRef(null),C=v.useRef(null),w=v.useRef(b),E=v.useRef(y),T=v.useRef(!1);of(()=>{let A=li.init();return A.then(D=>(N.current=D)&&S(!1)).catch(D=>D?.type!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>k.current?F():A.cancel()}),bn(()=>{if(k.current&&N.current){let A=k.current.getOriginalEditor(),D=ss(N.current,e||"",r||n||"text",o||"");D!==A.getModel()&&A.setModel(D)}},[o],_),bn(()=>{if(k.current&&N.current){let A=k.current.getModifiedEditor(),D=ss(N.current,t||"",s||n||"text",i||"");D!==A.getModel()&&A.setModel(D)}},[i],_),bn(()=>{let A=k.current.getModifiedEditor();A.getOption(N.current.editor.EditorOption.readOnly)?A.setValue(t||""):t!==A.getValue()&&(A.executeEdits("",[{range:A.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),A.pushUndoStop())},[t],_),bn(()=>{k.current?.getModel()?.original.setValue(e||"")},[e],_),bn(()=>{let{original:A,modified:D}=k.current.getModel();N.current.editor.setModelLanguage(A,r||n||"text"),N.current.editor.setModelLanguage(D,s||n||"text")},[n,r,s],_),bn(()=>{N.current?.editor.setTheme(c)},[c],_),bn(()=>{k.current?.updateOptions(u)},[u],_);let P=v.useCallback(()=>{if(!N.current)return;E.current(N.current);let A=ss(N.current,e||"",r||n||"text",o||""),D=ss(N.current,t||"",s||n||"text",i||"");k.current?.setModel({original:A,modified:D})},[n,t,s,e,r,o,i]),L=v.useCallback(()=>{!T.current&&C.current&&(k.current=N.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...u}),P(),N.current?.editor.setTheme(c),x(!0),T.current=!0)},[u,c,P]);v.useEffect(()=>{_&&w.current(k.current,N.current)},[_]),v.useEffect(()=>{!M&&!_&&L()},[M,_,L]);function F(){let A=k.current?.getModel();a||A?.original?.disp
Line truncated
|
||||
`},tf=cx(hx)(ef),gx={config:ux},px=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,i){return i(o)},s)}};function nf(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],nf(e[n],t[n]))}),Qu(Qu({},e),t)}var mx={type:"cancelation",msg:"operation is manually canceled"};function Al(e){var t=!1,n=new Promise(function(r,s){e.then(function(o){return t?s(mx):r(o)}),e.catch(s)});return n.cancel=function(){return t=!0},n}var bx=["monaco"],yx=ax.create({config:lx,isInitialized:!1,resolve:null,reject:null,monaco:null}),rf=jv(yx,2),Ks=rf[0],ai=rf[1];function vx(e){var t=gx.config(e),n=t.monaco,r=Uv(t,bx);ai(function(s){return{config:nf(s.config,r),monaco:n}})}function xx(){var e=Ks(function(t){var n=t.monaco,r=t.isInitialized,s=t.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!e.isInitialized){if(ai({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Al(Dl);if(window.monaco&&window.monaco.editor)return sf(window.monaco),e.resolve(window.monaco),Al(Dl);px(wx,Cx)(Sx)}return Al(Dl)}function wx(e){return document.body.appendChild(e)}function kx(e){var t=document.createElement("script");return e&&(t.src=e),t}function Cx(e){var t=Ks(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=kx("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Sx(){var e=Ks(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m||n;sf(r),e.resolve(r)},function(n){e.reject(n)})}function sf(e){Ks().monaco||ai({monaco:e})}function _x(){return Ks(function(e){var t=e.monaco;return t})}var Dl=new Promise(function(e,t){return ai({resolve:e,reject:t})}),li={config:vx,init:xx,__getMonacoInstance:_x},Ex={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Il=Ex,Mx={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Nx=Mx;function Ox({children:e}){return v.createElement("div",{style:Nx.container},e)}var Tx=Ox,Ax=Tx;function Dx({width:e,height:t,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:i}){return v.createElement("section",{style:{...Il.wrapper,width:e,height:t},...i},!n&&v.createElement(Ax,null,r),v.createElement("div",{ref:s,style:{...Il.fullWidth,...!n&&Il.hide},className:o}))}var Ix=Dx,of=v.memo(Ix);function Lx(e){v.useEffect(e,[])}var af=Lx;function Px(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var bn=Px;function Xs(){}function ss(e,t,n,r){return $x(e,r)||Fx(e,t,n,r)}function $x(e,t){return e.editor.getModel(lf(e,t))}function Fx(e,t,n,r){return e.editor.createModel(t,n,r?lf(e,r):void 0)}function lf(e,t){return e.Uri.parse(t)}function zx({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:f="100%",width:g="100%",className:m,wrapperProps:p={},beforeMount:y=Xs,onMount:b=Xs}){let[_,x]=v.useState(!1),[M,S]=v.useState(!0),k=v.useRef(null),N=v.useRef(null),C=v.useRef(null),w=v.useRef(b),E=v.useRef(y),T=v.useRef(!1);af(()=>{let A=li.init();return A.then(D=>(N.current=D)&&S(!1)).catch(D=>D?.type!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>k.current?F():A.cancel()}),bn(()=>{if(k.current&&N.current){let A=k.current.getOriginalEditor(),D=ss(N.current,e||"",r||n||"text",o||"");D!==A.getModel()&&A.setModel(D)}},[o],_),bn(()=>{if(k.current&&N.current){let A=k.current.getModifiedEditor(),D=ss(N.current,t||"",s||n||"text",i||"");D!==A.getModel()&&A.setModel(D)}},[i],_),bn(()=>{let A=k.current.getModifiedEditor();A.getOption(N.current.editor.EditorOption.readOnly)?A.setValue(t||""):t!==A.getValue()&&(A.executeEdits("",[{range:A.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),A.pushUndoStop())},[t],_),bn(()=>{k.current?.getModel()?.original.setValue(e||"")},[e],_),bn(()=>{let{original:A,modified:D}=k.current.getModel();N.current.editor.setModelLanguage(A,r||n||"text"),N.current.editor.setModelLanguage(D,s||n||"text")},[n,r,s],_),bn(()=>{N.current?.editor.setTheme(c)},[c],_),bn(()=>{k.current?.updateOptions(u)},[u],_);let P=v.useCallback(()=>{if(!N.current)return;E.current(N.current);let A=ss(N.current,e||"",r||n||"text",o||""),D=ss(N.current,t||"",s||n||"text",i||"");k.current?.setModel({original:A,modified:D})},[n,t,s,e,r,o,i]),L=v.useCallback(()=>{!T.current&&C.current&&(k.current=N.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...u}),P(),N.current?.editor.setTheme(c),x(!0),T.current=!0)},[u,c,P]);v.useEffect(()=>{_&&w.current(k.current,N.current)},[_]),v.useEffect(()=>{!M&&!_&&L()},[M,_,L]);function F(){let A=k.current?.getModel();a||A?.original?.d
Line truncated
|
||||
p-3 rounded-lg border cursor-pointer transition-colors
|
||||
${t?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 hover:border-gray-400 dark:border-gray-600 dark:hover:border-gray-500"}
|
||||
`,onClick:r,children:h.jsxs(I,{className:"flex justify-between items-start",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(J,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",e.version]}),h.jsx(J,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Xx(e.created_at)})]}),h.jsxs(I,{className:"flex gap-3 text-sm",children:[h.jsxs(J,{className:"text-green-600 dark:text-green-400",children:["+",e.changes_summary.added]}),h.jsxs(J,{className:"text-red-600 dark:text-red-400",children:["-",e.changes_summary.removed]})]})]})})});df.displayName="VersionListItem";const uf=({versions:e,selectedId:t,onSelect:n})=>e.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):h.jsx(ol,{role:"list",className:"space-y-2",children:e.map(r=>h.jsx(df,{version:r,isSelected:t===r.id,onSelect:n},r.id))}),qx=({layoutId:e,versions:t,onRestore:n})=>{const[r,s]=v.useState(),o=l=>{s(l)},i=()=>{r!==void 0&&n(r)},a=r===void 0;return h.jsxs(I,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[h.jsx(I,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:h.jsx(uf,{versions:t,selectedId:r,onSelect:o})}),h.jsx(I,{className:"flex justify-end",children:h.jsx(le,{variant:"primary",disabled:a,onClick:i,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Zx=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:r="Processing...",emailPlaceholder:s="Email",passwordPlaceholder:o="Password",forgotPasswordText:i="Forgot your password?",forgotPasswordUrl:a="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:c="Please enter a valid email address.",passwordRequiredError:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:g=!1,disabled:m=!1,apiError:p="",className:y="",style:b})=>{const[_,x]=v.useState(""),[M,S]=v.useState(""),[k,N]=v.useState({}),C=p,w=Object.values(f).some(F=>F===!0),E=g||w,T=m||E,P=()=>{const F={},A=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!_||_.trim()===""?F.email=l:A.test(_)||(F.email=c),(!M||M.trim()==="")&&(F.password=d),N(F),Object.keys(F).length===0},L=async F=>{if(!P()){F.preventDefault();return}N({}),u?await u(F):F.preventDefault()};return h.jsx(I,{className:`w-full ${y}`,style:b,children:h.jsxs(al,{onSubmit:L,className:"space-y-6",noValidate:!0,children:[C&&h.jsx(I,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:h.jsx(kt,{className:"text-sm text-red-600 dark:text-red-400",children:C})}),h.jsxs(I,{children:[h.jsx(gn,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),h.jsx(Et,{id:"email",name:"email",type:"email",value:_,onChange:F=>x(F.target.value),placeholder:s,disabled:T,className:`
|
||||
`,onClick:r,children:h.jsxs(I,{className:"flex justify-between items-start",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(J,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",e.version]}),h.jsx(J,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Jx(e.created_at)})]}),h.jsxs(I,{className:"flex gap-3 text-sm",children:[h.jsxs(J,{className:"text-green-600 dark:text-green-400",children:["+",e.changes_summary.added]}),h.jsxs(J,{className:"text-red-600 dark:text-red-400",children:["-",e.changes_summary.removed]})]})]})})});ff.displayName="VersionListItem";const hf=({versions:e,selectedId:t,onSelect:n})=>e.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):h.jsx(ol,{role:"list",className:"space-y-2",children:e.map(r=>h.jsx(ff,{version:r,isSelected:t===r.id,onSelect:n},r.id))}),Rx=({layoutId:e,versions:t,onRestore:n})=>{const[r,s]=v.useState(),o=l=>{s(l)},i=()=>{r!==void 0&&n(r)},a=r===void 0;return h.jsxs(I,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[h.jsx(I,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:h.jsx(hf,{versions:t,selectedId:r,onSelect:o})}),h.jsx(I,{className:"flex justify-end",children:h.jsx(le,{variant:"primary",disabled:a,onClick:i,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},ew=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:r="Processing...",emailPlaceholder:s="Email",passwordPlaceholder:o="Password",forgotPasswordText:i="Forgot your password?",forgotPasswordUrl:a="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:c="Please enter a valid email address.",passwordRequiredError:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:g=!1,disabled:m=!1,apiError:p="",className:y="",style:b})=>{const[_,x]=v.useState(""),[M,S]=v.useState(""),[k,N]=v.useState({}),C=p,w=Object.values(f).some(F=>F===!0),E=g||w,T=m||E,P=()=>{const F={},A=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!_||_.trim()===""?F.email=l:A.test(_)||(F.email=c),(!M||M.trim()==="")&&(F.password=d),N(F),Object.keys(F).length===0},L=async F=>{if(!P()){F.preventDefault();return}N({}),u?await u(F):F.preventDefault()};return h.jsx(I,{className:`w-full ${y}`,style:b,children:h.jsxs(al,{onSubmit:L,className:"space-y-6",noValidate:!0,children:[C&&h.jsx(I,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:h.jsx(kt,{className:"text-sm text-red-600 dark:text-red-400",children:C})}),h.jsxs(I,{children:[h.jsx(gn,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),h.jsx(Et,{id:"email",name:"email",type:"email",value:_,onChange:F=>x(F.target.value),placeholder:s,disabled:T,className:`
|
||||
w-full px-4 py-3 rounded-lg border
|
||||
${k.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
|
||||
bg-white dark:bg-gray-800
|
||||
@@ -147,7 +147,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
disabled:opacity-50 disabled:cursor-not-allowed
|
||||
transition-colors duration-200
|
||||
flex items-center justify-center
|
||||
`,children:E?h.jsxs(h.Fragment,{children:[h.jsxs(Jn,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]}):n})]})})},ff=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,Ll=e=>{const t=ff(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Qx=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},Jx=({onThemeChange:e,className:t="",autoText:n="System",lightText:r="Light",darkText:s="Dark",id:o,editorAttrs:i})=>{const a=Qx(),[l,c]=v.useState(a),[d,u]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>{Ll(l)},[]),v.useEffect(()=>{if(l!=="auto")return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{Ll("auto")};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[l]),v.useEffect(()=>{const p=y=>{f.current&&!f.current.contains(y.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const g=p=>{c(p),localStorage.setItem("g7_color_scheme",p),Ll(p),u(!1),e?.(p)},m=()=>ff(l)==="dark"?he.Moon:he.Sun;return h.jsxs(I,{ref:f,className:`relative ${t}`,id:o,...i,children:[h.jsx(le,{onClick:()=>u(!d),className:"w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":"Toggle theme",children:h.jsx(ae,{name:m(),className:"text-sm text-slate-500 dark:text-slate-400"})}),d&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsxs(I,{className:"py-2",children:[h.jsxs(le,{onClick:()=>g("auto"),className:`
|
||||
`,children:E?h.jsxs(h.Fragment,{children:[h.jsxs(Jn,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]}):n})]})})},gf=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,Pl=e=>{const t=gf(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},tw=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},nw=({onThemeChange:e,className:t="",autoText:n="System",lightText:r="Light",darkText:s="Dark",id:o,editorAttrs:i})=>{const a=tw(),[l,c]=v.useState(a),[d,u]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>{Pl(l)},[]),v.useEffect(()=>{if(l!=="auto")return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{Pl("auto")};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[l]),v.useEffect(()=>{const p=y=>{f.current&&!f.current.contains(y.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const g=p=>{c(p),localStorage.setItem("g7_color_scheme",p),Pl(p),u(!1),e?.(p)},m=()=>gf(l)==="dark"?he.Moon:he.Sun;return h.jsxs(I,{ref:f,className:`relative ${t}`,id:o,...i,children:[h.jsx(le,{onClick:()=>u(!d),className:"w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":"Toggle theme",children:h.jsx(ae,{name:m(),className:"text-sm text-slate-500 dark:text-slate-400"})}),d&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsxs(I,{className:"py-2",children:[h.jsxs(le,{onClick:()=>g("auto"),className:`
|
||||
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
|
||||
${l==="auto"?"bg-gray-50 dark:bg-gray-700":""}
|
||||
`,children:[h.jsx(ae,{name:he.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),l==="auto"&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(le,{onClick:()=>g("light"),className:`
|
||||
@@ -156,7 +156,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
`,children:[h.jsx(ae,{name:he.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),l==="light"&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(le,{onClick:()=>g("dark"),className:`
|
||||
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
|
||||
${l==="dark"?"bg-gray-50 dark:bg-gray-700":""}
|
||||
`,children:[h.jsx(ae,{name:he.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{className:"flex-1 text-left text-gray-900 dark:text-white",children:s}),l==="dark"&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},hf=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},gf=(e,t)=>window.G7Core?.t?.(e,t)??e,Rx=()=>window.G7Core,ew=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:r,triggerLabel:s,triggerIconName:o=he.Sliders,position:i="right",className:a="",style:l,requiredText:c,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:g,labelClassName:m,dynamicColumns:p,dynamicColumnsInsertAfter:y,editorAttrs:b})=>{const _=s??gf("common.column_selector"),x=c??gf("common.required"),M=v.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(y){const V=t.findIndex(X=>X.field===y);if(V!==-1)return[...t.slice(0,V+1),...p,...t.slice(V+1)]}return[...t,...p]},[t,p,y]),[S,k]=v.useState(!1),N=v.useRef(null),C=v.useRef(null),[w,E]=v.useState(!1),[T,P]=v.useState(i),L=v.useMemo(()=>{try{const V=window.G7Core?.AuthManager?.getInstance();return V?V.getUser()?.uuid:void 0}catch{return}},[]),F=e?`g7_columns_${e}${L!==void 0?`_${L}`:""}`:null,A=()=>{if(!F)return null;try{const V=localStorage.getItem(F);if(V){const X=JSON.parse(V);if(Array.isArray(X)&&X.length>0)return X}}catch(V){hf.warn("Failed to load from localStorage:",V)}return null},D=V=>{if(F)try{localStorage.setItem(F,JSON.stringify(V))}catch(X){hf.warn("Failed to save to localStorage:",X)}},O=()=>{const V=A();return V||(n&&n.length>0?n:f&&f.length>0?f:M.filter(X=>X.visible!==!1).map(X=>X.field))},[z,U]=v.useState(O);v.useEffect(()=>{w||(r&&z.length>0&&r(z),E(!0))},[w,r,z]),v.useEffect(()=>{w&&n&&n.length>0&&(A()||U(n))},[n,w]);const j=v.useRef([]),Y=v.useRef(null);v.useEffect(()=>{if(w&&p&&p.length>0){const V=p.map(Q=>Q.field);if(Y.current===null){const Q=A();if(Y.current=Q!==null,Q!==null){j.current=V;return}}const X=j.current,K=V.filter(Q=>!X.includes(Q));if(K.length>0){const Q=n&&n.length>0?n:z,ne=K.filter(se=>!Q.includes(se));if(ne.length>0){const se=[...Q,...ne];U(se),D(se),r?.(se)}}j.current=V}},[p,w]);const B=n&&n.length>0?n:z;v.useEffect(()=>{const V=X=>{N.current&&!N.current.contains(X.target)&&k(!1)};return S&&document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[S]),v.useEffect(()=>{if(S&&C.current&&N.current){const V=C.current.getBoundingClientRect(),X=N.current.getBoundingClientRect(),K=window.innerWidth,Q=V.width||256;i==="right"?X.right-Q<0?P("left"):P("right"):X.left+Q>K?P("right"):P("left")}},[S,i]);const W=V=>{if(M.find(Q=>Q.field===V)?.required)return;const K=B.includes(V)?B.filter(Q=>Q!==V):[...B,V];U(K),D(K),r?.(K)},G=T==="left"?"left-0":"right-0";return h.jsxs(I,{ref:N,className:`relative inline-block ${a}`,style:l,id:e,...b,children:[h.jsxs(le,{onClick:()=>k(!S),className:Rx()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",g)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${g??""}`,children:[h.jsx(ae,{name:o,className:"w-5 h-5"}),_&&h.jsx(J,{className:`${m||"hidden sm:inline"} text-sm`,children:_})]}),S&&h.jsxs(I,{ref:C,className:`absolute ${G} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(d||u)&&h.jsxs(I,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&h.jsx(J,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&h.jsx(J,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),h.jsx(I,{className:"p-2 max-h-64 overflow-y-auto",children:M.map(V=>{const X=B.includes(V.field),K=V.required===!0;return h.jsxs(I,{onClick:()=>!K&&W(V.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${K?"cursor-default":"cursor-pointer"}`,children:[h.jsx(On,{checked:X,disabled:K,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),h.jsx(J,{className:"text-sm text-gray-700 dark:text-gray-300",children:V.header}),K&&x&&h.jsx(J,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:x})]},V.field)})})]})]})},tw=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},nw=({className:e="",style:t})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{c
Line truncated
|
||||
`,children:[h.jsx(ae,{name:he.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(J,{className:"flex-1 text-left text-gray-900 dark:text-white",children:s}),l==="dark"&&h.jsx(ae,{name:he.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},pf=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},mf=(e,t)=>window.G7Core?.t?.(e,t)??e,rw=()=>window.G7Core,sw=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:r,triggerLabel:s,triggerIconName:o=he.Sliders,position:i="right",className:a="",style:l,requiredText:c,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:g,labelClassName:m,dynamicColumns:p,dynamicColumnsInsertAfter:y,editorAttrs:b})=>{const _=s??mf("common.column_selector"),x=c??mf("common.required"),M=v.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(y){const V=t.findIndex(X=>X.field===y);if(V!==-1)return[...t.slice(0,V+1),...p,...t.slice(V+1)]}return[...t,...p]},[t,p,y]),[S,k]=v.useState(!1),N=v.useRef(null),C=v.useRef(null),[w,E]=v.useState(!1),[T,P]=v.useState(i),L=v.useMemo(()=>{try{const V=window.G7Core?.AuthManager?.getInstance();return V?V.getUser()?.uuid:void 0}catch{return}},[]),F=e?`g7_columns_${e}${L!==void 0?`_${L}`:""}`:null,A=()=>{if(!F)return null;try{const V=localStorage.getItem(F);if(V){const X=JSON.parse(V);if(Array.isArray(X)&&X.length>0)return X}}catch(V){pf.warn("Failed to load from localStorage:",V)}return null},D=V=>{if(F)try{localStorage.setItem(F,JSON.stringify(V))}catch(X){pf.warn("Failed to save to localStorage:",X)}},O=()=>{const V=A();return V||(n&&n.length>0?n:f&&f.length>0?f:M.filter(X=>X.visible!==!1).map(X=>X.field))},[z,U]=v.useState(O);v.useEffect(()=>{w||(r&&z.length>0&&r(z),E(!0))},[w,r,z]),v.useEffect(()=>{w&&n&&n.length>0&&(A()||U(n))},[n,w]);const j=v.useRef([]),Y=v.useRef(null);v.useEffect(()=>{if(w&&p&&p.length>0){const V=p.map(Q=>Q.field);if(Y.current===null){const Q=A();if(Y.current=Q!==null,Q!==null){j.current=V;return}}const X=j.current,K=V.filter(Q=>!X.includes(Q));if(K.length>0){const Q=n&&n.length>0?n:z,ne=K.filter(se=>!Q.includes(se));if(ne.length>0){const se=[...Q,...ne];U(se),D(se),r?.(se)}}j.current=V}},[p,w]);const B=n&&n.length>0?n:z;v.useEffect(()=>{const V=X=>{N.current&&!N.current.contains(X.target)&&k(!1)};return S&&document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[S]),v.useEffect(()=>{if(S&&C.current&&N.current){const V=C.current.getBoundingClientRect(),X=N.current.getBoundingClientRect(),K=window.innerWidth,Q=V.width||256;i==="right"?X.right-Q<0?P("left"):P("right"):X.left+Q>K?P("right"):P("left")}},[S,i]);const W=V=>{if(M.find(Q=>Q.field===V)?.required)return;const K=B.includes(V)?B.filter(Q=>Q!==V):[...B,V];U(K),D(K),r?.(K)},G=T==="left"?"left-0":"right-0";return h.jsxs(I,{ref:N,className:`relative inline-block ${a}`,style:l,id:e,...b,children:[h.jsxs(le,{onClick:()=>k(!S),className:rw()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",g)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${g??""}`,children:[h.jsx(ae,{name:o,className:"w-5 h-5"}),_&&h.jsx(J,{className:`${m||"hidden sm:inline"} text-sm`,children:_})]}),S&&h.jsxs(I,{ref:C,className:`absolute ${G} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(d||u)&&h.jsxs(I,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&h.jsx(J,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&h.jsx(J,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),h.jsx(I,{className:"p-2 max-h-64 overflow-y-auto",children:M.map(V=>{const X=B.includes(V.field),K=V.required===!0;return h.jsxs(I,{onClick:()=>!K&&W(V.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${K?"cursor-default":"cursor-pointer"}`,children:[h.jsx(On,{checked:X,disabled:K,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),h.jsx(J,{className:"text-sm text-gray-700 dark:text-gray-300",children:V.header}),K&&x&&h.jsx(J,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:x})]},V.field)})})]})]})},ow=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},iw=({className:e="",style:t})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{c
Line truncated
|
||||
@keyframes loading {
|
||||
0% {
|
||||
transform: translateX(-100%);
|
||||
@@ -168,19 +168,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
`})]}):null},rw=(e,t)=>window.G7Core?.t?.(e,t)??e,sw=({options:e})=>{const t=document.documentElement.classList.contains("dark"),n=t?"rgb(17,24,39)":"rgb(249,250,251)",r=t?"#6b7280":"#9ca3af",s=t?"#9ca3af":"#6b7280";return h.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[h.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${r}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),h.jsx("span",{style:{color:s,fontSize:"14px"},children:e?.text||rw("nav.loading")})]})};function Mr(e){"@babel/helpers - typeof";return Mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(e)}function ow(e,t){if(Mr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pf(e){var t=ow(e,"string");return Mr(t)=="symbol"?t:t+""}function qs(e,t,n){return(t=pf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mf(Object(n),!0).forEach(function(r){qs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iw(e){if(Array.isArray(e))return e}function aw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Pl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bf(e,t){if(e){if(typeof e=="string")return Pl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pl(e,t):void 0}}function lw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rn(e,t){return iw(e)||aw(e,t)||bf(e,t)||lw()}function cw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hn(e,t){if(e==null)return{};var n,r,s=cw(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var dw=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function yf(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,s=r===void 0?!1:r,o=e.defaultValue,i=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,u=e.onMenuClose,f=e.onMenuOpen,g=e.value,m=Hn(e,dw),p=v.useState(a!==void 0?a:n),y=Rn(p,2),b=y[0],_=y[1],x=v.useState(l!==void 0?l:s),M=Rn(x,2),S=M[0],k=M[1],N=v.useState(g!==void 0?g:i),C=Rn(N,2),w=C[0],E=C[1],T=v.useCallback(function(z,U){typeof c=="function"&&c(z,U),E(z)},[c]),P=v.useCallback(function(z,U){var j;typeof d=="function"&&(j=d(z,U)),_(j!==void 0?j:z)},[d]),L=v.useCallback(function(){typeof f=="function"&&f(),k(!0)},[f]),F=v.useCallback(function(){typeof u=="function"&&u(),k(!1)},[u]),A=a!==void 0?a:b,D=l!==void 0?l:S,O=g!==void 0?g:w;return Me(Me({},m),{},{inputValue:A,menuIsOpen:D,onChange:T,onInputChange:P,onMenuClose:F,onMenuOpen:L,value:O})}function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(null,arguments)}function uw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pf(r.key),r)}}function fw(e,t,n){return t&&vf(e.prototype,t),n&&vf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $l(e,t){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$l(e,t)}function hw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$l(e,t)}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(e)}function xf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xf=function(){return!!e})()}function gw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pw(e,t){if(t&&(Mr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gw(e)}function mw(e){var t=xf();return function(){var n,r=ui(e);if(t){var s=ui(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return pw(this,n)}}function bw(e){if(Array.isArray(e))return Pl(e)}function yw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function os(e){return bw(e)||yw(e)||bf(e)||vw()}function xw(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ww(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var kw=(function(){function e(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ww(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=xw(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Xt="-ms-",fi="-moz-",rt="-webkit-",wf="comm",Fl="rule",zl="decl",Cw="@import",kf="@keyframes",Sw="@layer",_w=Math.abs,hi=String.fromCharCode,Ew=Object.assign;function Mw(e,t){return jt(e,0)^45?(((t<<2^jt(e,0))<<2^jt(e,1))<<2^jt(e,2))<<2^jt(e,3):0}function Cf(e){return e.trim()}function Nw(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function Vl(e,t){return e.indexOf(t)}function jt(e,t){return e.charCodeAt(t)|0}function Zs(e,t,n){return e.slice(t,n)}function Un(e){return e.length}function Hl(e){return e.length}function gi(e,t){return t.push(e),e}function Ow(e,t){return e.map(t).join("")}var pi=1,is=1,Sf=0,on=0,Nt=0,as="";function mi(e,t,n,r,s,o,i){return{value:e,root:t,parent:n,type:r,props:s,children:o,line:pi,column:is,length:i,return:""}}function Qs(e,t){return Ew(mi("",null,null,"",null,null,0),e,{length:-e.length},t)}function Tw(){return Nt}function Aw(){return Nt=on>0?jt(as,--on):0,is--,Nt===10&&(is=1,pi--),Nt}function yn(){return Nt=on<Sf?jt(as,on++):0,is++,Nt===10&&(is=1,pi++),Nt}function Bn(){return jt(as,on)}function bi(){return on}function Js(e,t){return Zs(as,e,t)}function Rs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _f(e){return pi=is=1,Sf=Un(as=e),on=0,[]}function Ef(e){return as="",e}function yi(e){return Cf(Js(on-1,Ul(e===91?e+2:e===40?e+1:e)))}function Dw(e){for(;(Nt=Bn())&&Nt<33;)yn();return Rs(e)>2||Rs(Nt)>3?"":" "}function Iw(e,t){for(;--t&&yn()&&!(Nt<48||Nt>102||Nt>57&&Nt<65||Nt>70&&Nt<97););return Js(e,bi()+(t<6&&Bn()==32&&yn()==32))}function Ul(e){for(;yn();)switch(Nt){case e:return on;case 34:case 39:e!==34&&e!==39&&Ul(Nt);break;case 40:e===41&&Ul(e);break;case 92:yn();break}return on}function Lw(e,t){for(;yn()&&e+Nt!==57;)if(e+Nt===84&&Bn()===47)break;return"/*"+Js(t,on-1)+"*"+hi(e===47?e:yn())}function Pw(e){for(;!Rs(Bn());)yn();return Js(e,on)}function $w(e){return Ef(vi("",null,null,null,[""],e=_f(e),0,[0],e))}function vi(e,t,n,r,s,o,i,a,l){for(var c=0,d=0,u=i,f=0,g=0,m=0,p=1,y=1,b=1,_=0,x="",M=s,S=o,k=r,N=x;y;)switch(m=_,_=yn()){case 40:if(m!=108&&jt(N,u-1)==58){Vl(N+=st(yi(_),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=yi(_);break;case 9:case 10:case 13:case 32:N+=Dw(m);break;case 92:N+=Iw(bi()-1,7);continue;case 47:switch(Bn()){case 42:case 47:gi(Fw(Lw(yn(),bi()),t,n),l);break;default:N+="/"}break;case 123*p:a[c++]=Un(N)*b;case 125*p:case 59:case 0:switch(_){case 0:case 125:y=0;case 59+d:b==-1&&(N=st(N,/\f/g,"")),g>0&&Un(N)-u&&gi(g>32?Nf(N+";",r,n,u-1):Nf(st(N," ","")+";",r,n,u-2),l);break;case 59:N+=";";default:if(gi(k=Mf(N,t,n,c,d,s,a,x,M=[],S=[],u),o),_===123)if(d===0)vi(N,t,k,k,M,o,u,a,S);else switch(f===99&&jt(N,3)===110?100:f){case 100:case 108:case 109:case 115:vi(e,k,k,r&&gi(Mf(e,k,k,0,0,s,a,x,s,M=[],u),S),s,S,u,a,r?M:S);break;default:vi(N,k,k,k,[""],S,0,a,S)}}c=d=g=0,p=b=1,x=N="",u=i;break;case 58:u=1+Un(N),g=m;default:if(p<1){if(_==123)--p;else if(_==125&&p++==0&&Aw()==125)continue}switch(N+=hi(_),_*p){case 38:b=d>0?1:(N+="\f",-1);break;case 44:a[c++]=(Un(N)-1)*b,b=1;break;case 64:Bn()===45&&(N+=yi(yn())),f=Bn(),d=u=Un(x=N+=Pw(bi())),_++;break;case 45:m===45&&Un(N)==2&&(p=0)}}return o}function Mf(e,t,n,r,s,o,i,a,l,c,d){for(var u=s-1,f=s===0?o:[""],g=Hl(f),m=0,p=0,y=0;m<r;++m)for(var b=0,_=Zs(e,u+1,u=_w(p=i[m])),x=e;b<g;++b)(x=Cf(p>0?f[b]+" "+_:st(_,/&\f/g,f[b])))&&(l[y++]=x);retu
Line truncated
|
||||
`})]}):null},aw=(e,t)=>window.G7Core?.t?.(e,t)??e,lw=({options:e})=>{const t=document.documentElement.classList.contains("dark"),n=t?"rgb(17,24,39)":"rgb(249,250,251)",r=t?"#6b7280":"#9ca3af",s=t?"#9ca3af":"#6b7280";return h.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[h.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${r}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),h.jsx("span",{style:{color:s,fontSize:"14px"},children:e?.text||aw("nav.loading")})]})};function Mr(e){"@babel/helpers - typeof";return Mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(e)}function cw(e,t){if(Mr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bf(e){var t=cw(e,"string");return Mr(t)=="symbol"?t:t+""}function qs(e,t,n){return(t=bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yf(Object(n),!0).forEach(function(r){qs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dw(e){if(Array.isArray(e))return e}function uw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function $l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vf(e,t){if(e){if(typeof e=="string")return $l(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$l(e,t):void 0}}function fw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rn(e,t){return dw(e)||uw(e,t)||vf(e,t)||fw()}function hw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hn(e,t){if(e==null)return{};var n,r,s=hw(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var gw=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function xf(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,s=r===void 0?!1:r,o=e.defaultValue,i=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,u=e.onMenuClose,f=e.onMenuOpen,g=e.value,m=Hn(e,gw),p=v.useState(a!==void 0?a:n),y=Rn(p,2),b=y[0],_=y[1],x=v.useState(l!==void 0?l:s),M=Rn(x,2),S=M[0],k=M[1],N=v.useState(g!==void 0?g:i),C=Rn(N,2),w=C[0],E=C[1],T=v.useCallback(function(z,U){typeof c=="function"&&c(z,U),E(z)},[c]),P=v.useCallback(function(z,U){var j;typeof d=="function"&&(j=d(z,U)),_(j!==void 0?j:z)},[d]),L=v.useCallback(function(){typeof f=="function"&&f(),k(!0)},[f]),F=v.useCallback(function(){typeof u=="function"&&u(),k(!1)},[u]),A=a!==void 0?a:b,D=l!==void 0?l:S,O=g!==void 0?g:w;return Me(Me({},m),{},{inputValue:A,menuIsOpen:D,onChange:T,onInputChange:P,onMenuClose:F,onMenuOpen:L,value:O})}function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(null,arguments)}function pw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bf(r.key),r)}}function mw(e,t,n){return t&&wf(e.prototype,t),n&&wf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fl(e,t){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Fl(e,t)}function bw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fl(e,t)}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(e)}function kf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kf=function(){return!!e})()}function yw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vw(e,t){if(t&&(Mr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yw(e)}function xw(e){var t=kf();return function(){var n,r=ui(e);if(t){var s=ui(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return vw(this,n)}}function ww(e){if(Array.isArray(e))return $l(e)}function kw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function os(e){return ww(e)||kw(e)||vf(e)||Cw()}function Sw(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function _w(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Ew=(function(){function e(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(_w(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Sw(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Xt="-ms-",fi="-moz-",rt="-webkit-",Cf="comm",zl="rule",Vl="decl",Mw="@import",Sf="@keyframes",Nw="@layer",Ow=Math.abs,hi=String.fromCharCode,Tw=Object.assign;function Aw(e,t){return jt(e,0)^45?(((t<<2^jt(e,0))<<2^jt(e,1))<<2^jt(e,2))<<2^jt(e,3):0}function _f(e){return e.trim()}function Dw(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function Hl(e,t){return e.indexOf(t)}function jt(e,t){return e.charCodeAt(t)|0}function Zs(e,t,n){return e.slice(t,n)}function Un(e){return e.length}function Ul(e){return e.length}function gi(e,t){return t.push(e),e}function Iw(e,t){return e.map(t).join("")}var pi=1,is=1,Ef=0,on=0,Nt=0,as="";function mi(e,t,n,r,s,o,i){return{value:e,root:t,parent:n,type:r,props:s,children:o,line:pi,column:is,length:i,return:""}}function Qs(e,t){return Tw(mi("",null,null,"",null,null,0),e,{length:-e.length},t)}function Lw(){return Nt}function Pw(){return Nt=on>0?jt(as,--on):0,is--,Nt===10&&(is=1,pi--),Nt}function yn(){return Nt=on<Ef?jt(as,on++):0,is++,Nt===10&&(is=1,pi++),Nt}function Bn(){return jt(as,on)}function bi(){return on}function Js(e,t){return Zs(as,e,t)}function Rs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Mf(e){return pi=is=1,Ef=Un(as=e),on=0,[]}function Nf(e){return as="",e}function yi(e){return _f(Js(on-1,Bl(e===91?e+2:e===40?e+1:e)))}function $w(e){for(;(Nt=Bn())&&Nt<33;)yn();return Rs(e)>2||Rs(Nt)>3?"":" "}function Fw(e,t){for(;--t&&yn()&&!(Nt<48||Nt>102||Nt>57&&Nt<65||Nt>70&&Nt<97););return Js(e,bi()+(t<6&&Bn()==32&&yn()==32))}function Bl(e){for(;yn();)switch(Nt){case e:return on;case 34:case 39:e!==34&&e!==39&&Bl(Nt);break;case 40:e===41&&Bl(e);break;case 92:yn();break}return on}function zw(e,t){for(;yn()&&e+Nt!==57;)if(e+Nt===84&&Bn()===47)break;return"/*"+Js(t,on-1)+"*"+hi(e===47?e:yn())}function Vw(e){for(;!Rs(Bn());)yn();return Js(e,on)}function Hw(e){return Nf(vi("",null,null,null,[""],e=Mf(e),0,[0],e))}function vi(e,t,n,r,s,o,i,a,l){for(var c=0,d=0,u=i,f=0,g=0,m=0,p=1,y=1,b=1,_=0,x="",M=s,S=o,k=r,N=x;y;)switch(m=_,_=yn()){case 40:if(m!=108&&jt(N,u-1)==58){Hl(N+=st(yi(_),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=yi(_);break;case 9:case 10:case 13:case 32:N+=$w(m);break;case 92:N+=Fw(bi()-1,7);continue;case 47:switch(Bn()){case 42:case 47:gi(Uw(zw(yn(),bi()),t,n),l);break;default:N+="/"}break;case 123*p:a[c++]=Un(N)*b;case 125*p:case 59:case 0:switch(_){case 0:case 125:y=0;case 59+d:b==-1&&(N=st(N,/\f/g,"")),g>0&&Un(N)-u&&gi(g>32?Tf(N+";",r,n,u-1):Tf(st(N," ","")+";",r,n,u-2),l);break;case 59:N+=";";default:if(gi(k=Of(N,t,n,c,d,s,a,x,M=[],S=[],u),o),_===123)if(d===0)vi(N,t,k,k,M,o,u,a,S);else switch(f===99&&jt(N,3)===110?100:f){case 100:case 108:case 109:case 115:vi(e,k,k,r&&gi(Of(e,k,k,0,0,s,a,x,s,M=[],u),S),s,S,u,a,r?M:S);break;default:vi(N,k,k,k,[""],S,0,a,S)}}c=d=g=0,p=b=1,x=N="",u=i;break;case 58:u=1+Un(N),g=m;default:if(p<1){if(_==123)--p;else if(_==125&&p++==0&&Pw()==125)continue}switch(N+=hi(_),_*p){case 38:b=d>0?1:(N+="\f",-1);break;case 44:a[c++]=(Un(N)-1)*b,b=1;break;case 64:Bn()===45&&(N+=yi(yn())),f=Bn(),d=u=Un(x=N+=Vw(bi())),_++;break;case 45:m===45&&Un(N)==2&&(p=0)}}return o}function Of(e,t,n,r,s,o,i,a,l,c,d){for(var u=s-1,f=s===0?o:[""],g=Ul(f),m=0,p=0,y=0;m<r;++m)for(var b=0,_=Zs(e,u+1,u=Ow(p=i[m])),x=e;b<g;++b)(x=_f(p>0?f[b]+" "+_:st(_,/&\f/g,f[b])))&&(l[y++]=x);retu
Line truncated
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Af;function Zw(){if(Af)return it;Af=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var k=S.$$typeof;switch(k){case t:switch(S=S.type,S){case l:case c:case r:case o:case s:case u:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case m:case g:case i:return S;default:return k}}case n:return k}}}function M(S){return x(S)===c}return it.AsyncMode=l,it.ConcurrentMode=c,it.ContextConsumer=a,it.ContextProvider=i,it.Element=t,it.ForwardRef=d,it.Fragment=r,it.Lazy=m,it.Memo=g,it.Portal=n,it.Profiler=o,it.StrictMode=s,it.Suspense=u,it.isAsyncMode=function(S){return M(S)||x(S)===l},it.isConcurrentMode=M,it.isContextConsumer=function(S){return x(S)===a},it.isContextProvider=function(S){return x(S)===i},it.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},it.isForwardRef=function(S){return x(S)===d},it.isFragment=function(S){return x(S)===r},it.isLazy=function(S){return x(S)===m},it.isMemo=function(S){return x(S)===g},it.isPortal=function(S){return x(S)===n},it.isProfiler=function(S){return x(S)===o},it.isStrictMode=function(S){return x(S)===s},it.isSuspense=function(S){return x(S)===u},it.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===o||S===s||S===u||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===g||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===y||S.$$typeof===b||S.$$typeof===_||S.$$typeof===p)},it.typeOf=x,it}var Df;function Qw(){return Df||(Df=1,Bl.exports=Zw()),Bl.exports}var jl,If;function Jw(){if(If)return jl;If=1;var e=Qw(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=s;function i(m){return e.isMemo(m)?s:o[m.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,y){if(typeof p!="string"){if(f){var b=u(p);b&&b!==f&&g(m,b,y)}var _=l(p);c&&(_=_.concat(c(p)));for(var x=i(m),M=i(p),S=0;S<_.length;++S){var k=_[S];if(!n[k]&&!(y&&y[k])&&!(M&&M[k])&&!(x&&x[k])){var N=d(p,k);try{a(m,k,N)}catch{}}}}return m}return jl=g,jl}Jw();var Rw=!0;function e1(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var Lf=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||Rw===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},t1=function(t,n,r){Lf(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+s:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function n1(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var r1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},s1=/[A-Z]|^ms/g,o1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pf=function(t){return t.charCodeAt(1)===45},$f=functioLine truncated
|
||||
*/var If;function e1(){if(If)return it;If=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var k=S.$$typeof;switch(k){case t:switch(S=S.type,S){case l:case c:case r:case o:case s:case u:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case m:case g:case i:return S;default:return k}}case n:return k}}}function M(S){return x(S)===c}return it.AsyncMode=l,it.ConcurrentMode=c,it.ContextConsumer=a,it.ContextProvider=i,it.Element=t,it.ForwardRef=d,it.Fragment=r,it.Lazy=m,it.Memo=g,it.Portal=n,it.Profiler=o,it.StrictMode=s,it.Suspense=u,it.isAsyncMode=function(S){return M(S)||x(S)===l},it.isConcurrentMode=M,it.isContextConsumer=function(S){return x(S)===a},it.isContextProvider=function(S){return x(S)===i},it.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},it.isForwardRef=function(S){return x(S)===d},it.isFragment=function(S){return x(S)===r},it.isLazy=function(S){return x(S)===m},it.isMemo=function(S){return x(S)===g},it.isPortal=function(S){return x(S)===n},it.isProfiler=function(S){return x(S)===o},it.isStrictMode=function(S){return x(S)===s},it.isSuspense=function(S){return x(S)===u},it.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===o||S===s||S===u||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===g||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===y||S.$$typeof===b||S.$$typeof===_||S.$$typeof===p)},it.typeOf=x,it}var Lf;function t1(){return Lf||(Lf=1,jl.exports=e1()),jl.exports}var Wl,Pf;function n1(){if(Pf)return Wl;Pf=1;var e=t1(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=s;function i(m){return e.isMemo(m)?s:o[m.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,y){if(typeof p!="string"){if(f){var b=u(p);b&&b!==f&&g(m,b,y)}var _=l(p);c&&(_=_.concat(c(p)));for(var x=i(m),M=i(p),S=0;S<_.length;++S){var k=_[S];if(!n[k]&&!(y&&y[k])&&!(M&&M[k])&&!(x&&x[k])){var N=d(p,k);try{a(m,k,N)}catch{}}}}return m}return Wl=g,Wl}n1();var r1=!0;function s1(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var $f=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||r1===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},o1=function(t,n,r){$f(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+s:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function i1(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var a1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},l1=/[A-Z]|^ms/g,c1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ff=function(t){return t.charCodeAt(1)===45},zf=functioLine truncated
|
||||
0%, 80%, 100% { opacity: 0; }
|
||||
40% { opacity: 1; }
|
||||
`]))),Sk=function(t,n){var r=t.isFocused,s=t.size,o=t.theme,i=o.colors,a=o.spacing.baseUnit;return Me({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2})},ec=function(t){var n=t.delay,r=t.offset;return Ee("span",{css:Kl({animation:"".concat(Ck," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},_k=function(t){var n=t.innerProps,r=t.isRtl,s=t.size,o=s===void 0?4:s,i=Hn(t,pk);return Ee("div",De({},Ct(Me(Me({},i),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ee(ec,{delay:0,offset:r}),Ee(ec,{delay:160,offset:!0}),Ee(ec,{delay:320,offset:!r}))},Ek=function(t,n){var r=t.isDisabled,s=t.isFocused,o=t.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Me({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:s?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:s?i.primary:i.neutral30}})},Mk=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,o=t.innerRef,i=t.innerProps,a=t.menuIsOpen;return Ee("div",De({ref:o},Ct(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),i,{"aria-disabled":r||void 0}),n)},Nk=Mk,Ok=["data"],Tk=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Ak=function(t){var n=t.children,r=t.cx,s=t.getStyles,o=t.getClassNames,i=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,u=t.selectProps;return Ee("div",De({},Ct(t,"group",{group:!0}),l),Ee(i,De({},a,{selectProps:u,theme:d,getStyles:s,getClassNames:o,cx:r}),c),Ee("div",null,n))},Dk=function(t,n){var r=t.theme,s=r.colors,o=r.spacing;return Me({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Ik=function(t){var n=Zf(t);n.data;var r=Hn(n,Ok);return Ee("div",De({},Ct(t,"groupHeading",{"group-heading":!0}),r))},Lk=Ak,Pk=["innerRef","isDisabled","isHidden","inputClassName"],$k=function(t,n){var r=t.isDisabled,s=t.value,o=t.theme,i=o.spacing,a=o.colors;return Me(Me({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},Fk),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},lh={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Fk={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Me({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},lh)},zk=function(t){return Me({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},lh)},Vk=function(t){var n=t.cx,r=t.value,s=Zf(t),o=s.innerRef,i=s.isDisabled,a=s.isHidden,l=s.inputClassName,c=Hn(s,Pk);return Ee("div",De({},Ct(t,"input",{"input-container":!0}),{"data-value":r||""}),Ee("input",De({className:n({input:!0},l),ref:o,style:zk(a),disabled:i},c)))},Hk=Vk,Uk=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,i=r.colors;return Me({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},Bk=function(t,n){var r=t.theme,s=r.borderRadius,o=r.colors,i=t.cropWithEllipsis;return Me({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},jk=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,i=r.colors,a=t.isFocused;return Me({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},ch=function(t){var n=t.children,r=t.innerProps;return Ee("div",r,n)},Wk=ch,Gk=ch;function Yk(e){var t=e.children,n=e.innerProps;return Ee("div",De({role:"button"},n),t||Ee(Rl,{size:14}))}var Kk=function(t){var n=t.children,r=t.components,s=t.data,o=t.innerProps,i=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,u=r.Remove;return Ee(c,{data:s,innerProps:Me(Me({},Ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ee(d,{data:s,innerProps:Me({},Ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Ee(u,{data:s,innerProps:Me(Me({},Ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),s
Line truncated
|
||||
`]))),Nk=function(t,n){var r=t.isFocused,s=t.size,o=t.theme,i=o.colors,a=o.spacing.baseUnit;return Me({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2})},tc=function(t){var n=t.delay,r=t.offset;return Ee("span",{css:Xl({animation:"".concat(Mk," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ok=function(t){var n=t.innerProps,r=t.isRtl,s=t.size,o=s===void 0?4:s,i=Hn(t,vk);return Ee("div",De({},Ct(Me(Me({},i),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ee(tc,{delay:0,offset:r}),Ee(tc,{delay:160,offset:!0}),Ee(tc,{delay:320,offset:!r}))},Tk=function(t,n){var r=t.isDisabled,s=t.isFocused,o=t.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Me({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:s?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:s?i.primary:i.neutral30}})},Ak=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,o=t.innerRef,i=t.innerProps,a=t.menuIsOpen;return Ee("div",De({ref:o},Ct(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),i,{"aria-disabled":r||void 0}),n)},Dk=Ak,Ik=["data"],Lk=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Pk=function(t){var n=t.children,r=t.cx,s=t.getStyles,o=t.getClassNames,i=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,u=t.selectProps;return Ee("div",De({},Ct(t,"group",{group:!0}),l),Ee(i,De({},a,{selectProps:u,theme:d,getStyles:s,getClassNames:o,cx:r}),c),Ee("div",null,n))},$k=function(t,n){var r=t.theme,s=r.colors,o=r.spacing;return Me({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Fk=function(t){var n=Jf(t);n.data;var r=Hn(n,Ik);return Ee("div",De({},Ct(t,"groupHeading",{"group-heading":!0}),r))},zk=Pk,Vk=["innerRef","isDisabled","isHidden","inputClassName"],Hk=function(t,n){var r=t.isDisabled,s=t.value,o=t.theme,i=o.spacing,a=o.colors;return Me(Me({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},Uk),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},dh={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Uk={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Me({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},dh)},Bk=function(t){return Me({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},dh)},jk=function(t){var n=t.cx,r=t.value,s=Jf(t),o=s.innerRef,i=s.isDisabled,a=s.isHidden,l=s.inputClassName,c=Hn(s,Vk);return Ee("div",De({},Ct(t,"input",{"input-container":!0}),{"data-value":r||""}),Ee("input",De({className:n({input:!0},l),ref:o,style:Bk(a),disabled:i},c)))},Wk=jk,Gk=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,i=r.colors;return Me({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},Yk=function(t,n){var r=t.theme,s=r.borderRadius,o=r.colors,i=t.cropWithEllipsis;return Me({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Kk=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,i=r.colors,a=t.isFocused;return Me({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},uh=function(t){var n=t.children,r=t.innerProps;return Ee("div",r,n)},Xk=uh,qk=uh;function Zk(e){var t=e.children,n=e.innerProps;return Ee("div",De({role:"button"},n),t||Ee(ec,{size:14}))}var Qk=function(t){var n=t.children,r=t.components,s=t.data,o=t.innerProps,i=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,u=r.Remove;return Ee(c,{data:s,innerProps:Me(Me({},Ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ee(d,{data:s,innerProps:Me({},Ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Ee(u,{data:s,innerProps:Me(Me({},Ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),s
Line truncated
|
||||
px-4 py-2.5 bg-gray-100 dark:bg-gray-700
|
||||
border-0 rounded-xl
|
||||
text-gray-700 dark:text-gray-200 font-medium
|
||||
@@ -195,11 +195,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
hover:bg-gray-100 dark:hover:bg-gray-700
|
||||
transition-colors
|
||||
${A.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
||||
`,role:"option","aria-selected":D,children:[h.jsx(I,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:D&&h.jsx(Jn,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsxs(I,{className:"flex-1 min-w-0",children:[h.jsx(I,{className:`font-medium ${D?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:A.label}),A.description&&h.jsx(I,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:A.description})]})]},A.value)})})]})]})]})},ro={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},tS=({options:e=[],value:t=[],onChange:n,placeholder:r="No items selected",disabled:s=!1,className:o="",id:i,editorAttrs:a})=>{const l=v.useCallback(f=>e.find(m=>String(m.value)===String(f))?.label||String(f),[e]),c=v.useCallback(f=>{if(s)return;const g=t.filter(m=>String(m)!==String(f));n?.(g)},[t,n,s]),d=v.useMemo(()=>t.map(f=>({value:f,label:l(f)})),[t,l]),u=`${ro.container.base} ${s?ro.container.disabled:""} ${o}`.trim();return h.jsx(I,{className:u,id:i,...a,children:d.length===0?h.jsx(J,{className:ro.placeholder,children:r}):d.map(f=>h.jsxs(J,{className:ro.tag,children:[f.label,!s&&h.jsx(J,{className:ro.tagRemove,onClick:()=>c(f.value),role:"button","aria-label":`Remove ${f.label}`,children:h.jsx(Jn,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},f.value))})};function nS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const Li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function us(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function uc(e){return"nodeType"in e}function en(e){var t,n;return e?us(e)?e:uc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function fc(e){const{Document:t}=en(e);return e instanceof t}function so(e){return us(e)?!1:e instanceof en(e).HTMLElement}function Bh(e){return e instanceof en(e).SVGElement}function fs(e){return e?us(e)?e.document:uc(e)?fc(e)?e:so(e)||Bh(e)?e.ownerDocument:document:document:document}const An=Li?v.useLayoutEffect:v.useEffect;function Pi(e){const t=v.useRef(e);return An(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function rS(){const e=v.useRef(null),t=v.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function oo(e,t){t===void 0&&(t=[e]);const n=v.useRef(e);return An(()=>{n.current!==e&&(n.current=e)},t),n}function io(e,t){const n=v.useRef();return v.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function $i(e){const t=Pi(e),n=v.useRef(null),r=v.useCallback(s=>{s!==n.current&&t?.(s,n.current),n.current=s},[]);return[n,r]}function Fi(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let hc={};function ao(e,t){return v.useMemo(()=>{if(t)return t;const n=hc[e]==null?0:hc[e]+1;return hc[e]=n,e+"-"+n},[e,t])}function jh(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},{...t})}}const hs=jh(1),lo=jh(-1);function sS(e){return"clientX"in e&&"clientY"in e}function zi(e){if(!e)return!1;const{KeyboardEvent:t}=en(e.target);return t&&e instanceof t}function oS(e){if(!e)return!1;const{TouchEvent:t}=en(e.target);return t&&e instanceof t}function Vi(e){if(oS(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return sS(e)?{x:e.clientX,y:e.clientY}:null}const Wn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Wn.Translate.toString(e),Wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Wh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function iS(e){return e.matches(Wh)?e:e.querySelector(Wh)}const aS={display:"none"};function lS(e){let{id:t,value:n}=e;return v.createElement("div",{id:t,s
Line truncated
|
||||
`,role:"option","aria-selected":D,children:[h.jsx(I,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:D&&h.jsx(Jn,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsxs(I,{className:"flex-1 min-w-0",children:[h.jsx(I,{className:`font-medium ${D?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:A.label}),A.description&&h.jsx(I,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:A.description})]})]},A.value)})})]})]})]})},ro={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},oS=({options:e=[],value:t=[],onChange:n,placeholder:r="No items selected",disabled:s=!1,className:o="",id:i,editorAttrs:a})=>{const l=v.useCallback(f=>e.find(m=>String(m.value)===String(f))?.label||String(f),[e]),c=v.useCallback(f=>{if(s)return;const g=t.filter(m=>String(m)!==String(f));n?.(g)},[t,n,s]),d=v.useMemo(()=>t.map(f=>({value:f,label:l(f)})),[t,l]),u=`${ro.container.base} ${s?ro.container.disabled:""} ${o}`.trim();return h.jsx(I,{className:u,id:i,...a,children:d.length===0?h.jsx(J,{className:ro.placeholder,children:r}):d.map(f=>h.jsxs(J,{className:ro.tag,children:[f.label,!s&&h.jsx(J,{className:ro.tagRemove,onClick:()=>c(f.value),role:"button","aria-label":`Remove ${f.label}`,children:h.jsx(Jn,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},f.value))})};function iS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const Li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function us(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function fc(e){return"nodeType"in e}function en(e){var t,n;return e?us(e)?e:fc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function hc(e){const{Document:t}=en(e);return e instanceof t}function so(e){return us(e)?!1:e instanceof en(e).HTMLElement}function Wh(e){return e instanceof en(e).SVGElement}function fs(e){return e?us(e)?e.document:fc(e)?hc(e)?e:so(e)||Wh(e)?e.ownerDocument:document:document:document}const An=Li?v.useLayoutEffect:v.useEffect;function Pi(e){const t=v.useRef(e);return An(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function aS(){const e=v.useRef(null),t=v.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function oo(e,t){t===void 0&&(t=[e]);const n=v.useRef(e);return An(()=>{n.current!==e&&(n.current=e)},t),n}function io(e,t){const n=v.useRef();return v.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function $i(e){const t=Pi(e),n=v.useRef(null),r=v.useCallback(s=>{s!==n.current&&t?.(s,n.current),n.current=s},[]);return[n,r]}function Fi(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let gc={};function ao(e,t){return v.useMemo(()=>{if(t)return t;const n=gc[e]==null?0:gc[e]+1;return gc[e]=n,e+"-"+n},[e,t])}function Gh(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},{...t})}}const hs=Gh(1),lo=Gh(-1);function lS(e){return"clientX"in e&&"clientY"in e}function zi(e){if(!e)return!1;const{KeyboardEvent:t}=en(e.target);return t&&e instanceof t}function cS(e){if(!e)return!1;const{TouchEvent:t}=en(e.target);return t&&e instanceof t}function Vi(e){if(cS(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return lS(e)?{x:e.clientX,y:e.clientY}:null}const Wn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Wn.Translate.toString(e),Wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Yh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function dS(e){return e.matches(Yh)?e:e.querySelector(Yh)}const uS={display:"none"};function fS(e){let{id:t,value:n}=e;return v.createElement("div",{id:t,s
Line truncated
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},gS={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function pS(e){let{announcements:t=gS,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=hS}=e;const{announce:o,announcement:i}=dS(),a=ao("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),uS(v.useMemo(()=>({onDragStart(u){let{active:f}=u;o(t.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;t.onDragMove&&o(t.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;o(t.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;o(t.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;o(t.onDragCancel({active:f,over:g}))}}),[o,t])),!l)return null;const d=v.createElement(v.Fragment,null,v.createElement(lS,{id:r,value:s.draggable}),v.createElement(cS,{id:a,announcement:i}));return n?Vn.createPortal(d,n):d}var At;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(At||(At={}));function Hi(){}function gs(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function gc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Dn=Object.freeze({x:0,y:0});function Yh(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function mS(e,t){const n=Vi(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Kh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function bS(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Xh(e){let{left:t,top:n,height:r,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+r},{x:t+s,y:n+r}]}function qh(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Zh(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const pc=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Zh(t,t.left,t.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=Yh(Zh(l),s);o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(Kh)},yS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Xh(t),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=Xh(l),d=s.reduce((f,g,m)=>f+Yh(c[m],g),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(Kh)};function vS(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),i=s-r,a=o-n;if(r<s&&n<o){const l=t.width*t.height,c=e.width*e.height,d=i*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const xS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=vS(a,t);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(bS)};function wS(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Qh(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Dn}function kS(e){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const CS=kS(1);function Jh(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function SS(e,t,n){const r=Jh(t);if(!r)return e;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=e.left-i-(1-s)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?e.width/s:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const _S={ignoreTransform:!1};function ps(e,t){t===void 0&&(t=_S);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=en(e).getComputedStyle(e);c&&(n=SS(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function Rh(e){return ps(e,{ignoreTransform:!0})}function ES(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function MS(e,t){return t===void 0&&(t=en(e).getComputedStyle(e)),t.posit
Line truncated
|
||||
`},yS={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vS(e){let{announcements:t=yS,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=bS}=e;const{announce:o,announcement:i}=gS(),a=ao("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),pS(v.useMemo(()=>({onDragStart(u){let{active:f}=u;o(t.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;t.onDragMove&&o(t.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;o(t.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;o(t.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;o(t.onDragCancel({active:f,over:g}))}}),[o,t])),!l)return null;const d=v.createElement(v.Fragment,null,v.createElement(fS,{id:r,value:s.draggable}),v.createElement(hS,{id:a,announcement:i}));return n?Vn.createPortal(d,n):d}var At;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(At||(At={}));function Hi(){}function gs(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function pc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Dn=Object.freeze({x:0,y:0});function Xh(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function xS(e,t){const n=Vi(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function qh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function wS(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Zh(e){let{left:t,top:n,height:r,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+r},{x:t+s,y:n+r}]}function Qh(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Jh(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const mc=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Jh(t,t.left,t.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=Xh(Jh(l),s);o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(qh)},kS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Zh(t),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=Zh(l),d=s.reduce((f,g,m)=>f+Xh(c[m],g),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(qh)};function CS(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),i=s-r,a=o-n;if(r<s&&n<o){const l=t.width*t.height,c=e.width*e.height,d=i*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const SS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=CS(a,t);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(wS)};function _S(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Rh(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Dn}function ES(e){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const MS=ES(1);function eg(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function NS(e,t,n){const r=eg(t);if(!r)return e;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=e.left-i-(1-s)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?e.width/s:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const OS={ignoreTransform:!1};function ps(e,t){t===void 0&&(t=OS);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=en(e).getComputedStyle(e);c&&(n=NS(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function tg(e){return ps(e,{ignoreTransform:!0})}function TS(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function AS(e,t){return t===void 0&&(t=en(e).getComputedStyle(e)),t.posit
Line truncated
|
||||
w-full flex items-center justify-between px-3 py-2
|
||||
bg-white dark:bg-gray-800
|
||||
border border-gray-300 dark:border-gray-600 rounded-lg
|
||||
@@ -209,7 +209,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
||||
`,children:[h.jsx(I,{className:"flex items-center gap-2",children:y?h.jsxs(h.Fragment,{children:[h.jsx(ae,{name:y.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),h.jsx(J,{className:"text-gray-900 dark:text-white",children:y.label})]}):h.jsx(J,{className:"text-gray-500 dark:text-gray-400",children:r})}),h.jsx(ae,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${u?"rotate-180":""}`})]}),l&&h.jsx("input",{type:"hidden",name:l,value:e||""}),u&&h.jsxs(I,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[h.jsx(I,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:h.jsx(Et,{type:"text",value:g,onChange:x=>m(x.target.value),placeholder:s,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),h.jsx(I,{className:"max-h-56 overflow-y-auto",children:b.length>0?b.map(x=>h.jsxs(le,{type:"button",onClick:()=>_(x),className:`
|
||||
w-full flex items-center gap-3 px-3 py-2 text-left text-sm
|
||||
${y?.faIcon===x.faIcon?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}
|
||||
`,children:[h.jsx(ae,{name:x.faIcon,className:"w-4 h-4"}),h.jsx(J,{children:x.label}),y?.faIcon===x.faIcon&&h.jsx(ae,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},x.value)):h.jsx(I,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},Nc=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:r="",style:s,children:o,disabled:i=!1,id:a,editorAttrs:l})=>{const[c,d]=v.useState(e),u=t!==void 0,f=u?t:c,g=v.useRef(null),[m,p]=v.useState(e?void 0:0),y=()=>{if(i)return;const _=!f;u||d(_),n?.(_)};v.useEffect(()=>{if(g.current)if(f){p(g.current.scrollHeight);const _=setTimeout(()=>{p(void 0)},300);return()=>clearTimeout(_)}else p(g.current.scrollHeight),requestAnimationFrame(()=>{p(0)})},[f]);const b={};if(v.Children.forEach(o,_=>{if(v.isValidElement(_)){const x=_.props?.slot;x==="trigger"?b.trigger=_:x==="content"&&(b.content=_)}}),!b.trigger&&!b.content){const _=v.Children.toArray(o);_.length>=2?(b.trigger=_[0],b.content=_.slice(1)):_.length===1&&(b.content=_[0])}return h.jsxs(I,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${r}`,style:s,id:a,...l,children:[h.jsxs(le,{type:"button",onClick:y,disabled:i,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${i?"opacity-50 cursor-not-allowed":""} ${f?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":f,children:[h.jsx(I,{className:"flex-1",children:b.trigger}),!b.trigger&&h.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.jsx(I,{ref:g,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:m!==void 0?`${m}px`:"auto"},children:h.jsx(I,{className:"bg-white dark:bg-gray-800",children:b.content})})]})},yo=window.G7Core,Fg=yo?.useControllableState,zg=(e,t)=>window.G7Core?.t?.(e,t)??e,Y_={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},K_=({options:e,value:t,onChange:n,disabled:r=!1})=>{const[s,o]=v.useState(!1),[i,a]=v.useState({}),l=v.useRef(null),c=e.find(u=>u.value===t)??e[0];v.useEffect(()=>{if(!s)return;const u=g=>{l.current&&!l.current.contains(g.target)&&o(!1)},f=()=>{if(!l.current)return;const g=l.current.getBoundingClientRect();a({position:"fixed",top:g.bottom+4,right:window.innerWidth-g.right,zIndex:9999})};return document.addEventListener("mousedown",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[s]);const d=v.useCallback(()=>{if(r||!l.current)return;const u=l.current.getBoundingClientRect();a({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.right,zIndex:9999}),o(f=>!f)},[r]);return h.jsxs(I,{ref:l,className:"relative flex-shrink-0",children:[h.jsxs(I,{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${r?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[h.jsx(J,{children:c?.label??""}),h.jsx(ae,{name:he.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),s&&h.jsx(I,{style:i,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(u=>{const f=u.value??"",g=Y_[f],m=g?zg(g):"",p=u.value===t;return h.jsxs(I,{role:"option","aria-selected":p,onClick:y=>{y.stopPropagation(),y.preventDefault(),n(u.value),o(!1)},onMouseDown:y=>y.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[h.jsx(J,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:u.label}),p&&h.jsx(ae,{name:he.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),m&&h.jsx(J,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:m})]},f||"__null__")})})]})},X_=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((s,o)=>s.id-o.id),r=[...t].sort((s,o)=>s.id-o.id);return n.every((s,o)=>s.id===r[o].id&&s.scope_type===r[o].scope_type)},q_=({data:e=[],value:t=[],onChange:n,scopeOptions:r=[],className:s="",disabled:o=!1,desktopColumns:i=2,inst
Line truncated
|
||||
`,children:[h.jsx(ae,{name:x.faIcon,className:"w-4 h-4"}),h.jsx(J,{children:x.label}),y?.faIcon===x.faIcon&&h.jsx(ae,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},x.value)):h.jsx(I,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},Oc=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:r="",style:s,children:o,disabled:i=!1,id:a,editorAttrs:l})=>{const[c,d]=v.useState(e),u=t!==void 0,f=u?t:c,g=v.useRef(null),[m,p]=v.useState(e?void 0:0),y=()=>{if(i)return;const _=!f;u||d(_),n?.(_)};v.useEffect(()=>{if(g.current)if(f){p(g.current.scrollHeight);const _=setTimeout(()=>{p(void 0)},300);return()=>clearTimeout(_)}else p(g.current.scrollHeight),requestAnimationFrame(()=>{p(0)})},[f]);const b={};if(v.Children.forEach(o,_=>{if(v.isValidElement(_)){const x=_.props?.slot;x==="trigger"?b.trigger=_:x==="content"&&(b.content=_)}}),!b.trigger&&!b.content){const _=v.Children.toArray(o);_.length>=2?(b.trigger=_[0],b.content=_.slice(1)):_.length===1&&(b.content=_[0])}return h.jsxs(I,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${r}`,style:s,id:a,...l,children:[h.jsxs(le,{type:"button",onClick:y,disabled:i,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${i?"opacity-50 cursor-not-allowed":""} ${f?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":f,children:[h.jsx(I,{className:"flex-1",children:b.trigger}),!b.trigger&&h.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.jsx(I,{ref:g,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:m!==void 0?`${m}px`:"auto"},children:h.jsx(I,{className:"bg-white dark:bg-gray-800",children:b.content})})]})},yo=window.G7Core,Vg=yo?.useControllableState,Hg=(e,t)=>window.G7Core?.t?.(e,t)??e,Z_={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Q_=({options:e,value:t,onChange:n,disabled:r=!1})=>{const[s,o]=v.useState(!1),[i,a]=v.useState({}),l=v.useRef(null),c=e.find(u=>u.value===t)??e[0];v.useEffect(()=>{if(!s)return;const u=g=>{l.current&&!l.current.contains(g.target)&&o(!1)},f=()=>{if(!l.current)return;const g=l.current.getBoundingClientRect();a({position:"fixed",top:g.bottom+4,right:window.innerWidth-g.right,zIndex:9999})};return document.addEventListener("mousedown",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[s]);const d=v.useCallback(()=>{if(r||!l.current)return;const u=l.current.getBoundingClientRect();a({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.right,zIndex:9999}),o(f=>!f)},[r]);return h.jsxs(I,{ref:l,className:"relative flex-shrink-0",children:[h.jsxs(I,{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${r?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[h.jsx(J,{children:c?.label??""}),h.jsx(ae,{name:he.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),s&&h.jsx(I,{style:i,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(u=>{const f=u.value??"",g=Z_[f],m=g?Hg(g):"",p=u.value===t;return h.jsxs(I,{role:"option","aria-selected":p,onClick:y=>{y.stopPropagation(),y.preventDefault(),n(u.value),o(!1)},onMouseDown:y=>y.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[h.jsx(J,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:u.label}),p&&h.jsx(ae,{name:he.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),m&&h.jsx(J,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:m})]},f||"__null__")})})]})},J_=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((s,o)=>s.id-o.id),r=[...t].sort((s,o)=>s.id-o.id);return n.every((s,o)=>s.id===r[o].id&&s.scope_type===r[o].scope_type)},R_=({data:e=[],value:t=[],onChange:n,scopeOptions:r=[],className:s="",disabled:o=!1,desktopColumns:i=2,inst
Line truncated
|
||||
let scriptImported = false
|
||||
self.addEventListener('message', async (e) => {
|
||||
const { file, id, imageCompressionLibUrl, options } = e.data
|
||||
@@ -228,11 +228,11 @@ self.addEventListener('message', async (e) => {
|
||||
self.postMessage({ error: e.message + '\\n' + e.stack, id })
|
||||
}
|
||||
})
|
||||
`;let od;function fM(e,t){return new Promise(((n,r)=>{od||(od=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(uM));const s=new Worker(od);s.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)s.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void s.terminate();n(i.data.file),s.terminate()}else t.onProgress(i.data.progress)})),s.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),s.terminate()})),s.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Qt(e,t){return new Promise((function(n,r){let s,o,i,a,l,c;if(s={...t},i=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=g=>{i=g,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof dM))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(c=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||c)return a0(e,s).then(function(g){try{return o=g,f.call(this)}catch(m){return r(m)}}.bind(this),r);var d=function(){try{return f.call(this)}catch(g){return r(g)}}.bind(this),u=function(g){try{return a0(e,s).then((function(m){try{return o=m,d()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",fM(e,s).then((function(g){try{return o=g,d()}catch{return u()}}),u)}catch{u()}function f(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{s.preserveExif&&e.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===e.type)&&(o=Zp(e,o))}catch{}return n(o)}}))}Qt.getDataUrlFromFile=e0,Qt.getFilefromDataUrl=sd,Qt.loadImage=t0,Qt.drawImageInCanvas=r0,Qt.drawFileInCanvas=ua,Qt.canvasToFile=fa,Qt.getExifOrientation=s0,Qt.handleMaxWidthOrHeight=o0,Qt.followExifOrientation=i0,Qt.cleanupCanvasMemory=Gn,Qt.isAutoOrientationInBrowser=_s,Qt.approximateBelowMaximumCanvasSizeOfBrowser=n0,Qt.copyExifWithoutOrientation=Zp,Qt.getBrowserName=$r,Qt.version="2.0.2";const hM=window.G7Core,id=e=>{const t=["B","KB","MB","GB"];let n=0,r=e;for(;r>=1024&&n<t.length-1;)r/=1024,n++;return`${r.toFixed(2)} ${t[n]}`},gM=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},pM=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",Ht=(e,t)=>hM?.t?.(e,t)??e,l0=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},mM="2.0.2";function bM(){const e=window?.G7Core?.asset;if(typeof e?.template=="function")return e.template("sirsoft-admin_basic",`vendor/browser-image-compression/${mM}/browser-image-compression.js`)}const Fr=window.G7Core;function yM(e){const{attachmentableType:t,attachmentableId:n,collection:r,maxFiles:s,maxSize:o,maxConcurrentUploads:i,accept:a,imageCompression:l,roleIds:c,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:g,onUploadComplete:m,onUploadError:p,onRemove:y,onReorder:b,uploadTriggerEvent:_,confirmBeforeRemove:x,uploadParams:M}=e,[S,k]=v.useState(u),[N,C]=v.useState([]),[w,E]=v.useState(!1),T=v.useRef(null),P=v.useRef(0),L=v.useRef(new Set),F=v.useRef(new Map),A=v.useRef(null),[D,O]=v.useState(!1),[z,U]=v.useState(null),[j,Y]=v.useState(!1),B=v.useRef(!1),[W,G]=v.useState([]),[V,X]=v.useState(!1),[K,Q]=v.useState(0),ne=v.useRef(0),[se,ue]=v.useState(new Map),ee=v.useRef(new Map),me=v.useRef(g);me.current=g,v.useEffect(()=>{me.current?.(N)},[N]),v.useEffect(()=>{if(B.current)return;const te=u.filter(xe=>!L.current.has(xe.id)&&(!xe.hash||!L.current.has(xe.hash))),pe=new Set(te.map(xe=>xe.id)),we=Array.from(F.current.values()).filter(xe=>!pe.has(xe.id)&&!L.current.has(xe.id));k([...te,...we])},[u]);const ie=v.useCallback(async te=>{const pe={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0,libURL:bM()};return await Qt(te,pe)},[l]),de=v.useCallback(async te=>{const pe=S.length+N.length,we=Math.max(0,s-pe),xe=Array.from(te).slice(0,we);if(te.length>we){const ke=Array.from(te).slice(we),Be=Ht("attachment.upload_limit_exceeded",{max:s});p?.(Be,ke[0]??te[0])}for(const ke of
Line truncated
|
||||
`;let id;function mM(e,t){return new Promise(((n,r)=>{id||(id=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(pM));const s=new Worker(id);s.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)s.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void s.terminate();n(i.data.file),s.terminate()}else t.onProgress(i.data.progress)})),s.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),s.terminate()})),s.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Qt(e,t){return new Promise((function(n,r){let s,o,i,a,l,c;if(s={...t},i=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=g=>{i=g,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof gM))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(c=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||c)return c0(e,s).then(function(g){try{return o=g,f.call(this)}catch(m){return r(m)}}.bind(this),r);var d=function(){try{return f.call(this)}catch(g){return r(g)}}.bind(this),u=function(g){try{return c0(e,s).then((function(m){try{return o=m,d()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",mM(e,s).then((function(g){try{return o=g,d()}catch{return u()}}),u)}catch{u()}function f(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{s.preserveExif&&e.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===e.type)&&(o=Jp(e,o))}catch{}return n(o)}}))}Qt.getDataUrlFromFile=n0,Qt.getFilefromDataUrl=od,Qt.loadImage=r0,Qt.drawImageInCanvas=o0,Qt.drawFileInCanvas=ua,Qt.canvasToFile=fa,Qt.getExifOrientation=i0,Qt.handleMaxWidthOrHeight=a0,Qt.followExifOrientation=l0,Qt.cleanupCanvasMemory=Gn,Qt.isAutoOrientationInBrowser=_s,Qt.approximateBelowMaximumCanvasSizeOfBrowser=s0,Qt.copyExifWithoutOrientation=Jp,Qt.getBrowserName=$r,Qt.version="2.0.2";const bM=window.G7Core,ad=e=>{const t=["B","KB","MB","GB"];let n=0,r=e;for(;r>=1024&&n<t.length-1;)r/=1024,n++;return`${r.toFixed(2)} ${t[n]}`},yM=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},vM=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",Ht=(e,t)=>bM?.t?.(e,t)??e,d0=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},xM="2.0.2";function wM(){const e=window?.G7Core?.asset;if(typeof e?.template=="function")return e.template("sirsoft-admin_basic",`vendor/browser-image-compression/${xM}/browser-image-compression.js`)}const Fr=window.G7Core;function kM(e){const{attachmentableType:t,attachmentableId:n,collection:r,maxFiles:s,maxSize:o,maxConcurrentUploads:i,accept:a,imageCompression:l,roleIds:c,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:g,onUploadComplete:m,onUploadError:p,onRemove:y,onReorder:b,uploadTriggerEvent:_,confirmBeforeRemove:x,uploadParams:M}=e,[S,k]=v.useState(u),[N,C]=v.useState([]),[w,E]=v.useState(!1),T=v.useRef(null),P=v.useRef(0),L=v.useRef(new Set),F=v.useRef(new Map),A=v.useRef(null),[D,O]=v.useState(!1),[z,U]=v.useState(null),[j,Y]=v.useState(!1),B=v.useRef(!1),[W,G]=v.useState([]),[V,X]=v.useState(!1),[K,Q]=v.useState(0),ne=v.useRef(0),[se,ue]=v.useState(new Map),ee=v.useRef(new Map),me=v.useRef(g);me.current=g,v.useEffect(()=>{me.current?.(N)},[N]),v.useEffect(()=>{if(B.current)return;const te=u.filter(xe=>!L.current.has(xe.id)&&(!xe.hash||!L.current.has(xe.hash))),pe=new Set(te.map(xe=>xe.id)),we=Array.from(F.current.values()).filter(xe=>!pe.has(xe.id)&&!L.current.has(xe.id));k([...te,...we])},[u]);const ie=v.useCallback(async te=>{const pe={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0,libURL:wM()};return await Qt(te,pe)},[l]),de=v.useCallback(async te=>{const pe=S.length+N.length,we=Math.max(0,s-pe),xe=Array.from(te).slice(0,we);if(te.length>we){const ke=Array.from(te).slice(we),Be=Ht("attachment.upload_limit_exceeded",{max:s});p?.(Be,ke[0]??te[0])}for(const ke of
Line truncated
|
||||
relative border-2 border-dashed rounded-lg transition-colors
|
||||
${l?"opacity-60 cursor-not-allowed":""}
|
||||
${e&&!l?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
|
||||
`,onDragOver:u=>{u.preventDefault(),d&&r(!0)},onDragLeave:()=>r(!1),onDrop:u=>{u.preventDefault(),r(!1),d&&n(u.dataTransfer.files)},children:[h.jsx("input",{ref:s,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.target.files),className:"hidden",disabled:l}),!c&&h.jsxs(I,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&s.current?.click(),children:[h.jsx(yt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),h.jsx(kt,{className:"text-sm text-gray-600 dark:text-gray-400",children:Ht("attachment.drop_or_click")}),h.jsxs(kt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[Ht("attachment.upload_limit",{maxFiles:i,maxSize:a}),o&&` (${o})`]})]}),c]})},xM=window.G7Core,wM=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},kM=({file:e,onRemove:t,onRetry:n,onImageClick:r,onDownload:s,isPrimary:o,onPrimaryClick:i,disabled:a})=>{const{attributes:l,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:g}=Zi({id:"hash"in e?e.hash:e.id}),m={transform:Wn.Transform.toString(u),transition:f,opacity:g?.5:1},p="status"in e&&e.status!==void 0,y=p?e.status:"done",b=y==="uploading",_=y==="compressing",x=y==="error",M=p?e.progress:100,S=p?e.preview:void 0,k=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[N,C]=v.useState(void 0),w=!p&&k?e.download_url:void 0;v.useEffect(()=>{if(!w){C(void 0);return}if(ed(w)){C(w);return}let T=!0,P;return(async()=>{try{const F=await xM.api.get(w,{responseType:"blob"});T&&F&&(P=URL.createObjectURL(F),C(P))}catch(F){wM.error("Failed to load authenticated image:",F)}})(),()=>{T=!1,P&&URL.revokeObjectURL(P)}},[w]);const E=N;return h.jsxs(I,{ref:d,style:m,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[h.jsxs(I,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${k||!p?"cursor-pointer":""}`,onClick:()=>{b||_||(k&&r?r():!p&&s&&s())},children:[S||E?h.jsx(Nn,{src:S||E,alt:e.original_filename,className:"w-full h-full object-cover"}):h.jsx(yt,{className:`fa-solid ${pM(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||_)&&h.jsxs(I,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[h.jsx(I,{className:"w-3/4 h-2 bg-gray-700 dark:bg-gray-600 rounded-full overflow-hidden",children:h.jsx(I,{className:"h-full bg-blue-500 dark:bg-blue-400 transition-all",style:{width:`${M}%`}})}),h.jsxs(J,{className:"text-white text-xs mt-1",children:[M,"%"]})]}),x&&h.jsx(I,{className:"absolute inset-0 bg-red-500/50 dark:bg-red-600/50 flex items-center justify-center",children:h.jsx(yt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),i&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),i()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:Ht(o?"attachment.primary_image":"attachment.set_as_primary"),children:h.jsx(yt,{className:"fa-solid fa-star text-xs"})}),h.jsxs(I,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${a?"hidden":""}`,children:[h.jsx(le,{type:"button",...l,...c,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:Ht("attachment.drag_to_reorder"),onClick:T=>T.stopPropagation(),children:h.jsx(yt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&s&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),s()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:Ht("common.download"),children:h.jsx(yt,{className:"fa-solid fa-download text-sm"})}),x&&n&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:Ht("common.retry"),children:h.jsx(yt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),t()},disabled:b||_,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:Ht("common.delete"),children:h.jsx(yt,{className:"fa-solid fa-times text-sm"})})]})]}),h.jsxs(I,{className:`p-2 ${!p&&s?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&s&&s()},children:[h.jsx(kt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),h.
Line truncated
|
||||
`,onDragOver:u=>{u.preventDefault(),d&&r(!0)},onDragLeave:()=>r(!1),onDrop:u=>{u.preventDefault(),r(!1),d&&n(u.dataTransfer.files)},children:[h.jsx("input",{ref:s,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.target.files),className:"hidden",disabled:l}),!c&&h.jsxs(I,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&s.current?.click(),children:[h.jsx(yt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),h.jsx(kt,{className:"text-sm text-gray-600 dark:text-gray-400",children:Ht("attachment.drop_or_click")}),h.jsxs(kt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[Ht("attachment.upload_limit",{maxFiles:i,maxSize:a}),o&&` (${o})`]})]}),c]})},SM=window.G7Core,_M=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},EM=({file:e,onRemove:t,onRetry:n,onImageClick:r,onDownload:s,isPrimary:o,onPrimaryClick:i,disabled:a})=>{const{attributes:l,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:g}=Zi({id:"hash"in e?e.hash:e.id}),m={transform:Wn.Transform.toString(u),transition:f,opacity:g?.5:1},p="status"in e&&e.status!==void 0,y=p?e.status:"done",b=y==="uploading",_=y==="compressing",x=y==="error",M=p?e.progress:100,S=p?e.preview:void 0,k=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[N,C]=v.useState(void 0),w=!p&&k?e.download_url:void 0;v.useEffect(()=>{if(!w){C(void 0);return}if(td(w)){C(w);return}let T=!0,P;return(async()=>{try{const F=await SM.api.get(w,{responseType:"blob"});T&&F&&(P=URL.createObjectURL(F),C(P))}catch(F){_M.error("Failed to load authenticated image:",F)}})(),()=>{T=!1,P&&URL.revokeObjectURL(P)}},[w]);const E=N;return h.jsxs(I,{ref:d,style:m,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[h.jsxs(I,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${k||!p?"cursor-pointer":""}`,onClick:()=>{b||_||(k&&r?r():!p&&s&&s())},children:[S||E?h.jsx(Nn,{src:S||E,alt:e.original_filename,className:"w-full h-full object-cover"}):h.jsx(yt,{className:`fa-solid ${vM(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||_)&&h.jsxs(I,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[h.jsx(I,{className:"w-3/4 h-2 bg-gray-700 dark:bg-gray-600 rounded-full overflow-hidden",children:h.jsx(I,{className:"h-full bg-blue-500 dark:bg-blue-400 transition-all",style:{width:`${M}%`}})}),h.jsxs(J,{className:"text-white text-xs mt-1",children:[M,"%"]})]}),x&&h.jsx(I,{className:"absolute inset-0 bg-red-500/50 dark:bg-red-600/50 flex items-center justify-center",children:h.jsx(yt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),i&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),i()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:Ht(o?"attachment.primary_image":"attachment.set_as_primary"),children:h.jsx(yt,{className:"fa-solid fa-star text-xs"})}),h.jsxs(I,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${a?"hidden":""}`,children:[h.jsx(le,{type:"button",...l,...c,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:Ht("attachment.drag_to_reorder"),onClick:T=>T.stopPropagation(),children:h.jsx(yt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&s&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),s()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:Ht("common.download"),children:h.jsx(yt,{className:"fa-solid fa-download text-sm"})}),x&&n&&h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:Ht("common.retry"),children:h.jsx(yt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),h.jsx(le,{type:"button",onClick:T=>{T.stopPropagation(),t()},disabled:b||_,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:Ht("common.delete"),children:h.jsx(yt,{className:"fa-solid fa-times text-sm"})})]})]}),h.jsxs(I,{className:`p-2 ${!p&&s?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&s&&s()},children:[h.jsx(kt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),h.
Line truncated
|
||||
${y.radio}
|
||||
text-blue-600
|
||||
bg-gray-100 dark:bg-gray-700
|
||||
@@ -245,10 +245,10 @@ self.addEventListener('message', async (e) => {
|
||||
${y.label}
|
||||
font-medium
|
||||
text-gray-900 dark:text-gray-300
|
||||
`,children:_.label})]},_.value)})}),c&&h.jsx(J,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:c})]})},Es=()=>window.G7Core,ha=(e,t)=>Es()?.t?.(e,t)??e,_M=()=>Es()?.locale?.supported?.()??["ko","en"],EM=()=>Es()?.locale?.current?.()??"ko",d0=e=>{const t=ha(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},MM=({content:e="",value:t,onChange:n,multilingual:r=!1,isHtml:s=!1,onIsHtmlChange:o,rows:i=15,placeholder:a="",label:l,showHtmlModeToggle:c=!0,contentClassName:d="",purifyConfig:u,className:f="",name:g="content",htmlFieldName:m="content_mode",readOnly:p=!1,id:y,editorAttrs:b})=>{const _=v.useMemo(()=>_M(),[]),x=v.useMemo(()=>EM(),[]),[M,S]=v.useState(x),[k,N]=v.useState(s),[C,w]=v.useState(e),[E,T]=v.useState(t??{}),[P,L]=v.useState(!1);v.useEffect(()=>{N(s)},[s]),v.useEffect(()=>{r||w(e)},[e,r]),v.useEffect(()=>{r&&t&&T(t)},[t,r]);const F=v.useCallback(Y=>{const B=Y.target.value;if(w(B),n){const W=Es()?.createChangeEvent?.({value:B,name:g,type:"textarea"})??{target:{name:g,value:B}};n(W)}},[n,g]),A=v.useCallback((Y,B)=>{const W={...E,[Y]:B};if(T(W),n){const G=Es()?.createChangeEvent?.({value:W,name:g,type:"multilingual"})??{target:{name:g,value:W}};n(G)}},[n,g,E]),D=v.useCallback(Y=>{const B=Y.target.checked;if(N(B),B||L(!1),o){const W=Es()?.createChangeEvent?.({checked:B,name:m,type:"checkbox"})??{target:{name:m,checked:B}};o(W)}},[o,m]),O=v.useCallback(()=>{L(Y=>!Y)},[]),z=r?E[M]??"":C,U=v.useCallback(Y=>!!E[Y]?.trim(),[E]),j=()=>h.jsx(I,{className:"flex flex-wrap items-center gap-2 mb-3",children:_.map(Y=>{const B=Y===x,W=M===Y;return h.jsxs(le,{type:"button",className:`
|
||||
`,children:_.label})]},_.value)})}),c&&h.jsx(J,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:c})]})},Es=()=>window.G7Core,ha=(e,t)=>Es()?.t?.(e,t)??e,OM=()=>Es()?.locale?.supported?.()??["ko","en"],TM=()=>Es()?.locale?.current?.()??"ko",f0=e=>{const t=ha(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},AM=({content:e="",value:t,onChange:n,multilingual:r=!1,isHtml:s=!1,onIsHtmlChange:o,rows:i=15,placeholder:a="",label:l,showHtmlModeToggle:c=!0,contentClassName:d="",purifyConfig:u,className:f="",name:g="content",htmlFieldName:m="content_mode",readOnly:p=!1,id:y,editorAttrs:b})=>{const _=v.useMemo(()=>OM(),[]),x=v.useMemo(()=>TM(),[]),[M,S]=v.useState(x),[k,N]=v.useState(s),[C,w]=v.useState(e),[E,T]=v.useState(t??{}),[P,L]=v.useState(!1);v.useEffect(()=>{N(s)},[s]),v.useEffect(()=>{r||w(e)},[e,r]),v.useEffect(()=>{r&&t&&T(t)},[t,r]);const F=v.useCallback(Y=>{const B=Y.target.value;if(w(B),n){const W=Es()?.createChangeEvent?.({value:B,name:g,type:"textarea"})??{target:{name:g,value:B}};n(W)}},[n,g]),A=v.useCallback((Y,B)=>{const W={...E,[Y]:B};if(T(W),n){const G=Es()?.createChangeEvent?.({value:W,name:g,type:"multilingual"})??{target:{name:g,value:W}};n(G)}},[n,g,E]),D=v.useCallback(Y=>{const B=Y.target.checked;if(N(B),B||L(!1),o){const W=Es()?.createChangeEvent?.({checked:B,name:m,type:"checkbox"})??{target:{name:m,checked:B}};o(W)}},[o,m]),O=v.useCallback(()=>{L(Y=>!Y)},[]),z=r?E[M]??"":C,U=v.useCallback(Y=>!!E[Y]?.trim(),[E]),j=()=>h.jsx(I,{className:"flex flex-wrap items-center gap-2 mb-3",children:_.map(Y=>{const B=Y===x,W=M===Y;return h.jsxs(le,{type:"button",className:`
|
||||
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
|
||||
${W?B?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":B?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
|
||||
`,onClick:()=>S(Y),children:[h.jsx(ae,{name:"globe",className:"w-3 h-3"}),h.jsx(J,{children:d0(Y)}),B&&h.jsx(J,{className:"text-red-500",children:"*"}),U(Y)&&!W&&h.jsx(ae,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},Y)})});return h.jsxs(I,{className:`space-y-2 ${f}`,id:y,...b,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[l&&h.jsx(gn,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),h.jsxs(I,{className:"flex items-center gap-3",children:[k&&!p&&h.jsx(le,{type:"button",onClick:O,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${P?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:ha(P?"common.preview_off":"common.preview")}),c&&h.jsxs(gn,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[h.jsx(Et,{type:"checkbox",name:m,checked:k,onChange:D,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),h.jsx(I,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:ha("common.html_mode")})]})]})]}),r&&j(),!P&&(r?_.map(Y=>h.jsx(I,{className:M===Y?"block":"hidden",children:h.jsx(lr,{name:`${g}[${Y}]`,value:E[Y]??"",onChange:B=>A(Y,B.target.value),placeholder:`${a} (${d0(Y)})`,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${k?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},Y)):h.jsx(lr,{name:g,value:C,onChange:F,placeholder:a,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${k?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),P&&h.jsx(I,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:h.jsx(kl,{content:z,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},u0="g7_dismissed_warnings";function f0(){try{const e=sessionStorage.getItem(u0);return e?JSON.parse(e):[]}catch{return[]}}function NM(e){try{const t=f0();t.includes(e)||(t.push(e),sessionStorage.setItem(u0,JSON.stringify(t)))}catch{}}function OM(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const TM=({warnings:e,className:t=""})=>{const[n,r]=v.useState([]);v.useEffect(()=>{r(f0())},[]);const s=v.useCallback(i=>{NM(i),r(a=>[...a,i])},[]);if(!e||e.length===0)return null;const o=e.filter(i=>!n.includes(i.id));return o.length===0?null:h.jsx(I,{className:`space-y-2 ${t}`.trim(),children:o.map(i=>h.jsx(Ku,{type:OM(i.level),message:i.message,dismissible:!0,onDismiss:()=>s(i.id)},i.id))})},h0=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},AM=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:r})=>{const[s,o]=v.useState(!1),i=v.useRef(!0),a=v.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=v.useMemo(()=>`g7_filters_${e}${a!==void 0?`_${a}`:""}`,[e,a]),c=v.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const g=JSON.parse(f);if(Array.isArray(g))return g}}catch(f){h0.warn("Failed to load from localStorage:",f)}return null},[l]),d=v.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(g){h0.warn("Failed to save to localStorage:",g)}},[l]),u=v.useCallback(()=>{const f=c();return f||(t&&t.length>0?t:n)},[c,t,n]);return v.useEffect(()=>{if(!s){const f=u();r&&f.length>0&&r(f),o(!0)}},[s,r,u]),v.useEffect(()=>{if(s&&t&&t.length>0){if(i.current){i.current=!1;return}d(t)}},[s,t,d]),null},DM=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>c
Line truncated
|
||||
`,onClick:()=>S(Y),children:[h.jsx(ae,{name:"globe",className:"w-3 h-3"}),h.jsx(J,{children:f0(Y)}),B&&h.jsx(J,{className:"text-red-500",children:"*"}),U(Y)&&!W&&h.jsx(ae,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},Y)})});return h.jsxs(I,{className:`space-y-2 ${f}`,id:y,...b,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[l&&h.jsx(gn,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),h.jsxs(I,{className:"flex items-center gap-3",children:[k&&!p&&h.jsx(le,{type:"button",onClick:O,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${P?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:ha(P?"common.preview_off":"common.preview")}),c&&h.jsxs(gn,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[h.jsx(Et,{type:"checkbox",name:m,checked:k,onChange:D,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),h.jsx(I,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:ha("common.html_mode")})]})]})]}),r&&j(),!P&&(r?_.map(Y=>h.jsx(I,{className:M===Y?"block":"hidden",children:h.jsx(lr,{name:`${g}[${Y}]`,value:E[Y]??"",onChange:B=>A(Y,B.target.value),placeholder:`${a} (${f0(Y)})`,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${k?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},Y)):h.jsx(lr,{name:g,value:C,onChange:F,placeholder:a,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${k?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),P&&h.jsx(I,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:h.jsx(kl,{content:z,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},h0="g7_dismissed_warnings";function g0(){try{const e=sessionStorage.getItem(h0);return e?JSON.parse(e):[]}catch{return[]}}function DM(e){try{const t=g0();t.includes(e)||(t.push(e),sessionStorage.setItem(h0,JSON.stringify(t)))}catch{}}function IM(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const LM=({warnings:e,className:t=""})=>{const[n,r]=v.useState([]);v.useEffect(()=>{r(g0())},[]);const s=v.useCallback(i=>{DM(i),r(a=>[...a,i])},[]);if(!e||e.length===0)return null;const o=e.filter(i=>!n.includes(i.id));return o.length===0?null:h.jsx(I,{className:`space-y-2 ${t}`.trim(),children:o.map(i=>h.jsx(Xu,{type:IM(i.level),message:i.message,dismissible:!0,onDismiss:()=>s(i.id)},i.id))})},p0=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},PM=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:r})=>{const[s,o]=v.useState(!1),i=v.useRef(!0),a=v.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=v.useMemo(()=>`g7_filters_${e}${a!==void 0?`_${a}`:""}`,[e,a]),c=v.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const g=JSON.parse(f);if(Array.isArray(g))return g}}catch(f){p0.warn("Failed to load from localStorage:",f)}return null},[l]),d=v.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(g){p0.warn("Failed to save to localStorage:",g)}},[l]),u=v.useCallback(()=>{const f=c();return f||(t&&t.length>0?t:n)},[c,t,n]);return v.useEffect(()=>{if(!s){const f=u();r&&f.length>0&&r(f),o(!0)}},[s,r,u]),v.useEffect(()=>{if(s&&t&&t.length>0){if(i.current){i.current=!1;return}d(t)}},[s,t,d]),null},$M=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>c
Line truncated
|
||||
w-full px-4 py-2.5
|
||||
bg-gray-100 dark:bg-gray-700
|
||||
border-0 rounded-xl
|
||||
@@ -257,27 +257,27 @@ self.addEventListener('message', async (e) => {
|
||||
flex items-center justify-between gap-2
|
||||
text-left cursor-pointer
|
||||
disabled:opacity-50 disabled:cursor-not-allowed
|
||||
`,"aria-haspopup":"listbox","aria-expanded":f,children:[h.jsx(I,{className:"flex-1 min-w-0",children:M()}),h.jsx(Jn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&h.jsx(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:h.jsx(I,{className:"overflow-auto",style:{maxHeight:i},children:e.length===0?h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:g0("common.no_options")}):e.map((k,N)=>{const C=String(k.value)===String(t);return h.jsx(le,{type:"button",onClick:()=>!k.disabled&&_(k.value),disabled:k.disabled,className:`
|
||||
`,"aria-haspopup":"listbox","aria-expanded":f,children:[h.jsx(I,{className:"flex-1 min-w-0",children:M()}),h.jsx(Jn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&h.jsx(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:h.jsx(I,{className:"overflow-auto",style:{maxHeight:i},children:e.length===0?h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:m0("common.no_options")}):e.map((k,N)=>{const C=String(k.value)===String(t);return h.jsx(le,{type:"button",onClick:()=>!k.disabled&&_(k.value),disabled:k.disabled,className:`
|
||||
w-full px-4 py-3 text-left text-sm
|
||||
hover:bg-gray-100 dark:hover:bg-gray-700
|
||||
transition-colors
|
||||
${C?"bg-blue-50 dark:bg-blue-900/20":""}
|
||||
${k.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
||||
`,role:"option","aria-selected":C,"data-item-value":k.value,"data-item-index":N,"data-item-selected":C,children:c?.item?p0(c.item,{item:k,index:N,isSelected:C},`item-${N}`):a||S(k,C)},k.value)})})})]})};function $M(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const FM=({value:e,checked:t=!1,icon:n,label:r,variant:s="blue",customColor:o,className:i="",style:a,onChange:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(!1),g="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const b=$M(o),_=document.documentElement.classList.contains("dark");let x;return t?x={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:u?.85:1}:x=b?{backgroundColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${u?_?.25:.12:_?.15:.06})`,color:o,borderColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${_?.3:.2})`}:{},h.jsxs(gn,{className:`${g} ${i}`,style:{...x,...a},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),id:c,...d,children:[h.jsx(Et,{type:"checkbox",value:e,checked:t,onChange:M=>{l?.(M)},className:"hidden"}),n&&h.jsx(ae,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})}const y=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[s]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[s];return h.jsxs(gn,{className:`${g} ${y} ${i}`,style:a,id:c,...d,children:[h.jsx(Et,{type:"checkbox",value:e,checked:t,onChange:b=>{l?.(b)},className:"hidden"}),n&&h.jsx(ae,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})},zM=({label:e,icon:t,iconPosition:n="left",position:r="right",className:s="",style:o,children:i})=>{const[a,l]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),u=v.useRef(null),f=v.useRef(null),g=v.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),y=224;let b=r==="right"?p.right-y:p.left;const _=p.bottom+8;b<8&&(b=8),b+y>window.innerWidth-8&&(b=window.innerWidth-y-8),d({top:_,left:b})},[r]);v.useEffect(()=>{a&&g()},[a,g]),v.useEffect(()=>{if(!a)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[a]),v.useEffect(()=>{const p=y=>{const b=y.target,_=u.current?.contains(b),x=f.current?.contains(b);!_&&!x&&l(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const m=a?Vn.createPortal(h.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:c.top,left:c.left},onClick:()=>l(!1),children:i}),document.body):null;return h.jsxs(I,{className:`relative inline-block ${s}`,style:o,children:[h.jsxs(le,{ref:u,onClick:()=>l(!a),className:"flex items-center gap-2",children:[n==="left"&&t&&h.jsx(ae,{name:t,className:"w-4 h-4"}),e&&h.jsx(J,{className:"text-sm font-medium",children:e}),n==="right"&&t&&h.jsx(ae,{name:t,className:"w-4 h-4"})]}),m]})},VM=({label:e,icon:t,variant:n="default",disabled:r=!1,divider:s=!1,className:o="",style:i,onClick:a})=>{if(s)return h.jsx(I,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:i});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",c=r?"opacity-50 cursor-not-allowed":"cursor-pointer",d=()=>{!r&&a&&a()};return h.jsxs(I,{onClick:d,className:`flex items-center gap-3 px-4 py-3Line truncated
|
||||
`,role:"option","aria-selected":C,"data-item-value":k.value,"data-item-index":N,"data-item-selected":C,children:c?.item?b0(c.item,{item:k,index:N,isSelected:C},`item-${N}`):a||S(k,C)},k.value)})})})]})};function HM(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const UM=({value:e,checked:t=!1,icon:n,label:r,variant:s="blue",customColor:o,className:i="",style:a,onChange:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(!1),g="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const b=HM(o),_=document.documentElement.classList.contains("dark");let x;return t?x={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:u?.85:1}:x=b?{backgroundColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${u?_?.25:.12:_?.15:.06})`,color:o,borderColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${_?.3:.2})`}:{},h.jsxs(gn,{className:`${g} ${i}`,style:{...x,...a},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),id:c,...d,children:[h.jsx(Et,{type:"checkbox",value:e,checked:t,onChange:M=>{l?.(M)},className:"hidden"}),n&&h.jsx(ae,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})}const y=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[s]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[s];return h.jsxs(gn,{className:`${g} ${y} ${i}`,style:a,id:c,...d,children:[h.jsx(Et,{type:"checkbox",value:e,checked:t,onChange:b=>{l?.(b)},className:"hidden"}),n&&h.jsx(ae,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})},BM=({label:e,icon:t,iconPosition:n="left",position:r="right",className:s="",style:o,children:i})=>{const[a,l]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),u=v.useRef(null),f=v.useRef(null),g=v.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),y=224;let b=r==="right"?p.right-y:p.left;const _=p.bottom+8;b<8&&(b=8),b+y>window.innerWidth-8&&(b=window.innerWidth-y-8),d({top:_,left:b})},[r]);v.useEffect(()=>{a&&g()},[a,g]),v.useEffect(()=>{if(!a)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[a]),v.useEffect(()=>{const p=y=>{const b=y.target,_=u.current?.contains(b),x=f.current?.contains(b);!_&&!x&&l(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const m=a?Vn.createPortal(h.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:c.top,left:c.left},onClick:()=>l(!1),children:i}),document.body):null;return h.jsxs(I,{className:`relative inline-block ${s}`,style:o,children:[h.jsxs(le,{ref:u,onClick:()=>l(!a),className:"flex items-center gap-2",children:[n==="left"&&t&&h.jsx(ae,{name:t,className:"w-4 h-4"}),e&&h.jsx(J,{className:"text-sm font-medium",children:e}),n==="right"&&t&&h.jsx(ae,{name:t,className:"w-4 h-4"})]}),m]})},jM=({label:e,icon:t,variant:n="default",disabled:r=!1,divider:s=!1,className:o="",style:i,onClick:a})=>{if(s)return h.jsx(I,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:i});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",c=r?"opacity-50 cursor-not-allowed":"cursor-pointer",d=()=>{!r&&a&&a()};return h.jsxs(I,{onClick:d,className:`flex items-center gap-3 px-4 py-3Line truncated
|
||||
* @kurkle/color v0.3.4
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2024 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function Eo(e){return e+.5|0}const br=(e,t,n)=>Math.max(Math.min(e,n),t);function Mo(e){return br(Eo(e*2.55),0,255)}function yr(e){return br(Eo(e*255),0,255)}function tr(e){return br(Eo(e/2.55)/100,0,1)}function v0(e){return br(Eo(e*100),0,100)}const Cn={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},cd=[..."0123456789ABCDEF"],tN=e=>cd[e&15],nN=e=>cd[(e&240)>>4]+cd[e&15],ga=e=>(e&240)>>4===(e&15),rN=e=>ga(e.r)&&ga(e.g)&&ga(e.b)&&ga(e.a);function sN(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Cn[e[1]]*17,g:255&Cn[e[2]]*17,b:255&Cn[e[3]]*17,a:t===5?Cn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Cn[e[1]]<<4|Cn[e[2]],g:Cn[e[3]]<<4|Cn[e[4]],b:Cn[e[5]]<<4|Cn[e[6]],a:t===9?Cn[e[7]]<<4|Cn[e[8]]:255})),n}const oN=(e,t)=>e<255?t(e):"";function iN(e){var t=rN(e)?tN:nN;return e?"#"+t(e.r)+t(e.g)+t(e.b)+oN(e.a,t):void 0}const aN=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x0(e,t,n){const r=t*Math.min(n,1-n),s=(o,i=(o+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[s(0),s(8),s(4)]}function lN(e,t,n){const r=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function cN(e,t,n){const r=x0(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function dN(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function dd(e){const n=e.r/255,r=e.g/255,s=e.b/255,o=Math.max(n,r,s),i=Math.min(n,r,s),a=(o+i)/2;let l,c,d;return o!==i&&(d=o-i,c=a>.5?d/(2-o-i):d/(o+i),l=dN(n,r,s,d,o),l=l*60+.5),[l|0,c||0,a]}function ud(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(yr)}function fd(e,t,n){return ud(x0,e,t,n)}function uN(e,t,n){return ud(cN,e,t,n)}function fN(e,t,n){return ud(lN,e,t,n)}function w0(e){return(e%360+360)%360}function hN(e){const t=aN.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Mo(+t[5]):yr(+t[5]));const s=w0(+t[2]),o=+t[3]/100,i=+t[4]/100;return t[1]==="hwb"?r=uN(s,o,i):t[1]==="hsv"?r=fN(s,o,i):r=fd(s,o,i),{r:r[0],g:r[1],b:r[2],a:n}}function gN(e,t){var n=dd(e);n[0]=w0(n[0]+t),n=fd(n),e.r=n[0],e.g=n[1],e.b=n[2]}function pN(e){if(!e)return;const t=dd(e),n=t[0],r=v0(t[1]),s=v0(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${tr(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const k0={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"},C0={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 mN(){const e={},t=Object.keys(C0),n=Object.keys(k0);let r,s,o,i,a;for(r=0;r<t.length;r++){for(i=a=t[r],s=0;s<n.length;s++)o=n[s]Line truncated
|
||||
*/function Eo(e){return e+.5|0}const br=(e,t,n)=>Math.max(Math.min(e,n),t);function Mo(e){return br(Eo(e*2.55),0,255)}function yr(e){return br(Eo(e*255),0,255)}function tr(e){return br(Eo(e/2.55)/100,0,1)}function w0(e){return br(Eo(e*100),0,100)}const Cn={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},dd=[..."0123456789ABCDEF"],oN=e=>dd[e&15],iN=e=>dd[(e&240)>>4]+dd[e&15],ga=e=>(e&240)>>4===(e&15),aN=e=>ga(e.r)&&ga(e.g)&&ga(e.b)&&ga(e.a);function lN(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Cn[e[1]]*17,g:255&Cn[e[2]]*17,b:255&Cn[e[3]]*17,a:t===5?Cn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Cn[e[1]]<<4|Cn[e[2]],g:Cn[e[3]]<<4|Cn[e[4]],b:Cn[e[5]]<<4|Cn[e[6]],a:t===9?Cn[e[7]]<<4|Cn[e[8]]:255})),n}const cN=(e,t)=>e<255?t(e):"";function dN(e){var t=aN(e)?oN:iN;return e?"#"+t(e.r)+t(e.g)+t(e.b)+cN(e.a,t):void 0}const uN=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function k0(e,t,n){const r=t*Math.min(n,1-n),s=(o,i=(o+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[s(0),s(8),s(4)]}function fN(e,t,n){const r=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function hN(e,t,n){const r=k0(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function gN(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function ud(e){const n=e.r/255,r=e.g/255,s=e.b/255,o=Math.max(n,r,s),i=Math.min(n,r,s),a=(o+i)/2;let l,c,d;return o!==i&&(d=o-i,c=a>.5?d/(2-o-i):d/(o+i),l=gN(n,r,s,d,o),l=l*60+.5),[l|0,c||0,a]}function fd(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(yr)}function hd(e,t,n){return fd(k0,e,t,n)}function pN(e,t,n){return fd(hN,e,t,n)}function mN(e,t,n){return fd(fN,e,t,n)}function C0(e){return(e%360+360)%360}function bN(e){const t=uN.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Mo(+t[5]):yr(+t[5]));const s=C0(+t[2]),o=+t[3]/100,i=+t[4]/100;return t[1]==="hwb"?r=pN(s,o,i):t[1]==="hsv"?r=mN(s,o,i):r=hd(s,o,i),{r:r[0],g:r[1],b:r[2],a:n}}function yN(e,t){var n=ud(e);n[0]=C0(n[0]+t),n=hd(n),e.r=n[0],e.g=n[1],e.b=n[2]}function vN(e){if(!e)return;const t=ud(e),n=t[0],r=w0(t[1]),s=w0(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${tr(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const S0={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"},_0={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 xN(){const e={},t=Object.keys(_0),n=Object.keys(S0);let r,s,o,i,a;for(r=0;r<t.length;r++){for(i=a=t[r],s=0;s<n.length;s++)o=n[s]Line truncated
|
||||
* Chart.js v4.5.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2025 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/function nr(){}const CN=(()=>{let e=0;return()=>e++})();function ft(e){return e==null}function Dt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Qe(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Sn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Yn(e,t){return Sn(e)?e:t}function Je(e,t){return typeof e>"u"?t:e}const SN=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,E0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function bt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function at(e,t,n,r){let s,o,i;if(Dt(e))for(o=e.length,s=0;s<o;s++)t.call(n,e[s],s);else if(Qe(e))for(i=Object.keys(e),o=i.length,s=0;s<o;s++)t.call(n,e[i[s]],i[s])}function ba(e,t){let n,r,s,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],o=t[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function ya(e){if(Dt(e))return e.map(ya);if(Qe(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=ya(e[n[s]]);return t}return e}function M0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function _N(e,t,n,r){if(!M0(e))return;const s=t[e],o=n[e];Qe(s)&&Qe(o)?Oo(s,o,r):t[e]=ya(o)}function Oo(e,t,n){const r=Dt(t)?t:[t],s=r.length;if(!Qe(e))return e;n=n||{};const o=n.merger||_N;let i;for(let a=0;a<s;++a){if(i=r[a],!Qe(i))continue;const l=Object.keys(i);for(let c=0,d=l.length;c<d;++c)o(l[c],e,i,n)}return e}function To(e,t){return Oo(e,t,{merger:EN})}function EN(e,t,n){if(!M0(e))return;const r=t[e],s=n[e];Qe(r)&&Qe(s)?To(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ya(s))}const N0={"":e=>e,x:e=>e.x,y:e=>e.y};function MN(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function NN(e){const t=MN(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function zr(e,t){return(N0[t]||(N0[t]=NN(t)))(e)}function gd(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ao=e=>typeof e<"u",vr=e=>typeof e=="function",O0=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function ON(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ht=Math.PI,Ot=2*ht,va=Number.POSITIVE_INFINITY,TN=ht/180,It=ht/2,Vr=ht/4,T0=ht*2/3,A0=Math.log10,xr=Math.sign;function xa(e,t,n){return Math.abs(e-t)<n}function D0(e){const t=Math.round(e);e=xa(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(A0(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function AN(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,o)=>s-o).pop(),t}function DN(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function wa(e){return!DN(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function IN(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function LN(e,t,n){let r,s,o;for(r=0,s=e.length;r<s;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function rr(e){return e*(ht/180)}function PN(e){return e*(180/ht)}function I0(e){if(!Sn(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function L0(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ht&&(o+=Ot),{angle:o,distance:s}}function $N(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Kn(e){return(e%Ot+Ot)%Ot}function ka(e,t,n,r){const s=Kn(e),o=Kn(t),i=Kn(n),a=Kn(o-s),l=Kn(i-s),c=Kn(s-o),d=Kn(s-i);return s===o||s===i||r&&o===i||a>l&&c<d}function cn(e,t,n){return Math.max(t,Math.min(n,e))}function FN(e){return cn(e,-32768,32767)}function Hr(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function pd(e,t,n){n=n||(i=>e[i]<t);let r=e.length-1,s=0,o;for(;r-s>1;)o=s+r>>1,n(o)?s=o:r=o;return{lo:s,hi:r}}const md=(e,t,n,r)=>pd(e,n,r?s=>{const o=e[s][t];return o<n||o===n&&e[s+1][t]===n}:s=>e[s][t]<n),zN=(e,t,n)=>pd(e,n,r=>e[r][t]>=n);function VN(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const P0=["push","pop","shift","splice","unshift"];function HN(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),P0.forEach(n=>{const r="_onData"+gd(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const i=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),i}})})}function $0(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(P0.forEach(o=>{delete e[o]}),delete e._chartjs)}function F0(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const z0=(function(){return typeof window>"u"?functionLine truncated
|
||||
*/function nr(){}const MN=(()=>{let e=0;return()=>e++})();function ft(e){return e==null}function Dt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Qe(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Sn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Yn(e,t){return Sn(e)?e:t}function Je(e,t){return typeof e>"u"?t:e}const NN=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,N0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function bt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function at(e,t,n,r){let s,o,i;if(Dt(e))for(o=e.length,s=0;s<o;s++)t.call(n,e[s],s);else if(Qe(e))for(i=Object.keys(e),o=i.length,s=0;s<o;s++)t.call(n,e[i[s]],i[s])}function ba(e,t){let n,r,s,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],o=t[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function ya(e){if(Dt(e))return e.map(ya);if(Qe(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=ya(e[n[s]]);return t}return e}function O0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ON(e,t,n,r){if(!O0(e))return;const s=t[e],o=n[e];Qe(s)&&Qe(o)?Oo(s,o,r):t[e]=ya(o)}function Oo(e,t,n){const r=Dt(t)?t:[t],s=r.length;if(!Qe(e))return e;n=n||{};const o=n.merger||ON;let i;for(let a=0;a<s;++a){if(i=r[a],!Qe(i))continue;const l=Object.keys(i);for(let c=0,d=l.length;c<d;++c)o(l[c],e,i,n)}return e}function To(e,t){return Oo(e,t,{merger:TN})}function TN(e,t,n){if(!O0(e))return;const r=t[e],s=n[e];Qe(r)&&Qe(s)?To(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ya(s))}const T0={"":e=>e,x:e=>e.x,y:e=>e.y};function AN(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function DN(e){const t=AN(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function zr(e,t){return(T0[t]||(T0[t]=DN(t)))(e)}function pd(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ao=e=>typeof e<"u",vr=e=>typeof e=="function",A0=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function IN(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ht=Math.PI,Ot=2*ht,va=Number.POSITIVE_INFINITY,LN=ht/180,It=ht/2,Vr=ht/4,D0=ht*2/3,I0=Math.log10,xr=Math.sign;function xa(e,t,n){return Math.abs(e-t)<n}function L0(e){const t=Math.round(e);e=xa(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(I0(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function PN(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,o)=>s-o).pop(),t}function $N(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function wa(e){return!$N(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function FN(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function zN(e,t,n){let r,s,o;for(r=0,s=e.length;r<s;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function rr(e){return e*(ht/180)}function VN(e){return e*(180/ht)}function P0(e){if(!Sn(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function $0(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ht&&(o+=Ot),{angle:o,distance:s}}function HN(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Kn(e){return(e%Ot+Ot)%Ot}function ka(e,t,n,r){const s=Kn(e),o=Kn(t),i=Kn(n),a=Kn(o-s),l=Kn(i-s),c=Kn(s-o),d=Kn(s-i);return s===o||s===i||r&&o===i||a>l&&c<d}function cn(e,t,n){return Math.max(t,Math.min(n,e))}function UN(e){return cn(e,-32768,32767)}function Hr(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function md(e,t,n){n=n||(i=>e[i]<t);let r=e.length-1,s=0,o;for(;r-s>1;)o=s+r>>1,n(o)?s=o:r=o;return{lo:s,hi:r}}const bd=(e,t,n,r)=>md(e,n,r?s=>{const o=e[s][t];return o<n||o===n&&e[s+1][t]===n}:s=>e[s][t]<n),BN=(e,t,n)=>md(e,n,r=>e[r][t]>=n);function jN(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const F0=["push","pop","shift","splice","unshift"];function WN(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),F0.forEach(n=>{const r="_onData"+pd(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const i=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),i}})})}function z0(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(F0.forEach(o=>{delete e[o]}),delete e._chartjs)}function V0(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const H0=(function(){return typeof window>"u"?functionLine truncated
|
||||
* Chart.js v4.5.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2025 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class MO{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const o=n.listeners[s],i=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=z0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let i=o.length-1,a=!1,l;for(;i>=0;--i)l=o[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[i]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),o.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var sr=new MO;const lm="transparent",NO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=j0(e||lm),s=r.valid&&j0(t||lm);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class OO{constructor(t,n,r,s){const o=n[r];s=_a([t.to,s,o,t.from]);const i=_a([t.from,o,s]);this._active=!0,this._fn=t.fn||NO[t.type||typeof i],this._easing=Do[t.easing]||Do.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=i,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,i=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=_a([t.to,n,s,t.from]),this._from=_a([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class cm{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Qe(t))return;const n=Object.keys(_t.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!Qe(o))return;const i={};for(const a of n)i[a]=o[a];(Dt(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,i)})})}_animateOptions(t,n){const r=n.options,s=AO(t,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&TO(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,s=[],o=t.$animations||(t.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const d=n[c];let u=o[c];const f=r.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){t[c]=d;continue}o[c]=u=new OO(f,t,c,d),s.push(u)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return sr.add(this._chart,r),!0}}function TO(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const o=e[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function AO(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function dm(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:s,end:r?s:o}}function DO(e,t,n){if(n===!1)return!1;const r=dm(e,n),s=dm(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function IO(e){let t,n,r,s;return Qe(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function um(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].indLine truncated
|
||||
*/class AO{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const o=n.listeners[s],i=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=H0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let i=o.length-1,a=!1,l;for(;i>=0;--i)l=o[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[i]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),o.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var sr=new AO;const dm="transparent",DO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=G0(e||dm),s=r.valid&&G0(t||dm);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class IO{constructor(t,n,r,s){const o=n[r];s=_a([t.to,s,o,t.from]);const i=_a([t.from,o,s]);this._active=!0,this._fn=t.fn||DO[t.type||typeof i],this._easing=Do[t.easing]||Do.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=i,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,i=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=_a([t.to,n,s,t.from]),this._from=_a([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class um{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Qe(t))return;const n=Object.keys(_t.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!Qe(o))return;const i={};for(const a of n)i[a]=o[a];(Dt(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,i)})})}_animateOptions(t,n){const r=n.options,s=PO(t,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&LO(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,s=[],o=t.$animations||(t.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const d=n[c];let u=o[c];const f=r.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){t[c]=d;continue}o[c]=u=new IO(f,t,c,d),s.push(u)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return sr.add(this._chart,r),!0}}function LO(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const o=e[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function PO(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function fm(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:s,end:r?s:o}}function $O(e,t,n){if(n===!1)return!1;const r=fm(e,n),s=fm(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function FO(e){let t,n,r,s;return Qe(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function hm(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].indLine truncated
|
||||
`)>-1?e.split(`
|
||||
`):e}function _5(e,t){const{element:n,datasetIndex:r,index:s}=t,o=e.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:e,label:i,parsed:o.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function eb(e,t){const n=e.chart.ctx,{body:r,footer:s,title:o}=e,{boxWidth:i,boxHeight:a}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),d=Rt(t.footerFont),u=o.length,f=s.length,g=r.length,m=_n(t.padding);let p=m.height,y=0,b=r.reduce((M,S)=>M+S.before.length+S.lines.length+S.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){const M=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*M+(b-g)*l.lineHeight+(b-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*d.lineHeight+(f-1)*t.footerSpacing);let _=0;const x=function(M){y=Math.max(y,n.measureText(M).width+_)};return n.save(),n.font=c.string,at(e.title,x),n.font=l.string,at(e.beforeBody.concat(e.afterBody),x),_=t.displayColors?i+2+t.boxPadding:0,at(r,M=>{at(M.before,x),at(M.lines,x),at(M.after,x)}),_=0,n.font=d.string,at(e.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function E5(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function M5(e,t,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(e==="left"&&s+o+i>t.width||e==="right"&&s-o-i<0)return!0}function N5(e,t,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),M5(c,e,t,n)&&(c="center"),c}function tb(e,t,n){const r=n.yAlign||t.yAlign||E5(e,n);return{xAlign:n.xAlign||t.xAlign||N5(e,t,n,r),yAlign:r}}function O5(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function T5(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function nb(e,t,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=e,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Ns(i);let m=O5(t,a);const p=T5(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:cn(m,0,r.width-t.width),y:cn(p,0,r.height-t.height)}}function Ha(e,t,n){const r=_n(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rb(e){return qn([],or(e))}function A5(e,t,n){return Os(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function sb(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const ob={beforeTitle:nr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:nr,beforeBody:nr,beforeLabel:nr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ft(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:nr,afterBody:nr,beforeFooter:nr,footer:nr,afterFooter:nr};function dn(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?ob[t].call(n,r):s}class Bd extends Yr{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(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new cm(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=A5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=dn(r,"beforeTitle",this,t),o=dn(r,"title",this,t),i=dn(r,"afterTitle",this,t);let a=[];return a=qn(a,or(s)),a=qn(a,or(o)),a=qn(a,or(i)),a}getBeforeBody(t,n){return rb(dn(n.call
Line truncated
|
||||
`):e}function O5(e,t){const{element:n,datasetIndex:r,index:s}=t,o=e.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:e,label:i,parsed:o.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function nb(e,t){const n=e.chart.ctx,{body:r,footer:s,title:o}=e,{boxWidth:i,boxHeight:a}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),d=Rt(t.footerFont),u=o.length,f=s.length,g=r.length,m=_n(t.padding);let p=m.height,y=0,b=r.reduce((M,S)=>M+S.before.length+S.lines.length+S.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){const M=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*M+(b-g)*l.lineHeight+(b-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*d.lineHeight+(f-1)*t.footerSpacing);let _=0;const x=function(M){y=Math.max(y,n.measureText(M).width+_)};return n.save(),n.font=c.string,at(e.title,x),n.font=l.string,at(e.beforeBody.concat(e.afterBody),x),_=t.displayColors?i+2+t.boxPadding:0,at(r,M=>{at(M.before,x),at(M.lines,x),at(M.after,x)}),_=0,n.font=d.string,at(e.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function T5(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function A5(e,t,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(e==="left"&&s+o+i>t.width||e==="right"&&s-o-i<0)return!0}function D5(e,t,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),A5(c,e,t,n)&&(c="center"),c}function rb(e,t,n){const r=n.yAlign||t.yAlign||T5(e,n);return{xAlign:n.xAlign||t.xAlign||D5(e,t,n,r),yAlign:r}}function I5(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function L5(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function sb(e,t,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=e,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Ns(i);let m=I5(t,a);const p=L5(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:cn(m,0,r.width-t.width),y:cn(p,0,r.height-t.height)}}function Ha(e,t,n){const r=_n(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function ob(e){return qn([],or(e))}function P5(e,t,n){return Os(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ib(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const ab={beforeTitle:nr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:nr,beforeBody:nr,beforeLabel:nr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ft(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:nr,afterBody:nr,beforeFooter:nr,footer:nr,afterFooter:nr};function dn(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?ab[t].call(n,r):s}class jd extends Yr{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(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new um(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=P5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=dn(r,"beforeTitle",this,t),o=dn(r,"title",this,t),i=dn(r,"afterTitle",this,t);let a=[];return a=qn(a,or(s)),a=qn(a,or(o)),a=qn(a,or(i)),a}getBeforeBody(t,n){return ob(dn(n.call
Line truncated
|
||||
@@ -27,9 +27,27 @@ export declare const monacoInitOptions: {
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* JSON 언어 서비스 진단 옵션 (Monaco 버전 간 공통 최소 표면)
|
||||
*/
|
||||
export interface MonacoJSONLanguageDefaults {
|
||||
setDiagnosticsOptions(options: Record<string, unknown>): void;
|
||||
}
|
||||
/**
|
||||
* JSON 언어 서비스 기본 설정 객체를 찾습니다.
|
||||
*
|
||||
* Monaco 0.55 부터 JSON 언어 서비스가 `monaco.languages.json` 에서 최상위
|
||||
* `monaco.json` 으로 옮겨졌다. 구 경로는 런타임 호환 별칭으로만 남아 있고 타입은
|
||||
* 이미 `{ deprecated: true }` 스텁이라, 구 경로만 부르면 타입 검사가 깨지고 별칭이
|
||||
* 걷히는 순간 예고 없이 `undefined` 가 된다. 새 경로를 먼저 보고 구 경로로 내려간다.
|
||||
*
|
||||
* @param monaco Monaco Editor 인스턴스
|
||||
* @return MonacoJSONLanguageDefaults|null 찾지 못하면 null
|
||||
*/
|
||||
export declare function getJSONLanguageDefaults(monaco: unknown): MonacoJSONLanguageDefaults | null;
|
||||
/**
|
||||
* JSON 언어 서비스 설정
|
||||
*
|
||||
* @param monaco Monaco Editor 인스턴스
|
||||
*/
|
||||
export declare function configureJSONLanguageService(monaco: typeof import('monaco-editor')): void;
|
||||
export declare function configureJSONLanguageService(monaco: unknown): void;
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/_commonjsHelpers-CT9FvmAN",["exports"],(function(t){"use strict";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}t.getDefaultExportFromCjs=o}));
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
(function(){"use strict";class qs{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?De.isErrorNoTelemetry(e)?new De(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Us=new qs;function bt(t){$s(t)||Us.onUnexpectedError(t)}function $t(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:De.isErrorNoTelemetry(t),cause:r?$t(r):void 0,code:t.code}}return t}const Ht="Canceled";function $s(t){return t instanceof En?!0:t instanceof Error&&t.name===Ht&&t.message===Ht}class En extends Error{constructor(){super(Ht),this.name=this.message}}class De extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof De)return e;const n=new De;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Y extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Y.prototype)}}function Hs(t,e="Unreachable"){throw new Error(e)}function Ws(t,e="unexpected state"){if(!t)throw typeof e=="string"?new Y(`Assertion Failed: ${e}`):e}function pt(t){if(!t()){debugger;t(),bt(new Y("Assertion Failed"))}}function Mn(t,e){let n=0;for(;n<t.length-1;){const r=t[n],s=t[n+1];if(!e(r,s))return!1;n++}return!0}function zs(t){return typeof t=="string"}function Gs(t){return!!t&&typeof t[Symbol.iterator]=="function"}var wt;(function(t){function e(w){return!!w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*s(w){yield w}t.single=s;function i(w){return e(w)?w:s(w)}t.wrap=i;function l(w){return w||n}t.from=l;function*o(w){for(let y=w.length-1;y>=0;y--)yield w[y]}t.reverse=o;function u(w){return!w||w[Symbol.iterator]().next().done===!0}t.isEmpty=u;function c(w){return w[Symbol.iterator]().next().value}t.first=c;function h(w,y){let A=0;for(const D of w)if(y(D,A++))return!0;return!1}t.some=h;function f(w,y){let A=0;for(const D of w)if(!y(D,A++))return!1;return!0}t.every=f;function m(w,y){for(const A of w)if(y(A))return A}t.find=m;function*p(w,y){for(const A of w)y(A)&&(yield A)}t.filter=p;function*b(w,y){let A=0;for(const D of w)yield y(D,A++)}t.map=b;function*d(w,y){let A=0;for(const D of w)yield*y(D,A++)}t.flatMap=d;function*x(...w){for(const y of w)Gs(y)?yield*y:yield y}t.concat=x;function N(w,y,A){let D=A;for(const V of w)D=y(D,V);return D}t.reduce=N;function v(w){let y=0;for(const A of w)y++;return y}t.length=v;function*L(w,y,A=w.length){for(y<-w.length&&(y=0),y<0&&(y+=w.length),A<0?A+=w.length:A>w.length&&(A=w.length);y<A;y++)yield w[y]}t.slice=L;function E(w,y=Number.POSITIVE_INFINITY){const A=[];if(y===0)return[A,w];const D=w[Symbol.iterator]();for(let V=0;V<y;V++){const _=D.next();if(_.done)return[A,t.empty()];A.push(_.value)}return[A,{[Symbol.iterator](){return D}}]}t.consume=E;async function T(w){const y=[];for await(const A of w)y.push(A);return y}t.asyncToArray=T;async function q(w){let y=[];for await(const A of w)y=y.concat(A);return y}t.asyncToArrayFlat=q})(wt||(wt={}));function E1(t,e){}function kn(t){if(wt.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function js(...t){return xt(()=>kn(t))}class Os{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function xt(t){return new Os(t)}const Tt=class Tt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{kn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Re.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Tt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Tt.DISABLE_DISPOSED_WARNING=!1;let tt=Tt;const Rn=class Rn{constructor(){this._store=new tt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Rn.None=Object.freeze({dispose(){}});let Re=Rn;const Je=class Je{constructor(e){this.element=e,this.next=Je.Undefined,this.prev=Je.Undefined}};Je.Undefined=new Je(void 0);let j=Je;class Xs{constructor(){this._first=j.Undefined,this._last=j.Undefined,this._size=0}get size(){return this._size}isEmpt
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class Ys extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}}class Zs extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}}class Ot{constructor(e){this.value=e}}const Ks=2;class fe{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new Gt(e?.onListenerError??bt,this._options?.leakWarningThreshold??Js):void 0,this._perfMon=this._options?._profName?new zt(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Zs(`${o}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||bt)(c),Re.None}if(this._disposed)return Re.None;n&&(e=e.bind(n));const s=new Ot(e);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=jt.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof Ot?(this._deliveryQueue??=new ei,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const l=xt(()=>{i?.(),this._removeListener(s)});return r instanceof tt?r.add(l):Array.isArray(r)&&r.push(l),l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const s=this._deliveryQueue.current===this;if(this._size*Ks<=n.length){let i=0;for(let l=0;l<n.length;l++)n[l]?n[i++]=n[l]:s&&i<this._deliveryQueue.end&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=i}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||bt;if(!r){e.value(n);return}try{e.value(n)}catch(s){r(s)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ot)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class ei{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function ti(){return globalThis._VSCODE_NLS_MESSAGES}function Pn(){return globalThis._VSCODE_NLS_LANGUAGE}const ni=Pn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Fn(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,s)=>{const i=s[0],l=e[i];let o=r;return typeof l=="string"?o=l:(typeof l=="number"||typeof l=="boolean"||l===void 0||l===null)&&(o=String(l)),o}),ni&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function P(t,e,...n){return Fn(typeof t=="number"?ri(t,e):e,n)}function ri(t,e){const n=ti()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const Ve="en";let Xt=!1,Qt=!1,Jt=!1,_t,Yt=Ve,Tn=Ve,si,be;const Ce=globalThis;let ee;typeof Ce.vscode<"u"&&typeof Ce.vscode.process<"u"?ee=Ce.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ee=process);const ii=typeof ee?.versions?.electron=="string"&&ee?.type==="renderer";if(typeof ee=="object"){Xt=ee.platform==="win32",Qt=ee.platform==="darwin",Jt=ee.platform==="linux",Jt&&ee.env.SNAP&&ee.env.SNAP_REVISION,ee.env.CI||ee.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ee.env.GITHUB_WORKSPACE,_t=Ve,Yt=Ve;const t=ee.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);_t=e.userLocale,Tn=e.osLocale,Yt=e.resolvedLanguage||Ve,si=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!ii?(be=navigator.userAgent,Xt=be.indexOf("Windows")>=0,Qt=be.indexOf("Macintosh")>=0,(be.indexOf("Macintosh")>=0||be.indexOf("iPad")>=0||be.inde
Line truncated
|
||||
`||t===" "}class Et{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Ra{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Ca(t,e,n=(r,s)=>r===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function*Ea(t,e){let n,r;for(const s of t)r!==void 0&&e(r,s)?n.push(s):(n&&(yield n),n=[s]),r=s;n&&(yield n)}function Ma(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function ka(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Pa(t,e){for(const n of e)t.push(n)}var wn;(function(t){function e(i){return i<0}t.isLessThan=e;function n(i){return i<=0}t.isLessThanOrEqual=n;function r(i){return i>0}t.isGreaterThan=r;function s(i){return i===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(wn||(wn={}));function at(t,e){return(n,r)=>e(t(n),t(r))}const lt=(t,e)=>t-e;function Fa(t){return(e,n)=>-t(e,n)}const et=class et{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new et(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new et(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(s=>((r||wn.isGreaterThan(e(s,n)))&&(r=!1,n=s),!0)),n}};et.empty=new et(e=>{});let ds=et;class B{static fromTo(e,n){return new B(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let s=r;for(;s<n.length&&n[s].start<=e.endExclusive;)s++;if(r===s)n.splice(r,0,e);else{const i=Math.min(e.start,n[r].start),l=Math.max(e.endExclusive,n[s-1].endExclusive);n.splice(r,s-r,new B(i,l))}}static tryCreate(e,n){if(!(e>n))return new B(e,n)}static ofLength(e){return new B(0,e)}static ofStartAndLength(e,n){return new B(e,e+n)}static emptyAt(e){return new B(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new Y(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new B(this.start+e,this.endExclusive+e)}deltaStart(e){return new B(this.start+e,this.endExclusive)}deltaEnd(e){return new B(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new B(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new B(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new Y(`Invalid join: ${this.toString()} and ${e.toString()}`);return new B(this.start,e.endExclusive)}}function He(t,e){const n=We(t,e);return n===-1?void 0:t[n]}function We(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const l=Math.floor((s+i)/2);e(t[l])?s=l+1:i=l}return s-1}function Ta(t,e){const n=xn(t,e);return n===t.length?void 0:t[n]}function xn(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const l=Math.floor((s+i)/2);e(t[l])?i=l:s=l+1}return s}const It=class It{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(It.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=We(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};It.assertInvariants=!1;let Mt=It;const ie=class ie{static ofLength(e,n){return new ie(e,e+n)}static fromRange(e){return new ie(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new ie(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let n=
Line truncated
|
||||
`?(n++,r=0):r++;return new he(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new he(this.lineCount,this.columnCount+e.columnCount):new he(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new C(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new C(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new C(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return $.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new H(e.lineNumber,e.column+this.columnCount):new H(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};he.zero=new he(0,0);let ot=he;class Da{getOffsetRange(e){return new B(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return C.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new ze.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new ze.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new ze.deps.TextEdit(n)}}const Cn=class Cn{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Cn._deps=void 0;let ze=Cn;class Va extends Da{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
|
||||
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new H(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const s=this.getLineLength(n);return new H(n,s+1)}if(e.column<1)return new H(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new H(e.lineNumber,r+1):e}getPosition(e){const n=We(this.lineStartOffsetByLineIdx,i=>i<=e),r=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new H(r,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new ze.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Ia{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new H(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new C(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Va(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new C(e,1,e,Number.MAX_SAFE_INTEGER))}}class Ba extends Ia{constructor(e,n){Ws(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new ot(this._lineCount-1,e.length)}}class kt extends Ba{constructor(e){super(n=>e[n-1],e.length)}}class Se{static joinReplacements(e,n){if(e.length===0)throw new Y;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let i="";for(let l=0;l<e.length;l++){const o=e[l];if(i+=o.text,l<e.length-1){const u=e[l+1],c=C.fromPositions(o.range.getEndPosition(),u.range.getStartPosition()),h=n.getValueOfRange(c);i+=h}}return new Se(C.fromPositions(r,s),i)}static fromStringReplacement(e,n){return new Se(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new Se(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return Se.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=bi(n,r),i=ot.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),l=r.substring(s),o=C.fromPositions(i,this.range.getEndPosition());return new Se(o,l)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=pi(n,r),i=ot.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),l=r.substring(0,r.length-s),o=C.fromPositions(this.range.getStartPosition(),i);return new Se(o,l)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class ae{static inverse(e,n,r){const s=[];let i=1,l=1;for(const u of e){const c=new ae(new $(i,u.original.startLineNumber),new $(l,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,l=u.modified.endLineNumberExclusive}const o=new ae(new $(i,n+1),new $(l,r+1));return o.modified.isEmpty||s.push(o),s}static clip(e,n,r){const s=[];for(const i of e){const l=i.original.intersect(n),o=i.modified.intersect(r);l&&!l.isEmpty&&o&&!o.isEmpty&&s.push(new ae(l,o))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ae(this.modified,this.original)}join(e){return new ae(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new le(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Y("not a valid diff");return new le(new C(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new C(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new le(new C(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new C(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(gs(this.original.endLineNumberExclusive,e)&&gs(this.modified.endLineNumberExclusive,n))return new le(new C(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new C(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new le(C.fromPositions(new H(this.original.startLineNumber,1),Ge(new H(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),C.fromPositions(new H(this.modified.startLineNumber,1),Ge(new H(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new le(C.fromPositions(Ge(new H(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Ge(new H(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),C.fromPositions(Ge(new H(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Ge(new H(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Y}}function Ge(t,e){if(t.lineNumber<1)return new H(1,1);if(t.lineNumber>e.length)return new H(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new H(t.lineNumber,n.length+1):t}function gs(t,e){return t>=1&&t<=e.length}class xe extends ae{static fromRangeMappings(e){const n=$.join(e.map(s=>$.fromRangeInclusive(s.originalRange))),r=$.join(e.map(s=>$.fromRangeInclusive(s.modifiedRange)));return new xe(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new xe(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new xe(this.original,this.modified,[this.toRangeMapping()])}}class le{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((s,i)=>new le(s.range,n[i]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],s=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new Y("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new le(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new Se(this.originalRange,n)}}function bs(t,e,n,r=!1){const s=[];for(const i of Ea(t.map(l=>qa(l,e,n)),(l,o)=>l.original.intersectsOrTouches(o.original)||l.modified.intersectsOrTouches(o.modified))){const l=i[0],o=i[i.length-1];s.push(new xe(l.original.join(o.original),l.modified.join(o.modified),i.map(u=>u.innerChanges[0])))}return pt(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:Mn(s,(i,l)=>l.original.startLineNumber-i.original.endLineNumberExclusive===l.modified.startLineNumber-i.modified.endLineNumberExclusive&&i.original.endLineNumberExclusive<l.origin
Line truncated
|
||||
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=s}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<r;s++)n+=Math.abs((this.histogram[s]??0)-(e.histogram[s]??0));return 1-n/(this.totalCount+e.totalCount)}};mt.chrKeys=new Map;let Pt=mt;class ja{compute(e,n,r=ct.instance,s){if(e.length===0||n.length===0)return ye.trivial(e,n);const i=new Ln(e.length,n.length),l=new Ln(e.length,n.length),o=new Ln(e.length,n.length);for(let b=0;b<e.length;b++)for(let d=0;d<n.length;d++){if(!r.isValid())return ye.trivialTimedOut(e,n);const x=b===0?0:i.get(b-1,d),N=d===0?0:i.get(b,d-1);let v;e.getElement(b)===n.getElement(d)?(b===0||d===0?v=0:v=i.get(b-1,d-1),b>0&&d>0&&l.get(b-1,d-1)===3&&(v+=o.get(b-1,d-1)),v+=s?s(b,d):1):v=-1;const L=Math.max(x,N,v);if(L===v){const E=b>0&&d>0?o.get(b-1,d-1):0;o.set(b,d,E+1),l.set(b,d,3)}else L===x?(o.set(b,d,0),l.set(b,d,1)):L===N&&(o.set(b,d,0),l.set(b,d,2));i.set(b,d,L)}const u=[];let c=e.length,h=n.length;function f(b,d){(b+1!==c||d+1!==h)&&u.push(new O(new B(b+1,c),new B(d+1,h))),c=b,h=d}let m=e.length-1,p=n.length-1;for(;m>=0&&p>=0;)l.get(m,p)===3?(f(m,p),m--,p--):l.get(m,p)===1?m--:p--;return f(-1,-1),u.reverse(),new ye(u,!1)}}class ys{compute(e,n,r=ct.instance){if(e.length===0||n.length===0)return ye.trivial(e,n);const s=e,i=n;function l(d,x){for(;d<s.length&&x<i.length&&s.getElement(d)===i.getElement(x);)d++,x++;return d}let o=0;const u=new Oa;u.set(0,l(0,0));const c=new Xa;c.set(0,u.get(0)===0?null:new _s(null,0,0,u.get(0)));let h=0;e:for(;;){if(o++,!r.isValid())return ye.trivialTimedOut(s,i);const d=-Math.min(o,i.length+o%2),x=Math.min(o,s.length+o%2);for(h=d;h<=x;h+=2){const N=h===x?-1:u.get(h+1),v=h===d?-1:u.get(h-1)+1,L=Math.min(Math.max(N,v),s.length),E=L-h;if(L>s.length||E>i.length)continue;const T=l(L,E);u.set(h,T);const q=L===N?c.get(h+1):c.get(h-1);if(c.set(h,T!==L?new _s(q,L,E,T-L):q),u.get(h)===s.length&&u.get(h)-h===i.length)break e}}let f=c.get(h);const m=[];let p=s.length,b=i.length;for(;;){const d=f?f.x+f.length:0,x=f?f.y+f.length:0;if((d!==p||x!==b)&&m.push(new O(new B(d,p),new B(x,b))),!f)break;p=f.x,b=f.y,f=f.prev}return m.reverse(),new ye(m,!1)}}class _s{constructor(e,n,r,s){this.prev=e,this.x=n,this.y=r,this.length=s}}class Oa{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Xa{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Ft{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=e[s-1],l=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(l=this.range.startColumn-1,i=i.substring(l)),this.lineStartOffsets.push(l);let o=0;if(!r){const c=i.trimStart();o=i.length-c.length,i=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const u=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-l-o,i.length):i.length;for(let c=0;c<u;c++)this.elements.push(i.charCodeAt(c));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new B(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Ns(e>0?this.elements[e-1]:-1),r=Ns(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let s=0;return n!==r&&(s+=10,n===0&&r===1&&(s+=1)),s+=vs(n),s+=vs(r),s}translateOffset(e,n="right"){const r=We(this.firstElementOffsetByLineIdx,i=>i<=e),s=e-this.firstElementOffsetByLineIdx[r];return new H(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?C.fromPositions(r,r):C.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Oe(this.elements[e]))return;let n=e;for(;n>0&&Oe(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Oe(this.elements[r]);)r++;return new B(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Oe(this.elements[e]))return;l
Line truncated
|
||||
`).length>=15&&Ya(f,p=>p.length>=2)>=2}),l=t1(t,l),l}function Ya(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function Za(t,e,n,r){const s=[],i=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Pt(u.original,e,u)),l=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Pt(u.modified,n,u))),o=new Set;for(const u of i){let c=-1,h;for(const f of l){const m=u.computeSimilarity(f);m>c&&(c=m,h=f)}if(c>.9&&h&&(l.delete(h),s.push(new ae(u.range,h.range)),o.add(u.source),o.add(h.source)),!r.isValid())return{moves:s,excludedChanges:o}}return{moves:s,excludedChanges:o}}function Ka(t,e,n,r,s,i){const l=[],o=new ba;for(const m of t)for(let p=m.original.startLineNumber;p<m.original.endLineNumberExclusive-2;p++){const b=`${e[p-1]}:${e[p+1-1]}:${e[p+2-1]}`;o.add(b,{range:new $(p,p+3)})}const u=[];t.sort(at(m=>m.modified.startLineNumber,lt));for(const m of t){let p=[];for(let b=m.modified.startLineNumber;b<m.modified.endLineNumberExclusive-2;b++){const d=`${n[b-1]}:${n[b+1-1]}:${n[b+2-1]}`,x=new $(b,b+3),N=[];o.forEach(d,({range:v})=>{for(const E of p)if(E.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&E.modifiedLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive){E.originalLineRange=new $(E.originalLineRange.startLineNumber,v.endLineNumberExclusive),E.modifiedLineRange=new $(E.modifiedLineRange.startLineNumber,x.endLineNumberExclusive),N.push(E);return}const L={modifiedLineRange:x,originalLineRange:v};u.push(L),N.push(L)}),p=N}if(!i.isValid())return[]}u.sort(Fa(at(m=>m.modifiedLineRange.length,lt)));const c=new de,h=new de;for(const m of u){const p=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,b=c.subtractFrom(m.modifiedLineRange),d=h.subtractFrom(m.originalLineRange).getWithDelta(p),x=b.getIntersection(d);for(const N of x.ranges){if(N.length<3)continue;const v=N,L=N.delta(-p);l.push(new ae(L,v)),c.addRange(v),h.addRange(L)}}l.sort(at(m=>m.original.startLineNumber,lt));const f=new Mt(t);for(let m=0;m<l.length;m++){const p=l[m],b=f.findLastMonotonous(q=>q.original.startLineNumber<=p.original.startLineNumber),d=He(t,q=>q.modified.startLineNumber<=p.modified.startLineNumber),x=Math.max(p.original.startLineNumber-b.original.startLineNumber,p.modified.startLineNumber-d.modified.startLineNumber),N=f.findLastMonotonous(q=>q.original.startLineNumber<p.original.endLineNumberExclusive),v=He(t,q=>q.modified.startLineNumber<p.modified.endLineNumberExclusive),L=Math.max(N.original.endLineNumberExclusive-p.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-p.modified.endLineNumberExclusive);let E;for(E=0;E<x;E++){const q=p.original.startLineNumber-E-1,w=p.modified.startLineNumber-E-1;if(q>r.length||w>s.length||c.contains(w)||h.contains(q)||!Ss(r[q-1],s[w-1],i))break}E>0&&(h.addRange(new $(p.original.startLineNumber-E,p.original.startLineNumber)),c.addRange(new $(p.modified.startLineNumber-E,p.modified.startLineNumber)));let T;for(T=0;T<L;T++){const q=p.original.endLineNumberExclusive+T,w=p.modified.endLineNumberExclusive+T;if(q>r.length||w>s.length||c.contains(w)||h.contains(q)||!Ss(r[q-1],s[w-1],i))break}T>0&&(h.addRange(new $(p.original.endLineNumberExclusive,p.original.endLineNumberExclusive+T)),c.addRange(new $(p.modified.endLineNumberExclusive,p.modified.endLineNumberExclusive+T))),(E>0||T>0)&&(l[m]=new ae(new $(p.original.startLineNumber-E,p.original.endLineNumberExclusive+T),new $(p.modified.startLineNumber-E,p.modified.endLineNumberExclusive+T)))}return l}function Ss(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const s=new ys().compute(new Ft([t],new C(1,1,1,t.length),!1),new Ft([e],new C(1,1,1,e.length),!1),n);let i=0;const l=O.invert(s.diffs,t.length);for(const h of l)h.seq1Range.forEach(f=>{vn(t.charCodeAt(f))||i++});function o(h){let f=0;for(let m=0;m<t.length;m++)vn(h.charCodeAt(m))||f++;return f}const u=o(t.length>e.length?t:e);return i/u>.6&&u>10}function e1(t){if(t.length===0)return t;t.sort(at(n=>n.original.startLineNumber,lt));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],s=t[n],i=s.original.startLineNumber-r.original.endLineNumberExclusive,l=s.modified.startLineNumber-r.modified.endLineNumberExclusive;if(i>=0&&l>=0&&i+l<=2){e[e.length-1]=r.join(s);continue}e.push(s)}return e}function t1(t,e){const n=new Mt(t);return e=e.filter(r=>{const s=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new ae(new $(1,1),new $(1,1)),i=He(t,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return s!==i}),e}function As(t,e,n){let r=n;return r=Rs(t,e,r),r=Rs(t,e,r),r=n1(t,e,r),r}function Rs(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let i=1;i<n.length;i++){const l=r[r.length-1];let o=n[i];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const u=o.seq1Range.start-l.seq1Range.endExclusive;let c;for(c=1;c<=u&&!(t.getElement(o.seq1Range.start-c)!==t.getElement(o.seq1Range.endExclusive-c)||e.getElement(o.seq2Range.
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function ks(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class l1{constructor(){this.dynamicProgrammingDiffing=new ja,this.myersDiffingAlgorithm=new ys}computeDiff(e,n,r){if(e.length<=1&&Ca(e,n,(w,y)=>w===y))return new Et([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Et([new xe(new $(1,e.length+1),new $(1,n.length+1),[new le(new C(1,1,e.length,e[e.length-1].length+1),new C(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=r.maxComputationTimeMs===0?ct.instance:new Ga(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,l=new Map;function o(w){let y=l.get(w);return y===void 0&&(y=l.size,l.set(w,y)),y}const u=e.map(w=>o(w.trim())),c=n.map(w=>o(w.trim())),h=new Ms(u,e),f=new Ms(c,n),m=h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,s,(w,y)=>e[w]===n[y]?n[y].length===0?.1:1+Math.log(1+n[y].length):.99):this.myersDiffingAlgorithm.compute(h,f,s);let p=m.diffs,b=m.hitTimeout;p=As(h,f,p),p=i1(h,f,p);const d=[],x=w=>{if(i)for(let y=0;y<w;y++){const A=N+y,D=v+y;if(e[A]!==n[D]){const V=this.refineDiff(e,n,new O(new B(A,A+1),new B(D,D+1)),s,i,r);for(const _ of V.mappings)d.push(_);V.hitTimeout&&(b=!0)}}};let N=0,v=0;for(const w of p){pt(()=>w.seq1Range.start-N===w.seq2Range.start-v);const y=w.seq1Range.start-N;x(y),N=w.seq1Range.endExclusive,v=w.seq2Range.endExclusive;const A=this.refineDiff(e,n,w,s,i,r);A.hitTimeout&&(b=!0);for(const D of A.mappings)d.push(D)}x(e.length-N);const L=new kt(e),E=new kt(n),T=bs(d,L,E);let q=[];return r.computeMoves&&(q=this.computeMoves(T,e,n,u,c,s,i,r)),pt(()=>{function w(A,D){if(A.lineNumber<1||A.lineNumber>D.length)return!1;const V=D[A.lineNumber-1];return!(A.column<1||A.column>V.length+1)}function y(A,D){return!(A.startLineNumber<1||A.startLineNumber>D.length+1||A.endLineNumberExclusive<1||A.endLineNumberExclusive>D.length+1)}for(const A of T){if(!A.innerChanges)return!1;for(const D of A.innerChanges)if(!(w(D.modifiedRange.getStartPosition(),n)&&w(D.modifiedRange.getEndPosition(),n)&&w(D.originalRange.getStartPosition(),e)&&w(D.originalRange.getEndPosition(),e)))return!1;if(!y(A.modified,n)||!y(A.original,e))return!1}return!0}),new Et(T,q,b)}computeMoves(e,n,r,s,i,l,o,u){return Ja(e,n,r,s,i,l).map(f=>{const m=this.refineDiff(n,r,new O(f.original.toOffsetRange(),f.modified.toOffsetRange()),l,o,u),p=bs(m.mappings,new kt(n),new kt(r),!0);return new Ra(f,p)})}refineDiff(e,n,r,s,i,l){const u=o1(r).toRangeMapping2(e,n),c=new Ft(e,u.originalRange,i),h=new Ft(n,u.modifiedRange,i),f=c.length+h.length<500?this.dynamicProgrammingDiffing.compute(c,h,s):this.myersDiffingAlgorithm.compute(c,h,s);let m=f.diffs;return m=As(c,h,m),m=Es(c,h,m,(b,d)=>b.findWordContaining(d)),l.extendToSubwords&&(m=Es(c,h,m,(b,d)=>b.findSubWordContaining(d),!0)),m=r1(c,h,m),m=a1(c,h,m),{mappings:m.map(b=>new le(c.translateRange(b.seq1Range),h.translateRange(b.seq2Range))),hitTimeout:f.hitTimeout}}}function o1(t){return new ae(new $(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new $(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const Ps={getLegacy:()=>new $a,getDefault:()=>new l1};function Ae(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class g{constructor(e,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=Ae(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class oe{constructor(e,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Ae(Math.max(Math.min(1,n),0),3),this.l=Ae(Math.max(Math.min(1,r),0),3),this.a=Ae(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=e.a,l=Math.max(n,r,s),o=Math.min(n,r,s);let u=0,c=0;const h=(o+l)/2,f=l-o;if(f>0){switch(c=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),l){case n:u=(r-s)/f+(r<s?6:0);break;case r:u=(s-n)/f+2;break;case s:u=(n-r)/f+4;break}u*=60,u=Math.round(u)}return new oe(u,c,h,i)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:s,a:i}=e;let l,o,u;if(r===0)l=o=u=s;else{const c=s<.5?s*(1+r):s+r-s*r,h=2*s-c;l=oe._hue2rgb(h,c,n+1/3),o=oe._hue2rgb(h,c,n),u=oe._hue2rgb(h,c,n-1/3)}return new g(Math.round(l*255),Math.round(o*255),Math.round(u*255),i)}}class Xe{constructor(e,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Ae(Math.max(Math.min(1,n),0),3),this.v=Ae(Math.max(Math.min(1,r),0),3),this.a=Ae(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),l=Math.min(n,r,s),o=i-l,u=i===0?0:o/i;let c;return o===0?c=0:i===n?c=((r-s)/o%6+6)%6:i===r?c=(s-n)/o+2:c=(n-r)/o+4,new Xe(Math.round(c*60),u,i,e.a)}static toRGBA(e)
Line truncated
|
||||
`);i.lastIndex=0;let h;for(;(h=i.exec(c))!==null;){const f=c.substring(0,h.index),m=(f.match(/\n/g)||[]).length,p=l+m,b=h[0].split(`
|
||||
`),d=b.length,x=p+d-1,N=f.lastIndexOf(`
|
||||
`)+1,v=h.index-N+1,L=b[b.length-1],E=d===1?v+h[0].length:L.length+1,T={startLineNumber:p,startColumn:v,endLineNumber:x,endColumn:E},q=(h.groups??{}).label??"",w=((h.groups??{}).separator??"")!=="",y={range:T,text:q,hasSeparatorLine:w,shouldBeInComments:!0};(y.text||y.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<y.range.startLineNumber)&&n.push(y),i.lastIndex=h.index+h[0].length}}return n}function p1(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(f1,""),{text:t,hasSeparatorLine:e}}class w1{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new En)}}var Is;(function(t){async function e(r){let s;const i=await Promise.all(r.map(l=>l.then(o=>o,o=>{s||(s=o)})));if(typeof s<"u")throw s;return i}t.settled=e;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(l){i(l)}})}t.withAsyncBody=n})(Is||(Is={}));class x1{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new Y("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new w1;return this._unsatisfiedConsumers.push(e),e.p}}}const re=class re{constructor(e,n){this._onReturn=n,this._producerConsumer=new x1,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(const i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(e){return new re(n=>{n.emitMany(e)})}static fromPromise(e){return new re(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new re(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new re(async n=>{await Promise.all(e.map(async r=>{for await(const s of r)n.emitOne(s)}))})}static map(e,n){return new re(async r=>{for await(const s of e)r.emitOne(n(s))})}map(e){return re.map(this,e)}static coalesce(e){return re.filter(e,n=>!!n)}coalesce(){return re.coalesce(this)}static filter(e,n){return new re(async r=>{for await(const s of e)n(s)&&r.emitOne(s)})}filter(e){return re.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};re.EMPTY=re.fromArray([]);let Bs=re;class y1{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=qe(e);const r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+i),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=qe(e),n=qe(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=qe(e),n=qe(n);const r=this.values,s=this.prefixSum;if(e>=r.length)return!1;const i=r.length-e;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subar
Line truncated
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
(function(){"use strict";var he,J;class $o{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ft.isErrorNoTelemetry(e)?new ft(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Bo=new $o;function ln(t){Uo(t)||Bo.onUnexpectedError(t)}function Wn(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:ft.isErrorNoTelemetry(t),cause:r?Wn(r):void 0,code:t.code}}return t}const Hn="Canceled";function Uo(t){return t instanceof si?!0:t instanceof Error&&t.name===Hn&&t.message===Hn}class si extends Error{constructor(){super(Hn),this.name=this.message}}class ft extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof ft)return e;const n=new ft;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class le extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,le.prototype)}}function qo(t,e="Unreachable"){throw new Error(e)}function jo(t,e="unexpected state"){if(!t)throw typeof e=="string"?new le(`Assertion Failed: ${e}`):e}function un(t){if(!t()){debugger;t(),ln(new le("Assertion Failed"))}}function ai(t,e){let n=0;for(;n<t.length-1;){const r=t[n],i=t[n+1];if(!e(r,i))return!1;n++}return!0}function Wo(t){return typeof t=="string"}function Ho(t){return!!t&&typeof t[Symbol.iterator]=="function"}var cn;(function(t){function e(L){return!!L&&typeof L=="object"&&typeof L[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(L){yield L}t.single=i;function s(L){return e(L)?L:i(L)}t.wrap=s;function a(L){return L||n}t.from=a;function*o(L){for(let S=L.length-1;S>=0;S--)yield L[S]}t.reverse=o;function u(L){return!L||L[Symbol.iterator]().next().done===!0}t.isEmpty=u;function l(L){return L[Symbol.iterator]().next().value}t.first=l;function h(L,S){let P=0;for(const D of L)if(S(D,P++))return!0;return!1}t.some=h;function f(L,S){let P=0;for(const D of L)if(!S(D,P++))return!1;return!0}t.every=f;function m(L,S){for(const P of L)if(S(P))return P}t.find=m;function*g(L,S){for(const P of L)S(P)&&(yield P)}t.filter=g;function*d(L,S){let P=0;for(const D of L)yield S(D,P++)}t.map=d;function*p(L,S){let P=0;for(const D of L)yield*S(D,P++)}t.flatMap=p;function*y(...L){for(const S of L)Ho(S)?yield*S:yield S}t.concat=y;function x(L,S,P){let D=P;for(const T of L)D=S(D,T);return D}t.reduce=x;function v(L){let S=0;for(const P of L)S++;return S}t.length=v;function*b(L,S,P=L.length){for(S<-L.length&&(S=0),S<0&&(S+=L.length),P<0?P+=L.length:P>L.length&&(P=L.length);S<P;S++)yield L[S]}t.slice=b;function _(L,S=Number.POSITIVE_INFINITY){const P=[];if(S===0)return[P,L];const D=L[Symbol.iterator]();for(let T=0;T<S;T++){const w=D.next();if(w.done)return[P,t.empty()];P.push(w.value)}return[P,{[Symbol.iterator](){return D}}]}t.consume=_;async function N(L){const S=[];for await(const P of L)S.push(P);return S}t.asyncToArray=N;async function M(L){let S=[];for await(const P of L)S=S.concat(P);return S}t.asyncToArrayFlat=M})(cn||(cn={}));function O1(t,e){}function oi(t){if(cn.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function zo(...t){return fn(()=>oi(t))}class Go{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function fn(t){return new Go(t)}const Vn=class Vn{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{oi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===et.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Vn.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Vn.DISABLE_DISPOSED_WARNING=!1;let Ot=Vn;const ri=class ri{constructor(){this._store=new Ot,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ri.None=Object.freeze({dispose(){}});let et=ri;const Ct=class Ct{constructor(e){this.element=e,this.next=Ct.Undefined,this.prev=Ct.Undefined}};Ct.Undefined=new Ct(void 0);let Y=Ct;class Jo{constructor(){this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}get size(){return this._size}is
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class Zo extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}}class Yo extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}}class Qn{constructor(e){this.value=e}}const Ko=2;class Pe{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new Jn(e?.onListenerError??ln,this._options?.leakWarningThreshold??Qo):void 0,this._perfMon=this._options?._profName?new Gn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new Yo(`${o}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||ln)(l),et.None}if(this._disposed)return et.None;n&&(e=e.bind(n));const i=new Qn(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Xn.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Qn?(this._deliveryQueue??=new el,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=fn(()=>{s?.(),this._removeListener(i)});return r instanceof Ot?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*Ko<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||ln;if(!r){e.value(n);return}try{e.value(n)}catch(i){r(i)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Qn)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class el{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function tl(){return globalThis._VSCODE_NLS_MESSAGES}function li(){return globalThis._VSCODE_NLS_LANGUAGE}const nl=li()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function ui(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),nl&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function $(t,e,...n){return ui(typeof t=="number"?rl(t,e):e,n)}function rl(t,e){const n=tl()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const ht="en";let Zn=!1,Yn=!1,Kn=!1,mn,er=ht,ci=ht,il,$e;const tt=globalThis;let me;typeof tt.vscode<"u"&&typeof tt.vscode.process<"u"?me=tt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(me=process);const sl=typeof me?.versions?.electron=="string"&&me?.type==="renderer";if(typeof me=="object"){Zn=me.platform==="win32",Yn=me.platform==="darwin",Kn=me.platform==="linux",Kn&&me.env.SNAP&&me.env.SNAP_REVISION,me.env.CI||me.env.BUILD_ARTIFACTSTAGINGDIRECTORY||me.env.GITHUB_WORKSPACE,mn=ht,er=ht;const t=me.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);mn=e.userLocale,ci=e.osLocale,er=e.resolvedLanguage||ht,il=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!sl?($e=navigator.userAgent,Zn=$e.indexOf("Windows")>=0,Yn=$e.indexOf("Macintosh")>=0,($e.indexOf("Macintosh")>=0||$e.indexOf("iPad")>=0||$e.inde
Line truncated
|
||||
`||t===" "}class vn{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class ku{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Ru(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function*Mu(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function Eu(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Tu(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Pu(t,e){for(const n of e)t.push(n)}var vr;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(vr||(vr={}));function jt(t,e){return(n,r)=>e(t(n),t(r))}const Wt=(t,e)=>t-e;function Cu(t){return(e,n)=>-t(e,n)}const Dt=class Dt{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Dt(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new Dt(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||vr.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};Dt.empty=new Dt(e=>{});let js=Dt;class j{static fromTo(e,n){return new j(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let i=r;for(;i<n.length&&n[i].start<=e.endExclusive;)i++;if(r===i)n.splice(r,0,e);else{const s=Math.min(e.start,n[r].start),a=Math.max(e.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new j(s,a))}}static tryCreate(e,n){if(!(e>n))return new j(e,n)}static ofLength(e){return new j(0,e)}static ofStartAndLength(e,n){return new j(e,e+n)}static emptyAt(e){return new j(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new le(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new j(this.start+e,this.endExclusive+e)}deltaStart(e){return new j(this.start+e,this.endExclusive)}deltaEnd(e){return new j(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new j(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new j(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new le(`Invalid join: ${this.toString()} and ${e.toString()}`);return new j(this.start,e.endExclusive)}}function yt(t,e){const n=wt(t,e);return n===-1?void 0:t[n]}function wt(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?i=a+1:s=a}return i-1}function Iu(t,e){const n=Lr(t,e);return n===t.length?void 0:t[n]}function Lr(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?s=a:i=a+1}return i}const $n=class $n{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if($n.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=wt(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};$n.assertInvariants=!1;let Ln=$n;const ve=class ve{static ofLength(e,n){return new ve(e,e+n)}static fromRange(e){return new ve(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new ve(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];le
Line truncated
|
||||
`?(n++,r=0):r++;return new Te(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Te(this.lineCount,this.columnCount+e.columnCount):new Te(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new B(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new B(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new B(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return H.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new Q(e.lineNumber,e.column+this.columnCount):new Q(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Te.zero=new Te(0,0);let Ht=Te;class Fu{getOffsetRange(e){return new j(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return B.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new xt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new xt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new xt.deps.TextEdit(n)}}const ii=class ii{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};ii._deps=void 0;let xt=ii;class Vu extends Fu{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
|
||||
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new Q(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new Q(n,i+1)}if(e.column<1)return new Q(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new Q(e.lineNumber,r+1):e}getPosition(e){const n=wt(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new Q(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new xt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Du{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new Q(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new B(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Vu(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new B(e,1,e,Number.MAX_SAFE_INTEGER))}}class Ou extends Du{constructor(e,n){jo(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Ht(this._lineCount-1,e.length)}}class Nn extends Ou{constructor(e){super(n=>e[n-1],e.length)}}class Xe{static joinReplacements(e,n){if(e.length===0)throw new le;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const o=e[a];if(s+=o.text,a<e.length-1){const u=e[a+1],l=B.fromPositions(o.range.getEndPosition(),u.range.getStartPosition()),h=n.getValueOfRange(l);s+=h}}return new Xe(B.fromPositions(r,i),s)}static fromStringReplacement(e,n){return new Xe(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new Xe(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return Xe.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=pl(n,r),s=Ht.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),a=r.substring(i),o=B.fromPositions(s,this.range.getEndPosition());return new Xe(o,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=bl(n,r),s=Ht.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-i),o=B.fromPositions(this.range.getStartPosition(),s);return new Xe(o,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const u of e){const l=new Le(new H(s,u.original.startLineNumber),new H(a,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}const o=new Le(new H(s,n+1),new H(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ne(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new le("not a valid diff");return new Ne(new B(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new B(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ne(new B(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new B(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Ws(this.original.endLineNumberExclusive,e)&&Ws(this.modified.endLineNumberExclusive,n))return new Ne(new B(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new B(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ne(B.fromPositions(new Q(this.original.startLineNumber,1),vt(new Q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),B.fromPositions(new Q(this.modified.startLineNumber,1),vt(new Q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ne(B.fromPositions(vt(new Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),vt(new Q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),B.fromPositions(vt(new Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),vt(new Q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new le}}function vt(t,e){if(t.lineNumber<1)return new Q(1,1);if(t.lineNumber>e.length)return new Q(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new Q(t.lineNumber,n.length+1):t}function Ws(t,e){return t>=1&&t<=e.length}class qe extends Le{static fromRangeMappings(e){const n=H.join(e.map(i=>H.fromRangeInclusive(i.originalRange))),r=H.join(e.map(i=>H.fromRangeInclusive(i.modifiedRange)));return new qe(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new qe(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new qe(this.original,this.modified,[this.toRangeMapping()])}}class Ne{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ne(i.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],i=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new le("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Ne(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new Xe(this.originalRange,n)}}function Hs(t,e,n,r=!1){const i=[];for(const s of Mu(t.map(a=>$u(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new qe(a.original.join(o.original),a.modified.join(o.modified),s.map(u=>u.innerChanges[0])))}return un(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:ai(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive<a.ori
Line truncated
|
||||
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=i}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-n/(this.totalCount+e.totalCount)}};sn.chrKeys=new Map;let _n=sn;class zu{compute(e,n,r=Gt.instance,i){if(e.length===0||n.length===0)return je.trivial(e,n);const s=new Sr(e.length,n.length),a=new Sr(e.length,n.length),o=new Sr(e.length,n.length);for(let d=0;d<e.length;d++)for(let p=0;p<n.length;p++){if(!r.isValid())return je.trivialTimedOut(e,n);const y=d===0?0:s.get(d-1,p),x=p===0?0:s.get(d,p-1);let v;e.getElement(d)===n.getElement(p)?(d===0||p===0?v=0:v=s.get(d-1,p-1),d>0&&p>0&&a.get(d-1,p-1)===3&&(v+=o.get(d-1,p-1)),v+=i?i(d,p):1):v=-1;const b=Math.max(y,x,v);if(b===v){const _=d>0&&p>0?o.get(d-1,p-1):0;o.set(d,p,_+1),a.set(d,p,3)}else b===y?(o.set(d,p,0),a.set(d,p,1)):b===x&&(o.set(d,p,0),a.set(d,p,2));s.set(d,p,b)}const u=[];let l=e.length,h=n.length;function f(d,p){(d+1!==l||p+1!==h)&&u.push(new K(new j(d+1,l),new j(p+1,h))),l=d,h=p}let m=e.length-1,g=n.length-1;for(;m>=0&&g>=0;)a.get(m,g)===3?(f(m,g),m--,g--):a.get(m,g)===1?m--:g--;return f(-1,-1),u.reverse(),new je(u,!1)}}class Xs{compute(e,n,r=Gt.instance){if(e.length===0||n.length===0)return je.trivial(e,n);const i=e,s=n;function a(p,y){for(;p<i.length&&y<s.length&&i.getElement(p)===s.getElement(y);)p++,y++;return p}let o=0;const u=new Gu;u.set(0,a(0,0));const l=new Ju;l.set(0,u.get(0)===0?null:new Qs(null,0,0,u.get(0)));let h=0;e:for(;;){if(o++,!r.isValid())return je.trivialTimedOut(i,s);const p=-Math.min(o,s.length+o%2),y=Math.min(o,i.length+o%2);for(h=p;h<=y;h+=2){const x=h===y?-1:u.get(h+1),v=h===p?-1:u.get(h-1)+1,b=Math.min(Math.max(x,v),i.length),_=b-h;if(b>i.length||_>s.length)continue;const N=a(b,_);u.set(h,N);const M=b===x?l.get(h+1):l.get(h-1);if(l.set(h,N!==b?new Qs(M,b,_,N-b):M),u.get(h)===i.length&&u.get(h)-h===s.length)break e}}let f=l.get(h);const m=[];let g=i.length,d=s.length;for(;;){const p=f?f.x+f.length:0,y=f?f.y+f.length:0;if((p!==g||y!==d)&&m.push(new K(new j(p,g),new j(y,d))),!f)break;g=f.x,d=f.y,f=f.prev}return m.reverse(),new je(m,!1)}}class Qs{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class Gu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Ju{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Sn{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const l=s.trimStart();o=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let l=0;l<u;l++)this.elements.push(s.charCodeAt(l));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new j(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Ks(e>0?this.elements[e-1]:-1),r=Ks(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=Ys(n),i+=Ys(r),i}translateOffset(e,n="right"){const r=wt(this.firstElementOffsetByLineIdx,s=>s<=e),i=e-this.firstElementOffsetByLineIdx[r];return new Q(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?B.fromPositions(r,r):B.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Nt(this.elements[e]))return;let n=e;for(;n>0&&Nt(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Nt(this.elements[r]);)r++;return new j(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Nt(this.elements[e]))return;l
Line truncated
|
||||
`).length>=15&&Zu(f,g=>g.length>=2)>=2}),a=tc(t,a),a}function Zu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function Yu(t,e,n,r){const i=[],s=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new _n(u.original,e,u)),a=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new _n(u.modified,n,u))),o=new Set;for(const u of s){let l=-1,h;for(const f of a){const m=u.computeSimilarity(f);m>l&&(l=m,h=f)}if(l>.9&&h&&(a.delete(h),i.push(new Le(u.range,h.range)),o.add(u.source),o.add(h.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function Ku(t,e,n,r,i,s){const a=[],o=new pu;for(const m of t)for(let g=m.original.startLineNumber;g<m.original.endLineNumberExclusive-2;g++){const d=`${e[g-1]}:${e[g+1-1]}:${e[g+2-1]}`;o.add(d,{range:new H(g,g+3)})}const u=[];t.sort(jt(m=>m.modified.startLineNumber,Wt));for(const m of t){let g=[];for(let d=m.modified.startLineNumber;d<m.modified.endLineNumberExclusive-2;d++){const p=`${n[d-1]}:${n[d+1-1]}:${n[d+2-1]}`,y=new H(d,d+3),x=[];o.forEach(p,({range:v})=>{for(const _ of g)if(_.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&_.modifiedLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive){_.originalLineRange=new H(_.originalLineRange.startLineNumber,v.endLineNumberExclusive),_.modifiedLineRange=new H(_.modifiedLineRange.startLineNumber,y.endLineNumberExclusive),x.push(_);return}const b={modifiedLineRange:y,originalLineRange:v};u.push(b),x.push(b)}),g=x}if(!s.isValid())return[]}u.sort(Cu(jt(m=>m.modifiedLineRange.length,Wt)));const l=new Ie,h=new Ie;for(const m of u){const g=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,d=l.subtractFrom(m.modifiedLineRange),p=h.subtractFrom(m.originalLineRange).getWithDelta(g),y=d.getIntersection(p);for(const x of y.ranges){if(x.length<3)continue;const v=x,b=x.delta(-g);a.push(new Le(b,v)),l.addRange(v),h.addRange(b)}}a.sort(jt(m=>m.original.startLineNumber,Wt));const f=new Ln(t);for(let m=0;m<a.length;m++){const g=a[m],d=f.findLastMonotonous(M=>M.original.startLineNumber<=g.original.startLineNumber),p=yt(t,M=>M.modified.startLineNumber<=g.modified.startLineNumber),y=Math.max(g.original.startLineNumber-d.original.startLineNumber,g.modified.startLineNumber-p.modified.startLineNumber),x=f.findLastMonotonous(M=>M.original.startLineNumber<g.original.endLineNumberExclusive),v=yt(t,M=>M.modified.startLineNumber<g.modified.endLineNumberExclusive),b=Math.max(x.original.endLineNumberExclusive-g.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-g.modified.endLineNumberExclusive);let _;for(_=0;_<y;_++){const M=g.original.startLineNumber-_-1,L=g.modified.startLineNumber-_-1;if(M>r.length||L>i.length||l.contains(L)||h.contains(M)||!ea(r[M-1],i[L-1],s))break}_>0&&(h.addRange(new H(g.original.startLineNumber-_,g.original.startLineNumber)),l.addRange(new H(g.modified.startLineNumber-_,g.modified.startLineNumber)));let N;for(N=0;N<b;N++){const M=g.original.endLineNumberExclusive+N,L=g.modified.endLineNumberExclusive+N;if(M>r.length||L>i.length||l.contains(L)||h.contains(M)||!ea(r[M-1],i[L-1],s))break}N>0&&(h.addRange(new H(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+N)),l.addRange(new H(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+N))),(_>0||N>0)&&(a[m]=new Le(new H(g.original.startLineNumber-_,g.original.endLineNumberExclusive+N),new H(g.modified.startLineNumber-_,g.modified.endLineNumberExclusive+N)))}return a}function ea(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new Xs().compute(new Sn([t],new B(1,1,1,t.length),!1),new Sn([e],new B(1,1,1,e.length),!1),n);let s=0;const a=K.invert(i.diffs,t.length);for(const h of a)h.seq1Range.forEach(f=>{Ar(t.charCodeAt(f))||s++});function o(h){let f=0;for(let m=0;m<t.length;m++)Ar(h.charCodeAt(m))||f++;return f}const u=o(t.length>e.length?t:e);return s/u>.6&&u>10}function ec(t){if(t.length===0)return t;t.sort(jt(n=>n.original.startLineNumber,Wt));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],i=t[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,a=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function tc(t,e){const n=new Ln(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new Le(new H(1,1),new H(1,1)),s=yt(t,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),e}function ta(t,e,n){let r=n;return r=na(t,e,r),r=na(t,e,r),r=nc(t,e,r),r}function na(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let s=1;s<n.length;s++){const a=r[r.length-1];let o=n[s];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const u=o.seq1Range.start-a.seq1Range.endExclusive;let l;for(l=1;l<=u&&!(t.getElement(o.seq1Range.start-l)!==t.getElement(o.seq1Range.endExclusive-l)||e.getElement(o.seq2Range.
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function aa(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class oc{constructor(){this.dynamicProgrammingDiffing=new zu,this.myersDiffingAlgorithm=new Xs}computeDiff(e,n,r){if(e.length<=1&&Ru(e,n,(L,S)=>L===S))return new vn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new vn([new qe(new H(1,e.length+1),new H(1,n.length+1),[new Ne(new B(1,1,e.length,e[e.length-1].length+1),new B(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?Gt.instance:new Hu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(L){let S=a.get(L);return S===void 0&&(S=a.size,a.set(L,S)),S}const u=e.map(L=>o(L.trim())),l=n.map(L=>o(L.trim())),h=new sa(u,e),f=new sa(l,n),m=h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,i,(L,S)=>e[L]===n[S]?n[S].length===0?.1:1+Math.log(1+n[S].length):.99):this.myersDiffingAlgorithm.compute(h,f,i);let g=m.diffs,d=m.hitTimeout;g=ta(h,f,g),g=sc(h,f,g);const p=[],y=L=>{if(s)for(let S=0;S<L;S++){const P=x+S,D=v+S;if(e[P]!==n[D]){const T=this.refineDiff(e,n,new K(new j(P,P+1),new j(D,D+1)),i,s,r);for(const w of T.mappings)p.push(w);T.hitTimeout&&(d=!0)}}};let x=0,v=0;for(const L of g){un(()=>L.seq1Range.start-x===L.seq2Range.start-v);const S=L.seq1Range.start-x;y(S),x=L.seq1Range.endExclusive,v=L.seq2Range.endExclusive;const P=this.refineDiff(e,n,L,i,s,r);P.hitTimeout&&(d=!0);for(const D of P.mappings)p.push(D)}y(e.length-x);const b=new Nn(e),_=new Nn(n),N=Hs(p,b,_);let M=[];return r.computeMoves&&(M=this.computeMoves(N,e,n,u,l,i,s,r)),un(()=>{function L(P,D){if(P.lineNumber<1||P.lineNumber>D.length)return!1;const T=D[P.lineNumber-1];return!(P.column<1||P.column>T.length+1)}function S(P,D){return!(P.startLineNumber<1||P.startLineNumber>D.length+1||P.endLineNumberExclusive<1||P.endLineNumberExclusive>D.length+1)}for(const P of N){if(!P.innerChanges)return!1;for(const D of P.innerChanges)if(!(L(D.modifiedRange.getStartPosition(),n)&&L(D.modifiedRange.getEndPosition(),n)&&L(D.originalRange.getStartPosition(),e)&&L(D.originalRange.getEndPosition(),e)))return!1;if(!S(P.modified,n)||!S(P.original,e))return!1}return!0}),new vn(N,M,d)}computeMoves(e,n,r,i,s,a,o,u){return Qu(e,n,r,i,s,a).map(f=>{const m=this.refineDiff(n,r,new K(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,o,u),g=Hs(m.mappings,new Nn(n),new Nn(r),!0);return new ku(f,g)})}refineDiff(e,n,r,i,s,a){const u=lc(r).toRangeMapping2(e,n),l=new Sn(e,u.originalRange,s),h=new Sn(n,u.modifiedRange,s),f=l.length+h.length<500?this.dynamicProgrammingDiffing.compute(l,h,i):this.myersDiffingAlgorithm.compute(l,h,i);let m=f.diffs;return m=ta(l,h,m),m=ia(l,h,m,(d,p)=>d.findWordContaining(p)),a.extendToSubwords&&(m=ia(l,h,m,(d,p)=>d.findSubWordContaining(p),!0)),m=rc(l,h,m),m=ac(l,h,m),{mappings:m.map(d=>new Ne(l.translateRange(d.seq1Range),h.translateRange(d.seq2Range))),hitTimeout:f.hitTimeout}}}function lc(t){return new Le(new H(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new H(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const oa={getLegacy:()=>new Uu,getDefault:()=>new oc};function Qe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class A{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=Qe(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class _e{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Qe(Math.max(Math.min(1,n),0),3),this.l=Qe(Math.max(Math.min(1,r),0),3),this.a=Qe(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let u=0,l=0;const h=(o+a)/2,f=a-o;if(f>0){switch(l=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),a){case n:u=(r-i)/f+(r<i?6:0);break;case r:u=(i-n)/f+2;break;case i:u=(n-r)/f+4;break}u*=60,u=Math.round(u)}return new _e(u,l,h,s)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,u;if(r===0)a=o=u=i;else{const l=i<.5?i*(1+r):i+r-i*r,h=2*i-l;a=_e._hue2rgb(h,l,n+1/3),o=_e._hue2rgb(h,l,n),u=_e._hue2rgb(h,l,n-1/3)}return new A(Math.round(a*255),Math.round(o*255),Math.round(u*255),s)}}class _t{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Qe(Math.max(Math.min(1,n),0),3),this.v=Qe(Math.max(Math.min(1,r),0),3),this.a=Qe(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,u=s===0?0:o/s;let l;return o===0?l=0:s===n?l=((r-i)/o%6+6)%6:s===r?l=(i-n)/o+2:l=(n-r)/o+4,new _t(Math.round(l*60),u,s,e.a)}static toRGBA(e)
Line truncated
|
||||
`);s.lastIndex=0;let h;for(;(h=s.exec(l))!==null;){const f=l.substring(0,h.index),m=(f.match(/\n/g)||[]).length,g=a+m,d=h[0].split(`
|
||||
`),p=d.length,y=g+p-1,x=f.lastIndexOf(`
|
||||
`)+1,v=h.index-x+1,b=d[d.length-1],_=p===1?v+h[0].length:b.length+1,N={startLineNumber:g,startColumn:v,endLineNumber:y,endColumn:_},M=(h.groups??{}).label??"",L=((h.groups??{}).separator??"")!=="",S={range:N,text:M,hasSeparatorLine:L,shouldBeInComments:!0};(S.text||S.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<S.range.startLineNumber)&&n.push(S),s.lastIndex=h.index+h[0].length}}return n}function bc(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(hc,""),{text:t,hasSeparatorLine:e}}class yc{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new si)}}var ha;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(ha||(ha={}));class wc{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new le("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new yc;return this._unsatisfiedConsumers.push(e),e.p}}}const pe=class pe{constructor(e,n){this._onReturn=n,this._producerConsumer=new wc,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new pe(n=>{n.emitMany(e)})}static fromPromise(e){return new pe(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new pe(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new pe(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new pe(async r=>{for await(const i of e)r.emitOne(n(i))})}map(e){return pe.map(this,e)}static coalesce(e){return pe.filter(e,n=>!!n)}coalesce(){return pe.coalesce(this)}static filter(e,n){return new pe(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return pe.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};pe.EMPTY=pe.fromArray([]);let ma=pe;class xc{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=gt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=gt(e),n=gt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=gt(e),n=gt(n);const r=this.values,i=this.prefixSum;if(e>=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.suba
Line truncated
|
||||
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const L=m(4);L>=0?b+=String.fromCharCode(L):f=4;break;default:f=5}_=r;continue}if(N>=0&&N<=31)if(Qt(N)){b+=t.substring(_,r),f=2;break}else f=6;r++}return b}function y(){if(i="",f=0,s=r,u=o,h=l,r>=n)return s=n,a=17;let b=t.charCodeAt(r);if(Tr(b)){do r++,i+=String.fromCharCode(b),b=t.charCodeAt(r);while(Tr(b));return a=15}if(Qt(b))return r++,i+=String.fromCharCode(b),b===13&&t.charCodeAt(r)===10&&(r++,i+=`
|
||||
`),o++,l=r,a=14;switch(b){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=p(),a=10;case 47:const _=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!Qt(t.charCodeAt(r));)r++;return i=t.substring(_,r),a=12}if(t.charCodeAt(r+1)===42){r+=2;const N=n-1;let M=!1;for(;r<N;){const L=t.charCodeAt(r);if(L===42&&t.charCodeAt(r+1)===47){r+=2,M=!0;break}r++,Qt(L)&&(L===13&&t.charCodeAt(r)===10&&r++,o++,l=r)}return M||(r++,f=1),i=t.substring(_,r),a=13}return i+=String.fromCharCode(b),r++,a=16;case 45:if(i+=String.fromCharCode(b),r++,r===n||!St(t.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=d(),a=11;default:for(;r<n&&x(b);)r++,b=t.charCodeAt(r);if(s!==r){switch(i=t.substring(s,r),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(b),r++,a=16}}function x(b){if(Tr(b)||Qt(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let b;do b=y();while(b>=12&&b<=15);return b}return{setPosition:g,getPosition:()=>r,scan:e?v:y,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function Tr(t){return t===32||t===9}function Qt(t){return t===10||t===13}function St(t){return t>=48&&t<=57}var da;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(da||(da={}));const Se=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),At=200,ga={" ":{"\n":new Array(At).fill(0).map((t,e)=>`
|
||||
`+" ".repeat(e)),"\r":new Array(At).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(At).fill(0).map((t,e)=>`\r
|
||||
`+" ".repeat(e))}," ":{"\n":new Array(At).fill(0).map((t,e)=>`
|
||||
`+" ".repeat(e)),"\r":new Array(At).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(At).fill(0).map((t,e)=>`\r
|
||||
`+" ".repeat(e))}},kc=[`
|
||||
`,"\r",`\r
|
||||
`];function Rc(t,e,n){let r,i,s,a,o;if(e){for(a=e.offset,o=a+e.length,s=a;s>0&&!pa(t,s-1);)s--;let N=o;for(;N<t.length&&!pa(t,N);)N++;i=t.substring(s,N),r=Mc(i,n)}else i=t,r=0,s=0,a=0,o=t.length;const u=Ec(n,t),l=kc.includes(u);let h=0,f=0,m;n.insertSpaces?m=Se[n.tabSize||4]??kt(Se[1],n.tabSize||4):m=" ";const g=m===" "?" ":" ";let d=Er(i,!1),p=!1;function y(){if(h>1)return kt(u,h)+kt(m,r+f);const N=m.length*(r+f);return!l||N>ga[g][u].length?u+kt(m,r+f):N<=0?u:ga[g][u][N]}function x(){let N=d.scan();for(h=0;N===15||N===14;)N===14&&n.keepLines?h+=1:N===14&&(h=1),N=d.scan();return p=N===16||d.getTokenError()!==0,N}const v=[];function b(N,M,L){!p&&(!e||M<o&&L>a)&&t.substring(M,L)!==N&&v.push({offset:M,length:L-M,content:N})}let _=x();if(n.keepLines&&h>0&&b(kt(u,h),0,0),_!==17){let N=d.getTokenOffset()+s,M=m.length*r<20&&n.insertSpaces?Se[m.length*r]:kt(m,r);b(M,s,N)}for(;_!==17;){let N=d.getTokenOffset()+d.getTokenLength()+s,M=x(),L="",S=!1;for(;h===0&&(M===12||M===13);){let D=d.getTokenOffset()+s;b(Se[1],N,D),N=d.getTokenOffset()+d.getTokenLength()+s,S=M===12,L=S?y():"",M=x()}if(M===2)_!==1&&f--,n.keepLines&&h>0||!n.keepLines&&_!==1?L=y():n.keepLines&&(L=Se[1]);else if(M===4)_!==3&&f--,n.keepLines&&h>0||!n.keepLines&&_!==3?L=y():n.keepLines&&(L=Se[1]);else{switch(_){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?L=y():L=Se[1];break;case 5:n.keepLines&&h>0||!n.keepLines?L=y():L=Se[1];break;case 12:L=y();break;case 13:h>0?L=y():S||(L=Se[1]);break;case 6:n.keepLines&&h>0?L=y():S||(L=Se[1]);break;case 10:n.keepLines&&h>0?L=y():M===6&&!S&&(L="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?L=y():(M===12||M===13)&&!S?L=Se[1]:M!==5&&M!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(M===12||M===13)&&(L=y())}M===17&&(n.keepLines&&h>0?L=y():L=n.insertFinalNewline?u:"");const P=d.getTokenOffset()+s;b(L,N,P),_=M}return v}function kt(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}function Mc(t,e){let n=0,r=0;const i=e.tabSize||4;for(;n<t.length;){let s=t.charAt(n);if(s===Se[1])r++;else if(s===" ")r+=i;else break;n++}return Math.floor(r/i)}function Ec(t,e){for(let n=0;n<e.length;n++){const r=e.charAt(n);if(r==="\r")return n+1<e.length&&e.charAt(n+1)===`
|
||||
`?`\r
|
||||
`:"\r";if(r===`
|
||||
`)return`
|
||||
`}return t&&t.eol||`
|
||||
`}function pa(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}var kn;(function(t){t.DEFAULT={allowTrailingComma:!1}})(kn||(kn={}));function Tc(t,e=[],n=kn.DEFAULT){let r=null,i=[];const s=[];function a(u){Array.isArray(i)?i.push(u):r!==null&&(i[r]=u)}return Cc(t,{onObjectBegin:()=>{const u={};a(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const u=[];a(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(u,l,h)=>{e.push({error:u,offset:l,length:h})}},n),i[0]}function ba(t){if(!t.parent||!t.parent.children)return[];const e=ba(t.parent);if(t.parent.type==="property"){const n=t.parent.children[0].value;e.push(n)}else if(t.parent.type==="array"){const n=t.parent.children.indexOf(t);n!==-1&&e.push(n)}return e}function Pr(t){switch(t.type){case"array":return t.children.map(Pr);case"object":const e=Object.create(null);for(let n of t.children){const r=n.children[1];r&&(e[n.children[0].value]=Pr(r))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function Pc(t,e,n=!1){return e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}function ya(t,e,n=!1){if(Pc(t,e,n)){const r=t.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=e;i++){const s=ya(r[i],e,n);if(s)return s}return t}}function Cc(t,e,n=kn.DEFAULT){const r=Er(t,!1),i=[];function s(w){return w?()=>w(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(w){return w?()=>w(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function o(w){return w?k=>w(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(w){return w?k=>w(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const l=a(e.onObjectBegin),h=u(e.onObjectProperty),f=s(e.onObjectEnd),m=a(e.onArrayBegin),g=s(e.onArrayEnd),d=u(e.onLiteralValue),p=o(e.onSeparator),y=s(e.onComment),x=o(e.onError),v=n&&n.disallowComments,b=n&&n.allowTrailingComma;function _(){for(;;){const w=r.scan();switch(r.getTokenError()){case 4:N(14);break;case 5:N(15);break;case 3:N(13);break;case 1:v||N(11);break;case 2:N(12);break;case 6:N(16);break}switch(w){case 12:case 13:v?N(10):y();break;case 16:N(1);break;case 15:case 14:break;default:return w}}}function N(w,k=[],C=[]){if(x(w),k.length+C.length>0){let I=r.getToken();for(;I!==17;){if(k.indexOf(I)!==-1){_();break}else if(C.indexOf(I)!==-1)break;I=_()}}}function M(w){const k=r.getTokenValue();return w?d(k):(h(k),i.push(k)),_(),!0}function L(){switch(r.getToken()){case 11:const w=r.getTokenValue();let k=Number(w);isNaN(k)&&(N(2),k=0),d(k);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return _(),!0}function S(){return r.getToken()!==10?(N(3,[],[2,5]),!1):(M(!1),r.getToken()===6?(p(":"),_(),T()||N(4,[],[2,5])):N(5,[],[2,5]),i.pop(),!0)}function P(){l(),_();let w=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(w||N(4,[],[]),p(","),_(),r.getToken()===2&&b)break}else w&&N(6,[],[]);S()||N(4,[],[2,5]),w=!0}return f(),r.getToken()!==2?N(7,[2],[]):_(),!0}function D(){m(),_();let w=!0,k=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||N(4,[],[]),p(","),_(),r.getToken()===4&&b)break}else k&&N(6,[],[]);w?(i.push(0),w=!1):i[i.length-1]++,T()||N(4,[],[4,5]),k=!0}return g(),w||i.pop(),r.getToken()!==4?N(8,[4],[]):_(),!0}function T(){switch(r.getToken()){case 3:return D();case 1:return P();case 10:return M(!0);default:return L()}}return _(),r.getToken()===17?n.allowEmptyContent?!0:(N(4,[],[]),!1):T()?(r.getToken()!==17&&N(9,[],[]),!0):(N(4,[],[]),!1)}const it=Er;var wa;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(wa||(wa={}));var xa;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(xa||(xa={}));const Ic=Tc,Fc=ya,Vc=ba,Dc=Pr;var va;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t
Line truncated
|
||||
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
||||
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ee.create(0,e);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return ee.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var R;(function(t){const e=Object.prototype.toString;function n(g){return typeof g<"u"}t.defined=n;function r(g){return typeof g>"u"}t.undefined=r;function i(g){return g===!0||g===!1}t.boolean=i;function s(g){return e.call(g)==="[object String]"}t.string=s;function a(g){return e.call(g)==="[object Number]"}t.number=a;function o(g,d,p){return e.call(g)==="[object Number]"&&d<=g&&g<=p}t.numberRange=o;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}t.integer=u;function l(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}t.uinteger=l;function h(g){return e.call(g)==="[object Function]"}t.func=h;function f(g){return g!==null&&typeof g=="object"}t.objectLiteral=f;function m(g,d){return Array.isArray(g)&&g.every(d)}t.typedArray=m})(R||(R={}));class en{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(en.isIncremental(r)){const i=xo(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),u=Math.max(i.end.line,0);let l=this._lineOffsets;const h=wo(r.text,!1,s);if(u-o===h.length)for(let m=0,g=h.length;m<g;m++)l[m+o+1]=h[m];else h.length<1e4?l.splice(o+1,u-o,...h):this._lineOffsets=l=l.slice(0,o+1).concat(h,l.slice(u+1));const f=r.text.length-(a-s);if(f!==0)for(let m=o+1+h.length,g=l.length;m<g;m++)l[m]=l[m]+f}else if(en.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=wo(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Me;(function(t){function e(i,s,a,o){return new en(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof en)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let a=i.getText(),o=zr(s.map(Uc),(h,f)=>{let m=h.range.start.line-f.range.start.line;return m===0?h.range.start.character-f.range.start.character:m}),u=0;const l=[];for(const h of o){let f=i.offsetAt(h.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&l.push(a.substring(u,f)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}t.applyEdits=r})(Me||(Me={}));function zr(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);zr(r,e),zr(i,e);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)e(r[s],i[a])<=0?t[o++]=r[s++]:t[o++]=i[a++];for(;s<r.length;)t[o++]=r[s++];for(;a<i.length;)t[o++]=i[a++];return t}function wo(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function xo(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Uc(t){const e=xo(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var G;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]
Line truncated
|
||||
`;for(let s=0;s<t.length;s++)i+=r+Zr(t[s],r,n),s<t.length-1&&(i+=","),i+=`
|
||||
`;return i+=e+"]",i}else{const i=Object.keys(t);if(i.length===0)return"{}";let s=`{
|
||||
`;for(let a=0;a<i.length;a++){const o=i[a];s+=r+JSON.stringify(o)+": "+Zr(t[o],r,n),a<i.length-1&&(s+=","),s+=`
|
||||
`}return s+=e+"}",s}}return n(t)}class Kc{constructor(e,n=[],r=Promise,i={}){this.schemaService=e,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(e){for(let n=this.contributions.length-1;n>=0;n--){const r=this.contributions[n].resolveCompletion;if(r){const i=r(e);if(i)return i}}return this.promiseConstructor.resolve(e)}doComplete(e,n,r){const i={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(n);let o=r.getNodeFromOffset(a,!0);if(this.isInComment(e,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){const m=s[a-1];(o.type==="object"&&m==="}"||o.type==="array"&&m==="]")&&(o=o.parent)}const u=this.getCurrentWord(e,a);let l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=W.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let m=a-u.length;m>0&&s[m-1]==='"'&&m--,l=W.create(e.positionAt(m),n)}const h=new Map,f={add:m=>{let g=m.label;const d=h.get(g);if(d)d.documentation||(d.documentation=m.documentation),d.detail||(d.detail=m.detail),d.labelDetails||(d.labelDetails=m.labelDetails);else{if(g=g.replace(/[\n]/g,"↵"),g.length>60){const p=g.substr(0,57).trim()+"...";h.has(p)||(g=p)}m.textEdit=Ve.replace(l,m.insertText),m.label=g,h.set(g,m),i.items.push(m)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:m=>{console.error(m)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(e.uri,r).then(m=>{const g=[];let d=!0,p="",y;if(o&&o.type==="string"){const v=o.parent;v&&v.type==="property"&&v.keyNode===o&&(d=!v.valueNode,y=v,p=s.substr(o.offset+1,o.length-2),v&&(o=v.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(N=>{(!y||y!==N)&&h.set(N.keyNode.value,jr.create("__"))});let b="";d&&(b=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),m?this.getPropertyCompletions(m,r,o,d,b,f):this.getSchemaLessPropertyCompletions(r,o,p,f);const _=Qr(o);this.contributions.forEach(N=>{const M=N.collectPropertyCompletions(e.uri,_,u,d,b==="",f);M&&g.push(M)}),!m&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(f.add({kind:we.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,b),insertTextFormat:ie.Snippet,documentation:""}),f.setAsIncomplete())}const x={};return m?this.getValueCompletions(m,r,o,a,e,f,x):this.getSchemaLessValueCompletions(r,o,a,e,f),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,e,f,g),this.promiseConstructor.all(g).then(()=>{if(f.getNumberOfProposals()===0){let v=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(v=o.offset+o.length);const b=this.evaluateSeparatorAfter(e,v);this.addFillerValueCompletions(x,b,f)}return i})})}getPropertyCompletions(e,n,r,i,s,a){n.getMatchingSchemas(e.schema,r.offset).forEach(u=>{if(u.node===r&&!u.inverted){const l=u.schema.properties;l&&Object.keys(l).forEach(f=>{const m=l[f];if(typeof m=="object"&&!m.deprecationMessage&&!m.doNotSuggest){const g={kind:we.Property,label:f,insertText:this.getInsertTextForProperty(f,m,i,s),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(m.markdownDescription)||m.description||""};m.suggestSortText!==void 0&&(g.sortText=m.suggestSortText),g.insertText&&Zt(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});const h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){const f=(m,g=void 0)=>{const d={kind:we.Property,label:m,insertText:this.getInsertTextForProperty(m,void 0,i,s),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(m),documentation:g||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(d.sortText=h.suggestSortText),d.insertText&&Zt(d.insertText,`$1${s}`)&&(d.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(d)};if(h.enum)for(let m=0;m<h.enum.length;m++){let g;h.markdownEnumDescriptions&&m<h.markdownEnumDescriptions.length?g=this.fromMarkup(h.markdownEnumDescriptions[m]):h.enumDescriptions&&m<h.enumDescriptions.length&&(g=h.enumDescriptions[m]),f(h.enum[m],g)}h.const&&f(h.const)}}})}getSchemaLessPropertyCompletions(e,n,r,i){const s=a=>{a.properties.forEach(o=>{const u=o.keyNode.value;i.add({kind:we.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(n.parent)if(n.parent.type==="property"){const a=n.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:we.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:ie.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueC
Line truncated
|
||||
`,g=g+`
|
||||
`+d+"]",d+=" ",o="array";h=m+d+a.bodyText.split(`
|
||||
`).join(`
|
||||
`+d)+g+n,l=l||h,f=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:ie.Snippet,filterText:f}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&i<5&&this.addDefaultValueCompletions(e.items,n,r,i+1)}addEnumValueCompletions(e,n,r){if(Re(e.const)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n),insertTextFormat:ie.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,s=e.enum.length;i<s;i++){const a=e.enum[i];let o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(o=e.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:ie.Snippet,documentation:o})}}collectTypes(e,n){if(Array.isArray(e.enum)||Re(e.const))return;const r=e.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(e,n,r){e.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:ie.Snippet,detail:E("New object"),documentation:""}),e.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:ie.Snippet,detail:E("New array"),documentation:""})}addBooleanValueCompletion(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n),insertTextFormat:ie.Snippet,documentation:""})}addNullValueCompletion(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:ie.Snippet,documentation:""})}addDollarSchemaCompletions(e,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:we.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,e),insertTextFormat:ie.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,n){const r=JSON.stringify(e,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(e,n){return Zr(e,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(e,n){switch(typeof e){case"object":return e===null?"${1:null}"+n:this.getInsertTextForValue(e,n);case"string":let r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+n}return this.getInsertTextForValue(e,n)}getSuggestionKind(e){if(Array.isArray(e)){const n=e;e=n.length>0?n[0]:void 0}if(!e)return we.Value;switch(e){case"string":return we.Value;case"object":return we.Module;case"property":return we.Property;default:return we.Value}}getLabelTextForMatchingNode(e,n){switch(e.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,n,r){switch(e.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:const i=n.getText().substr(e.offset,e.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(e,n,r,i){const s=this.getInsertTextForValue(e,"");if(!r)return s;const a=s+": ";let o,u=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){const l=n.defaultSnippets[0].body;Re(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),u+=n.enum.length),Re(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),u++),Re(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),u++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),u+=n.examples.length),u===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.items&&(l="array")),l){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}ret
Line truncated
|
||||
\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(e,n){const r=it(e.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,n,r){const i=it(n.getText(),!0),s=e.items;for(let a=s.length-1;a>=0;a--){const o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(e,n,r){const i=it(e.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<r;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=r}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:st.Markdown,value:e}}doesSupportMarkdown(){if(!Re(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(st.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return Re(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return Re(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class e1{constructor(e,n=[],r){this.schemaService=e,this.contributions=n,this.promise=r||Promise}doHover(e,n,r){const i=e.offsetAt(n);let s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);const a=s;if(s.type==="string"){const h=s.parent;if(h&&h.type==="property"&&h.keyNode===s&&(s=h.valueNode,!s))return this.promise.resolve(null)}const o=W.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),u=h=>({contents:h,range:o}),l=Qr(s);for(let h=this.contributions.length-1;h>=0;h--){const m=this.contributions[h].getInfoContribution(e.uri,l);if(m)return m.then(g=>u(g))}return this.schemaService.getSchemaForResource(e.uri,r).then(h=>{if(h&&s){const f=r.getMatchingSchemas(h.schema,s.offset);let m,g,d,p;f.every(x=>{if(x.node===s&&!x.inverted&&x.schema&&(m=m||x.schema.title,g=g||x.schema.markdownDescription||Yr(x.schema.description),x.schema.enum)){const v=x.schema.enum.indexOf(ot(s));x.schema.markdownEnumDescriptions?d=x.schema.markdownEnumDescriptions[v]:x.schema.enumDescriptions&&(d=Yr(x.schema.enumDescriptions[v])),d&&(p=x.schema.enum[v],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});let y="";return m&&(y=Yr(m)),g&&(y.length>0&&(y+=`
|
||||
|
||||
`),y+=g),d&&(y.length>0&&(y+=`
|
||||
|
||||
`),y+=`\`${t1(p)}\`: ${d}`),u([y])}return null})}}function Yr(t){if(t)return t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
||||
|
||||
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function t1(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}class n1{constructor(e,n){this.jsonSchemaService=e,this.promise=n,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:ye.Error)}doValidation(e,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);const s=[],a={},o=l=>{const h=l.range.start.line+" "+l.range.start.character+" "+l.message;a[h]||(a[h]=!0,s.push(l))},u=l=>{let h=r?.trailingCommas?Cn(r.trailingCommas):ye.Error,f=r?.comments?Cn(r.comments):this.commentSeverity,m=r?.schemaValidation?Cn(r.schemaValidation):ye.Warning,g=r?.schemaRequest?Cn(r.schemaRequest):ye.Warning;if(l){const d=(p,y)=>{if(n.root&&g){const x=n.root,v=x.type==="object"?x.properties[0]:void 0;if(v&&v.keyNode.value==="$schema"){const b=v.valueNode||v,_=W.create(e.positionAt(b.offset),e.positionAt(b.offset+b.length));o(He.create(_,p,g,y))}else{const b=W.create(e.positionAt(x.offset),e.positionAt(x.offset+1));o(He.create(b,p,g,y))}}};if(l.errors.length)d(l.errors[0],G.SchemaResolveError);else if(m){for(const y of l.warnings)d(y,G.SchemaUnsupportedFeature);const p=n.validate(e,l.schema,m,r?.schemaDraft);p&&p.forEach(o)}ko(l.schema)&&(f=void 0),Ro(l.schema)&&(h=void 0)}for(const d of n.syntaxErrors){if(d.code===G.TrailingComma){if(typeof h!="number")continue;d.severity=h}o(d)}if(typeof f=="number"){const d=E("Comments are not permitted in JSON.");n.comments.forEach(p=>{o(He.create(p,d,f,G.CommentNotPermitted))})}return s};if(i){const l=i.id||"schemaservice://untitled/"+r1++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(f=>u(f))}return this.jsonSchemaService.getSchemaForResource(e.uri,n).then(l=>u(l))}getLanguageStatus(e,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,n)}}}let r1=0;function ko(t){if(t&&typeof t=="object"){if(Fe(t.allowComments))return t.allowComments;if(t.allOf)for(const e of t.allOf){const n=ko(e);if(Fe(n))return n}}}function Ro(t){if(t&&typeof t=="object"){if(Fe(t.allowTrailingCommas))return t.allowTrailingCommas;const e=t;if(Fe(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(const n of t.allOf){const r=Ro(n);if(Fe(r))return r}}}function Cn(t){switch(t){case"error":return ye.Error;case"warning":return ye.Warning;case"ignore":return}}const Mo=48,i1=57,s1=65,In=97,a1=102;function ne(t){return t<Mo?0:t<=i1?t-Mo:(t<In&&(t+=In-s1),t>=In&&t<=a1?t-In+10:0)}function o1(t){if(t[0]==="#")switch(t.length){case 4:return{red:ne(t.charCodeAt(1))*17/255,green:ne(t.charCodeAt(2))*17/255,blue:ne(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ne(t.charCodeAt(1))*17/255,green:ne(t.charCodeAt(2))*17/255,blue:ne(t.charCodeAt(3))*17/255,alpha:ne(t.charCodeAt(4))*17/255};case 7:return{red:(ne(t.charCodeAt(1))*16+ne(t.charCodeAt(2)))/255,green:(ne(t.charCodeAt(3))*16+ne(t.charCodeAt(4)))/255,blue:(ne(t.charCodeAt(5))*16+ne(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ne(t.charCodeAt(1))*16+ne(t.charCodeAt(2)))/255,green:(ne(t.charCodeAt(3))*16+ne(t.charCodeAt(4)))/255,blue:(ne(t.charCodeAt(5))*16+ne(t.charCodeAt(6)))/255,alpha:(ne(t.charCodeAt(7))*16+ne(t.charCodeAt(8)))/255}}}class l1{constructor(e){this.schemaService=e}findDocumentSymbols(e,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Zt(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const m=[];for(const g of i.items)if(g.type==="object"){for(const d of g.properties)if(d.keyNode.value==="key"&&d.valueNode){const p=Mt.create(e.uri,Ye(e,g));if(m.push({name:Eo(d.valueNode),kind:De.Function,location:p}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),m}}return m}const o=[{node:i,containerName:""}];let u=0,l=!1;const h=[],f=(m,g)=>{m.type==="array"?m.items.forEach(d=>{d&&o.push({node:d,containerName:g})}):m.type==="object"&&m.properties.forEach(d=>{const p=d.valueNode;if(p)if(s>0){s--;const y=Mt.create(e.uri,Ye(e,d)),x=g?g+"."+d.keyNode.value:d.keyNode.value;h.push({name:this.getKeyLabel(d),kind:this.getSymbolKind(p.type),location:y,containerName:g}),o.push({node:p,containerName:x})}else l=!0})};for(;u<o.length;){const m=o[u++];f(m.node,m.containerName)}return l&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),h}findDocumentSymbols2(e,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||Zt(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const m=[];for(const g of i.items)if(g.type==="object"){for(const d of g.properties)if(d.keyNode.value==="key"&&d.valueNode){const p=Ye(e,g),y=Ye(e,d.keyNode);if(m.push({name:Eo(d.valueNode),kind:De.Function,range:p,selectionRange:y}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),m}}return m}const o=[],uLine truncated
|
||||
`,keepLines:e?.keepLines===!0};return Oc(t.getText(),r,i).map(s=>Ve.replace(W.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),s.content))}var se;(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(se||(se={}));class Fn{constructor(e,n){this.propertyName=e??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let n=0;e.noKeyName?n=this.childrenProperties.length:n=x1(this.childrenProperties,e,w1),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,e)}else this.childrenProperties.push(e);return e}}function w1(t,e){const n=t.propertyName.toLowerCase(),r=e.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function x1(t,e,n){const r=e.propertyName.toLowerCase(),i=t[0].propertyName.toLowerCase(),s=t[t.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return t.length;let a=0,o=t.length-1;for(;a<=o;){let u=o+a>>1,l=n(e,t[u]);if(l>0)a=u+1;else if(l<0)o=u-1;else return u}return-a-1}function v1(t,e){const n={...e,keepLines:!1},r=Me.applyEdits(t,ei(t,n,void 0)),i=Me.create("test://test.json","json",0,r),s=L1(i),a=N1(i,s),o=ei(a,n,void 0),u=Me.applyEdits(a,o);return[Ve.replace(W.create(ee.create(0,0),t.positionAt(t.getText().length)),u)]}function L1(t){const e=t.getText(),n=it(e,!1);let r=new Fn,i=r,s=r,a=r,o,u=0,l=0,h,f,m=-1,g=-1,d=0,p=0,y=[],x=!1,v=!1;for(;(o=n.scan())!==17;){if(x===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?a.endLineNumber=b-1:s.endLineNumber=b-1,d=b,x=!1}if(v===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(d=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==u){for(let b=u;b<n.getTokenStartLine();b++){const _=t.getText(W.create(ee.create(b,0),ee.create(b+1,0))).length;l=l+_}u=n.getTokenStartLine()}switch(o){case 10:{if(h===void 0||h===1||h===5&&y[y.length-1]===se.Object){const b=new Fn(n.getTokenValue(),d);a=s,s=i.addChildProperty(b)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),y[y.length-1]===se.Object)i=s;else if(y[y.length-1]===se.Array){const b=new Fn(n.getTokenValue(),d);b.noKeyName=!0,a=s,s=i.addChildProperty(b),i=s}y.push(se.Array),s.type=se.Array,d=n.getTokenStartLine(),d++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===se.Array){const b=new Fn(n.getTokenValue(),d);b.noKeyName=!0,a=s,s=i.addChildProperty(b)}s.type=se.Object,y.push(se.Object),i=s,d=n.getTokenStartLine(),d++;break}case 4:{p=n.getTokenStartLine(),y.pop(),s.endLineNumber===void 0&&(h===2||h===4)&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=m,s.indexWhereToAddComa=g,a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=p,d=p+1;break}case 2:{p=n.getTokenStartLine(),y.pop(),h!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=m,s.indexWhereToAddComa=g),a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),d=p+1;break}case 5:{p=n.getTokenStartLine(),s.endLineNumber===void 0&&(y[y.length-1]===se.Object||y[y.length-1]===se.Array&&(h===2||h===4))&&(s.endLineNumber=p,s.commaIndex=n.getTokenOffset()-l,s.commaLine=p),(h===2||h===4)&&(a=s,s=s?s.parent:void 0,i=s),d=p+1;break}case 13:{h===5&&m===n.getTokenStartLine()&&(y[y.length-1]===se.Array&&(f===2||f===4)||y[y.length-1]===se.Object)&&(y[y.length-1]===se.Array&&(f===2||f===4)||y[y.length-1]===se.Object)&&(s.endLineNumber=void 0,x=!0),(h===1||h===3)&&m===n.getTokenStartLine()&&(v=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(f=h,h=o,m=n.getTokenStartLine(),g=n.getTokenOffset()+n.getTokenLength()-l)}return r}function N1(t,e){if(e.childrenProperties.length===0)return t;const n=Me.create("test://test.json","json",0,t.getText()),r=[];for(Io(r,e,e.beginningLineNumber);r.length>0;){const i=r.shift(),s=i.propertyTreeArray;let a=i.beginningLineNumber;for(let o=0;o<s.length;o++){const u=s[o],l=W.create(ee.create(u.beginningLineNumber,0),ee.create(u.endLineNumber+1,0)),h=t.getText(l),f=Me.create("test://test.json","json",0,h);if(u.lastProperty===!0&&o!==s.length-1){const d=u.lineWhereToAddComma-u.beginningLineNumber,p=u.indexWhereToAddComa,y={range:W.create(ee.create(d,p),ee.create(d,p)),text:","};Me.update(f,[y],1)}else if(u.lastProperty===!1&&o===s.length-1){const d=u.commaIndex,y=u.commaLine-u.beginningLineNumber,x={range:W.create(ee.create(y,d),ee.create(y,d+1)),text:""};Me.update(f,[x],1)}const m=u.endLineNumber-u.beginningLineNumber+1,g={range:W.create(ee.create(a,0),ee.create(a+m,0)),text:f.getText()};Me.update(n,[g],1),Io(r,u,a),a=a+m}}return n}function Io(t,e,n){if(e.childrenProperties.length!==0)if(e.type===se.Object){let r=1/0;for(const s of e.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);const i=r-e.beginningLineNumber;n=n+i,t.push(new Vo(n,e.childrenProperties))}else e.type===se.Array&&Fo(t,e,n)}function Fo(t,e,n){for(const r of e.childrenProperties){if(r.type===se.Object){let i=1/0;for(const
Line truncated
|
||||
-51330
File diff suppressed because it is too large.
Load diff
-1
@@ -1 +0,0 @@
|
||||
define("vs/basic-languages/monaco.contribution",["require","../editor.api-i0YVFWkl"],(function(a,r){"use strict";const d={},n={};class l{static getOrCreate(s){return n[s]||(n[s]=new l(s)),n[s]}constructor(s){this._languageId=s,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((i,o)=>{this._lazyLoadPromiseResolve=i,this._lazyLoadPromiseReject=o})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,d[this._languageId].loader().then(s=>this._lazyLoadPromiseResolve(s),s=>this._lazyLoadPromiseReject(s))),this._lazyLoadPromise}}function t(e){const s=e.id;d[s]=e,r.languages.register(e);const i=l.getOrCreate(s);r.languages.registerTokensProviderFactory(s,{create:async()=>(await i.load()).language}),r.languages.onLanguageEncountered(s,async()=>{const o=await i.load();r.languages.setLanguageConfiguration(s,o.conf)})}t({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,s)=>a(["../abap-D-t0cyap"],e,s))}),t({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,s)=>a(["../apex-CcIm7xu6"],e,s))}),t({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,s)=>a(["../azcli-BA0tQDCg"],e,s))}),t({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,s)=>a(["../bat-C397hTD6"],e,s))}),t({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,s)=>a(["../bicep-DF5aW17k"],e,s))}),t({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,s)=>a(["../cameligo-plsz8qhj"],e,s))}),t({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,s)=>a(["../clojure-Y2auQMzK"],e,s))}),t({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,s)=>a(["../coffee-Bu45yuWE"],e,s))}),t({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,s)=>a(["../cpp-CkKPQIni"],e,s))}),t({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,s)=>a(["../cpp-CkKPQIni"],e,s))}),t({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,s)=>a(["../csharp-CX28MZyh"],e,s))}),t({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>new Promise((e,s)=>a(["../csp-D8uWnyxW"],e,s))}),t({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,s)=>a(["../css-CaeNmE3S"],e,s))}),t({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>new Promise((e,s)=>a(["../cypher-DVThT8BS"],e,s))}),t({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,s)=>a(["../dart-CmGfCvrO"],e,s))}),t({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,s)=>a(["../dockerfile-CZqqYdch"],e,s))}),t({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,s)=>a(["../ecl-30fUercY"],e,s))}),t({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,s)=>a(["../elixir-xjPaIfzF"],e,s))}),t({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,s)=>a(["../flow9-DqtmStfK"],e,s))}),t({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,s)=>a(["../fsharp-BOMdg4U1"],e,s))}),t({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJME-ah8"],e,s)).then(e=>e.TagAutoInterpolationDollar)}),t({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJME-ah8"],e,s)).then(e=>e.TagAngleInterpolationDollar)}),t({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJME-ah8"],e,s)).then(e=>e.TagBracketInterpolationDollar)}),t({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJME-ah8"],e,s)).then(e=>e.TagAngleInterpolationBracket)}),t({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJME-ah8"],e,s)).then(e=>e.TagBracketInterpolationBracket)}),t({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-CJMLine truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/cssMode-CGp6dFmI",["exports","./workers-CbP2cVmy","./lspLanguageFeatures-A02kBDb6","./editor.api-i0YVFWkl"],(function(t,a,e,d){"use strict";class l{constructor(s){this._defaults=s,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=a.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...s){let i;return this._getClient().then(h=>{i=h}).then(h=>{if(this._worker)return this._worker.withSyncedResources(s)}).then(h=>i)}}function f(c){const s=[],i=[],h=new l(c);s.push(h);const o=(...n)=>h.getLanguageServiceWorker(...n);function A(){const{languageId:n,modeConfiguration:r}=c;g(i),r.completionItems&&i.push(d.languages.registerCompletionItemProvider(n,new e.CompletionAdapter(o,["/","-",":"]))),r.hovers&&i.push(d.languages.registerHoverProvider(n,new e.HoverAdapter(o))),r.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(n,new e.DocumentHighlightAdapter(o))),r.definitions&&i.push(d.languages.registerDefinitionProvider(n,new e.DefinitionAdapter(o))),r.references&&i.push(d.languages.registerReferenceProvider(n,new e.ReferenceAdapter(o))),r.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(n,new e.DocumentSymbolAdapter(o))),r.rename&&i.push(d.languages.registerRenameProvider(n,new e.RenameAdapter(o))),r.colors&&i.push(d.languages.registerColorProvider(n,new e.DocumentColorAdapter(o))),r.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(n,new e.FoldingRangeAdapter(o))),r.diagnostics&&i.push(new e.DiagnosticsAdapter(n,o,c.onDidChange)),r.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(n,new e.SelectionRangeAdapter(o))),r.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(n,new e.DocumentFormattingEditProvider(o))),r.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(n,new e.DocumentRangeFormattingEditProvider(o)))}return A(),s.push(m(i)),m(s)}function m(c){return{dispose:()=>g(c)}}function g(c){for(;c.length;)c.pop().dispose()}t.CompletionAdapter=e.CompletionAdapter,t.DefinitionAdapter=e.DefinitionAdapter,t.DiagnosticsAdapter=e.DiagnosticsAdapter,t.DocumentColorAdapter=e.DocumentColorAdapter,t.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,t.DocumentHighlightAdapter=e.DocumentHighlightAdapter,t.DocumentLinkAdapter=e.DocumentLinkAdapter,t.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,t.DocumentSymbolAdapter=e.DocumentSymbolAdapter,t.FoldingRangeAdapter=e.FoldingRangeAdapter,t.HoverAdapter=e.HoverAdapter,t.ReferenceAdapter=e.ReferenceAdapter,t.RenameAdapter=e.RenameAdapter,t.SelectionRangeAdapter=e.SelectionRangeAdapter,t.fromPosition=e.fromPosition,t.fromRange=e.fromRange,t.toRange=e.toRange,t.toTextEdit=e.toTextEdit,t.WorkerManager=l,t.setupMode=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-900
@@ -1,900 +0,0 @@
|
||||
define("vs/editor.api-i0YVFWkl",["exports"],(function(Io){"use strict";var Od,Fd,ac,_C,yp,Lp,Su,tl,yu,xp,yC,kp,zd,Dp,Ep,Np,Tp,ku,Rp,Mp,Pp,Ud,Iu,LC,Du,$d,Eu,kC,Ap,Op,Nu,Tu,Ru,Fp,Wp,Bp,Hp,Vp,jd,zp,Up,$p,jp,qp,Kp,Gp,Pu,Au,Zp,Yp,EC,NC,fc,Xp,Ou,Qp,Jp,il,Fu,em,tm,im,TC,nm,qd,Wu,sm,om,lm,RC,MC,Bu,zu,cm,dm,hm,um,fm,OC,$u,FC,gm,WC,BC,ju,pm,HC,mm,_m,bm,nl,pc,sl,Gd,vm,wm,Sm,ym,Lm;function IB(){return globalThis._VSCODE_NLS_MESSAGES}function VT(){return globalThis._VSCODE_NLS_LANGUAGE}const Ete=VT()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function qS(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),Ete&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function p(o,e,...t){return qS(typeof o=="number"?DB(o,e):e,t)}function DB(o,e){const t=IB()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=DB(o,e):i=e;const n=qS(i,t);return{value:n,original:e===i?n:qS(e,t)}}function Nte(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const bt=window,YE=class YE{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};YE.INSTANCE=new YE;let zT=YE;function EB(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function UT(o){return zT.INSTANCE.getZoomFactor(o)}const Im=navigator.userAgent,Fs=Im.indexOf("Firefox")>=0,KS=Im.indexOf("AppleWebKit")>=0,GC=Im.indexOf("Chrome")>=0,qu=!GC&&Im.indexOf("Safari")>=0,NB=!GC&&!qu&&KS;Im.indexOf("Electron/")>=0;const TB=Im.indexOf("Android")>=0;let $T=!1;if(typeof bt.matchMedia=="function"){const o=bt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=bt.matchMedia("(display-mode: fullscreen)");$T=o.matches,EB(bt,o,({matches:t})=>{$T&&e.matches||($T=t)})}class Tte{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Dm.isErrorNoTelemetry(e)?new Dm(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const jT=new Tte;function GS(o){jT.onUnexpectedError(o)}function Ee(o){Do(o)||jT.onUnexpectedError(o)}function Di(o){Do(o)||jT.onUnexpectedExternalError(o)}function qT(o){if(o instanceof Error){const{name:e,message:t,cause:i}=o,n=o.stacktrace||o.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:Dm.isErrorNoTelemetry(o),cause:i?qT(i):void 0,code:o.code}}return o}const ZS="Canceled";function Do(o){return o instanceof cr?!0:o instanceof Error&&o.name===ZS&&o.message===ZS}class cr extends Error{constructor(){super(ZS),this.name=this.message}}function Rte(){const o=new Error(ZS);return o.name=o.message,o}function dr(o){return o?new Error(`Illegal argument: ${o}`):new Error("Illegal argument")}function YS(o){return o?new Error(`Illegal state: ${o}`):new Error("Illegal state")}class Mte extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Dm extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Dm)return e;const t=new Dm;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Ce extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ce.prototype)}}function KT(o,e){if(!o)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function ZC(o,e="Unreachable"){throw new Error(e)}function YC(o,e="unexpected state"){if(!o)throw typeof e=="string"?new Ce(`Assertion Failed: ${e}`):e}function RB(o,e="Soft Assertion Failed"){o||Ee(new Ce(e))}function Xd(o){if(!o()){debugger;o(),Ee(new Ce("Assertion Failed"))}}function XC(o,e){let t=0;for(;t<o.length-1;){const i=o[t],n=o[t+1];if(!e(i,n))return!1;t++}return!0}function ji(o){return typeof o=="string"}function nn(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function Pte(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function bc(o){return typeof o=="number"&&!isNaN(o)}function GT(o){return!!o&&typeof o[Symbol.iterator]=="function"}function MB(o){return o===!0||o===!1}function Qn(o){return typeof o>"u"}function sn(o){return!hr(o)}function hr(o){return Qn(o)||o===null}function it(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Qd(o){return YC(o!=null,"Argument is `undefined` or `null`."),o}function Ku(o){return typeof o=="function"}function Ate(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)Ote(o[i],e[i])}function Ote(o,e){if(ji(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Ku(e)){try{if(o instanceof e)return}catch{}if(!hr(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function l5e(o){return o}const Gu="en";let QC=!1,JC=!1,e1=!1,PB=!1,ZT=!1,YT=!1,AB=!1,XS,QS=Gu,OB=Gu,Fte,Cc;const vc=globalThis;let Eo;typeof vc.vscode<"u"&&typeof vc.vscode.process<"u"?Eo=vc.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Eo=process);const Wte=typeof Eo?.versions?.electron=="string"&&Eo?.type==="renderer";if(typeof Eo=="object"){QC=Eo.platform==="win32",JC=Eo.platform==="darwin",e1=Eo.platform==="linux",e1&&Eo.env.SNAP&&Eo.env.SNAP_REVISION,Eo.env.CI||Eo.env.BUILD_ARTIFACTSTAGINGDIRECTORY||Eo.env.GITHUB_WORKSPACE,XS=Gu,QS=Gu;const o=Eo.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o);XS=e.userLocale,OB=e.osLocale,QS=e.resolvedLanguage||Gu,Fte=e.languagePack?.translationsConfigFile}catch{}PB=!0}else typeof navigator=="object"&&!Wte?(Cc=navigator.userAgent,QC=Cc.indexOf("Windows")>=0,JC=Cc.indexOf("Macintosh")>=0,YT=(Cc.indexOf("Macintosh")>=0||Cc.indexOf("iPad")>=0||Cc.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,e1=Cc.indexOf("Linux")>=0,AB=Cc?.indexOf("Mobi")>=0,ZT=!0,QS=VT()||Gu,XS=navigator.language.toLowerCase(),OB=XS):console.error("Unable to resolve platform.");let JS=0;JC?JS=1:QC?JS=3:e1&&(JS=2);const gn=QC,ze=JC,Ws=e1,ma=PB,ol=ZT,Bte=ZT&&typeof vc.importScripts=="function"?vc.origin:void 0,ur=YT,FB=AB,XT=JS,rl=Cc,Hte=QS,Vte=typeof vc.postMessage=="function"&&!vc.importScripts,ey=(()=>{if(Vte){const o=[];vc.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),vc.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),so=JC||YT?2:QC?1:3;let WB=!0,BB=!1;function HB(){if(!BB){BB=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,WB=new Uint16Array(o.buffer)[0]===513}retu
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class aie extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}}class lie extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}}class lR{constructor(e){this.value=e}}const cie=2;let P=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new rR(e?.onListenerError??Ee,this._options?.leakWarningThreshold??rie):void 0,this._perfMon=this._options?._profName?new oR(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new lie(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Ee)(c),A.None}if(this._disposed)return A.None;t&&(e=e.bind(t));const n=new lR(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=aR.create(),s=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof lR?(this._deliveryQueue??=new $B,this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const r=ue(()=>{s?.(),this._removeListener(n)});return i instanceof U?i.add(r):Array.isArray(i)&&i.push(r),r},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(this._size*cie<=t.length){let s=0;for(let r=0;r<t.length;r++)t[r]?t[s++]=t[r]:n&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=s}}_deliver(e,t){if(!e)return;const i=this._options?.onListenerError||Ee;if(!i){e.value(t);return}try{e.value(t)}catch(n){i(n)}}_deliverQueue(e){const t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof lR)this._deliver(this._listeners,e);else{const t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}};const die=()=>new $B;class $B{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class Qu extends P{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Jn,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class jB extends Qu{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class hie extends P{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}}class uie{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new P({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),ue(Yu(()=>{this.hasListeners&&this.unhook(t);const n=this.events.indexOf(t);this.events.splice(n,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.f
Line truncated
|
||||
`),n=Lne(i[t+1]);if(n)return new jR(n.fileName,n.line,n.column,n.id)}constructor(e,t,i,n){this.fileName=e,this.line=t,this.column=i,this.id=n}}function Lne(o){const e=o.match(/\((.*):(\d+):(\d+)\)/);if(e)return{fileName:e[1],line:parseInt(e[2]),column:parseInt(e[3]),id:o};const t=o.match(/at ([^\(\)]*):(\d+):(\d+)/);if(t)return{fileName:t[1],line:parseInt(t[2]),column:parseInt(t[3]),id:o}}let qR;function xne(o){qR=o}let A6;function kne(o){A6=o}class O6{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t,i=Gi.ofCaller()){const n=t===void 0?void 0:e,s=t===void 0?e:t;return qR({owner:n,debugName:()=>{const r=OR(s);if(r!==void 0)return r;const l=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(l)return`${this.debugName}.${l[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:s},r=>s(this.read(r),r),i)}flatten(){return qR({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,t){return e.add(A6(this,t)),this}}class Am extends O6{constructor(e){super(),this._observers=new Set,Wn()?.handleObservableCreated(this,e)}addObserver(e){const t=this._observers.size;this._observers.add(e),t===0&&this.onFirstObserverAdded(),t!==this._observers.size&&Wn()?.handleOnListenerCountChanged(this,this._observers.size)}removeObserver(e){const t=this._observers.delete(e);t&&this._observers.size===0&&this.onLastObserverRemoved(),t&&Wn()?.handleOnListenerCountChanged(this,this._observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}debugGetObservers(){return this._observers}}function Le(o,e,t=Gi.ofCaller()){let i;return typeof o=="string"?i=new xn(void 0,o,void 0):i=new xn(o,void 0,void 0),new p1(i,e,Ro,t)}class p1 extends Am{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,Wn()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let n;t||(t=n=new Pm(()=>{},()=>`Setting ${this.debugName}`));try{const s=this._value;this._setValue(e),Wn()?.handleObservableUpdated(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const r of this._observers)t.updateObserver(r,this),r.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function KR(o,e,t=Gi.ofCaller()){let i;return typeof o=="string"?i=new xn(void 0,o,void 0):i=new xn(o,void 0,void 0),new Ine(i,e,Ro,t)}class Ine extends p1{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class Dne extends Am{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this._deltas){Wn()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const t of this._observers)t.handleChange(this,e)}this._deltas.length=0}else{Wn()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const e of this._observers)e.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(const e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();const e=[...this._observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let n;t||(t=n=new Pm(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),i!==void 0&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(s,r)=>{},handlePossibleChange:s=>{}},this),this._updateCounter>1)for(const s of this._observers)s.handlePossibleChange(this)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function m1(o,e,t=Gi.ofCaller()){return o.lazy?new Dne(new xn(o.owner,o.debugName,void 0),e,o.equalsFn??Ro,t):new p1(new xn(o.owner,o.debugName,void 0),e,o.equalsFn??Ro,t)}function Ene(o){switch(o){case 1:return"dependenciesMightHaveChanged";case 2:retu
Line truncated
|
||||
| KEY '=~' REGEX
|
||||
| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=p(1668,`Expected: {0}
|
||||
Received: '{1}'.`,e,L1.getLexeme(t)),s=t.offset,r=L1.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:r,additionalInfo:i}),ac._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},ac._parseError=new Error,ac);const oB=class oB{static false(){return ms.INSTANCE}static true(){return Vs.INSTANCE}static has(e){return ff.create(e)}static equals(e,t){return Hm.create(e,t)}static notEquals(e,t){return Py.create(e,t)}static regex(e,t){return k1.create(e,t)}static in(e,t){return Ry.create(e,t)}static notIn(e,t){return My.create(e,t)}static not(e){return gf.create(e)}static and(...e){return pf.create(e,null,!0)}static or(...e){return Ac.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};oB._parser=new Tse({regexParsingWithErrorRecovery:!1});let K=oB;function Rse(o,e){const t=o?o.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function x1(o,e){return o.cmp(e)}const tN=class tN{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Vs.INSTANCE}};tN.INSTANCE=new tN;let ms=tN;const iN=class iN{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return ms.INSTANCE}};iN.INSTANCE=new iN;let Vs=iN;class ff{static create(e,t=null){const i=Hn.get(e);return typeof i=="boolean"?i?Vs.INSTANCE:ms.INSTANCE:new ff(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:CH(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Hn.get(this.key);return typeof e=="boolean"?e?Vs.INSTANCE:ms.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=gf.create(this.key,this)),this.negated}}class Hm{static create(e,t,i=null){if(typeof t=="boolean")return t?ff.create(e,i):gf.create(e,i);const n=Hn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?Vs.INSTANCE:ms.INSTANCE:new Hm(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:mf(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Hn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Vs.INSTANCE:ms.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Py.create(this.key,this.value,this)),this.negated}}class Ry{static create(e,t){return new Ry(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:mf(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):typeof i=="string"&&typeof t=="object"&&t!==null?Sse.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=My.create(this.key,this.valueKey)),this.negated}}class My{static create(e,t){return new My(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=Ry.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class Py{static create(e,t,i=null){if(typeof t=="boolean")return t?gf.create(e,i):ff.create(e,i);const n=Hn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?ms.INSTANCE:Vs.INSTANCE:new Py(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:mf(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Hn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?ms.INSTANCE:Vs.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Hm.create(this.key,this.value,this)),this.negated}}class gf{static create
Line truncated
|
||||
`+e(r,i+1):n+=`${r}
|
||||
`;return n};return e(this._data,0)}}function lh(o){return o===47||o===92}function IH(o){return o.replace(/[\\/]/g,Pi.sep)}function $se(o){return o.indexOf("/")===-1&&(o=IH(o)),/^[a-zA-Z]:(\/|$)/.test(o)&&(o="/"+o),o}function DH(o,e=Pi.sep){if(!o)return"";const t=o.length,i=o.charCodeAt(0);if(lh(i)){if(lh(o.charCodeAt(1))&&!lh(o.charCodeAt(2))){let s=3;const r=s;for(;s<t&&!lh(o.charCodeAt(s));s++);if(r!==s&&!lh(o.charCodeAt(s+1))){for(s+=1;s<t;s++)if(lh(o.charCodeAt(s)))return o.slice(0,s+1).replace(/[\\/]/g,e)}}return e}else if(EH(i)&&o.charCodeAt(1)===58)return lh(o.charCodeAt(2))?o.slice(0,2)+e:o.slice(0,2);let n=o.indexOf("://");if(n!==-1){for(n+=3;n<t;n++)if(lh(o.charCodeAt(n)))return o.slice(0,n+1)}return""}function f2(o,e,t,i=_a){if(o===e)return!0;if(!o||!e||e.length>o.length)return!1;if(t){if(!_R(o,e))return!1;if(e.length===o.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,o.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),o.indexOf(e)===0}function EH(o){return o>=65&&o<=90||o>=97&&o<=122}function jse(o,e=gn){return e?EH(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}function hl(o){return hy(o,!0)}class qse{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:a1(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===we.file)return f2(hl(e),hl(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(RH(e.authority,t.authority))return f2(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return be.joinPath(e,...t)}basenameOrAuthority(e){return vr(e)||e.authority}basename(e){return Pi.basename(e.path)}extname(e){return Pi.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===we.file?t=be.file(d6(hl(e))).path:(t=Pi.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===we.file?t=be.file(c6(hl(e))).path:t=Pi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!RH(e.authority,t.authority))return;if(e.scheme===we.file){const s=Kie(hl(e),hl(t));return gn?IH(s):s}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const r=Math.min(i.length,n.length);s<r&&!(i.charCodeAt(s)!==n.charCodeAt(s)&&i.charAt(s).toLowerCase()!==n.charAt(s).toLowerCase());s++);i=n.substr(0,s)+i.substr(s)}return Pi.relative(i,n)}resolvePath(e,t){if(e.scheme===we.file){const i=be.file(qie(hl(e),t));return e.with({authority:i.authority,path:i.path})}return t=$se(t),e.with({path:Pi.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&e.path[0]==="/"}isEqualAuthority(e,t){return e===t||e!==void 0&&t!==void 0&&Nm(e,t)}hasTrailingPathSeparator(e,t=_a){if(e.scheme===we.file){const i=hl(e);return i.length>DH(i).length&&i[i.length-1]===t}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=_a){return MH(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=_a){let i=!1;if(e.scheme===we.file){const n=hl(e);i=n!==void 0&&n.length===DH(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!MH(e,t)?e.with({path:e.path+"/"}):e}}const $t=new qse(()=>!1),ch=$t.isEqual.bind($t);$t.isEqualOrParent.bind($t),$t.getComparisonKey.bind($t);const Kse=$t.basenameOrAuthority.bind($t),vr=$t.basename.bind($t),Gse=$t.extname.bind($t),zy=$t.dirname.bind($t),NH=$t.joinPath.bind($t),Zse=$t.normalizePath.bind($t),Yse=$t.relativePath.bind($t),TH=$t.resolvePath.bind($t);$t.isAbsolutePath.bind($t);const RH=$t.isEqualAuthority.bind($t),MH=$t.hasTrailingPathSeparator.bind($t);$t.removeTrailingPathSeparator.bind($t),$t.addTrailingPathSeparator.bind($t);var dh;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(r=>{const[a,l]=r.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(o.META_DATA_MIME,s),i}o.parseMetaData=e})(dh||(dh={}));const Rt=We("logService"),PH=We("loggerService");var Qi;(function(o){o[o.Off=0]="Off",o[o.Trace=1]="Trace",o[o.Debug=2]="Debug",o[o.Info=3]="Info",o[o.Warning=4]="Warning",o[o.Error=5]="Error"})(Qi||(Qi={}));const AH=Qi.Info;function OH(o,e){return o!==Qi.Off&&o<=e}class FH extends A{constructor(){super(...arguments),this.level=AH,this._onDidChangeLogLevel=this._register(new P)}getLine truncated
|
||||
* 'to': A mandatory logical position value providing where to move the cursor.
|
||||
\`\`\`
|
||||
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
||||
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
||||
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
||||
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
||||
\`\`\`
|
||||
* 'by': Unit to move. Default is computed based on 'to' value.
|
||||
\`\`\`
|
||||
'line', 'wrappedLine', 'character', 'halfLine'
|
||||
\`\`\`
|
||||
* 'value': Number of units to move. Default is '1'.
|
||||
* 'select': If 'true' makes the selection. Default is 'false'.
|
||||
`,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},o.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},o.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case o.RawDirection.Left:n=0;break;case o.RawDirection.Right:n=1;break;case o.RawDirection.Up:n=2;break;case o.RawDirection.Down:n=3;break;case o.RawDirection.PrevBlankLine:n=4;break;case o.RawDirection.NextBlankLine:n=5;break;case o.RawDirection.WrappedLineStart:n=6;break;case o.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case o.RawDirection.WrappedLineColumnCenter:n=8;break;case o.RawDirection.WrappedLineEnd:n=9;break;case o.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case o.RawDirection.ViewPortTop:n=11;break;case o.RawDirection.ViewPortBottom:n=13;break;case o.RawDirection.ViewPortCenter:n=12;break;case o.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case o.RawUnit.Line:s=1;break;case o.RawUnit.WrappedLine:s=2;break;case o.RawUnit.Character:s=3;break;case o.RawUnit.HalfLine:s=4;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1}}o.parse=t})(Qy||(Qy={}));var Ai;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(Ai||(Ai={}));class w2{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(e.getTokenCount()===0)return!0;const i=e.findTokenIndexAtOffset(t-2),n=e.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(e,t){for(let i=e;i<=t;i++){const n=String.fromCharCode(i);if(!this.open.includes(n)&&!this.close.includes(n))return n}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class woe{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)N1(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),N1(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),N1(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),N1(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),t.close.length===1&&t.open.length===1&&N1(this.autoClosingPairsCloseSingleChar,t.close,t)}}function N1(o,e,t){o.has(e)?o.get(e).push(t):o.set(e,[t])}const Jy="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Soe(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of Jy)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const S2=Soe();function y2(o){let e=S2;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const GH=new Jn;GH.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function T1(o,e,t,i,n){if(e=y2(e),n||(n=Ye.first(GH)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),T1(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);const h=yoe(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].leLine truncated
|
||||
`,mC.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])>
|
||||
`;let L2=mC,x2;function ZH(){return x2||(x2=new TextDecoder("UTF-16LE")),x2}let k2;function Loe(){return k2||(k2=new TextDecoder("UTF-16BE")),k2}let I2;function YH(){return I2||(I2=HB()?ZH():Loe()),I2}function xoe(o,e,t){const i=new Uint16Array(o.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?koe(o,e,t):ZH().decode(i)}function koe(o,e,t){const i=[];let n=0;for(let s=0;s<t;s++){const r=rne(o,e);e+=2,i[n++]=String.fromCharCode(r)}return i.join("")}class uh{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return YH().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||zi(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class eL{constructor(e,t,i,n,s,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=r,this._openSet=eL._toSet(this.open),this._closeSet=eL._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function Ioe(o){const e=o.length;o=o.map(r=>[r[0].toLowerCase(),r[1].toLowerCase()]);const t=[];for(let r=0;r<e;r++)t[r]=r;const i=(r,a)=>{const[l,c]=r,[d,h]=a;return l===d||l===h||c===d||c===h},n=(r,a)=>{const l=Math.min(r,a),c=Math.max(r,a);for(let d=0;d<e;d++)t[d]===c&&(t[d]=l)};for(let r=0;r<e;r++){const a=o[r];for(let l=r+1;l<e;l++){const c=o[l];i(a,c)&&n(t[r],t[l])}}const s=[];for(let r=0;r<e;r++){const a=[],l=[];for(let c=0;c<e;c++)if(t[c]===r){const[d,h]=o[c];a.push(d),l.push(h)}a.length>0&&s.push({open:a,close:l})}return s}class Doe{constructor(e,t){this._richEditBracketsBrand=void 0;const i=Ioe(t);this.brackets=i.map((n,s)=>new eL(e,s,n.open,n.close,Eoe(n.open,n.close,i,s),Noe(n.open,n.close,i,s))),this.forwardRegex=Toe(this.brackets),this.reversedRegex=Roe(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function XH(o,e,t,i){for(let n=0,s=e.length;n<s;n++){if(n===t)continue;const r=e[n];for(const a of r.open)a.indexOf(o)>=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function QH(o,e){return o.length-e.length}function tL(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function Eoe(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s<r;s++)XH(n[s],t,i,n);return n=tL(n),n.sort(QH),n.reverse(),R1(n)}function Noe(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s<r;s++)XH(n[s],t,i,n);return n=tL(n),n.sort(QH),n.reverse(),R1(n.map(D2))}function Toe(o){let e=[];for(const t of o){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=tL(e),R1(e)}function Roe(o){let e=[];for(const t of o){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=tL(e),R1(e.map(D2))}function Moe(o){const e=/^[\w ]+$/.test(o);return o=oo(o),e?`\\b${o}\\b`:o}function R1(o,e){const t=`(${o.map(Moe).join(")|(")})`;return JB(t,!0,e)}const D2=(function(){function o(i){const n=new Uint16Array(i.length);let s=0;for(let r=i.length-1;r>=0;r--)n[s++]=i.charCodeAt(r);return YH().decode(n)}let e=null,t=null;return function(n){return e!==n&&(e=n,t=o(e)),t}})();class Yr{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=i.length-(s.index||0),a=s[0].length,l=n+r;return new k(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=D2(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=s.index||0,a=s[0].length;if(a===0)return null;const l=n+r;return new k(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const r=i.substring(n,s);return this.findNextBracketInText(e,t,r,n)}}class Poe{c
Line truncated
|
||||
`},"[yaml]":{"editor.insertSpaces":!0,"editor.tabSize":2}}}]);class Koe{constructor(e,t){this.languageId=e;const i=t.brackets?aV(t.brackets):[],n=new gR(a=>{const l=new Set;return{info:new Goe(this,a,l),closing:l}}),s=new gR(a=>{const l=new Set,c=new Set;return{info:new Zoe(this,a,l,c),opening:l,openingColorized:c}});for(const[a,l]of i){const c=n.get(a),d=s.get(l);c.closing.add(d.info),d.opening.add(c.info)}const r=t.colorizedBracketPairs?aV(t.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,l]of r){const c=n.get(a),d=s.get(l);c.closing.add(d.info),d.openingColorized.add(c.info),d.opening.add(c.info)}this._openingBrackets=new Map([...n.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...s.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return R1(t,e)}}function aV(o){return o.filter(([e,t])=>e!==""&&t!=="")}class lV{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class Goe extends lV{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class Zoe extends lV{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Yoe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cV=function(o,e){return function(t,i){e(t,i,o)}};class N2{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const Jt=We("languageConfigurationService");let T2=class extends A{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new ere),this.onDidChangeEmitter=this._register(new P),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(R2));this._register(this.configurationService.onDidChangeConfiguration(n=>{const s=n.change.keys.some(a=>i.has(a)),r=n.change.overrides.filter(([a,l])=>l.some(c=>i.has(c))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new N2(void 0));else for(const a of r)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new N2(a)))})),this._register(this._registry.onDidChange(n=>{this.configurations.delete(n.languageId),this.onDidChangeEmitter.fire(new N2(n.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=Xoe(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};T2=Yoe([cV(0,Me),cV(1,Mt)],T2);function Xoe(o,e,t,i){let n=e.getLanguageConfiguration(o);if(!n){if(!i.isRegisteredLanguageId(o))return new Zm(o,{});n=new Zm(o,{})}const s=Qoe(n.languageId,t),r=uV([n.underlyingConfig,s]);return new Zm(n.languageId,r)}const R2={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Qoe(o,e){const t=e.getValue(R2.brackets,{overrideIdentifier:o}),i=e.getValue(R2.colorizedBracketPairs,{overrideIdentifier:o});return{brackets:dV(t),colorizedBracketPairs:dV(i)}}function dV(o){if(Array.isArray(o))return o.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function hV(o,e,t){const i=o.getLineContent(e);let n=It(i);return n.length>t-1&&(n=n.substring(0,t-1)),n}class Joe{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new fV(e,t,++this._order);return this._entries.push(i),this._resolved=null,ue(()=>{for(let n=0;n<this._entries.length;n++)if(this._entries[n]===i){this._entries.splice(n,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new Zm(this.languageId,e))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(fV.cmp),uV(this._entries.map(e=>e.configuration)))}}function uV(o){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefor
Line truncated
|
||||
`){const r=[];for(let a=0,l=i.length;a<l;a++)r[a]=this._enter(e,t,!1,i[a]);return new _s(4,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,t,i,n){if(e.autoIndent===0)return Lf(n,`
|
||||
`,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(n.startLineNumber),c=It(l).substring(0,n.startColumn-1);return Lf(n,`
|
||||
`+e.normalizeIndentation(c),i)}const s=Ym(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===Ai.None)return Lf(n,`
|
||||
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ai.Indent)return Lf(n,`
|
||||
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ai.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),d=`
|
||||
`+c+`
|
||||
`+l;return i?new $y(n,d,!0):new jy(n,d,-1,c.length-l.length,!0)}else if(s.indentAction===Ai.Outdent){const l=dL(e,s.indentation);return Lf(n,`
|
||||
`+e.normalizeIndentation(l+s.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=It(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=lre(e.autoIndent,t,n,{unshiftIndent:c=>dL(e,c),shiftIndent:c=>U2(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,n.getEndPosition());const d=n.endColumn,h=t.getLineContent(n.endLineNumber),u=es(h);if(u>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,u+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new $y(n,`
|
||||
`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return d<=u+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new jy(n,`
|
||||
`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return Lf(n,`
|
||||
`+e.normalizeIndentation(a),i)}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new $y(new k(1,1,1,1),`
|
||||
`);else{a--;const l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s].positionLineNumber,l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}return n}static lineBreakInsert(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class _re{static getEdits(e,t,i,n,s,r){const a=this._distributePasteToCursors(e,i,n,s,r);return a?(i=i.sort(k.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _distributePasteToCursors(e,t,i,n,s){if(n||t.length===1)return null;if(s&&s.length===t.length)return s;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substring(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substring(0,i.length-1));const r=ro(i);if(r.length===t.length)return r}return null}static _distributedPaste(e,t,i,n){const s=[];for(let r=0,a=i.length;r<a;r++){const c=e.overtypeOnPaste&&e.inputMode==="overtype"?m2:Dn;s[r]=new c(i[r],n[r])}return new _s(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){const r=[];for(let a=0,l=i.length;a<l;a++){const c=i[a],d=c.getPosition();if(s&&!c.isEmpty()&&(s=!1),s&&n.indexOf(`
|
||||
`)!==n.length-1&&(s=!1),s){const h=new k(d.lineNumber,1,d.lineNumber,1);r[a]=new _2(h,n,c,!0)}else{const u=e.overtypeOnPaste&&e.inputMode==="overtype"?m2:Dn;r[a]=new u(c,n)}}return new _s(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class bre{static getEdits(e,t,i,n,s,r,a,l){const c=n.map(d=>this._compositionType(i,d,s,r,a,l));return new _s(4,c,{shouldPushStackElementBefore:cL(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),d=new k(a.lineNumber,l,a.lineNumber,c);return new jy(d,i,0,r)}}class Cre{static getEdits(e,t,i){const n=[];for(let r=0,a=t.length;r<a;r++)n[r]=new Dn(t[r],i);const s=z2(i,e);return new _s(s,n,{shouldPushStackElementBefore:cL(e,s),shouldPushStackElementAfter:!1})}}class vre{static getCommands(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s];if(a.isEmpty()){const l=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,t,a.startLineNumber);c=c||" ";const d=e.normalizeIndentation(c);if(!l.startsWith(d)){n[s]=new Dn(new k(a.startLineNumber,1,a.startLineNumber,l.length+1),d,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const l=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new Lr(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static _goodIndentForLine(e,t,i){let n=null,s="";const r=M1(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,s=r.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(Kr(d)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=Ym(e.autoIndent,t,new k(a,l,a,l),e.languageConfigurationService);c&&(s=c.indentation+c.appendText)}return n&&(n===Ai.Indent&&(s=U2(e,s)),n===Ai.Outdent&&(s=dL(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,r),l=e.indentSize,c=l-a%l;for(let d=0;d<c;d++)s+=" "}else s=" ";return new Dn(i,s,n)}}class V2 extends jy{constructor(e,t,i,n,s,r){super(e,t,i,n),this._openCharacter=s,this._closeCharacter=r,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,t,i){return this.closeCharacterRange=new k(t.startLineNumber,t.endColumn-this._closeCharacter.length,t.endLineNumber,t.endColumn),this.enclosingRange=new k(t.startLineNumber,t.endColumn-this._openCharacter.length-this._closeCharacter.length,t.endLineNumber,t.endColumn),super.computeCursorState(e,i)}}class wre extends V2{constructor(e,t,i,n){const s=(i?t:"")+n,r=0,a=-n.length;super(e,s,r,a,t,n)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,n,t)}}class Sre extends V2{constructor(e,t,i,n){const s=i+n,r=0,a=i.length;super(t,s,r,a,i,n),this._autoIndentationEdit=e,this._autoClosingEdit={range:t,text:s}}getEditOperations(e,t){t.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),t.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length!==2)throw new Error("There should be two inverse edit operations!");const n=i[0].range,s=i[1].range,r=n.plusRange(s);return this._computeCursorStateWithRange(e,r,t)}}function z2(o,e){return o===" "?e===5||e===6?6:5:4}function cL(o,e){return CV(o)&&!CV(e)?!0:o===5?!1:bV(o)!==bV(e)}function bV(o){return o===6||o===5?"space":o}function CV(o){return o===4||o===5||o===6}function vV(o,e,t,i,n){if(o.autoClosingOvertype==="never"||!o.autoClosingPairs.autoClosingPairsCloseSingleChar.has(n))return!1;for(let s=0,r=t.length;s<r;s++){const a=t[s];if(!a.isEmpty())return!1;const l=a.getPosition(),c=e.getLineContent(l.lineNumber);if(c.charAt(l.column-1)!==n)return!1;const h=hh(n);if((l.column>2?c.charCodeAt(l.column-2):0)===92&&h)return!1;if(o.autoClosingOvertype==="auto"){let f=!1;for(let g=0,m=i.length;g<m;g++){const _=i[g];if(l.lineNumber===_.startLineNumber&&l.column===_.startColumn){f=!0;break}}if(!f)return!1}}return!0}function Lf(o,e,t){return t?new $y(o,e,!0):new Dn(o,e,!0)}function U2(o,e,t){return t=t||1,Lr.shiftIndent(e,e.length+t,o.tabSize,o.indentSize,o.insertSpaces)}function dL(o,e,t){return t=t||1,Lr.unshiftIndent(e,e.length+t,o.tabSize,o.indentSize,o.insertSpaces)}function wV(o,e){return hh(e)?o.autoSurround==="quotes"||o.autoSurround==="languageDefined":o.autoSurround==="brackets"||o.autoSurround==="languageDefined"}class gh{static indent(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++)n
Line truncated
|
||||
- Use 0 to automatically compute the line height from the font size.
|
||||
- Values between 0 and 8 will be used as a multiplier with the font size.
|
||||
- Values greater than or equal to 8 will be used as effective values.`)},0,150)}compute(e,t,i){return e.fontInfo.lineHeight}}class Jre extends Zt{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:"none",renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,markSectionHeaderRegex:"\\bMARK:\\s*(?<separator>-?)\\s*(?<label>.*)$",sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(81,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p(273,"Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"string",enum:["none","mouseover","scroll"],enumDescriptions:[p(274,"The minimap is always shown."),p(275,"The minimap is hidden when mouse is not over the minimap and shown when mouse is over the minimap."),p(276,"The minimap is only shown when the editor is scrolled")],default:e.autohide,description:p(277,"Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p(278,"The minimap has the same size as the editor contents (and might scroll)."),p(279,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p(280,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p(281,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p(282,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p(283,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p(284,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p(285,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p(286,"Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:p(287,"Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:p(288,"Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.markSectionHeaderRegex":{type:"string",default:e.markSectionHeaderRegex,description:p(289,"Defines the regular expression used to find section headers in comments. The regex must contain a named match group `label` (written as `(?<label>.+)`) that encapsulates the section header, otherwise it will not work. Optionally you can include another match group named `separator`. Use \\n in the pattern to match multi-line headers.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:p(290,"Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:p(291,"Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;let i=this.defaultValue.markSectionHeaderRegex;const n=e.markSectionHeaderRegex;if(typeof n=="string")try{new RegExp(n,"d"),i=n}catch{}return{enabled:_e(t.enabled,this.defaultValue.enabled),autohide:Ot(t.autohide,this.defaultValue.autohide,["none","mouseover","scroll"]),size:Ot(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ot(t.side,this.defaultValue.side,["right","left"]),showSlider:Ot(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_e(t.renderCharacters,this.defaultValue.renderCharacters),scale:vt.clampedInt(t.scale,1,1,3),maxColumn:vt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:_e(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:_e(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),markSectionHeaderRegex:i,sectionHeaderFontSize:Wo.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:Wo.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function eae(o){return o==="ctrlCmd"?ze?"metaKey":"ctrlKey":"altKey"}class tae extends Zt{constructor(){super(96,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p(292,"Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.
Line truncated
|
||||
`)}}const bL=new Vae;ei.add(MV.ColorContribution,bL);function N(o,e,t,i,n){return bL.registerColor(o,e,t,i,n)}function zae(o,e){switch(o.op){case 0:return Dr(o.value,e)?.darken(o.factor);case 1:return Dr(o.value,e)?.lighten(o.factor);case 2:return Dr(o.value,e)?.transparent(o.factor);case 7:{const t=Dr(o.color,e)||$.transparent,i=Dr(o.with,e)||$.transparent;return t.mix(i,o.ratio)}case 3:{const t=Dr(o.background,e);return t?Dr(o.value,e)?.makeOpaque(t):Dr(o.value,e)}case 4:for(const t of o.values){const i=Dr(t,e);if(i)return i}return;case 6:return Dr(e.defines(o.if)?o.then:o.else,e);case 5:{const t=Dr(o.value,e);if(!t)return;const i=Dr(o.background,e);return i?t.isDarkerThan(i)?$.getLighterColor(t,i,o.factor).transparent(o.transparency):$.getDarkerColor(t,i,o.factor).transparent(o.transparency):t.transparent(o.factor*o.transparency)}default:throw ZC()}}function $s(o,e){return{op:0,value:o,factor:e}}function Ea(o,e){return{op:1,value:o,factor:e}}function Ne(o,e){return{op:2,value:o,factor:e}}function H1(...o){return{op:4,values:o}}function Uae(o,e,t){return{op:6,if:o,then:e,else:t}}function PV(o,e,t,i){return{op:5,value:o,background:e,factor:t,transparency:i}}function Dr(o,e){if(o!==null){if(typeof o=="string")return o[0]==="#"?$.fromHex(o):e.getColor(o);if(o instanceof $)return o;if(typeof o=="object")return zae(o,e)}}const AV="vscode://schemas/workbench-colors",OV=ei.as(nL.JSONContribution);OV.registerSchema(AV,bL.getColorSchema());const FV=new wt(()=>OV.notifySchemaChanged(AV),200);bL.onDidChangeSchema(()=>{FV.isScheduled()||FV.schedule()});const Ue=N("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},p(1756,"Overall foreground color. This color is only used if not overridden by a component."));N("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},p(1757,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),N("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},p(1758,"Overall foreground color for error messages. This color is only used if not overridden by a component."));const WV=N("descriptionForeground",{light:"#717171",dark:Ne(Ue,.7),hcDark:Ne(Ue,.7),hcLight:Ne(Ue,.7)},p(1759,"Foreground color for description text providing additional information, for example for a label.")),CL=N("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},p(1760,"The default color for icons in the workbench.")),_l=N("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},p(1761,"Overall border color for focused elements. This color is only used if not overridden by a component.")),Ze=N("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},p(1762,"An extra border around elements to separate them from others for greater contrast.")),jt=N("contrastActiveBorder",{light:null,dark:null,hcDark:_l,hcLight:_l},p(1763,"An extra border around active elements to separate them from others for greater contrast."));N("selection.background",null,p(1764,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));const $ae=N("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},p(1765,"Foreground color for links in text."));N("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},p(1766,"Foreground color for links in text when clicked on and on mouse hover.")),N("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:$.black,hcLight:"#292929"},p(1767,"Color for text separators.")),N("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},p(1768,"Foreground color for preformatted text segments.")),N("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},p(1769,"Background color for preformatted text segments.")),N("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},p(1770,"Background color for block quotes in text.")),N("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:$.white,hcLight:"#292929"},p(1771,"Border color for block quotes in text.")),N("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:$.black,hcLight:"#F2F2F2"},p(1772,"Background color for code blocks in text.")),N("sash.hoverBorder",_l,p(1977,"Border color of active sashes."));const vL=N("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:$.black,hcLight:"#0F4A85"},p(1978,"Badge background color. Badges are small information labels, e.g. for search results count.")),jae=N("badge.foreground",{dark:$.white,light:"#333",hcDark:$.white,hcLight:$.white},p(1979,"Badge foreground color. Badges are small information labels, e.g. for search results count."));N("activityWarningBadge.foreground",{dark:$.black
Line truncated
|
||||
${a}: ${r};`}return i+=`
|
||||
}`,i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function Ece(o){return o.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Tf extends A{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class vs extends Tf{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Na{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const s=new Uint8Array(n);for(let r=0;r<n;r++)s[r]=i[n-r-1];return s}}class Nce{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._viewLayout.getLineHeightForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class Tce extends Nce{constructor(e,t,i,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i,this._viewLinesGpu=n}linesVisibleRangesForRange(e,t){const i=this._viewLines.linesVisibleRangesForRange(e,t);if(!this._viewLinesGpu)return i??null;const n=this._viewLinesGpu.linesVisibleRangesForRange(e,t);return i?n?i.concat(n).sort((s,r)=>s.lineNumber-r.lineNumber):i:n}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)??this._viewLinesGpu?.visibleRangeForPosition(e)??null}}class lz{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class Z1{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new Z1(s.left,s.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class Sh{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class cz{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class SM{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class AL{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(
Line truncated
|
||||
</span></span>`):e.appendString("<span><span></span></span>"),new yM(new vl(0,0),0)}return Vce(Ace(o),e)}class Mce{constructor(e,t,i){this.characterMapping=e,this.html=t,this.containsForeignElements=i}}function FL(o){const e=new uh(1e4),t=h_(o,e);return new Mce(t.characterMapping,e.build(),t.containsForeignElements)}class Pce{constructor(e,t,i,n,s,r,a,l,c,d,h,u,f,g,m){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=r,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=u,this.renderSpaceCharCode=f,this.renderWhitespace=g,this.renderControlCharacters=m}}function Ace(o){const e=o.lineContent;let t,i,n;o.stopRenderingLineAfter!==-1&&o.stopRenderingLineAfter<e.length?(t=!0,i=e.length-o.stopRenderingLineAfter,n=o.stopRenderingLineAfter):(t=!1,i=0,n=e.length);let s=Oce(e,o.containsRTL,o.lineTokens,o.fauxIndentLength,n);o.renderControlCharacters&&!o.isBasicASCII&&(s=Wce(e,s)),(o.renderWhitespace===4||o.renderWhitespace===1||o.renderWhitespace===2&&o.selectionsOnLine||o.renderWhitespace===3&&!o.continuesWithWrappedLine)&&(s=Bce(o,e,n,s));let r=0;if(o.lineDecorations.length>0){for(let a=0,l=o.lineDecorations.length;a<l;a++){const c=o.lineDecorations[a];c.type===3||c.type===1?r|=1:c.type===2&&(r|=2)}s=Hce(e,n,s,o.lineDecorations)}return o.containsRTL||(s=Fce(e,s,!o.isBasicASCII||o.fontLigatures)),new Pce(o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,e,n,t,i,s,r,o.fauxIndentLength,o.tabSize,o.startVisibleColumn,o.spaceWidth,o.renderSpaceCharCode,o.renderWhitespace,o.renderControlCharacters)}function Oce(o,e,t,i,n){const s=[];let r=0;i>0&&(s[r++]=new un(i,"",0,!1));let a=i;for(let l=0,c=t.getCount();l<c;l++){const d=t.getEndOffset(l);if(d<=i)continue;const h=t.getClassName(l);if(d>=n){const f=e?Tm(o.substring(a,n)):!1;s[r++]=new un(n,h,0,f);break}const u=e?Tm(o.substring(a,d)):!1;s[r++]=new un(d,h,0,u),a=d}return s}function Fce(o,e,t){let i=0;const n=[];let s=0;if(t)for(let r=0,a=e.length;r<a;r++){const l=e[r],c=l.endIndex;if(i+50<c){const d=l.type,h=l.metadata,u=l.containsRTL;let f=-1,g=i;for(let m=i;m<c;m++)o.charCodeAt(m)===32&&(f=m),f!==-1&&m-g>=50&&(n[s++]=new un(f+1,d,h,u),g=f+1,f=-1);g!==c&&(n[s++]=new un(c,d,h,u))}else n[s++]=l;i=c}else for(let r=0,a=e.length;r<a;r++){const l=e[r],c=l.endIndex,d=c-i;if(d>50){const h=l.type,u=l.metadata,f=l.containsRTL,g=Math.ceil(d/50);for(let m=1;m<g;m++){const _=i+m*50;n[s++]=new un(_,h,u,f)}n[s++]=new un(c,h,u,f)}else n[s++]=l;i=c}return n}function uz(o){return o<32?o!==9:o===127||o>=8234&&o<=8238||o>=8294&&o<=8297||o>=8206&&o<=8207||o===1564}function Wce(o,e){const t=[];let i=new un(0,"",0,!1),n=0;for(const s of e){const r=s.endIndex;for(;n<r;n++){const a=o.charCodeAt(n);uz(a)&&(n>i.endIndex&&(i=new un(n,s.type,s.metadata,s.containsRTL),t.push(i)),i=new un(n+1,"mtkcontrol",s.metadata,!1),t.push(i))}n>i.endIndex&&(i=new un(r,s.type,s.metadata,s.containsRTL),t.push(i))}return t}function Bce(o,e,t,i){const n=o.continuesWithWrappedLine,s=o.fauxIndentLength,r=o.tabSize,a=o.startVisibleColumn,l=o.useMonospaceOptimizations,c=o.selectionsOnLine,d=o.renderWhitespace===1,h=o.renderWhitespace===3,u=o.renderSpaceWidth!==o.spaceWidth,f=[];let g=0,m=0,_=i[m].type,b=i[m].containsRTL,C=i[m].endIndex;const w=i.length;let v=!1,S=es(e),L;S===-1?(v=!0,S=t,L=t):L=Kr(e);let x=!1,I=0,D=c&&c[I],R=a%r;for(let O=s;O<t;O++){const B=e.charCodeAt(O);D&&D.endExclusive<=O&&(I++,D=c&&c[I]);let V;if(O<S||O>L)V=!0;else if(B===9)V=!0;else if(B===32)if(d)if(x)V=!0;else{const z=O+1<t?e.charCodeAt(O+1):0;V=z===32||z===9}else V=!0;else V=!1;if(V&&c&&(V=!!D&&D.start<=O&&O<D.endExclusive),V&&h&&(V=v||O>L),V&&b&&O>=S&&O<=L&&(V=!1),x){if(!V||!l&&R>=r){if(u){const z=g>0?f[g-1].endIndex:s;for(let ee=z+1;ee<=O;ee++)f[g++]=new un(ee,"mtkw",1,!1)}else f[g++]=new un(O,"mtkw",1,!1);R=R%r}}else(O===C||V&&O>s)&&(f[g++]=new un(O,_,0,b),R=R%r);for(B===9?R=r:th(B)?R+=2:R++,x=V;O===C&&(m++,m<w);)_=i[m].type,b=i[m].containsRTL,C=i[m].endIndex}let F=!1;if(x)if(n&&d){const O=t>0?e.charCodeAt(t-1):0,B=t>1?e.charCodeAt(t-2):0;O===32&&B!==32&&B!==9||(F=!0)}else F=!0;if(F)if(u){const O=g>0?f[g-1].endIndex:s;for(let B=O+1;B<=t;B++)f[g++]=new un(B,"mtkw",1,!1)}else f[g++]=new un(t,"mtkw",1,!1);else f[g++]=new un(t,_,0,b);return f}function Hce(o,e,t,i){i.sort(os.compare);const n=Rce.normalize(o,i),s=n.length;let r=0;const a=[];let l=0,c=0;for(let h=0,u=t.length;h<u;h++){const f=t[h],g=f.endIndex,m=f.type,_=f.metadata,b=f.containsRTL;for(;r<s&&n[r].startOffset<g;){const C=n[r];if(C.startOffset>c&&(c=C.startOffset,a[l++]=new un(c,m,_,b)),C.endOffset+1<=g)c=C.endOffset+1,a[l++]=new un(c,m+" "+C.className,_|C.metadata,b),r++;else{c=g,a[l++]=new un(c,m+" "+C.className,_|C.metadata,b);break}}g>c&&(c=g,a[l++]=new un(c,m,_,b))}const d=t[t.length-1].endIndex;if(r<s&&n[r].startOffset===d)for(;r<s&&n[r].startOffset===d;){const h=n[r];a[l++]=new un(c,h.className,h.metadata,!1Line truncated
|
||||
target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?ti.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return Nn.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return Nn.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return Nn.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return Nn.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return Nn.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return Nn.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return Nn.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return Nn.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return Nn.createOverlayWidget(this.target,this._getMouseColumn(),e)}}const mz={isAfterLines:!0};function Pf(o){return{isAfterLines:!1,horizontalDistanceToText:o}}class rs{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Na.collect(t,this._viewHelper.viewDomNode);return!!(ws.isChildOfContentWidgets(i)||ws.isChildOfOverflowingContentWidgets(i)||ws.isChildOfOverlayWidgets(i)||ws.isChildOfOverflowingOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){const r=new g_(this._context,this._viewHelper,e),a=new Yce(r,t,i,n,s);try{const l=rs._createMouseTarget(r,a);if(l.type===6&&r.stickyTabStops&&l.position!==null){const c=rs._snapToSoftTabBoundary(l.position,r.viewModel),d=k.fromPositions(c,c).plusRange(l.range);return a.fulfillContentText(c,d,l.detail)}return l}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,t){if(t.target===null)return t.fulfillUnknown();const i=t;let n=null;return!ws.isChildOfOverflowGuard(t.targetPath)&&!ws.isChildOfOverflowingContentWidgets(t.targetPath)&&!ws.isChildOfOverflowingOverlayWidgets(t.targetPath)&&(n=n||t.fulfillUnknown()),n=n||rs._hitTestContentWidget(e,i),n=n||rs._hitTestOverlayWidget(e,i),n=n||rs._hitTestMinimap(e,i),n=n||rs._hitTestScrollbarSlider(e,i),n=n||rs._hitTestViewZone(e,i),n=n||rs._hitTestMargin(e,i),n=n||rs._hitTestViewCursor(e,i),n=n||rs._hitTestTextArea(e,i),n=n||rs._hitTestViewLines(e,i),n=n||rs._hitTestScrollbar(e,i),n||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(ws.isChildOfContentWidgets(t.targetPath)||ws.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(ws.isChildOfOverlayWidgets(t.targetPath)||ws.isChildOfOverflowingOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfillContentText(n.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft||n>r.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return ws.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if(s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth){const a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return r.glyphMarginLane=l[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,r)}return s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layoutIn
Line truncated
|
||||
`),null]:[e,t]},setTextData(o,e,t,i){o.setData(_i.text,e),typeof t=="string"&&o.setData("text/html",t),o.setData("vscode-editor-data",JSON.stringify(i))}},Sp=class Sp{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let r;if(t){const a=i.substring(0,n),l=t.value.substring(0,t.selectionStart);a===l&&(r=t.newlineCountBeforeSelection)}return new Sp(i,n,s,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new Sp(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){const i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,n,-1)}if(e>=this.selectionEnd){const n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,n,1)}const t=this.value.substring(this.selectionStart,e);if(t.indexOf("…")===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(`
|
||||
`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Gr(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(Lc(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;if(c===d){const u=e.selectionStart-n;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}const h=l-a;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Gr(e.value,t.value),e.selectionEnd),n=Math.min(Lc(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-r.length}}static fromScreenReaderContentState(e){return new Sp(e.value,e.selectionStart,e.selectionEnd,e.selection,e.newlineCountBeforeSelection)}};Sp.EMPTY=new Sp("",0,0,null,void 0);let as=Sp;const Of=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);const o=new Uint8Array(16),e=[];for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(o),o[6]=o[6]&15|64,o[8]=o[8]&63|128;let i=0,n="";return n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n}})();function Lz(o){return`${o}-${Of()}`}var mde=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xz=function(o,e){return function(t,i){e(t,i,o)}},zL;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(zL||(zL={}));class _de{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let NM=class extends A{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,r){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=r,this._onFocus=this._register(new P),this.onFocus=this._onFocus.event,this._onBlur=this._register(new P),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new P),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new P),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new P),this.onCut=this._onCut.event,this._onPaste=this._register(new P),this.onPaste=this._onPaste.event,this._onType=this._register(new P),this.onType=this._onType.event,this._onCompositionStart=this._register(new P),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new P),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new P),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new P),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new ct),this._asyncTriggerCut=this._register(new wt(()=>this._onCut.fire(),0)),this._textAreaState=as.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(ie.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new wt(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{const c=new St(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{const c=new St(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{const c=new _de;if(this._currentComposition){this._currentComposition=c;return}i
Line truncated
|
||||
`):t.text,n),e.preventDefault(),e.clipboardData&&Af.setTextData(e.clipboardData,t.text,t.html,n),this._logService.trace("TextAreaEditContextInput#_ensureClipboardGetsEditorSelection with id : ",i," with text.length: ",t.text.length)}};NM=mde([xz(4,bn),xz(5,Rt)],NM);class bde extends A{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this._onSyntheticTap=this._register(new P),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new gt(this._actual,"keydown")).event,this.onKeyPress=this._register(new gt(this._actual,"keypress")).event,this.onKeyUp=this._register(new gt(this._actual,"keyup")).event,this.onCompositionStart=this._register(new gt(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new gt(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new gt(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new gt(this._actual,"beforeinput")).event,this.onInput=this._register(new gt(this._actual,"input")).event,this.onCut=this._register(new gt(this._actual,"cut")).event,this.onCopy=this._register(new gt(this._actual,"copy")).event,this.onPaste=this._register(new gt(this._actual,"paste")).event,this.onFocus=this._register(new gt(this._actual,"focus")).event,this.onBlur=this._register(new gt(this._actual,"blur")).event,this._register(this.onKeyDown(()=>_h.onKeyDown())),this._register(this.onBeforeInput(()=>_h.onBeforeInput())),this._register(this.onInput(()=>_h.onInput())),this._register(this.onKeyUp(()=>_h.onKeyUp())),this._register(W(this._actual,zL.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=ah(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?Ui()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const r=ah(n);r?s=r.activeElement:s=Ui();const a=me(s),l=s===n,c=n.selectionStart,d=n.selectionEnd;if(l&&c===t&&d===i){Fs&&a.parent!==a&&n.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),Fs&&a.parent!==a&&n.focus();return}try{const h=ose(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),rse(n,h)}catch{}}}class Cde extends IM{constructor(e,t,i){super(e,t,i),this._register($n.addTarget(this.viewHelper.linesContentDomNode)),this._register(W(this.viewHelper.linesContentDomNode,Pt.Tap,s=>this.onTap(s))),this._register(W(this.viewHelper.linesContentDomNode,Pt.Change,s=>this.onChange(s))),this._register(W(this.viewHelper.linesContentDomNode,Pt.Contextmenu,s=>this._onContextMenu(new Hc(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(W(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new kce(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,r)=>this._onMouseDown(s,r)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new Hc(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:i.type===6&&i.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class vde extends IM{constructor(e,t,i){super(e,t,i),this._register($n.addTarget(this.viewHelper.linesContentDomNode)),this._register(W(this.viewHelper.linesContentDomNode,Pt.Tap,n=>this.onTap(n))),this._register(W(th
Line truncated
|
||||
`)}}class wue{constructor(e,t,i){this._canvas=e,this._textureIndex=t,this._slabs=[],this._activeSlabsByDims=new Vy,this._unusedRects=[],this._openRegionsByHeight=new Map,this._openRegionsByWidth=new Map,this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Vf(this._canvas.getContext("2d",{willReadFrequently:!0})),this._slabW=Math.min(i?.slabW??64<<Math.max(Math.floor(ft().devicePixelRatio)-1,0),this._canvas.width),this._slabH=Math.min(i?.slabH??this._slabW,this._canvas.height),this._slabsPerRow=Math.floor(this._canvas.width/this._slabW),this._slabsPerColumn=Math.floor(this._canvas.height/this._slabH)}allocate(e){const t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new Ce("Glyph is too large for the atlas page");if(t>this._slabW||i>this._slabH){if(this._allocatedGlyphs.size>0)return;let c=this._canvas.width;for(;t<c/2&&i<c/2;)c/=2;this._slabW=c,this._slabH=c,this._slabsPerRow=Math.floor(this._canvas.width/this._slabW),this._slabsPerColumn=Math.floor(this._canvas.height/this._slabH)}const n={w:t,h:i};let s=this._activeSlabsByDims.get(n.w,n.h);if(s){const c=Math.floor(this._slabW/s.entryW)*Math.floor(this._slabH/s.entryH);s.count>=c&&(s=void 0)}let r,a;if(!s)if(t<i){const c=this._openRegionsByWidth.get(t);if(c?.length)for(let d=c.length-1;d>=0;d--){const h=c[d];if(h.w>=t&&h.h>=i){r=h.x,a=h.y,t<h.w&&this._unusedRects.push({x:h.x+t,y:h.y,w:h.w-t,h:i}),h.y+=i,h.h-=i,h.h===0&&(d===c.length-1?c.pop():this._unusedRects.splice(d,1));break}}}else{const c=this._openRegionsByHeight.get(i);if(c?.length)for(let d=c.length-1;d>=0;d--){const h=c[d];if(h.w>=t&&h.h>=i){r=h.x,a=h.y,i<h.h&&this._unusedRects.push({x:h.x,y:h.y+i,w:t,h:h.h-i}),h.x+=t,h.w-=t,h.h===0&&(d===c.length-1?c.pop():this._unusedRects.splice(d,1));break}}}if(r===void 0||a===void 0){if(!s){if(this._slabs.length>=this._slabsPerRow*this._slabsPerColumn)return;s={x:Math.floor(this._slabs.length%this._slabsPerRow)*this._slabW,y:Math.floor(this._slabs.length/this._slabsPerRow)*this._slabH,entryW:n.w,entryH:n.h,count:0};const d=this._slabW%s.entryW,h=this._slabH%s.entryH;d&&dU(this._openRegionsByWidth,d,{x:s.x+this._slabW-d,w:d,y:s.y,h:this._slabH-(h??0)}),h&&dU(this._openRegionsByHeight,h,{x:s.x,w:this._slabW,y:s.y+this._slabH-h,h}),this._slabs.push(s),this._activeSlabsByDims.set(s,n.w,n.h)}const c=Math.floor(this._slabW/s.entryW);r=s.x+Math.floor(s.count%c)*s.entryW,a=s.y+Math.floor(s.count/c)*s.entryH,s.count++}this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,r,a,t,i);const l={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:r,y:a,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._allocatedGlyphs.add(l),l}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Vf(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=0,r=0,a=0;const l=64<<Math.floor(ft().devicePixelRatio)-1,c=l;for(const h of this._slabs){let u=0,f=0;for(let _=0;_<h.count;_++)u+h.entryW>l&&(u=0,f+=h.entryH),n.fillStyle="#FF0000",n.fillRect(h.x+u,h.y+f,h.entryW,h.entryH),s+=h.entryW*h.entryH,u+=h.entryW;const g=Math.floor(l/h.entryW),m=Math.floor(c/h.entryH);h.entryW*g*h.entryH*m}for(const h of this._allocatedGlyphs)r+=h.w*h.h,n.fillStyle="#4040FF",n.fillRect(h.x,h.y,h.w,h.h);const d=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const h of d)n.fillStyle="#FF000088",n.fillRect(h.x,h.y,h.w,h.h),a+=h.w*h.h;return n.globalAlpha=.5,n.drawImage(this._canvas,0,0),n.globalAlpha=1,i.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let i=0,n=0,s=0,r=0,a=0;const l=e*t,c=64<<Math.floor(ft().devicePixelRatio)-1,d=c;for(const g of this._slabs){let m=0,_=0;for(let v=0;v<g.count;v++)m+g.entryW>c&&(m=0,_+=g.entryH),i+=g.entryW*g.entryH,m+=g.entryW;const b=Math.floor(c/g.entryW),C=Math.floor(d/g.entryH),w=g.entryW*b*g.entryH*C;s+=c*d-w}for(const g of this._allocatedGlyphs)n+=g.w*g.h;const h=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const g of h)a+=g.w*g.h;const u=s-a;r=i-(n-u);const f=n/(n+r+a);return[`page[${this._textureIndex}]:`,` Total: ${l}px (${e}x${t})`,` Used: ${n}px (${(n/l*100).toFixed(2)}%)`,` Wasted: ${r}px (${(r/l*100).toFixed(2)}%)`,`Restricted: ${a}px (${(a/l*100).toFixed(2)}%) (hard to allocate)`,`Efficiency: ${f===1?"100":(f*100).toFixed(2)}%`,` Slabs: ${this._slabs.length} of ${Math.floor(this._canvas.width/c)*Math.floor(this._canvas.height/d)}`].join(`
|
||||
`)}}function dU(o,e,t){let i=o.get(e);i||(i=[],o.set(e,i)),i.push(t)}var Sue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hU=function(o,e){return function(t,i){e(t,i,o)}},QM;let Ra=(yp=class extends A{get version(){return this._version}get usedArea(){return this._usedArea}get source(){return this._canvas}get glyphs(){return this._glyphInOrderSet.values()}constructor(e,t,i,n,s){switch(super(),this._logService=n,this._version=0,this._usedArea={left:0,top:0,right:0,bottom:0},this._glyphMap=new Vy,this._glyphInOrderSet=new Set,this._canvas=new OffscreenCanvas(t,t),this._colorMap=s.getColorTheme().tokenColorMap,i){case"shelf":this._allocator=new vue(this._canvas,e);break;case"slab":this._allocator=new wue(this._canvas,e);break;default:this._allocator=i(this._canvas,e);break}this._register(ue(()=>{this._canvas.width=1,this._canvas.height=1}))}getGlyph(e,t,i,n){return this._glyphMap.get(t,i,n,e.cacheKey)??this._createGlyph(e,t,i,n)}_createGlyph(e,t,i,n){if(this._glyphInOrderSet.size>=QM.maximumGlyphCount)return;const s=e.rasterizeGlyph(t,i,n,this._colorMap),r=this._allocator.allocate(s);if(r!==void 0)return this._glyphMap.set(r,t,i,n,e.cacheKey),this._glyphInOrderSet.add(r),this._version++,this._usedArea.right=Math.max(this._usedArea.right,r.x+r.w-1),this._usedArea.bottom=Math.max(this._usedArea.bottom,r.y+r.h-1),this._logService.getLevel()===Qi.Trace&&this._logService.trace("New glyph",{chars:t,tokenMetadata:i,decorationStyleSetId:n,rasterizedGlyph:s,glyph:r}),r}getUsagePreview(){return this._allocator.getUsagePreview()}getStats(){return this._allocator.getStats()}},QM=yp,yp.maximumGlyphCount=5e3,yp);Ra=QM=Sue([hU(3,Rt),hU(4,li)],Ra);var yue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uU=function(o,e){return function(t,i){e(t,i,o)}},sx;let xh=(Lp=class extends A{get pages(){return this._pages}constructor(e,t,i,n,s){super(),this._maxTextureSize=e,this._decorationStyleCache=i,this._themeService=n,this._instantiationService=s,this._warmUpTask=this._register(new ct),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new Vy,this._onDidDeleteGlyphs=this._register(new P),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=t?.allocatorType??"slab",this._register(ie.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));const r=Math.max(1,Math.floor(ft().devicePixelRatio));this.pageSize=Math.min(1024*r,this._maxTextureSize),this._initFirstPage(),this._register(ue(()=>pt(this._pages)))}_initFirstPage(){const e=this._instantiationService.createInstance(Ra,0,this.pageSize,this._allocatorType);this._pages.push(e);const t=new gv(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(const e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,i,n,s){return i&=-2048,i|=Math.floor(s%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,i,n,e.cacheKey)??0,e,t,i,n)}_tryGetGlyph(e,t,i,n,s){return this._glyphPageIndex.set(e,i,n,s,t.cacheKey),this._pages[e].getGlyph(t,i,n,s)??(e+1<this._pages.length?this._tryGetGlyph(e+1,t,i,n,s):void 0)??this._getGlyphFromNewPage(t,i,n,s)}_getGlyphFromNewPage(e,t,i,n){if(this._pages.length>=sx.maximumPageCount)throw new Error(`Attempt to create a texture atlas page past the limit ${sx.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(Ra,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,i,n,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,i,n)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){const t=this._colorMap;if(!t)throw new Ce("Cannot warm atlas without color map");this._warmUpTask.value?.clear();const i=this._warmUpTask.value=this._instantiationService.createInstance(Cue);for(let n=65;n<=90;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=97;n<=122;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=33;n<=126;n++)for(const s of t.keys())i.enqueue(()=>{for(let
Line truncated
|
||||
|
||||
struct Vertex {
|
||||
@location(0) position: vec2f,
|
||||
};
|
||||
|
||||
struct LayoutInfo {
|
||||
canvasDims: vec2f,
|
||||
viewportOffset: vec2f,
|
||||
viewportDims: vec2f,
|
||||
}
|
||||
|
||||
struct ScrollOffset {
|
||||
offset: vec2f,
|
||||
}
|
||||
|
||||
struct Shape {
|
||||
position: vec2f,
|
||||
size: vec2f,
|
||||
color: vec4f,
|
||||
};
|
||||
|
||||
struct VSOutput {
|
||||
@builtin(position) position: vec4f,
|
||||
@location(1) color: vec4f,
|
||||
};
|
||||
|
||||
// Uniforms
|
||||
@group(0) @binding(1) var<uniform> layoutInfo: LayoutInfo;
|
||||
|
||||
// Storage buffers
|
||||
@group(0) @binding(0) var<storage, read> shapes: array<Shape>;
|
||||
@group(0) @binding(2) var<uniform> scrollOffset: ScrollOffset;
|
||||
|
||||
@vertex fn vs(
|
||||
vert: Vertex,
|
||||
@builtin(instance_index) instanceIndex: u32,
|
||||
@builtin(vertex_index) vertexIndex : u32
|
||||
) -> VSOutput {
|
||||
let shape = shapes[instanceIndex];
|
||||
|
||||
var vsOut: VSOutput;
|
||||
vsOut.position = vec4f(
|
||||
(
|
||||
// Top left corner
|
||||
vec2f(-1, 1) +
|
||||
// Convert pixel position to clipspace
|
||||
vec2f( 2, -2) / layoutInfo.canvasDims *
|
||||
// Shape position and size
|
||||
(layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size)
|
||||
),
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
vsOut.color = shape.color;
|
||||
return vsOut;
|
||||
}
|
||||
|
||||
@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f {
|
||||
return vsOut.color;
|
||||
}
|
||||
`;class Nue extends Tf{constructor(e,t,i,n,s,r){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new ct),this._initialized=!1,this._shapeCollection=this._register(kue([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(r)}async _initWebgpu(e){if(this._device=await e,this._store.isDisposed)return;const t=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{const a=new Float32Array(6),l=(c=this._canvas.width,d=this._canvas.height)=>(a[0]=c,a[1]=d,a[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*ft().devicePixelRatio),a[3]=0,a[4]=a[0]-a[2],a[5]=a[1]-a[3],a);i=this._register(qs.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>l())).object,this._register(cU(this._canvas,ft(),(c,d)=>{this._device.queue.writeBuffer(i,0,l(c,d))}))}const n=2;this._scrollOffsetBindBuffer=this._register(qs.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:n*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(n);const s=()=>qs.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=s(),this._register(ie.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=s(),this._pipeline&&this._updateBindGroup(this._pipeline,i)})),this._vertexBuffer=this._register(qs.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:Hf.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Hf)).object;const r=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:Eue});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:r,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:r,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,i),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,r,a,l){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:r,blue:a,alpha:l})}onScrollChanged(e){if(this._device){const t=ft().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*t,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;const e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();const t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();const i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);const n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(Hf.length/2,this._shapeCollection.entryCount),i.end();const s=t.finish();this._device.queue.submit([s])}}class Tue extends A{constructor(){super(),this._ruleCache=new Map,this._container=Q("div.monaco-decoration-css-rule-extractor"),this._dummyElement=Q("span"),this._container.appendChild(this._dummyElement),this._register(ue(()=>this._container.remove()))}getStyleRules(e,t){const i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);const n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container),n}_getStyleRules(e){const t=[],n=[...w1().styleSheets];for(let s=0;s<n.
Line truncated
|
||||
struct GlyphInfo {
|
||||
position: vec2f,
|
||||
size: vec2f,
|
||||
origin: vec2f,
|
||||
};
|
||||
|
||||
struct Vertex {
|
||||
@location(0) position: vec2f,
|
||||
};
|
||||
|
||||
struct Cell {
|
||||
position: vec2f,
|
||||
unused1: vec2f,
|
||||
glyphIndex: f32,
|
||||
textureIndex: f32
|
||||
};
|
||||
|
||||
struct LayoutInfo {
|
||||
canvasDims: vec2f,
|
||||
viewportOffset: vec2f,
|
||||
viewportDims: vec2f,
|
||||
}
|
||||
|
||||
struct ScrollOffset {
|
||||
offset: vec2f
|
||||
}
|
||||
|
||||
struct VSOutput {
|
||||
@builtin(position) position: vec4f,
|
||||
@location(1) layerIndex: f32,
|
||||
@location(0) texcoord: vec2f,
|
||||
};
|
||||
|
||||
// Uniforms
|
||||
@group(0) @binding(4) var<uniform> layoutInfo: LayoutInfo;
|
||||
@group(0) @binding(5) var<uniform> atlasDims: vec2f;
|
||||
@group(0) @binding(6) var<uniform> scrollOffset: ScrollOffset;
|
||||
|
||||
// Storage buffers
|
||||
@group(0) @binding(0) var<storage, read> glyphInfo: array<array<GlyphInfo, ${Ra.maximumGlyphCount}>, ${xh.maximumPageCount}>;
|
||||
@group(0) @binding(1) var<storage, read> cells: array<Cell>;
|
||||
|
||||
@vertex fn vs(
|
||||
vert: Vertex,
|
||||
@builtin(instance_index) instanceIndex: u32,
|
||||
@builtin(vertex_index) vertexIndex : u32
|
||||
) -> VSOutput {
|
||||
let cell = cells[instanceIndex];
|
||||
var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)];
|
||||
|
||||
var vsOut: VSOutput;
|
||||
// Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1
|
||||
vsOut.position = vec4f(
|
||||
// Make everything relative to top left instead of center
|
||||
vec2f(-1, 1) +
|
||||
((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size +
|
||||
((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) +
|
||||
((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) +
|
||||
(((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims),
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
|
||||
vsOut.layerIndex = cell.textureIndex;
|
||||
// Textures are flipped from natural direction on the y-axis, so flip it back
|
||||
vsOut.texcoord = vert.position;
|
||||
vsOut.texcoord = (
|
||||
// Glyph offset (0-1)
|
||||
(glyph.position / atlasDims) +
|
||||
// Glyph coordinate (0-1)
|
||||
(vsOut.texcoord * (glyph.size / atlasDims))
|
||||
);
|
||||
|
||||
return vsOut;
|
||||
}
|
||||
|
||||
@group(0) @binding(2) var ourSampler: sampler;
|
||||
@group(0) @binding(3) var ourTexture: texture_2d_array<f32>;
|
||||
|
||||
@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f {
|
||||
return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex));
|
||||
}
|
||||
`,cc=class cc extends gU{get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="viewport",this.wgsl=pU,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new P),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity);const s=2;this._scrollOffsetBindBuffer=this._register(qs.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:s*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(s)}_rebuildCellBuffer(e){this._cellBindBuffer?.destroy();const t=(Math.floor(e/32)+1)*32,i=t*cc.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(qs.createBuffer(this._device,{label:"Monaco full file cell buffer",size:i,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(i),new ArrayBuffer(i)],this._cellBindBufferLineCapacity=t,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){const t=ft().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}}update(e,t){let i="",n,s=0,r=0,a=0,l=0,c=0,d=0,h,u=0,f=0,g=0,m=0,_,b,C,w,v,S=0,L=0,x;const I=ft().devicePixelRatio;let D;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacity<e.endLineNumber-e.startLineNumber+1&&this._rebuildCellBuffer(e.endLineNumber-e.startLineNumber+1);const R=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]);R.fill(0);const F=cc.maxSupportedColumns*6;for(r=e.startLineNumber;r<=e.endLineNumber;r++)if(this._viewGpuContext.canRender(t,e,r)){w=e.getViewLineRenderingData(r),d=0,D=ox(w,t),s=t.spaceWidth*I,l=0,x=w.tokens,f=w.minColumn-1,g=0;for(let B=0,V=x.getCount();B<V;B++)if(g=x.getEndOffset(B),!(g<=f)){for(m=x.getMetadata(B),a=f;a<g&&!(a>cc.maxSupportedColumns);a++){if(n=D.getSegmentAtIndex(a),n===void 0)continue;i=n,w.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),b=void 0,_=void 0,C=void 0;for(v of w.inlineDecorations){if(r<v.range.startLineNumber||r>v.range.endLineNumber||r===v.range.startLineNumber&&a<v.range.startColumn-1||r===v.range.endLineNumber&&a>=v.range.endColumn-1)continue;const ee=ls.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,v.inlineClassName);for(const se of ee)for(const oe of se.style){const fe=se.styleMap.get(oe)?.toString()??"";switch(oe){case"color":{const Ie=$.Format.CSS.parse(fe);if(!Ie)throw new Ce("Invalid color format "+fe);b=Ie.toNumber32Bit();break}case"font-weight":{Fue(fe)>=400?_=!0:_=!1;break}case"opacity":{C=Wue(fe);break}default:throw new Ce("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(u=((r-1)*cc.maxSupportedColumns+a)*6,R.fill(0,u,u+6),i===" "){const ee=a+d;d=ti.nextRenderTabStop(a+d,w.tabSize),l+=s*(d-ee),d-=a+1}else l+=s;continue}const z=ls.decorationStyleCache.getOrCreateEntry(b,_,C);h=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,m,z,l),c=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*I+Math.floor((e.lineHeight*I-(h.fontBoundingBoxAscent+h.fontBoundingBoxDescent))/2)+h.fontBoundingBoxAscent),u=((r-e.startLineNumber)*cc.maxSupportedColumns+a)*6,R[u+0]=Math.floor(l),R[u+1]=c,R[u+4]=h.glyphIndex,R[u+5]=h.pageIndex,l+=s}f=g}S=((r-e.startLineNumber)*cc.maxSupportedColumns+g)*6,L=(r-e.startLineNumber)*cc.maxSupportedColumns*6,R.fill(0,S,L)}const O=(e.endLineNumber-e.startLineNumber+1)*F;return this._device.queue.writeBuffer(this._cellBindBuffer,0,R.buffer,0,(e.endLineNumber-e.startLineNumber)*F*Float32Array.BYTES_PER_ELEMENT),this._activeDoubleBufferIndex=this._activeDoubleBufferIndex?0:1,this._visibleObjectCount=O,O}draw(e,t){if(this._visibleObjectCount<=0)throw new Ce("Attempt to draw 0 objects");e.draw(Hf.length/2,this._visibleObjectCount)}};cc.maxSupportedColumns=2e3;let tP=cc;function Fue(o){switch(o){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(o)}function Wue(o){return o.endsWith("
Line truncated
|
||||
`,t+1),t===-1)break;e++}while(!0);return e}var Uue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vU=function(o,e){return function(t,i){e(t,i,o)}};class $ue{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new M(this.modelLineNumber,this.distanceToModelLineStart+1),i=new M(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const sP=Fs;let oP=class extends _U{constructor(e,t,i,n,s,r){super(e),this._keybindingService=s,this._instantiationService=r,this._primaryCursorPosition=new M(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const a=this._context.configuration.options,l=a.get(165);this._setAccessibilityOptions(a),this._contentLeft=l.contentLeft,this._contentWidth=l.contentWidth,this._contentHeight=l.height,this._fontInfo=a.get(59),this._emptySelectionClipboard=a.get(45),this._copyWithSyntaxHighlighting=a.get(31),this._visibleTextArea=null,this._selections=[new ce(1,1,1,1)],this._modelSelections=[new ce(1,1,1,1)],this._lastRenderPosition=null,this.textArea=lt(document.createElement("textarea")),Na.write(this.textArea,7),this.textArea.setClassName(`inputarea ${w_}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:c}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${c*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",nP(a,this._keybindingService)),this.textArea.setAttribute("aria-required",a.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(a.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",p(60,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",a.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=lt(document.createElement("div")),this.textAreaCover.setPosition("absolute"),t.appendChild(this.textArea),t.appendChild(this.textAreaCover);const d=new bU,h={getDataToCopy:()=>yz(this._context.viewModel,this._modelSelections,this._emptySelectionClipboard,this._copyWithSyntaxHighlighting),getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const g=this._selections[0];if(ze&&g.isEmpty()){const _=g.getStartPosition();let b=this._getWordBeforePosition(_);if(b.length===0&&(b=this._getCharacterBeforePosition(_)),b.length>0)return new as(b,b.length,b.length,k.fromPositions(_),0)}if(ze&&!g.isEmpty()&&this._context.viewModel.getValueLengthInRange(g,0)<500){const _=this._context.viewModel.getValueInRange(g,0);return new as(_,0,_.length,g,0)}if(qu&&!g.isEmpty()){const _="vscode-placeholder";return new as(_,0,_.length,null,void 0)}return as.EMPTY}if(TB){const g=this._selections[0];if(g.isEmpty()){const m=g.getStartPosition(),[_,b]=this._getAndroidWordAtPosition(m);if(_.length>0)return new as(_,b,b,k.fromPositions(m),0)}return as.EMPTY}const f=d.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0);return as.fromScreenReaderContentState(f)},deduceModelPosition:(f,g,m)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(f,g,m)},u=this._register(new bde(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(NM,h,u,so,{isAndroid:TB,isChrome:GC,isFirefox:Fs,isSafari:qu})),this._register(this._textAreaInput.onKeyDown(f=>{this._viewController.emitKeyDown(f
Line truncated
|
||||
`),S=w.substring(v+1),L=S.lastIndexOf(" "),x=S.length-L-1,I=m.getStartPosition(),D=Math.min(I.column-1,x),R=I.column-1-D,F=S.substring(0,S.length-D),{tabSize:O}=this._context.viewModel.model.getOptions(),B=jue(this.textArea.domNode.ownerDocument,F,this._fontInfo,O);return{distanceToModelLineStart:R,widthOfHiddenTextBefore:B}})(),{distanceToModelLineEnd:C}=(()=>{const w=g.value.substring(Math.max(g.selectionStart,g.selectionEnd)),v=w.indexOf(`
|
||||
`),S=v===-1?w:w.substring(0,v),L=S.indexOf(" "),x=L===-1?S.length:S.length-L-1,I=m.getEndPosition(),D=Math.min(this._context.viewModel.model.getLineMaxColumn(I.lineNumber)-I.column,x);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(I.lineNumber)-I.column-D}})();this._context.viewModel.revealRange("keyboard",!0,k.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new $ue(this._context,m.startLineNumber,_,b,C),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${w_} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(f=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${w_}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Ll.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=Sr(t,[]);let s=!0,r=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const d=i.charCodeAt(r-2);n.get(d)!==0?s=!1:r--}if(a&&l>i.length&&(a=!1),a){const d=i.charCodeAt(l-1);n.get(d)!==0?a=!1:l++}c++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Sr(this._context.configuration.options.get(148),[]);let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!zi(i.charCodeAt(0)))return i}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Da.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(165).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=sP?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this._copyWithSyntaxHighlighting=t.get(31),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",nP(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textAreaLine truncated
|
||||
`;this.value=i}equals(e){return this.value===e.value}static get NULL(){const e={getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(t,i)=>t};return new _v(e,[])}}class Jue{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,i){const n=t*i,s=n+1,r=Math.min(n+i,e.getLineCount());return new Que(s,r)}fromEditorSelection(e,t,i){const n=this._getPageOfLine(t.startLineNumber,i),s=this._getRangeForPage(e,n,i),r=this._getPageOfLine(t.endLineNumber,i),a=this._getRangeForPage(e,r,i),l=[{startLine:s.startLine,endLine:s.endLine}];return n+1<r&&l.push({startLine:a.startLine,endLine:a.endLine}),new _v(e,l)}}class efe{constructor(e){this.replacements=e;let t=-1;for(const i of e){if(!(i.replaceRange.start>=t))throw new Ce(`Edits must be disjoint and sorted. Found ${i} after ${t}`);t=i.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(t=>t.toString()).join(", ")}]`}normalize(){const e=[];let t;for(const i of this.replacements)if(!(i.getNewLength()===0&&i.replaceRange.length===0)){if(t&&t.replaceRange.endExclusive===i.replaceRange.start){const n=t.tryJoinTouching(i);if(n){t=n;continue}}t&&e.push(t),t=i}return t&&e.push(t),this._createNew(e)}compose(e){const t=this.normalize(),i=e.normalize();if(t.isEmpty())return i;if(i.isEmpty())return t;const n=[...t.replacements],s=[];let r=0;for(const a of i.replacements){for(;;){const h=n[0];if(!h||h.replaceRange.start+r+h.getNewLength()>=a.replaceRange.start)break;n.shift(),s.push(h),r+=h.getNewLength()-h.replaceRange.length}const l=r;let c,d;for(;;){const h=n[0];if(!h||h.replaceRange.start+r>a.replaceRange.endExclusive)break;c||(c=h),d=h,n.shift(),r+=h.getNewLength()-h.replaceRange.length}if(!c)s.push(a.delta(-r));else{const h=Math.min(c.replaceRange.start,a.replaceRange.start-l),u=a.replaceRange.start-(c.replaceRange.start+l);if(u>0){const _=c.slice(pe.emptyAt(h),new pe(0,u));s.push(_)}if(!d)throw new Ce("Invariant violation: lastIntersecting is undefined");const f=d.replaceRange.endExclusive+r-a.replaceRange.endExclusive;if(f>0){const _=d.slice(pe.ofStartAndLength(d.replaceRange.endExclusive,0),new pe(d.getNewLength()-f,d.getNewLength()));n.unshift(_),r-=_.getNewLength()-_.replaceRange.length}const g=new pe(h,a.replaceRange.endExclusive-r),m=a.slice(g,new pe(0,a.getNewLength()));s.push(m)}}for(;;){const a=n.shift();if(!a)break;s.push(a)}return this._createNew(s).normalize()}getNewRanges(){const e=[];let t=0;for(const i of this.replacements)e.push(pe.ofStartAndLength(i.replaceRange.start+t,i.getNewLength())),t+=i.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}}class tfe{constructor(e){this.replaceRange=e}delta(e){return this.slice(this.replaceRange.delta(e),new pe(0,this.getNewLength()))}getLengthDelta(){return this.getNewLength()-this.replaceRange.length}toString(){return`{ ${this.replaceRange.toString()} -> ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new pe(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}}class ife extends efe{apply(e){const t=[];let i=0;for(const n of this.replacements)t.push(e.substring(i,n.replaceRange.start)),t.push(n.newText),i=n.replaceRange.endExclusive;return t.push(e.substring(i)),t.join("")}}class nfe extends tfe{constructor(e,t){super(e),this.newText=t}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){const t=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),i=Gr(t,this.newText),n=Math.min(t.length-i,this.newText.length-i,Lc(t,this.newText)),s=new pe(this.replaceRange.start+i,this.replaceRange.endExclusive-n),r=this.newText.substring(i,this.newText.length-n);return new Cn(s,r)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){const t=this.replaceRange.substring(e),i=Gr(t,this.newText);return i===0?this:this.slice(this.replaceRange.deltaStart(i),new pe(i,this.newText.length))}removeCommonSuffix(e){const t=this.replaceRange.substring(e),i=Lc(t,this.newText);return i===0?this:this.slice(this.replaceRange.deltaEnd(-i),new pe(0,this.newText.length-i))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}}const vC=class vC extends ife{static compose(e){if(e.length===0)return vC.empty;let t=e[0];for(let i=1;i<e.length;i++)t=t.compose(e[i]);return t}constructor(e){super(e)}_createNew(e){return new vC(e)}};vC.empty=new vC([]);let qc=vC;class Cn extends nfe{static insert(e,t){return new Cn(pe.emptyAt(e),t)}static replace(e,t){return new Cn(e,t)}equals(e){return this.replaceRange.equals(e.replaceRange)&&this.newText===e.newText}tryJoinTouching(e){return new Cn(this.replaceRange.joinRightTo
Line truncated
|
||||
`?(t++,i=0):i++;return new el(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new el(this.lineCount,this.columnCount+e.columnCount):new el(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new k(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new k(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new k(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return ke.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new M(e.lineNumber,e.column+this.columnCount):new M(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};el.zero=new el(0,0);let $i=el;class SU{getOffsetRange(e){return new pe(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return k.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Uf.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Uf.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const t=e.replacements.map(i=>this.getTextReplacement(i));return new Uf.deps.TextEdit(t)}}const rB=class rB{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};rB._deps=void 0;let Uf=rB;function sfe(o){Uf._deps=o}class rx extends SU{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===`
|
||||
`&&(this.lineStartOffsetByLineIdx.push(t+1),t>0&&e.charAt(t-1)==="\r"?this.lineEndOffsetByLineIdx.push(t-1):this.lineEndOffsetByLineIdx.push(t));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new M(1,1);const t=this.textLength.lineCount+1;if(e.lineNumber>t){const n=this.getLineLength(t);return new M(t,n+1)}if(e.column<1)return new M(e.lineNumber,1);const i=this.getLineLength(e.lineNumber);return e.column-1>i?new M(e.lineNumber,i+1):e}getPosition(e){const t=C_(this.lineStartOffsetByLineIdx,s=>s<=e),i=t+1,n=e-this.lineStartOffsetByLineIdx[t]+1;return new M(i,n)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Uf.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class cP{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new M(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new k(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new rx(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new k(e,1,e,Number.MAX_SAFE_INTEGER))}}class ofe extends cP{constructor(e,t){YC(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)t+=`
|
||||
`+this._getLineContent(i);return t+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),t}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new $i(this._lineCount-1,e.length)}}class ax extends ofe{constructor(e){super(t=>e[t-1],e.length)}}class kh extends cP{constructor(e){super(),this.value=e,this._t=new rx(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}class mo{static fromStringEdit(e,t){const i=e.replacements.map(n=>Oi.fromStringReplacement(n,t));return new mo(i)}static fromParallelReplacementsUnsorted(e){const t=e.slice().sort(kn(i=>i.range,k.compareRangesUsingStarts));return new mo(t)}constructor(e){this.replacements=e,Xd(()=>XC(e,(t,i)=>t.range.getEndPosition().isBeforeOrEqual(i.range.getStartPosition())))}mapPosition(e){let t=0,i=0,n=0;for(const s of this.replacements){const r=s.range.getStartPosition();if(e.isBeforeOrEqual(r))break;const a=s.range.getEndPosition(),l=$i.ofText(s.text);if(e.isBefore(a)){const c=new M(r.lineNumber+t,r.column+(r.lineNumber+t===i?n:0)),d=l.addToPosition(c);return lx(c,d)}r.lineNumber+t!==i&&(n=0),t+=l.lineCount-(s.range.endLineNumber-s.range.startLineNumber),l.lineCount===0?a.lineNumber!==r.lineNumber?n+=l.columnCount-(a.column-1):n+=l.columnCount-(a.column-r.column):n=l.columnCount,i=a.lineNumber+t}return new M(e.lineNumber+t,e.column+(e.lineNumber+t===i?n:0))}mapRange(e){function t(r){return r instanceof M?r:r.getStartPosition()}function i(r){return r instanceof M?r:r.getEndPosition()}const n=t(this.mapPosition(e.getStartPosition())),s=i(this.mapPosition(e.getEndPosition()));return lx(n,s)}apply(e){let t="",i=new M(1,1);for(const s of this.replacements){const r=s.range,a=r.getStartPosition(),l=r.getEndPosition(),c=lx(i,a);c.isEmpty()||(t+=e.getValueOfRange(c)),t+=s.text,i=l}const n=lx(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new kh(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const s of this.replacements){const r=$i.ofText(s.text),a=M.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===t?n:0)}),l=r.createRange(a);e.push(l),i=l.endLineNumber-s.range.endLineNumber,n=l.endColumn-s.range.endColumn,t=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Ce;if(this.replacements.length===1)return this.replacements[0];const t=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition();let n="";for(let s=0;s<this.replacements.length;s++){const r=this.replacements[s];if(n+=r.text,s<this.replacements.length-1){const a=this.replacements[s+1],l=k.fromPositions(r.range.getEndPosition(),a.range.getStartPosition()),c=e.getValueOfRange(l);n+=c}}return new Oi(k.fromPositions(t,i),n)}toString(e){return e===void 0?this.replacements.map(t=>t.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new kh(e)):this.replacements.length===0?"":this.replacements.map(t=>{const n=e.getValueOfRange(t.range),s=k.fromPositions(new M(Math.max(1,t.range.startLineNumber-1),1),t.range.getStartPosition());let r=e.getValueOfRange(s);r.length>10&&(r="..."+r.substring(r.length-10));const a=k.fromPositions(t.range.getEndPosition(),new M(t.range.endLineNumber+1,1));let l=e.getValueOfRange(a);l.length>10&&(l=l.substring(0,10)+"...");let c=n;if(c.length>10){const h=Math.floor(5);c=c.substring(0,h)+"..."+c.substring(c.length-h)}let d=t.text;if(d.length>10){const h=Math.floor(5);d=d.substring(0,h)+"..."+d.substring(d.length-h)}return c.length===0?`${r}❰${d}❱${l}`:`${r}❰${c}↦${d}❱${l}`}).join(`
|
||||
`)}}class Oi{static joinReplacements(e,t){if(e.length===0)throw new Ce;if(e.length===1)return e[0];const i=e[0].range.getStartPosition(),n=e[e.length-1].range.getEndPosition();let s="";for(let r=0;r<e.length;r++){const a=e[r];if(s+=a.text,r<e.length-1){const l=e[r+1],c=k.fromPositions(a.range.getEndPosition(),l.range.getStartPosition()),d=t.getValueOfRange(c);s+=d}}return new Oi(k.fromPositions(i,n),s)}static fromStringReplacement(e,t){return new Oi(t.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new Oi(e,"")}constructor(e,t){this.range=e,this.text=t}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,t){return e.range.equalsRange(t.range)&&e.text===t.text}equals(e){return Oi.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const t=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),n=Gr(t,i),s=$i.ofText(t.substring(0,n)).addToPosition(this.range.getStartPosition()),r=i.substring(n),a=k.fromPositions(s,this.range.getEndPosition());return new Oi(a,r)}removeCommonSuffix(e){const t=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),n=Lc(t,i),s=$i.ofText(t.substring(0,t.length-n)).addToPosition(this.range.getStartPosition()),r=i.substring(0,i.length-n),a=k.fromPositions(this.range.getStartPosition(),s);return new Oi(a,r)}toString(){const e=this.range.getStartPosition(),t=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${t.lineNumber},${t.column}): "${this.text}"`}}function lx(o,e){if(o.lineNumber===e.lineNumber&&o.column===Number.MAX_SAFE_INTEGER)return k.fromPositions(e,e);if(!o.isBeforeOrEqual(e))throw new Ce("start must be before end");return new k(o.lineNumber,o.column,e.lineNumber,e.column)}sfe({StringEdit:qc,StringReplacement:Cn,TextReplacement:Oi,TextEdit:mo,TextLength:$i});var rfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},afe=function(o,e){return function(t,i){e(t,i,o)}};let dP=class extends A{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new ct),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new bU,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=this._domNode.domNode,i=ft().document.activeElement;if(!i||i!==t)return;if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);const s=ft().document.getSelection();if(!s)return;const r=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!r)return;this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;const t=this._context.viewModel.viewLayout,i=this._state.startPositionWithinEditor.lineNumber,n=t.getVerticalOffsetForLineNumber(i),s=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=s-n}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return W(this._domNode.domNode.ownerDocument,"selectionchange",()=>{const t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!Ll.enabled||!(ft().document.activeElement===this._domNode.domNode))return;const s=ft().document.getSelection();if(!s||s.rangeCount===0)return;const a=s.getRangeAt(0),l=Date.now(),c=l-e;if(e=l,c<5)return;const d=l-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,!(d<100)&&this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,s.direction,a))})}_getScreenReaderContentState(e){const t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,this._accessibilityService.getAccessibilitySupport()===0),i=this._context.viewModel.model.getPositionAt(1/0);let n=t.value;return i.column===1&&e.getEndPosition().equals(i)&&(n+=`
|
||||
`),t.value=n,t}_getScreenReaderRange(e,t){const i=this._domNode.domNode.firstChild;if(!i)return;const n=new globalThis.Range;return n.setStart(i,e),n.setEnd(i,t),{anchorNode:i,anchorOffset:e,focusNode:i,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,i,n){const s=e.viewModel,r=s.model,l=s.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),c=r.getOffsetAt(l);let d=n.startOffset+c,h=n.endOffset+c;if(r.getEndOfLineSequence()===1){const b=t.value,C=new rx(b),w=C.getPosition(n.startOffset),v=C.getPosition(n.endOffset);d+=w.lineNumber-1,h+=v.lineNumber-1}const f=r.getPositionAt(d),g=r.getPositionAt(h),m=i==="forward"?f:g,_=i==="forward"?g:f;return ce.fromPositions(m,_)}};dP=rfe([afe(3,bn)],dP);var lfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yU=function(o,e){return function(t,i){e(t,i,o)}};let hP=class extends A{constructor(e,t,i,n,s){super(),this._domNode=e,this._context=t,this._viewController=i,this._keybindingService=n,this._accessibilityService=s,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new ce(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new ct),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){this._state.value?.onWillPaste()}onWillCut(){this._state.value?.onWillCut()}handleFocusChange(e){this._state.value?.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){const e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new lP(this._domNode,this._context,this._viewController,this._accessibilityService):new dP(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){const e=this._context.configuration.options,t=e.get(165),i=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(i*this._fontInfo.typicalHalfwidthCharacterWidth),this._state.value?.onConfigurationChanged(e)}_updateDomAttributes(){const e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",p(55,"editor")),this._domNode.domNode.setAttribute("aria-label",nP(e,this._keybindingService));const t=this._context.viewModel.model.getOptions().tabSize,i=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*i}px`;const n=e.get(154),s=n==="inherit"?e.get(153):n,r=s==="inherit"?e.get(149):s;this._domNode.domNode.style.textWrap=r==="off"?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new ce(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._context.viewLayout.getCurrentScrollLeft(),i=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(i<this._contentLeft||i>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getCurrentScrollTop(),s=this._primarySelection.positionLineNumber,r=this._context.viewLayout.getVerticalOffsetForLineNumber(s)-n;if(r<0||r>this._contentHeight){this._renderAtTopLeft();return}const a=this._context.viewLayout.getLineHeightForLineNumber(s);this._doRender(r,this._contentLeft,this._divWidth,a),this._state.value?.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,i,n){dn(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(i),this._domNode.setHeight(n),this._domNode.setLineHeight(n)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete","both"),this._domNode.removeAttribute("aria-activedescendant")),e.role&&this._domNode.
Line truncated
|
||||
`,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register(W(this.domNode.domNode,"paste",h=>{if(this.logService.trace("NativeEditContext#paste"),h.preventDefault(),!h.clipboardData)return;let[u,f]=Af.getTextData(h.clipboardData);if(this.logService.trace("NativeEditContext#paste with id : ",f?.id," with text.length: ",u.length),!u)return;f=f||wl.INSTANCE.get(u);let g=!1,m=null,_=null;f&&(g=this._context.configuration.options.get(45)&&!!f.isFromEmptySelection,m=typeof f.multicursorText<"u"?f.multicursorText:null,_=f.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(u,g,m,_)})),this._register(mv(this._editContext,"textformatupdate",h=>this._handleTextFormatUpdate(h))),this._register(mv(this._editContext,"characterboundsupdate",h=>this._updateCharacterBounds(h)));let c;this._register(mv(this._editContext,"textupdate",h=>{const u=h.text;if(u.length===1){const f=u.charCodeAt(0);if(zi(f)){c=u;return}if(eh(f)&&c){const g={text:c+u,selectionEnd:h.selectionEnd,selectionStart:h.selectionStart,updateRangeStart:h.updateRangeStart-1,updateRangeEnd:h.updateRangeEnd-1};c=void 0,this._emitTypeEvent(this._viewController,g);return}}this._emitTypeEvent(this._viewController,h)})),this._register(mv(this._editContext,"compositionstart",h=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(mv(this._editContext,"compositionend",h=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let d=!1;this._register(Ll.onDidChange(()=>{Ll.enabled&&d&&(this._focusTracker.resume(),this.domNode.focus(),d=!1),!Ll.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),d=!0)})),this._register(fP.register(e,this))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBounds(e)}render(e){this._screenReaderSupport.render(e)}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new ce(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.fromLineNumber+e.count-1),!0}onLinesDeleted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}onLinesInserted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}_updateEditContextOnLineChange(e,t){this._editContextPrimarySelection.endLineNumber<e||this._editContextPrimarySelection.startLineNumber>t||this._updateEditContext()}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}onWillPaste(){this.logService.trace("NativeEditContext#onWillPaste"),this._onWillPaste()}_onWillPaste(){this._screenReaderSupport.onWillPaste()}onWillCopy(){this.logService.trace("NativeEditContext#onWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===Ui())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){const e=me(this.domNode.domNode),t=b1(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){this._viewController.emitKeyUp(new St(e))}_onKeyDown(e){const t=new St(e);t.keyCode===114&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){const e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){const e=this._getNewEditContextState();e&&(this._editContext.updateText(0,Number.MAX_SAFE_INTEGER,e.text??" "),this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new pe(e.selectionStartOffset,e.selectionEndOffset))}_emitTypeEvent(e,t){if(!this._editContext)return;const i=this._previousEditContextSelection.endExclusive,n=this._previousEditContextSelection.start;this._previousEditContextSelection=new pe(t.selectionStart,t.selectionEnd);let s=0,r=0;t.updateRangeEnd>i&&(s=t.updateRangeEnd-i),t.updateRangeStart<n&&(r=n-t.updateRangeStart);let a="";n<t.updateRangeStart&&(a+=this._editContext.text.substring(n,t.updateRangeStart)),a+=t.text,i>t
Line truncated
|
||||
`):r.text,l),e.preventDefault(),e.clipboardData&&Af.setTextData(e.clipboardData,r.text,r.html,l),this.logService.trace("NativeEditContext#_ensureClipboardGetsEditorSelectios with id : ",a," with text.length: ",r.text.length)}};cx=dfe([LU(5,ge),LU(6,Rt)],cx);class hfe extends vs{constructor(e,t){super(e),this._viewGpuContext=t,this._gpuShapes=[],this._register(Se(i=>this._updateEntries(i)))}onConfigurationChanged(e){return this._updateEntries(void 0),!0}prepareRender(e){}render(e){}_updateEntries(e){const t=this._context.configuration.options,i=t.get(116),n=t.get(59).typicalHalfwidthCharacterWidth,s=this._viewGpuContext.devicePixelRatio.read(e);for(let r=0,a=i.length;r<a;r++){const l=i[r],c=this._gpuShapes[r],d=l.color?$.fromHex(l.color):this._context.theme.getColor(Gde)??$.white,h=[l.column*n*s,0,Math.max(1,Math.ceil(s)),Number.MAX_SAFE_INTEGER,d.rgba.r/255,d.rgba.g/255,d.rgba.b/255,d.rgba.a];c?c.setRaw(h):this._gpuShapes[r]=this._viewGpuContext.rectangleRenderer.register(...h)}for(;this._gpuShapes.length>i.length;)this._gpuShapes.splice(-1,1)[0].dispose()}}const gN=class gN extends Lh{constructor(e,t){super(),this._viewGpuContext=t,this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onCursorStateChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return!0}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.viewportData,s=new GL(this._context.configuration,this._context.theme.type),r=[];for(let a=t;a<=i;a++){const l=a-t,c=this._viewGpuContext.canRenderDetailed(s,n,a);r[l]=c.length?`<div class="${gN.CLASS_NAME}" title="Cannot render on GPU: ${c.join(", ")}"></div>`:""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};gN.CLASS_NAME="gpu-mark";let gP=gN;var ufe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ffe=function(o,e){return function(t,i){e(t,i,o)}};let pP=class extends Tf{constructor(e,t,i,n,s,r,a,l,c){super(),this._instantiationService=c,this._shouldRecomputeGlyphMarginLanes=!1,this._ownerID=t,this._widgetFocusTracker=this._register(new gfe(e,l)),this._register(this._widgetFocusTracker.onChange(()=>{this._context.viewModel.setHasWidgetFocus(this._widgetFocusTracker.hasFocus())})),this._selections=[new ce(1,1,1,1)],this._renderAnimationFrame=null,this._overflowGuardContainer=lt(document.createElement("div")),Na.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._viewController=new Sde(n,r,a,i),this._context=new uue(n,s,r),this._context.addEventHandler(this),this._viewParts=[],this._editContextEnabled=this._context.configuration.options.get(170),this._accessibilitySupport=this._context.configuration.options.get(2),this._editContext=this._instantiateEditContext(),this._viewParts.push(this._editContext),this._linesContent=lt(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=lt(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._context.configuration.options.get(46)==="on"&&(this._viewGpuContext=this._instantiationService.createInstance(ls,this._context)),this._scrollbar=new Che(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new BM(this._context,this._viewGpuContext,this._linesContent),this._viewGpuContext&&(this._viewLinesGpu=this._instantiationService.createInstance(iP,this._context,this._viewGpuContext)),this._viewZones=new aue(this._context),this._viewParts.push(this._viewZones);const d=new Qhe(this._context);this._viewParts.push(d);const h=new iue(this._context);this._viewParts.push(h);const u=new Lde(this._context);this._viewParts.push(u),u.addDynamicOverlay(new mhe(this._context)),u.addDynamicOverlay(new ZM(this._context)),u.addDynamicOverlay(new The(this._context)),u.addDynamicOverlay(new bhe(this._context)),u.addDynamicOverlay(new cue(this._context));const f=new xde(this._context);this._viewParts.push(f),f.addDynamicOverlay(new _he(this._context)),f.addDynamicOverlay(new Ohe(this._context)),f.addDynamicOverlay(new Ahe(this._context)),f.addDynamicOverlay(new KL(this._context)),this._viewGpuContext&&f.addDynamicOverlay(new gP(this._context,this._viewGpuContext)),thiLine truncated
|
||||
`,"gi"):null,s=[];let r,a=0,l=0,c=0,d=0;const h=[];for(let g=0;g<60;g++)h.push(new Eh(Ti(0,g),0,-1,_o.getEmpty(),new qf(Ti(0,g))));const u=[];for(let g=0;g<60;g++)u.push(new Eh(Ti(1,g),0,-1,_o.getEmpty(),new qf(Ti(1,g))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const g=r.index,m=r[0];if(m===`
|
||||
`)a++,l=g+1;else{if(c!==g){let _;if(d===a){const b=g-c;if(b<h.length)_=h[b];else{const C=Ti(0,b);_=new Eh(C,0,-1,_o.getEmpty(),new qf(C))}}else{const b=a-d,C=g-l;if(b===1&&C<u.length)_=u[C];else{const w=Ti(b,C);_=new Eh(w,0,-1,_o.getEmpty(),new qf(w))}}s.push(_)}s.push(t.getToken(m)),c=g+m.length,d=a}}const f=e.length;if(c!==f){const g=d===a?Ti(0,f-c):Ti(a-d,f-l);s.push(new Eh(g,0,-1,_o.getEmpty(),new qf(g)))}this.length=Ti(a,f-l),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new Mte}}class yP{static createFromLanguage(e,t){function i(s){return t.getKey(`${s.languageId}:::${s.bracketText}`)}const n=new Map;for(const s of e.bracketsNew.openingBrackets){const r=Ti(0,s.bracketText.length),a=i(s),l=_o.getEmpty().add(a,PU);n.set(s.bracketText,new Eh(r,1,a,l,gx.create(r,s,l)))}for(const s of e.bracketsNew.closingBrackets){const r=Ti(0,s.bracketText.length);let a=_o.getEmpty();const l=s.getOpeningBrackets();for(const c of l)a=a.add(i(c),PU);n.set(s.bracketText,new Eh(r,2,i(l[0]),a,gx.create(r,s,a)))}return new yP(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>Bfe(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function Bfe(o){let e=oo(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class FU{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=yP.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Hfe(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e<o.length&&o[e].listHeight===a;)e++;return e-r>=2?WU(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())BU(i,n)<=BU(n,r)?(i=LP(i,n),n=r):n=LP(n,r);return LP(i,n)}function WU(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;o[n]=xl.create23(o[s],o[s+1],s+3===t?o[s+2]:null,e)}t=i}return xl.create23(o[0],o[1],t>=3?o[2]:null,e)}function BU(o,e){return Math.abs(o.listHeight-e.listHeight)}function LP(o,e){return o.listHeight===e.listHeight?xl.create23(o,e,null,!1):o.listHeight>e.listHeight?Vfe(o,e):zfe(e,o)}function Vfe(o,e){o=o.toMutable();let t=o;const i=[];let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=xl.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?xl.create23(o,n,null,!1):o}function zfe(o,e){o=o.toMutable();let t=o;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=xl.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?xl.create23(n,o,null,!1):o}class Ufe{constructor(e){this.lastOffset=ys,this.nextNodes=[e],this.offsets=[ys],this.idxs=[]}readLongestNodeAt(e,t){if(D_(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=xv(this.nextNodes);if(!i)return;const n=xv(this.offsets);if(D_(e,n))return;if(D_(n,e))if(ui(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=xP(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=xP(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=xv(this.offsets),t=xv(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=xv(this.nextNodes),n=xP(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(ui(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function xP(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function xv(o){return o.length>0?o[o.length-1]:void 0}function kP(o,e,t,i){return new $fe(o,e,t,i).parseDocument()}class $f
Line truncated
|
||||
`?0:1}function Zc(o){return o?o instanceof KU||o instanceof Qfe:!1}class TP{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Zc(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Zc(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(Zc(i)&&i.canAppend(this._model))return i;const n=new KU(p(781,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],NP(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=jn.unknown({name:"pushEditOperation"})){const r=this._getOrCreateEditStackElement(e,n),a=this._model.applyEdits(t,!0,s),l=TP._computeCursorState(i,a),c=a.map((d,h)=>({index:h,textChange:d.textChange}));return c.sort((d,h)=>d.textChange.oldPosition===h.textChange.oldPosition?d.index-h.index:d.textChange.oldPosition-h.textChange.oldPosition),r.append(this._model,c.map(d=>d.textChange),NP(this._model),this._model.getAlternativeVersionId(),l),l}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Ee(i),null}}}class Jfe{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function ege(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){const u=o.charCodeAt(s),f=t.charCodeAt(s);if(u!==f)break}let r=0,a=0;for(let u=s;u<e;u++)o.charCodeAt(u)===32?r++:a++;let l=0,c=0;for(let u=s;u<i;u++)t.charCodeAt(u)===32?l++:c++;if(r>0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-1<o.length&&l<t.length&&t.charCodeAt(l)!==32&&o.charCodeAt(l-1)===32&&o.charCodeAt(o.length-1)===44&&(n.looksLikeAlignment=!0);return}if(h%d===0){n.spacesDiff=h/d;return}}function GU(o,e,t){const i=Math.min(o.getLineCount(),1e4);let n=0,s=0,r="",a=0;const l=[2,4,6,8,3,5,7],c=8,d=[0,0,0,0,0,0,0,0,0],h=new Jfe;for(let g=1;g<=i;g++){const m=o.getLineLength(g),_=o.getLineContent(g),b=m<=65536;let C=!1,w=0,v=0,S=0;for(let x=0,I=m;x<I;x++){const D=b?_.charCodeAt(x):o.getLineCharCode(g,x);if(D===9)S++;else if(D===32)v++;else{C=!0,w=x;break}}if(!C||(S>0?n++:v>1&&s++,ege(r,a,_,w,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const L=h.spacesDiff;L<=c&&d[L]++,r=_,a=w}let u=t;n!==s&&(u=n<s);let f=e;if(u){let g=u?0:.1*i;l.forEach(m=>{const _=d[m];_>g&&(g=_,f=m)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(f=2)}return{insertSpaces:u,tabSize:f}}function Gs(o){return(o.metadata&1)>>>0}function qt(o,e){o.metadata=o.metadata&254|e<<0}function Rn(o){return(o.metadata&2)>>>1===1}function Ft(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function ZU(o){return(o.metadata&4)>>>2===1}function YU(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function XU(o){return(o.metadata&64)>>>6===1}function QU(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function JU(o){return(o.metadata&128)>>>7===1}function e$(o,e){o.metadata=o.metadata&127|(e?1:0)<<7}function tge(o){return(o.metadata&24)>>>3}function t$(o,e){o.metadata=o.metadata&231|e<<3}function ige(o){return(o.metadata&32)>>>5===1}function i$(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class n${constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,qt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,YU(this,!1),QU(this,!1),t$(this,1),i$(this,!1),e$(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Ft(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;YU(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),QU(this,this.options.glyphMarginClassName!==null),t$(this,this.options.stickiness),i$(this,this.options.collapseOnReplaceEdit),e$(this,this.options.affectsFont??!1)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const qe=new n$(null,0,0);qe.parent=qe,qe.left=qe,qe.right=qe,qt(qe,0);class RP{constructor(){this.root=qe,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r,a){return this.root===qe?[]:dge(this,e,t,i,n,s,r,a)}search(e,t,i,n,s){return this.root===qe?[]:cge(this,e,t,i,n,s)}collectNodesFromOwner(e){return age(this,e)}collectNodesPostOrder(){return lge(this)}insert(e){s$(this,e),this._normalizeDeltaIfNecessary()}delete(e){o$(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i
Line truncated
|
||||
`)>=0;let t=null;try{t=JB(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new Coe(t,this.wordSeparators?Sr(this.wordSeparators,[]):null,i?this.searchString:null)}}function c$(o){if(!o||o.length===0)return!1;for(let e=0,t=o.length;e<t;e++){const i=o.charCodeAt(e);if(i===10)return!0;if(i===92){if(e++,e>=t)break;const n=o.charCodeAt(e);if(n===110||n===114||n===87)return!0}}return!1}function Gf(o,e,t){if(!t)return new E1(o,null);const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return new E1(o,i)}class d${constructor(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++)e.charCodeAt(n)===10&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(n===-1||e<=t[0])return 0;for(;i<n;){const s=i+((n-i)/2>>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class vx{static findMatches(e,t,i,n,s){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new M_(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(e,i,r,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let c;if(n){const f=n.findLineFeedCountBeforeOffset(s+r.length)-l;c=a+r.length+f}else c=a+r.length;const d=e.getPositionAt(a),h=e.getPositionAt(c);return new k(d.lineNumber,d.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,s){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r
|
||||
`?new d$(a):null,c=[];let d=0,h;for(i.reset(0);h=i.next(a);)if(c[d++]=Gf(this._getMultilineMatchRange(e,r,a,l,h.index,h[0]),h,n),d>=s)return c;return c}static _doFindMatchesLineByLine(e,t,i,n,s){const r=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,c,t.startLineNumber,t.startColumn-1,a,r,n,s),r}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,r,n,s);for(let c=t.startLineNumber+1;c<t.endLineNumber&&a<s;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,r,n,s);if(a<s){const c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);a=this._findMatchesInLine(i,c,t.endLineNumber,0,a,r,n,s)}return r}static _findMatchesInLine(e,t,i,n,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const u=e.simpleSearch,f=u.length,g=t.length;let m=-f;for(;(m=t.indexOf(u,m+f))!==-1;)if((!c||BP(c,t,g,m,f))&&(r[s++]=new E1(new k(i,m+1+n,i,m+1+f+n),null),s>=l))return s;return s}const d=new M_(e.wordSeparators,e.regex);let h;d.reset(0);do if(h=d.next(t),h&&(r[s++]=Gf(new k(i,h.index+1+n,i,h.index+1+h[0].length+n),h,a),s>=l))return s;while(h);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new M_(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new M(t.lineNumber,1),r=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new k(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r
|
||||
`?new d$(l):null;i.reset(t.column-1);const d=i.next(l);return d?Gf(this._getMultilineMatchRange(e,r,l,c,d.index,d[0]),d,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new M(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r),l=this._findFirstMatchInLine(i,a,r,t.column,n);if(l)return l;for(let c=1;c<=s;c++){const d=(r+c-1)%s,h=e.getLineContent(d+1),u=this._findFirstMatchInLine(i,h,d+1,1,n);if(u)return u}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const r=e.next(t);return r?Gf(new k(i,r.index+1,i,r.index+1+r[0].length),r,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new M_(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new k(1,1,t.lineNumber,t.column),i,n,10*gge);if(s.length>0)return s[s.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new M(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,r,n);if(l)return l;for(let c=1;c<=s;c++){const d=(s+r-c-1)%s,h=e.getLineContent(d+1),u=this._findLastMatchInLine(i,h,d+1,n);if(u)return u}return null}static _findLastMatchInLine(e,t,i,n){let s=null,r;for(e.reset(0);r=e.next(t);)s=Gf(new k(i,r.index+1,i,r.index+1+r[0].length),r,n);return s}}function pge(o,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i);if(o.get(r)!==0)return!0}return!1}function mge(o,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i+n-1);if(o.get(r)!==0)return!0}return!1}function BP(o,e,t,i,n){return pge(o,e,t,i,n)&&mge(o,e,t,i,n)}class M_{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){ry(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||BP(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const Xc=65535;function h$(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class _ge{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Qc(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n<s;n++){const r=o.charCodeAt(n);r===13?n+1<s&&o.charCodeAt(n+1)===10?(t[i++]=n+2,n++):t[i++]=n+1:r===10&&(t[i++]=n+1)}return e?h$(t):t}function bge(o,e){o.length=0,o[0]=0;let t=1,i=0,n=0,s=0,r=!0;for(let l=0,c=e.length;l<c;l++){const d=e.charCodeAt(l);d===13?l+1<c&&e.charCodeAt(l+1)===10?(s++,o[t++]=l+2,l++):(i++,o[t++]=l+1):d===10?(n++,o[t++]=l+1):r&&d!==9&&(d<32||d>126)&&(r=!1)}const a=new _ge(h$(o),i,n,s,r);return o.length=0,a}class bo{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Zf{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Cge{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Oe&&e.iterate(e.root,i=>(i!==Oe&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class vge{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n<i.length;n++){const s=i[n];if(s.node.parent===null||s.nodeStartOffset>=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class wge{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Zf("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Oe,this._lineCnt=1,this._
Line truncated
|
||||
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const m=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,m),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);const u=this.createNewPieces(t);h.length>0&&this.rbInsertRight(n,h);let f=n;for(let g=0;g<u.length;g++)f=this.rbInsertRight(f,u[g]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{const n=this.createNewPieces(t);let s=this.rbInsertLeft(null,n[0]);for(let r=1;r<n.length;r++)s=this.rbInsertRight(s,n[r])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===Oe)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,r=n.node;if(s===r){const u=this.positionInBuffer(s,i.remainder),f=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){const g=s.next();Cx(this,s),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(s,f),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,u),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,u,f),this.computeBufferMetadata();return}const a=[],l=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,l),this._searchCache.validate(e),s.piece.length===0&&a.push(s);const c=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,c),r.piece.length===0&&a.push(r);const d=s.next();for(let u=d;u!==Oe&&u!==r;u=u.next())a.push(u);const h=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const r=t.piece,a={line:r.start.line+1,column:0},l=new bo(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),r.length-1);t.piece=l,e+=`
|
||||
`,Yc(this,t,-1,-1),t.piece.length===0&&i.push(t)}const n=this.createNewPieces(e);let s=this.rbInsertLeft(t,n[n.length-1]);for(let r=n.length-2;r>=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
|
||||
`);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r<i.length;r++)s=this.rbInsertRight(s,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,s=e.piece.bufferIndex,r=this._buffers[s].lineStarts,l=r[n.start.line]+n.start.column+t;let c=n.start.line,d=n.end.line,h=0,u=0,f=0;for(;c<=d&&(h=c+(d-c)/2|0,f=r[h],h!==d);)if(u=r[h+1],l<f)d=h-1;else if(l>=u)c=h+1;else break;return i?(i.line=h,i.column=l-f,null):{line:h,column:l-f}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)Cx(this,e[t])}createNewPieces(e){if(e.length>Xc){const d=[];for(;e.length>Xc;){const u=e.charCodeAt(Xc-1);let f;u===13||u>=55296&&u<=56319?(f=e.substring(0,Xc-1),e=e.substring(Xc-1)):(f=e.substring(0,Xc),e=e.substring(Xc));const g=Qc(f);d.push(new bo(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new Zf(f,g))}const h=Qc(e);return d.push(new bo(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new Zf(e,h)),d}let t=this._buffers[0].buffer.length;const i=Qc(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d<i.length;d++)i[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<i.length;d++)i[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[r],l={line:r,column:a},c=new bo(0,n,l,this.getLineFeedCnt(0,n,l),s-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="";const s=this._searchCache.get2(e);if(s){i=s.node;const r=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+r,l+i.piece.length);else{const c=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(l+r,l+c-t)}}else{let r=0;const a=e;for(;i!==Oe;)if(i.left!==Oe&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(h+l,h+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Oe;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Oe;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,d=a-s,h=i.length+d;e.piece=new bo(i.bufferIndex,i.start,r,l,h),Yc(this,e,d,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,
Line truncated
|
||||
`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Qc(t,!1);for(let f=0;f<s.length;f++)s[f]+=n;if(i){const f=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-f}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const r=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],l={line:r,column:a},c=e.piece.length+t.length,d=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,l),u=h-d;e.piece=new bo(e.piece.bufferIndex,e.piece.start,l,h,c),this._lastChangeBufferPos=l,Yc(this,e,t.length,u)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==Oe;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Oe;)if(i.left!==Oe&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Oe;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
||||
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Oe||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Oe||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new bo(e.piece.bufferIndex,e.piece.start,s,a,r),Yc(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new bo(t.piece.bufferIndex,l,t.piece.end,d,c),Yc(this,t,-1,-1),t.piece.length===0&&i.push(t);const h=this.createNewPieces(`\r
|
||||
`);this.rbInsertRight(e,h[0]);for(let u=0;u<i.length;u++)Cx(this,i[u])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+=`
|
||||
`,i.piece.length===1)Cx(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},r=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new bo(n.bufferIndex,s,n.end,a,r),Yc(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===Oe)return t(Oe);const i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===Oe)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),s=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,s)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new PP(t,1);if(i.left=Oe,i.right=Oe,i.parent=Oe,i.size_left=0,i.lf_left=0,this.root===Oe)this.root=i,i.color=0;else if(e.right===Oe)e.right=i,i.parent=e;else{const s=AP(e.right);s.left=i,i.parent=s}return l$(this,i),i}rbInsertLeft(e,t){const i=new PP(t,1);if(i.left=Oe,i.right=Oe,i.parent=Oe,i.size_left=0,i.lf_left=0,this.root===Oe)this.root=i,i.color=0;else if(e.left===Oe)e.left=i,i.parent=e;else{const n=a$(e.left);n.right=i,i.parent=n}return l$(this,i),i}}class P_ extends A{constructor(e,t,i,n,s,r,a){super(),this._onDidChangeContent=this._register(new P),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new wge(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),s=this.getPositionAt(i);return new k(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);let s=0;const r=this._getEndOfLine(t),a=this.getEOL();if(r.length!==a.length){const l=r.length-a.length,c=e.endLineNumber-e.startLineNumber;s=l*c}return n-i+s}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let r=n;r<=s;r++){const a=this.getLineContent(r),l=r===n?e.startColumn-1:0,c=r===s?e.endColumn-1:a.length;for(let d=l;d<c;d++)zi(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getNearestChunk(e){return this._pieceTree.getNearestChunk(e)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=es(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Kr(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return`
|
||||
`;case 2:return`\r
|
||||
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,a=!0,l=[];for(let m=0;m<e.length;m++){const _=e[m];a&&_._isTracked&&(a=!1);const b=_.range;if(_.text){let L=!0;r||(L=!c1(_.text),r=L),!n&&L&&(n=Tm(_.text)),!s&&L&&(s=n6(_.text))}let C="",w=0,v=0,S=0;if(_.text){let L;[w,v,S,L]=Dh(_.text);const x=this.getEOL();L===0||L===(x===`\r
|
||||
`?2:1)?C=_.text:C=_.text.replace(/\r\n|\r|\n/g,x)}l[m]={sortIndex:m,identifier:_.identifier||null,range:b,rangeOffset:this.getOffsetAt(b.startLineNumber,b.startColumn),rangeLength:this.getValueLengthInRange(b),text:C,eolCount:w,firstLineLength:v,lastLineLength:S,forceMoveMarkers:!!_.forceMoveMarkers,isAutoWhitespaceEdit:_.isAutoWhitespaceEdit||!1}}l.sort(P_._sortOpsAscending);let c=!1;for(let m=0,_=l.length-1;m<_;m++){const b=l[m].range.getEndPosition(),C=l[m+1].range.getStartPosition();if(C.isBeforeOrEqual(b)){if(C.isBefore(b))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));const d=i||t?P_._getInverseEditRanges(l):[],h=[];if(t)for(let m=0;m<l.length;m++){const _=l[m],b=d[m];if(_.isAutoWhitespaceEdit&&_.range.isEmpty())for(let C=b.startLineNumber;C<=b.endLineNumber;C++){let w="";C===b.startLineNumber&&(w=this.getLineContent(_.range.startLineNumber),es(w)!==-1)||h.push({lineNumber:C,oldContent:w})}}let u=null;if(i){let m=0;u=[];for(let _=0;_<l.length;_++){const b=l[_],C=d[_],w=this.getValueInRange(b.range),v=b.rangeOffset+m;m+=b.text.length-w.length,u[_]={sortIndex:b.sortIndex,identifier:b.identifier,range:C,text:w,textChange:new Tn(b.rangeOffset,w,v,b.text)}}c||u.sort((_,b)=>_.sortIndex-b.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const f=this._doApplyEdits(l);let g=null;if(t&&h.length>0){h.sort((m,_)=>_.lineNumber-m.lineNumber),g=[];for(let m=0,_=h.length;m<_;m++){const b=h[m].lineNumber;if(m>0&&h[m-1].lineNumber===b)continue;const C=h[m].oldContent,w=this.getLineContent(b);w.length===0||w===C||es(w)!==-1||g.push(b)}}return this._onDidChangeContent.fire(),new voe(u,f,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new k(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let f=0,g=e.length;f<g;f++){const m=e[f],_=m.range;t=t||m.forceMoveMarkers,l.push(this.getValueInRange(new k(r,a,_.startLineNumber,_.startColumn))),m.text.length>0&&l.push(m.text),r=_.endLineNumber,a=_.endColumn}const c=l.join(""),[d,h,u]=Dh(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(P_._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],s=n.range.startLineNumber,r=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(s===a&&r===l&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new k(s,r,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,s=null;for(let r=0,a=e.length;r<a;r++){const l=e[r];let c,d;s?s.range.endLineNumber===l.range.startLineNumber?(c=i,d=n+(l.range.startColumn-s.range.endColumn)):(c=i+(l.range.startLineNumber-s.range.endLineNumber),d=l.range.startColumn):(c=l.range.startLineNumber,d=l.range.startColumn);let h;if(l.text.length>0){const u=l.eolCount+1;u===1?h=new k(c,d,c,d+l.firstLineLength):h=new k(c,d,c+u-1,l.lastLineLength+1)}else h=new k(c,d,c,d);i=h.endLineNumber,n=h.endColumn,t.push(h),s=l}return t}static _sortOpsAscending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class Sge{constructor(e,t,i,n,s,r,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?`
|
||||
`:`\r
|
||||
`:i>t/2?`\r
|
||||
`:`
|
||||
`}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r
|
||||
`&&(this._cr>0||this._lf>0)||t===`
|
||||
`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s<r;s++){const a=i[s].buffer.replace(/\r\n|\r|\n/g,t),l=Qc(a);i[s]=new Zf(a,l)}const n=new P_(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class u${constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&yR(e)&&(this.BOM=Tie,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=bge(this._tmpLineStarts,e);this.chunks.push(new Zf(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Tm(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=n6(e)))}finish(e=!0){return this._finish(),new Sge(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Qc(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class yge{constructor(){this._onDidChangeVisibleRanges=new P,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set,this._viewsChanged=_r(this),this.visibleLineRanges=In({owner:this,equalsFn:f1(UR())},e=>(this._viewsChanged.read(e),ke.joinMany([...this._views].map(i=>i.state.read(e)?.visibleLineRanges??[]))))}attachView(){const e=new xge(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),this._viewsChanged.trigger(void 0),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0}),this._viewsChanged.trigger(void 0)}}class Lge{constructor(e,t){this.visibleLineRanges=e,this.stabilized=t}equals(e){return this===e?!0:!(!Ut(this.visibleLineRanges,e.visibleLineRanges,(t,i)=>t.equals(i))||this.stabilized!==e.stabilized)}}class xge{get state(){return this._state}constructor(e){this.handleStateChange=e,this._state=m1({owner:this,equalsFn:rf((t,i)=>t.equals(i))},void 0)}setVisibleLines(e,t){const i=e.map(s=>new ke(s.startLineNumber,s.endLineNumber+1)),n=new Lge(i,t);this._state.set(n,void 0,void 0),this.handleStateChange(n)}}class kge extends A{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new wt(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Ut(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class f$ extends A{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t){super(),this._languageIdCodec=e,this._textModel=t,this._onDidChangeTokens=this._register(new P),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}function Ige(o,e){const t=o.gotoNextSibling(),i=e.gotoNextSibling();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function g$(o,e){const t=o.gotoParent(),i=e.gotoParent();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function Dge(o,e,t){const i=o.gotoFirstChild(),n=e.gotoFirstChild();if(i!==n)throw new Error("Trees are out of sync");if(t===0)return i&&n;for(let s=1;s<=t;s++){const r=o.gotoNextSibling(),a=e.gotoNextSibling();if(r!==a)throw new Error("Trees are out of sync");if(!r||!a)return!1}return i&&n}function p$(o,e){do{if(o.currentNode.nextSibling)return Ige(o,e);o.currentNode.parent&&g$(o,e)}while(o.currentNode.nextSibling||o.currentNode.parent);return!1}function Ege(o,e){const t=e.walk();t.resetTo(o);const i=o.currentNode;do if(t.currentNode.previousSibling&&t.currentNode.endIndex-t.currentNode.startIndex!==0)t.gotoPreviousSibling();else{for(;!t.currentNode.previousSibling&&t.currentNode.parent;)t.gotoParent();t.gotoPreviousSibling()}while(t.currentNode.endIndex>i.startIndex&&(t.currentNode.parent||t.currentNode.previousSibling)&&t.currentNode.id!==i.id);if(t.currentNode.id!==i.id&&t.currentNode.endIndex<=i.startIndex)return t.currentNode}var Nge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof
Line truncated
|
||||
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=A.None}_assertNotDisposed(){if(this._isDisposed)throw new Ce("Model is disposed!")}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new $f(e,t)))}setValue(e,t=jn.setValue()){if(this._assertNotDisposed(),e==null)throw dr();const{textBuffer:i,disposable:n}=k$(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n,t)}_createContentChanged2(e,t,i,n,s,r,a,l,c,d){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:s}],eol:this._buffer.getEOL(),isEolChange:c,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:l,detailedReasons:[d],detailedReasonsChangeLengths:[1]}}_setValueFromTextBuffer(e,t,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new I$,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new I_([new pfe],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,r,a),0,s,new M(r,a),this.getValue(),!1,!1,!0,!1,i))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r
|
||||
`:`
|
||||
`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new I_([new vfe],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,r),0,n,new M(s,r),this.getValue(),!1,!1,!1,!0,jn.eolChange()))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=s.range,a=s.cachedAbsoluteStart-s.start,l=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),c=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);s.cachedAbsoluteStart=l,s.cachedAbsoluteEnd=c,s.cachedVersionId=e,s.start=l-a,s.end=c-a,Th(s)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=spe?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new Xy({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=GU(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),g2(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(i6.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Ce("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new rpe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRang
Line truncated
|
||||
`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ce("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ce("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ce("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const h=this.getLineMaxColumn(s);r>=h&&(r=h)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{const h=this.getLineMaxColumn(c);d>=h&&(d=h)}return i===s&&n===r&&a===c&&l===d&&e instanceof k&&!(e instanceof ce)?e:new k(s,r,c,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(zi(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new M(1,1);if(n>r)return new M(r,this.getLineMaxColumn(r));if(s<=1)return new M(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new M(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(zi(l))return new M(n,s-1)}return new M(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof M&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}isValidRange(e){return this._isValidRange(e,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,c=zi(a),d=zi(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof k&&!(e instanceof ce)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{const c=r>1?this._buffer.getLineCharCode(s,r-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,h=zi(c),u=zi(d);return!h&&!u?new k(s,r,a,l):s===a&&r===l?new k(s,r-1,a,l-1):h&&u?new k(s,r-1,a,l+1):h?new k(s,r-1,a,l):new k(s,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new k(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=npe){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(h=>k.isIRange(h))&&(l=t.map(h=>this.validateRange(h)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((h,u)=>h.startLineNumber-u.startLineNumber||h.startColumn-u.startColumn);const c=[];c.push(l.reduce((h,u)=>k.areIntersecting(h,u)?h.plusRange(u):(c.push(h),u)));let d;if(!i&&e.indexOf(`
|
||||
`)<0){const u=new Kf(e,i,n,s).parseSearchRequest();if(!u)return[];d=f=>this.findMatchesLineByLine(f,u,r,a)}else d=h=>vx.findMatches(this,new Kf(e,i,n,s),h,r,a);return c.map(d).reduce((h,u)=>h.concat(u),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(`
|
||||
`)<0){const c=new Kf(e,i,n,s).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let h=new k(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),u=this.findMatchesLineByLine(h,c,r,1);return vx.findNextMatch(this,new Kf(e,i,n,s),a,r),u.length>0||(h=new k(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),u=this.findMatchesLineByLine(h,c,r,1),u.length>0)?u[0]:null}return vx.findNextMatch(this,new Kf(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return vx.findPreviousMatch(this,new Kf(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
|
||||
`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v2?e:new v2(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i,n,s){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n,s)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n,s){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const r=t.map(l=>({range:this.validateRange(l.range),text:l.text}));let a=!0;if(e)for(let l=0,c=e.length;l<c;l++){const d=e[l];let h=!1;for(let u=0,f=r.length;u<f;u++){const g=r[u].range,m=g.startLineNumber>d.endLineNumber,_=d.startLineNumber>g.endLineNumber;if(!m&&!_){h=!0;break}}if(!h){a=!1;break}}if(a)for(let l=0,c=this._trimAutoWhitespaceLines.length;l<c;l++){const d=this._trimAutoWhitespaceLines[l],h=this.getLineMaxColumn(d);let u=!0;for(let f=0,g=r.length;f<g;f++){const m=r[f].range,_=r[f].text;if(!(d<m.startLineNumber||d>m.endLineNumber)&&!(d===m.startLineNumber&&m.startColumn===h&&m.isEmpty()&&_&&_.length>0&&_.charAt(0)===`
|
||||
`)&&!(d===m.startLineNumber&&m.startColumn===1&&m.isEmpty()&&_&&_.length>0&&_.charAt(_.length-1)===`
|
||||
`)){u=!1;break}}if(u){const f=new k(d,1,d,h);t.push(new v2(null,f,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n,s)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t,i){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t??!1,i??jn.applyEdits())}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t,i){const n=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),a=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,a.length!==0){for(let d=0,h=a.length;d<h;d++){const u=a[d];this._decorationsTree.acceptReplace(u.rangeOffset,u.rangeLength,u.text.length,u.forceMoveMarkers)}const l=[];this._increaseVersionId();let c=n;for(let d=0,h=a.length;d<h;d++){const u=a[d],[f]=Dh(u.text);this._onDidChangeDecorations.fire();const g=u.range.startLineNumber,m=u.range.endLineNumber,_=m-g,b=f,C=Math.min(_,b),w=b-_,v=r-c-w+g,S=v,L=v+b,x=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new M(S,1)),this.getOffsetAt(new M(L,this.getLineMaxColumn(L))),0),I=Ma.fromDecorations(x),D=new Ec(I);for(let R=C;R>=0;R--){const F=g+R,O=v+R;D.takeFromEndWhile(V=>V.lineNumber>O);const B=D.takeFromEndWhile(V=>V.lineNumber===O);l.push(new IU(F,this.getLineContent(O),B))}if(C<_){const R=g+C;l.push(new bfe(R+1,m))}if(C<b){const R=new Ec(I),F=g+C,O=b-C,B=r-c-O+F+1,V=[],z=[];for(let ee=0;ee<O;ee++){const se=B+ee;z[ee]=this.getLineContent(se),R.takeWhile(oe=>oe.lineNumber<se),V[ee]=R.takeWhile(oe=>oe.lineNumber===se)}l.push(new Cfe(F+1,g+b,z,V))}c+=w}this._emitContentChangedEvent(new I_(l,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:a,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1,detailedReasons:[i],detailedReasonsChangeLengths:[a.length]})}return s.reverseEdits===null?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e,t,i){if(e&&e.size>0){const s=Array.from(e).map(r=>new IU(r,this.getLineContent(r),this._getInjectedTextInLine(r)));this._onDidChangeInjectedText.fire(new DU(s))}if(t&&t.size>0){const s=Array.from(t).map(r=>new mfe(r.ownerId,r.decorationId,r.lineNumber,r.lineHeight));this._onDidChangeLineHeight.fire(new EU(s))}if(i&&i.size>0){const s=Array.from(i).map(r=>new _fe(r.ownerId,r.lineNumber));this._onDidChangeFont.fire(new NU(s))}}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(e,s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(e,s,N$(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){Ee(s)}return i.addDecoration=Pv,i.changeDecoration=Pv,i.changeDecorationOptions=Pv,i.removeDecoration=Pv,i.deltaDecorations=Pv,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Ee(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}
Line truncated
|
||||
`)>=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-r[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n,s){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(i)),r&&(i[0]._isTracked=!0);const a=[],l=[],c=this._model.pushEditOperations(this.getSelections(),i,d=>{if(r)for(let u=0,f=r.length;u<f;u++){const[g,m]=r[u],_=d[u],b=_.range.startLineNumber,C=_.range.startColumn-1+g,w=_.range.startColumn-1+m;a.push(new k(b,w+1,b,w+2)),l.push(new k(b,C+1,b,w+2))}const h=n(d);return h&&(this._isHandling=!0),h},void 0,s);c&&(this._isHandling=!1,this.setSelections(e,t,c,0)),a.length>0&&this._pushAutoClosedAction(a,l)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Fv.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){Ee(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return W$.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Wv(this._model,this.getSelections())}endComposition(e,t){const i=jn.cursor({kind:"compositionEnd",detailedSource:t}),n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(gh.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()),i)},e,t)}type(e,t,i){const n=jn.cursor({kind:"type",detailedSource:i});this._executeEdit(()=>{if(i==="keyboard"){const s=t.length;let r=0;for(;r<s;){const a=vR(t,r),l=t.substr(r,a);this._executeEditOperation(gh.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),l),n),r+=a}}else this._executeEditOperation(gh.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t),n)},e,i)}compositionType(e,t,i,n,s,r){const a=jn.cursor({kind:"compositionType",detailedSource:r});if(t.length===0&&i===0&&n===0){if(s!==0){const l=this.getSelections().map(c=>{const d=c.getPosition();return new ce(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,l,0)}return}this._executeEdit(()=>{this._executeEditOperation(gh.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s),a)},e,r)}paste(e,t,i,n,s){const r=jn.cursor({kind:"paste",detailedSource:s});this._executeEdit(()=>{this._executeEditOperation(gh.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]),r)},e,s,4)}cut(e,t){const i=jn.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(wf.cut(this.context.cursorConfig,this._model,this.getSelections()),i)},e,t)}executeCommand(e,t,i){const n=jn.cursor({kind:"executeCommand",detailedSource:i});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new _s(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}executeCommands(e,t,i){const n=jn.cursor({kind:"executeCommands",detailedSource:i});this._executeEdit(()=>{this._executeEditOperation(new _s(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}}class Fv{static from(e,t){return new Fv(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class W${static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(t.push(n),n.startLineNumber!==n.endLineNumber))rLine truncated
|
||||
`:this.model.getEOL();e=e.slice(0),e.sort(k.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d<l.length;d++)d>0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(s&&t){const l=[];let c=0;for(const d of e){const h=d.startLineNumber;d.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(d,i?2:0)),c=h}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Fo||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new k(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(59),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===bs.fontFamily;let c;return l?c=bs.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${bs.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${c};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,f=c===s?r-1:h.length;h===""?l+="<br>":l+=qpe(h,d.inflate(),t,u,f,a,gn)}return l}_getColorMap(){const e=di.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=$.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Mpe);return}this._withViewEventsCollector(e)}executeEdits(e,t,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,t,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealAll(n,e,i,0,t,0))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Ov(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Ov(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new Ov(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Ipe),this._eventDispatcher.emitOutgoingEvent(new Tpe))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class dA{static create(e){const
Line truncated
|
||||
`?i=1:e&&e.lineEnding&&e.lineEnding===`\r
|
||||
`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),this.hasModel()?n&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?ng._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?ng._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const i=this._modelData.model.getLineMaxColumn(e);return ng._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}getLineHeightForPosition(e){if(!this._modelData)return-1;const t=this._modelData.viewModel,i=t.coordinatesConverter,n=M.lift(e);if(i.modelPositionIsVisible(n)){const s=i.convertModelPositionToViewPosition(n);return t.viewLayout.getLineHeightForLineNumber(s.lineNumber)}return 0}setHiddenAreas(e,t,i){this._modelData?.viewModel.setHiddenAreas(e.map(n=>k.lift(n)),t,i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return ti.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!M.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!k.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!M.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new k(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=ce.isISelection(e),n=k.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new ce(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumbe
Line truncated
|
||||
`){return this._parts.join(e)}}function Nme(o){const e=Tme(o);if(e&&e.length>0)return new Uint32Array(e)}let $o=0;const Ah=new Uint32Array(10);function Tme(o){if($o=0,Tl(o,uA,4352),$o>0||(Tl(o,fA,4449),$o>0)||(Tl(o,gA,4520),$o>0)||(Tl(o,rg,12593),$o))return Ah.subarray(0,$o);if(o>=44032&&o<=55203){const e=o-44032,t=e%588,i=Math.floor(e/588),n=Math.floor(t/28),s=t%28-1;if(i<uA.length?Tl(i,uA,0):4352+i-12593<rg.length&&Tl(4352+i,rg,12593),n<fA.length?Tl(n,fA,0):4449+n-12593<rg.length&&Tl(4449+n-12593,rg,12593),s>=0&&(s<gA.length?Tl(s,gA,0):4520+s-12593<rg.length&&Tl(4520+s-12593,rg,12593)),$o>0)return Ah.subarray(0,$o)}}function Tl(o,e,t){o>=t&&o<t+e.length&&Rme(e[o-t])}function Rme(o){o!==0&&(Ah[$o++]=o&255,o>>8&&(Ah[$o++]=o>>8&255),o>>16&&(Ah[$o++]=o>>16&255))}const uA=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),fA=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),gA=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),rg=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function pA(...o){return function(e,t){for(let i=0,n=o.length;i<n;i++){const s=o[i](e,t);if(s)return s}return null}}J$.bind(void 0,!1);const Hv=J$.bind(void 0,!0);function J$(o,e,t){if(!t||t.length<e.length)return null;let i;return o?i=_R(t,e):i=t.indexOf(e)===0,i?e.length>0?[{start:0,end:e.length}]:[]:null}function ej(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function tj(o,e){return mA(o.toLowerCase(),e.toLowerCase(),0,0)}function mA(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=mA(o,e,t+1,i+1))?vA({start:i,end:i+1},n):null}return mA(o,e,t,i+1)}function _A(o){return 97<=o&&o<=122}function Fx(o){return 65<=o&&o<=90}function bA(o){return 48<=o&&o<=57}function ij(o){return o===32||o===9||o===10||o===13}const nj=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>nj.add(o.charCodeAt(0)));function Wx(o){return ij(o)||nj.has(o)}function sj(o,e){return o===e||Wx(o)&&Wx(e)}const CA=new Map;function oj(o){if(CA.has(o))return CA.get(o);let e;const t=Nme(o);return t&&(e=t),CA.set(o,e),e}function rj(o){return _A(o)||Fx(o)||bA(o)}function vA(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function aj(o,e){for(let t=e;t<o.length;t++){const i=o.charCodeAt(t);if(Fx(i)||bA(i)||t>0&&!rj(o.charCodeAt(t-1)))return t}return o.length}function wA(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=wA(o,e,t+1,i+1);!n&&(s=aj(e,s))<e.length;)n=wA(o,e,t+1,s),s++;return n===null?null:vA({start:i,end:i+1},n)}}function Mme(o){let e=0,t=0,i=0,n=0,s=0;for(let d=0;d<o.length;d++)s=o.charCodeAt(d),Fx(s)&&e++,_A(s)&&t++,rj(s)&&i++,bA(s)&&n++;const r=e/o.length,a=t/o.length,l=i/o.length,c=n/o.length;return{upperPercent:r,lowerPercent:a,alphaPercent:l,numericPercent:c}}function Pme(o){const{upperPercent:e,lowerPercent:t}=o;return t===0&&e>.6}function Ame(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function Ome(o){let e=0,t=0,i=0,n=0;for(let s=0;s<o.length;s++)i=o.charCodeAt(s),Fx(i)&&e++,_A(i)&&t++,ij(i)&&n++;return(e===0||t===0)&&n===0?o.length<=30:e<=5}function lj(o,e){if(!e||(e=e.trim(),e.length===0)||!Ome(o))return null;e.length>60&&(e=e.substring(0,60));const t=Mme(e);if(!Ame(t)){if(!Pme(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n<e.length&&(i=wA(o,e,0,n))===null;)n=aj(e,n+1);return i}function Fme(o,e,t=!1){if(!e||e.length===0)return null;let i=null,n=0;for(o=o.toLowerCase(),e=e.toLowerCase();n<e.length&&(i=SA(o,e,0,n,t),i===null);)n=cj(e,n+1);return i}function SA(o,e,t,i,n){let s=0;if(t===o.length)return[];if(i===e.length)return null;if(!sj(o.charCodeAt(t),e.charCodeAt(i))){const l=oj(o.charCodeAt(t));if(!l)return null;for(let c=0;c<l.length;c++)if(!sj(l[c],e.charCodeAt(i+c)))return null;s+=l.length-1}let r=null,a=i+s+1;if(r=SA(o,e,t+1,a,n),!n)for(;!r&&(a=cj(e,a))<e.length;)r=SA(o,e,t+1,a,n),a++;if(!r)return null;if(o.charCodeAt(t)!==e.charCodeAt(i)){const l=oj(o.charCodeAt(t));if(!l)return r;for(let c=0;c<l.length;c++)if(l[c]!==e.charCodeAt(i+c))return r}return vA({start:i,end:i+s+1},r)}function cj(o,e){for(let t=e;t<o.length;t++)if(Wx(o.charCodeAt(t))||t>0&&Wx(o.charCodeAt(t-1)))return t;return o.length}const Wme=pA(Hv,lj,ej),Bme=pA(Hv,lj,tj),dj=new dl(1e4);function hj(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=dj.get(o);i||(i=new RegExp(kie(o),"i"),dj.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?Bme(o,e):Wme(o,Line truncated
|
||||
`:`
|
||||
|
||||
`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`
|
||||
${i_e(t,e)}
|
||||
`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(oo(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function B_(o){return Rl(o)?!o.value:Array.isArray(o)?o.every(B_):!0}function Rl(o){return o instanceof qn?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function e_e(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&ch(be.from(o.baseUri),be.from(e.baseUri)))}function t_e(o){return o.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function i_e(o,e){const t=o.match(/^`+/gm)?.reduce((n,s)=>n.length>s.length?n:s).length??0,i=t>=3?t+1:3;return[`${"`".repeat(i)}${e}`,o,`${"`".repeat(i)}`].join(`
|
||||
`)}function zx(o){return o.replace(/"/g,""")}function DA(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function n_e(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function mj(o,...e){return be.from({scheme:we.command,path:o,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}class EA{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const NA=new EA("id#");function TA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let dg=TA();function _j(o){dg=o}const bj=/[&<>"']/,s_e=new RegExp(bj.source,"g"),Cj=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,o_e=new RegExp(Cj.source,"g"),r_e={"&":"&","<":"<",">":">",'"':""","'":"'"},vj=o=>r_e[o];function Mr(o,e){if(e){if(bj.test(o))return o.replace(s_e,vj)}else if(Cj.test(o))return o.replace(o_e,vj);return o}const a_e=/(^|[^\[])\^/g;function ki(o,e){let t=typeof o=="string"?o:o.source;e=e||"";const i={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(a_e,"$1"),t=t.replace(n,r),i},getRegex:()=>new RegExp(t,e)};return i}function wj(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const $v={exec:()=>null};function Sj(o,e){const t=o.replace(/\|/g,(s,r,a)=>{let l=!1,c=r;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function jv(o,e,t){const i=o.length;if(i===0)return"";let n=0;for(;n<i&&o.charAt(i-n-1)===e;)n++;return o.slice(0,i-n)}function l_e(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<o.length;i++)if(o[i]==="\\")i++;else if(o[i]===e[0])t++;else if(o[i]===e[1]&&(t--,t<0))return i;return-1}function yj(o,e,t,i){const n=e.href,s=e.title?Mr(e.title):null,r=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){i.state.inLink=!0;const a={type:"link",raw:t,href:n,title:s,text:r,tokens:i.inlineTokens(r)};return i.state.inLink=!1,a}return{type:"image",raw:t,href:n,title:s,text:Mr(r)}}function c_e(o,e){const t=o.match(/^(\s+)(?:```)/);if(t===null)return e;const i=t[1];return e.split(`
|
||||
`).map(n=>{const s=n.match(/^\s+/);if(s===null)return n;const[r]=s;return r.length>=i.length?n.slice(i.length):n}).join(`
|
||||
`)}class Ux{options;rules;lexer;constructor(e){this.options=e||dg}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:jv(i,`
|
||||
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const i=t[0],n=c_e(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){const n=jv(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:jv(t[0],`
|
||||
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let i=jv(t[0],`
|
||||
`).split(`
|
||||
`),n="",s="";const r=[];for(;i.length>0;){let a=!1;const l=[];let c;for(c=0;c<i.length;c++)if(/^ {0,3}>/.test(i[c]))l.push(i[c]),a=!0;else if(!a)l.push(i[c]);else break;i=i.slice(c);const d=l.join(`
|
||||
`),h=d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
||||
$1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}
|
||||
${d}`:d,s=s?`${s}
|
||||
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,r,!0),this.lexer.state.top=u,i.length===0)break;const f=r[r.length-1];if(f?.type==="code")break;if(f?.type==="blockquote"){const g=f,m=g.raw+`
|
||||
`+i.join(`
|
||||
`),_=this.blockquote(m);r[r.length-1]=_,n=n.substring(0,n.length-g.raw.length)+_.raw,s=s.substring(0,s.length-g.text.length)+_.text;break}else if(f?.type==="list"){const g=f,m=g.raw+`
|
||||
`+i.join(`
|
||||
`),_=this.list(m);r[r.length-1]=_,n=n.substring(0,n.length-f.raw.length)+_.raw,s=s.substring(0,s.length-g.raw.length)+_.raw,i=m.substring(r[r.length-1].raw.length).split(`
|
||||
`);continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const r=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;e;){let l=!1,c="",d="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=t[2].split(`
|
||||
`,1)[0].replace(/^\t+/,b=>" ".repeat(3*b.length)),u=e.split(`
|
||||
`,1)[0],f=!h.trim(),g=0;if(this.options.pedantic?(g=2,d=h.trimStart()):f?g=t[1].length+1:(g=t[2].search(/[^ ]/),g=g>4?1:g,d=h.slice(g),g+=t[1].length),f&&/^ *$/.test(u)&&(c+=u+`
|
||||
`,e=e.substring(u.length+1),l=!0),!l){const b=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),C=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),v=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){const S=e.split(`
|
||||
`,1)[0];if(u=S,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(u)||v.test(u)||b.test(u)||C.test(e))break;if(u.search(/[^ ]/)>=g||!u.trim())d+=`
|
||||
`+u.slice(g);else{if(f||h.search(/[^ ]/)>=4||w.test(h)||v.test(h)||C.test(h))break;d+=`
|
||||
`+u}!f&&!u.trim()&&(f=!0),c+=S+`
|
||||
`,e=e.substring(S.length+1),h=u.slice(g)}}s.loose||(a?s.loose=!0:/\n *\n *$/.test(c)&&(a=!0));let m=null,_;this.options.gfm&&(m=/^\[[ xX]\] /.exec(d),m&&(_=m[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:c,task:!!m,checked:_,loose:!1,text:d,tokens:[]}),s.raw+=c}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let l=0;l<s.items.length;l++)if(this.lexer.state.top=!1,s.items[l].tokens=this.lexer.blockTokens(s.items[l].text,[]),!s.loose){const c=s.items[l].tokens.filter(h=>h.type==="space"),d=c.length>0&&c.some(h=>/\n.*\n/.test(h.raw));s.loose=d}if(s.loose)for(let l=0;l<s.items.length;l++)s.items[l].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const i=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const i=Sj(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
|
||||
`):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const a of n)/^ *-+: *$/.test(a)?r.align.push("right"):/^ *:-+: *$/.test(a)?r.align.push("center"):/^ *:-+ *$/.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<i.length;a++)r.header.push({text:i[a],tokens:this.lexer.inline(i[a]),header:!0,align:r.align[a]});for(const a of s)r.rows.push(Sj(a,r.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:r.align[c]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const i=t[1].charAt(t[1].length-1)===`
|
||||
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Mr(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const r=jv(i.slice(0,-1),"\\");if((i.length-r.length)%2===0)return}else{const r=l_e(t[2],"()");if(r>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);r&&(n=r[1],s=r[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),yj(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const n=(i[2]||i[1]).replace(/\s+/g," "),s=t[n.toLowerCase()];if(!s){const r=i[0].charAt(0);return{type:"text",raw:r,text:r}}return yj(i,s,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const r=[...n[0]].length-1;let a,l,c=r,d=0;const h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+r);(n=h.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){c+=l;continue}else if((n[5]||n[6])&&r%3&&!((r+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);const u=[...n[0]][0].length,f=e.slice(0,r+n.index+u+l);if(Math.min(r,l)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const g=f.slice(2,-2);return{type:"strong",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," ");const n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=Mr(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let i,n;return t[2]==="@"?(i=Mr(t[1]),n="mailto:"+i):(i=Mr(t[1]),n=i),{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=Mr(t[0]),n="mailto:"+i;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);i=Mr(t[0]),t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let i;return this.lexer.state.inRawBlock?i=t[0]:i=Mr(t[0]),{type:"text",raw:t[0],text:i}}}}const d_e=/^(?: *(?:\n|$))+/,h_e=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,u_e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qv=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f_e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Lj=/(?:[*+-]|\d{1,9}[.)])/,xj=ki(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Lj).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),RA=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g_e=/^[^\n]+/,MA=/(?!\s*\])(?:\\.|[^\[\]\\])+/,p_e=ki(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",MA).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),m_e=ki(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Lj).getRegex(),$x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dLine truncated
|
||||
]`).replace("lheading",xj).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,v_e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ej=/^( {2,}|\\)\n(?!\s*$)/,w_e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Kv="\\p{P}\\p{S}",S_e=ki(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Kv).getRegex(),y_e=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,L_e=ki(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Kv).getRegex(),x_e=ki("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Kv).getRegex(),k_e=ki("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Kv).getRegex(),I_e=ki(/\\([punct])/,"gu").replace(/punct/g,Kv).getRegex(),D_e=ki(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),E_e=ki(PA).replace("(?:-->|$)","-->").getRegex(),N_e=ki("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",E_e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jx=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,T_e=ki(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",jx).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nj=ki(/^!?\[(label)\]\[(ref)\]/).replace("label",jx).replace("ref",MA).getRegex(),Tj=ki(/^!?\[(ref)\](?:\[\])?/).replace("ref",MA).getRegex(),R_e=ki("reflink|nolink(?!\\()","g").replace("reflink",Nj).replace("nolink",Tj).getRegex(),OA={_backpedal:$v,anyPunctuation:I_e,autolink:D_e,blockSkip:y_e,br:Ej,code:v_e,del:$v,emStrongLDelim:L_e,emStrongRDelimAst:x_e,emStrongRDelimUnd:k_e,escape:Dj,link:T_e,nolink:Tj,punctuation:S_e,reflink:Nj,reflinkSearch:R_e,tag:N_e,text:w_e,url:$v},M_e={...OA,link:ki(/^!?\[(label)\]\((.*?)\)/).replace("label",jx).getRegex(),reflink:ki(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jx).getRegex()},FA={...OA,escape:ki(Dj).replace("])","~|])").getRegex(),url:ki(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},P_e={...FA,br:ki(Ej).replace("{2,}","*").getRegex(),text:ki(FA.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qx={normal:AA,gfm:b_e,pedantic:C_e},Gv={normal:OA,gfm:FA,breaks:P_e,pedantic:M_e};class Ml{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||dg,this.options.tokenizer=this.options.tokenizer||new Ux,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qx.normal,inline:Gv.normal};this.options.pedantic?(t.block=qx.pedantic,t.inline=Gv.pedantic):this.options.gfm&&(t.block=qx.gfm,this.options.breaks?t.inline=Gv.breaks:t.inline=Gv.gfm),this.tokenizer.rules=t}static get rules(){return{block:qx,inline:Gv}}static lex(e,t){return new Ml(t).lex(e)}static lexInline(e,t){return new Ml(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
|
||||
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(a,l,c)=>l+" ".repeat(c.length));let n,s,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
|
||||
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=e.slice(1);let c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(r=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,r=e,a,l,c;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(i=d.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,r,c)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const h=e.slice(1);let u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(d=Math.min(d,u))}),d<1/0&&d>=0&&(s=e.substring(0,d+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(c=i.raw.slice(-1)),l=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}}class Zv{options;parser;constructor(e){this.options=e||dg}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+`
|
||||
`;return n?'<pre><code class="language-'+Mr(n)+'">'+(i?s:Mr(s,!0))+`</code></pre>
|
||||
`:"<pre><code>"+(i?s:Mr(s,!0))+`</code></pre>
|
||||
`}blockquote({tokens:e}){return`<blockquote>
|
||||
${this.parser.parse(e)}</blockquote>
|
||||
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
||||
`}hr(e){return`<hr>
|
||||
`}list(e){const t=e.ordered,i=e.start;let n="";for(let a=0;a<e.items.length;a++){const l=e.items[a];n+=this.listitem(l)}const s=t?"ol":"ul",r=t&&i!==1?' start="'+i+'"':"";return"<"+s+r+`>
|
||||
`+n+"</"+s+`>
|
||||
`}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
||||
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||||
`}table(e){let t="",i="";for(let s=0;s<e.header.length;s++)i+=this.tablecell(e.header[s]);t+=this.tablerow({text:i});let n="";for(let s=0;s<e.rows.length;s++){const r=e.rows[s];i="";for(let a=0;a<r.length;a++)i+=this.tablecell(r[a]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||||
<thead>
|
||||
`+t+`</thead>
|
||||
`+n+`</table>
|
||||
`}tablerow({text:e}){return`<tr>
|
||||
${e}</tr>
|
||||
`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>
|
||||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),s=wj(e);if(s===null)return n;e=s;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image({href:e,title:t,text:i}){const n=wj(e);if(n===null)return i;e=n;let s=`<img src="${e}" alt="${i}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class WA{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Pl{options;renderer;textRenderer;constructor(e){this.options=e||dg,this.options.renderer=this.options.renderer||new Zv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new WA}static parse(e,t){return new Pl(t).parse(e)}static parseInline(e,t){return new Pl(t).parseInline(e)}parse(e,t=!0){let i="";for(let n=0;n<e.length;n++){const s=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=l||"";continue}}const r=s;switch(r.type){case"space":{i+=this.renderer.space(r);continue}case"hr":{i+=this.renderer.hr(r);continue}case"heading":{i+=this.renderer.heading(r);continue}case"code":{i+=this.renderer.code(r);continue}case"table":{i+=this.renderer.table(r);continue}case"blockquote":{i+=this.renderer.blockquote(r);continue}case"list":{i+=this.renderer.list(r);continue}case"html":{i+=this.renderer.html(r);continue}case"paragraph":{i+=this.renderer.paragraph(r);continue}case"text":{let a=r,l=this.renderer.text(a);for(;n+1<e.length&&e[n+1].type==="text";)a=e[++n],l+=`
|
||||
`+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):i+=l;continue}default:{const a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const s=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=a||"";continue}}const r=s;switch(r.type){case"escape":{i+=t.text(r);break}case"html":{i+=t.html(r);break}case"link":{i+=t.link(r);break}case"image":{i+=t.image(r);break}case"strong":{i+=t.strong(r);break}case"em":{i+=t.em(r);break}case"codespan":{i+=t.codespan(r);break}case"br":{i+=t.br(r);break}case"del":{i+=t.del(r);break}case"text":{i+=t.text(r);break}default:{const a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}}class Kx{options;constructor(e){this.options=e||dg}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class Rj{defaults=TA();options=this.setOptions;parse=this.parseMarkdown(Ml.lex,Pl.parse);parseInline=this.parseMarkdown(Ml.lexInline,Pl.parseInline);Parser=Pl;Renderer=Zv;TextRenderer=WA;Lexer=Ml;Tokenizer=Ux;Hooks=Kx;constructor(...e){this.use(...e)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const s=n;for(const r of s.header)i=i.concat(this.walkTokens(r.tokens,t));for(const r of s.rows)for(const a of r)i=i.concat(this.walkTokens(a.tokens,t));break}case"list":{const s=n;i=i.concat(this.walkTokens(s.items,t));break}default:{const s=n;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(r=>{const a=s[r].flat(1/0);i=i.concat(this.walkTokens(a,t))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const r=t.renderers[s.name];r?t.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=r.apply(this,a)),l}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[s.level];r?r.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),n.extensions=t),i.renderer){const s=this.defaults.renderer||new Zv(this.defaults);for(const r in i.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const a=r,l=i.renderer[a],c=s[a];s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h||""}}n.renderer=s}if(i.tokenizer){const s=this.defaults.tokenizer||new Ux(this.defaults);for(const r in i.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const a=r,l=i.tokenizer[a],c=s[a];s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h}}n.tokenizer=s}if(i.hooks){const s=this.defaults.hooks||new Kx;for(const r in i.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;const a=r,l=i.hooks[a],c=s[a];Kx.passThroughHooks.has(r)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(l.call(s,d)).then(u=>c.call(s,u));const h=l.call(s,d);return c.call(s,h)}:s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h}}n.hooks=s}if(i.walkTokens){const s=this.defaults.walkTokens,r=i.walkTokens;n.walkTokens=function(a){let l=[];return l.push(r.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ml.lex(e,t??this.defaults)}parser(e,t){return Pl.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,s)=>{const r={...s},a={...this.defaults,...r},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of
Line truncated
|
||||
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Mr(i.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(i);throw i}}}const hg=new Rj;function wi(o,e){return hg.parse(o,e)}wi.options=wi.setOptions=function(o){return hg.setOptions(o),wi.defaults=hg.defaults,_j(wi.defaults),wi},wi.getDefaults=TA,wi.defaults=dg,wi.use=function(...o){return hg.use(...o),wi.defaults=hg.defaults,_j(wi.defaults),wi},wi.walkTokens=function(o,e){return hg.walkTokens(o,e)},wi.parseInline=hg.parseInline,wi.Parser=Pl,wi.parser=Pl.parse,wi.Renderer=Zv,wi.TextRenderer=WA,wi.Lexer=Ml,wi.lexer=Ml.lex,wi.Tokenizer=Ux,wi.Hooks=Kx,wi.parse=wi,wi.options,wi.setOptions,wi.use,wi.walkTokens,wi.parseInline;const A_e=wi;Pl.parse;const Yv=Ml.lex;function O_e(o){return JSON.stringify(o,F_e)}function BA(o){let e=JSON.parse(o);return e=HA(e),e}function F_e(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function HA(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return be.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof sh||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t<o.length;++t)o[t]=HA(o[t],e+1);else for(const t in o)Object.hasOwnProperty.call(o,t)&&(o[t]=HA(o[t],e+1))}return o}/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:Mj,setPrototypeOf:Pj,isFrozen:W_e,getPrototypeOf:B_e,getOwnPropertyDescriptor:H_e}=Object;let{freeze:vo,seal:ea,create:Aj}=Object,{apply:VA,construct:zA}=typeof Reflect<"u"&&Reflect;vo||(vo=function(e){return e}),ea||(ea=function(e){return e}),VA||(VA=function(e,t,i){return e.apply(t,i)}),zA||(zA=function(e,t){return new e(...t)});const Gx=Pr(Array.prototype.forEach),Oj=Pr(Array.prototype.pop),Xv=Pr(Array.prototype.push),Zx=Pr(String.prototype.toLowerCase),UA=Pr(String.prototype.toString),Fj=Pr(String.prototype.match),Qv=Pr(String.prototype.replace),V_e=Pr(String.prototype.indexOf),z_e=Pr(String.prototype.trim),Oa=Pr(Object.prototype.hasOwnProperty),wo=Pr(RegExp.prototype.test),Jv=U_e(TypeError);function Pr(o){return function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return VA(o,e,i)}}function U_e(o){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return zA(o,t)}}function Nt(o,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zx;Pj&&Pj(o,null);let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){const s=t(n);s!==n&&(W_e(e)||(e[i]=s),n=s)}o[n]=!0}return o}function $_e(o){for(let e=0;e<o.length;e++)Oa(o,e)||(o[e]=null);return o}function ug(o){const e=Aj(null);for(const[t,i]of Mj(o))Oa(o,t)&&(Array.isArray(i)?e[t]=$_e(i):i&&typeof i=="object"&&i.constructor===Object?e[t]=ug(i):e[t]=i);return e}function ew(o,e){for(;o!==null;){const i=H_e(o,e);if(i){if(i.get)return Pr(i.get);if(typeof i.value=="function")return Pr(i.value)}o=B_e(o)}function t(){return null}return t}const Wj=vo(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$A=vo(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jA=vo(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),j_e=vo(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh",
Line truncated
|
||||
`+lr),zC&&Gx([O,B,V],_c=>{lr=Qv(lr,_c," ")}),v&&FT?v.createHTML(lr):lr},e.setConfig=function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};LB(Ge),bB=!0},e.clearConfig=function(){KC=null,bB=!1},e.isValidAttribute=function(Ge,G,ye){KC||LB({});const $e=fs(Ge),Wi=fs(G);return yte($e,Wi,ye)},e.addHook=function(Ge,G){typeof G=="function"&&(F[Ge]=F[Ge]||[],Xv(F[Ge],G))},e.removeHook=function(Ge){if(F[Ge])return Oj(F[Ge])},e.removeHooks=function(Ge){F[Ge]&&(F[Ge]=[])},e.removeAllHooks=function(){F={}},e}var H_=jj();const qj=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),Kj=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),GA="vscode-relative-path";function Gj(o,e){if(e.override==="*")return!0;try{const t=new URL(o,GA+"://");return!!(e.override.includes(t.protocol.replace(/:$/,""))||e.allowRelativePaths&&t.protocol===GA+":"&&!o.trim().toLowerCase().startsWith(GA))}catch{return!1}}function nbe(o,e){H_.addHook("afterSanitizeAttributes",t=>{for(const i of["href","src"])if(t.hasAttribute(i)){const n=t.getAttribute(i);i==="href"?!n.startsWith("#")&&!Gj(n,o)&&t.removeAttribute(i):Gj(n,e)||t.removeAttribute(i)}})}const sbe=Object.freeze({ALLOWED_TAGS:[...qj],ALLOWED_ATTR:[...Kj],ALLOW_UNKNOWN_PROTOCOLS:!0});function obe(o,e){return Zj(o,e,"trusted")}function Zj(o,e,t){try{const i={...sbe};e?.allowedTags&&(e.allowedTags.override&&(i.ALLOWED_TAGS=[...e.allowedTags.override]),e.allowedTags.augment&&(i.ALLOWED_TAGS=[...i.ALLOWED_TAGS??[],...e.allowedTags.augment]));let n=[...Kj];e?.allowedAttributes&&(e.allowedAttributes.override&&(n=[...e.allowedAttributes.override]),e.allowedAttributes.augment&&(n=[...n,...e.allowedAttributes.augment])),n=n.map(a=>typeof a=="string"?a.toLowerCase():{attributeName:a.attributeName.toLowerCase(),shouldKeep:a.shouldKeep});const s=new Set(n.map(a=>typeof a=="string"?a:a.attributeName)),r=new Map;for(const a of n)typeof a=="string"?r.delete(a):r.set(a.attributeName,a);return i.ALLOWED_ATTR=Array.from(s),nbe({override:e?.allowedLinkProtocols?.override??[we.http,we.https],allowRelativePaths:e?.allowRelativeLinkPaths??!1},{override:e?.allowedMediaProtocols?.override??[we.http,we.https],allowRelativePaths:e?.allowRelativeMediaPaths??!1}),e?.replaceWithPlaintext&&H_.addHook("uponSanitizeElement",abe),r.size&&H_.addHook("uponSanitizeAttribute",(a,l)=>{const c=r.get(l.attrName);if(c){const d=c.shouldKeep(a,l);typeof d=="string"?(l.keepAttr=!0,l.attrValue=d):l.keepAttr=d}else l.keepAttr=s.has(l.attrName)}),t==="dom"?H_.sanitize(o,{...i,RETURN_DOM_FRAGMENT:!0}):H_.sanitize(o,{...i,RETURN_TRUSTED_TYPE:!0})}finally{H_.removeAllHooks()}}const rbe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function abe(o,e,t){if(!e.allowedTags[e.tagName]&&e.tagName!=="body"){const i=Yj(o);o.nodeType===Node.COMMENT_NODE?o.parentElement?.insertBefore(i,o):o.parentElement?.replaceChild(i,o)}}function Yj(o){let e,t;if(o.nodeType===Node.COMMENT_NODE)e=`<!--${o.textContent}-->`;else{const r=o.tagName.toLowerCase(),a=rbe.includes(r),l=o.attributes.length?" "+Array.from(o.attributes).map(c=>`${c.name}="${c.value}"`).join(" "):"";e=`<${r}${l}>`,a||(t=`</${r}>`)}const i=document.createDocumentFragment(),n=o.ownerDocument.createTextNode(e);for(i.appendChild(n);o.firstChild;)i.appendChild(o.firstChild);const s=t?o.ownerDocument.createTextNode(t):void 0;return s&&i.appendChild(s),i}function Xj(o,e,t){const i=Zj(e,t,"dom");Yi(o,i)}const lbe=new RegExp(`(\\\\)?\\$\\((${ve.iconNameExpression}(?:${ve.iconModifierExpression})?)\\)`,"g");function Fh(o){const e=new Array;let t,i=0,n=0;for(;(t=lbe.exec(o))!==null;){n=t.index||0,i<n&&e.push(o.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,r]=t;e.push(s?`$(${r})`:Al({id:r}))}return i<o.length&&e.push(o.substring(i)),e}function Al(o){const e=Q("span");return e.classList.add(...ve.asClassNameArray(o)),e}const ZA=Object.freeze({image:({href:o,title:e,text:t})=>{let i=[],n=[];return o&&({href:o,dimensions:i}=n_e(o),n.push(`src="${zx(o)}"`)),t&&n.push(`alt="${zx(t)}"`),e&&n.push(`title="${zx(e)}"`),i.length&&(n=n.concat(i)),"<img "+n.join(" ")+">"},paragraph({tokens:o}){return`<p>${this.parser.parseInline(o)}</p>`},link({href:o,title:e,tokens:t}){let i=this.parser.parseInline(t);return typeof o!="string"?"":(o===i&&(i=DA(i)),e=typeof e=="string"?zx(DA(e)):"",o=DA(o),o=o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="$Line truncated
|
||||
`,o.html=e=>"",o.heading=function({tokens:e}){return this.parser.parseInline(e)+`
|
||||
`},o.hr=()=>"",o.list=function({items:e}){return e.map(t=>this.listitem(t)).join(`
|
||||
`)+`
|
||||
`},o.listitem=({text:e})=>e+`
|
||||
`,o.paragraph=function({tokens:e}){return this.parser.parseInline(e)+`
|
||||
`},o.table=function({header:e,rows:t}){return e.map(i=>this.tablecell(i)).join(" ")+`
|
||||
`+t.map(i=>i.map(n=>this.tablecell(n)).join(" ")).join(`
|
||||
`)+`
|
||||
`},o.tablerow=({text:e})=>e,o.tablecell=function({tokens:e}){return this.parser.parseInline(e)},o.strong=({text:e})=>e,o.em=({text:e})=>e,o.codespan=({text:e})=>qr(e),o.br=e=>`
|
||||
`,o.del=({text:e})=>e,o.image=e=>"",o.text=({text:e})=>e,o.link=({text:e})=>e,o}const bbe=new Ln(iq);new Ln(()=>{const o=iq();return o.code=({text:e})=>`
|
||||
\`\`\`
|
||||
${qr(e)}
|
||||
\`\`\`
|
||||
`,o});function nw(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function nq(o){if(o.tokens)for(let e=o.tokens.length-1;e>=0;e--){const t=o.tokens[e];if(t.type==="text"){const i=t.raw.split(`
|
||||
`),n=i[i.length-1];if(n.includes("`"))return kbe(o);if(n.includes("**"))return Rbe(o);if(n.match(/\*\w/))return Ibe(o);if(n.match(/(^|\s)__\w/))return Mbe(o);if(n.match(/(^|\s)_\w/))return Dbe(o);if(Cbe(n)||vbe(n)&&o.tokens.slice(0,e).some(s=>s.type==="text"&&s.raw.match(/\[[^\]]*$/))){const s=o.tokens.slice(e+1);return s[0]?.type==="link"&&s[1]?.type==="text"&&s[1].raw.match(/^ *"[^"]*$/)||n.match(/^[^"]* +"[^"]*$/)?Nbe(o):Ebe(o)}else if(n.match(/(^|\s)\[\w*[^\]]*$/))return Tbe(o)}}}function Cbe(o){return!!o.match(/(^|\s)\[.*\]\(\w*/)}function vbe(o){return!!o.match(/^[^\[]*\]\([^\)]*$/)}function wbe(o){const e=o.items[o.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,i=c=>{const h=c.items.at(-1)?.tokens.at(-1);return h?.type==="heading"||h?.type==="list"&&i(h)};let n;if(t?.type==="text"&&!("inRawBlock"in e))n=nq(t);else if(i(o)){const c=Yv(o.raw.trim()+" ")[0];return c.type!=="list"?void 0:c}if(!n||n.type!=="paragraph")return;const s=nw(o.items.slice(0,-1)),r=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!r)return;const a=r+nw(e.tokens.slice(0,-1))+n.raw,l=Yv(s+a)[0];if(l.type==="list")return l}function Sbe(o,e){if(o.raw.match(/-\s*$/))return Yv(e+" ")}const ybe=3;function Lbe(o){for(let e=0;e<ybe;e++){const t=xbe(o);if(t)o=t;else break}return o}function xbe(o){let e,t;for(e=0;e<o.length;e++){const n=o[e];if(n.type==="paragraph"&&n.raw.match(/(\n|^)\|/)){t=Pbe(o.slice(e));break}}const i=o.at(-1);if(!t&&i?.type==="list"){const n=wbe(i);n&&(t=[n],e=o.length-1)}if(!t&&i?.type==="paragraph"){const n=nq(i);n&&(t=[n],e=o.length-1)}if(t){const n=[...o.slice(0,e),...t];return n.links=o.links,n}if(i?.type==="heading"){const n=Sbe(i,nw(o));if(n)return n}return null}function kbe(o){return Wh(o,"`")}function Ibe(o){return Wh(o,"*")}function Dbe(o){return Wh(o,"_")}function Ebe(o){return Wh(o,")",!1)}function Nbe(o){return Wh(o,'")',!1)}function Tbe(o){return Wh(o,"](https://microsoft.com)",!1)}function Rbe(o){return Wh(o,"**")}function Mbe(o){return Wh(o,"__")}function Wh(o,e,t=!0){const i=nw(Array.isArray(o)?o:[o]),n=t?i.trimEnd():i;return Yv(n+e)[0]}function Pbe(o){const e=nw(o),t=e.split(`
|
||||
`);let i,n=!1;for(let s=0;s<t.length;s++){const r=t[s].trim();if(typeof i>"u"&&r.match(/^\s*\|/)){const a=r.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(r.match(/^\s*\|/)){if(s!==t.length-1)return;n=!0}else return}if(typeof i=="number"&&i>0){const s=n?t.slice(0,-1).join(`
|
||||
`):e,r=!!s.match(/\|\s*$/),a=s+(r?"":"|")+`
|
||||
|${" --- |".repeat(i)}`;return Yv(a)}}let sq={showInstantHover:()=>{},showDelayedHover:()=>{},setupDelayedHover:()=>A.None,setupDelayedHoverAtMouse:()=>A.None,hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>({dispose:()=>{},show:()=>{},hide:()=>{},update:()=>{}}),showManagedHover:()=>{}};function Abe(o){sq=o}function ta(){return sq}class Obe{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}function ks(o,e,t){return Math.min(Math.max(o,e),t)}class oq{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class Fbe{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}class fg extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var Kn;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],l={start:s.start,end:Math.min(r.start,s.end)},c={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}o.relativeComplement=n})(Kn||(Kn={}));function rq(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.end<i.range.start)break;const n=Kn.intersect(o,i.range);Kn.isEmpty(n)||t.push({range:n,size:i.size})}return t}function XA({start:o,end:e},t){return{start:o+t,end:e+t}}function Wbe(o){const e=[];let t=null;for(const i of o){const n=i.range.start,s=i.range.end,r=i.size;if(t&&r===t.size){t.range.end=s;continue}t={range:{start:n,end:s},size:r},e.push(t)}return e}function Bbe(...o){return Wbe(o.reduce((e,t)=>e.concat(t),[]))}class Hbe{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=rq({start:0,end:e},this.groups),r=rq({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:XA(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=Bbe(s,a,r),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e<this._paddingTop)return 0;let t=0,i=this._paddingTop;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s*n.size;if(e<r)return t+Math.floor((e-i)/n.size);t+=s,i=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s;if(e<r)return this._paddingTop+t+(e-i)*n.size;t+=s*n.size,i=r}return-1}}class Vbe{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)i=this.transactionNodesPendingRemoval.has(t.domNode),i&&this.transactionNodesPendingRemoval.delete(t.domNode);else{const n=Q(".monaco-list-row"),r=this.getRenderer(e).renderTemplate(n);t={domNode:n,templateId:e,templateData:r}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}function zbe(o,e,t,i=[]){if(!o.dataTransfer)return;const n=Q(".monaco-drag-image");n.textContent=t,n.classList.add(...i),(a=>{for(;a&&!a.classList.contains("monaco-workbench");)a=a.parentElement;return a||e.ownerDocument.body})(e).appendChild(n),o.dataTransfer.setDragImage(n,-10,-10),setTimeout(()=>n.remove(),0)}var ad=function(o,e,t,i){var n
Line truncated
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
|
||||
`),e.listFocusAndSelectionForeground&&i.push(`
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
|
||||
`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const n=od(e.listFocusAndSelectionOutline,od(e.listSelectionOutline,e.listFocusOutline??""));n&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${n}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.focused,
|
||||
.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
|
||||
`);const s=od(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`
|
||||
.monaco-list${t}.drop-target,
|
||||
.monaco-list${t} .monaco-list-rows.drop-target,
|
||||
.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }
|
||||
`),e.listDropBetweenBackground&&(i.push(`
|
||||
.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,
|
||||
.monaco-list${t} .monaco-list-row.drop-target-before::before {
|
||||
content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;
|
||||
background-color: ${e.listDropBetweenBackground};
|
||||
}`),i.push(`
|
||||
.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,
|
||||
.monaco-list${t} .monaco-list-row.drop-target-after::after {
|
||||
content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;
|
||||
background-color: ${e.listDropBetweenBackground};
|
||||
}`)),e.tableColumnsBorder&&i.push(`
|
||||
.monaco-table > .monaco-split-view2,
|
||||
.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
|
||||
.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,
|
||||
.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
||||
border-color: ${e.tableColumnsBorder};
|
||||
}
|
||||
|
||||
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
|
||||
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
|
||||
border-color: transparent;
|
||||
}
|
||||
`),e.tableOddRowsBackgroundColor&&i.push(`
|
||||
.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
|
||||
.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
|
||||
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
|
||||
background-color: ${e.tableOddRowsBackgroundColor};
|
||||
}
|
||||
`),this.styleElement.textContent=i.join(`
|
||||
`)}}const iCe={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:$.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:$.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:$.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},nCe={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function sCe(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n<o.length&&o[n]===e+(n-t);)i.push(o[n++]);return i}function JA(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):t.push(e[n++]);return t}function oCe(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):n++;return t}const fq=(o,e)=>o-e;class rCe{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const r of this.renderers)r.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class aCe{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new U}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),s=n&&typeof n!="string"?n:Et(n);i.disposables.add(Se(a=>{this.setAriaLabel(a.readObservable(s),i.container)}));const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?i.container.setAttribute("aria-level",`${r}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class lCe{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class jo{get onDidChangeFocus(){return ie.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ie.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ie.chain(this.disposables.add(new gt(this.view.domNode,"keydown")).event,s=>s.map(r=>new St(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>st.stop(r,!0)).filter(()=>!1)),i=ie.chain(this.disposables.add(new gt(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new St(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>st.stop(r,!0)).map(({browserEvent:r})=>{const a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,d=typeof l<"u"?this.view.domElement(l):this.view.domNode;retur
Line truncated
|
||||
`)}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=od(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=me(this.selectElement),i=mi(this.selectElement),n=me(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-dc.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const u=this._hasDetails?this._cachedMaxDetailsHeight:0,f=h+s+u,g=Math.floor((r-s-u)/this.getHeight()),m=Math.floor((a-s-u)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.top<dc.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||g<1&&m<1?!1:(g<dc.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&m>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.top<dc.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&g<1||this._dropDownPosition===1&&m<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&g+m<1)return this.hideSelectDropDown(!0),!1;f>r&&(h=g*this.getHeight())}else f>a&&(h=m*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContaine
Line truncated
|
||||
`)}}const mg=new LCe;ei.add(wCe.IconContribution,mg);function Wt(o,e,t,i){return mg.registerIcon(o,e,t,i)}function Sq(){return mg}function xCe(){const o=mH();for(const e in o){const t="\\"+o[e].toString(16);mg.registerIcon(e,{fontCharacter:t})}}xCe();const yq="vscode://schemas/icons",Lq=ei.as(nL.JSONContribution);Lq.registerSchema(yq,mg.getIconSchema());const xq=new wt(()=>Lq.notifySchemaChanged(yq),200);mg.onDidChange(()=>{xq.isScheduled()||xq.schedule()});const kq=Wt("widget-close",Y.close,p(2009,"Icon for the close action in widgets."));Wt("goto-previous-location",Y.arrowUp,p(2010,"Icon for goto previous editor location.")),Wt("goto-next-location",Y.arrowDown,p(2011,"Icon for goto next editor location.")),ve.modify(Y.sync,"spin"),ve.modify(Y.loading,"spin");var nO=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sO=function(o,e){return function(t,i){e(t,i,o)}};const kCe=Wt("diff-review-insert",Y.add,p(94,"Icon for 'Insert' in accessible diff viewer.")),ICe=Wt("diff-review-remove",Y.remove,p(95,"Icon for 'Remove' in accessible diff viewer.")),DCe=Wt("diff-review-close",Y.close,p(96,"Icon for 'Close' in accessible diff viewer."));let _g=(yC=class extends A{constructor(e,t,i,n,s,r,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=r,this._diffs=a,this._models=l,this._instantiationService=c,this._state=j(this,d=>{const h=this._visible.read(d);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const u=d.store.add(this._instantiationService.createInstance(oO,this._diffs,this._models,this._setVisible,this._canClose)),f=d.store.add(this._instantiationService.createInstance(rO,this._parentNode,u,this._width,this._height,this._models));return{model:u,view:f}}).recomputeInitiallyAndOnChange(this._store)}next(){Dt(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){Dt(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){Dt(e=>{this._setVisible(!1,e)})}},yC._ttPolicy=Sl("diffReview",{createHTML:e=>e}),yC);_g=nO([sO(8,ge)],_g);let oO=class extends A{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=Le(this,[]),this._currentGroupIdx=Le(this,0),this._currentElementIdx=Le(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((r,a)=>this._groups.read(a)[r]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((r,a)=>this.currentGroup.read(a)?.lines[r]),this._register(Se(r=>{const a=this._diffs.read(r);if(!a){this._groups.set([],void 0);return}const l=ECe(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());Dt(c=>{const d=this._models.getModifiedPosition();if(d){const h=l.findIndex(u=>d?.lineNumber<u.range.modified.endLineNumberExclusive);h!==-1&&this._currentGroupIdx.set(h,c)}this._groups.set(l,c)})})),this._register(Se(r=>{const a=this.currentElement.read(r);a?.type===Ds.Deleted?this._accessibilitySignalService.playSignal(xs.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===Ds.Added&&this._accessibilitySignalService.playSignal(xs.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Se(r=>{const a=this.currentElement.read(r);if(a&&a.type!==Ds.Header){const l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(k.fromPositions(new M(l,1)))}}))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||lf(t,n=>{this._currentGroupIdx.set(pe.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),n),this._currentElementIdx.set(0,n)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Dt(i=>{this._currentElementIdx.set(pe.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);i!==-1&&Dt(n=>{this._currentElementIdx.set(i,n)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Ds.Deleted?this._models.originalReveal(k.fromPositions(new M(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==Ds.Header?k.fromPositions(new M(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};oO=nO([sO(4,nd)],oO);const cw=3;function ECe(o,e,t){const i=[];for(const n of BR(
Line truncated
|
||||
`);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=n}computeSimilarity(e){let t=0;const i=Math.max(this.histogram.length,e.histogram.length);for(let n=0;n<i;n++)t+=Math.abs((this.histogram[n]??0)-(e.histogram[n]??0));return 1-t/(this.totalCount+e.totalCount)}};DS.chrKeys=new Map;let nk=DS;class zCe{compute(e,t,i=dw.instance,n){if(e.length===0||t.length===0)return ld.trivial(e,t);const s=new hO(e.length,t.length),r=new hO(e.length,t.length),a=new hO(e.length,t.length);for(let g=0;g<e.length;g++)for(let m=0;m<t.length;m++){if(!i.isValid())return ld.trivialTimedOut(e,t);const _=g===0?0:s.get(g-1,m),b=m===0?0:s.get(g,m-1);let C;e.getElement(g)===t.getElement(m)?(g===0||m===0?C=0:C=s.get(g-1,m-1),g>0&&m>0&&r.get(g-1,m-1)===3&&(C+=a.get(g-1,m-1)),C+=n?n(g,m):1):C=-1;const w=Math.max(_,b,C);if(w===C){const v=g>0&&m>0?a.get(g-1,m-1):0;a.set(g,m,v+1),r.set(g,m,3)}else w===_?(a.set(g,m,0),r.set(g,m,1)):w===b&&(a.set(g,m,0),r.set(g,m,2));s.set(g,m,w)}const l=[];let c=e.length,d=t.length;function h(g,m){(g+1!==c||m+1!==d)&&l.push(new Ji(new pe(g+1,c),new pe(m+1,d))),c=g,d=m}let u=e.length-1,f=t.length-1;for(;u>=0&&f>=0;)r.get(u,f)===3?(h(u,f),u--,f--):r.get(u,f)===1?u--:f--;return h(-1,-1),l.reverse(),new ld(l,!1)}}class Oq{compute(e,t,i=dw.instance){if(e.length===0||t.length===0)return ld.trivial(e,t);const n=e,s=t;function r(m,_){for(;m<n.length&&_<s.length&&n.getElement(m)===s.getElement(_);)m++,_++;return m}let a=0;const l=new UCe;l.set(0,r(0,0));const c=new $Ce;c.set(0,l.get(0)===0?null:new Fq(null,0,0,l.get(0)));let d=0;e:for(;;){if(a++,!i.isValid())return ld.trivialTimedOut(n,s);const m=-Math.min(a,s.length+a%2),_=Math.min(a,n.length+a%2);for(d=m;d<=_;d+=2){const b=d===_?-1:l.get(d+1),C=d===m?-1:l.get(d-1)+1,w=Math.min(Math.max(b,C),n.length),v=w-d;if(w>n.length||v>s.length)continue;const S=r(w,v);l.set(d,S);const L=w===b?c.get(d+1):c.get(d-1);if(c.set(d,S!==w?new Fq(L,w,v,S-w):L),l.get(d)===n.length&&l.get(d)-d===s.length)break e}}let h=c.get(d);const u=[];let f=n.length,g=s.length;for(;;){const m=h?h.x+h.length:0,_=h?h.y+h.length:0;if((m!==f||_!==g)&&u.push(new Ji(new pe(m,f),new pe(_,g))),!h)break;f=h.x,g=h.y,h=h.prev}return u.reverse(),new ld(u,!1)}}class Fq{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class UCe{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=t}}}class $Ce{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class sk{constructor(e,t,i){this.lines=e,this.range=t,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let n=this.range.startLineNumber;n<=this.range.endLineNumber;n++){let s=e[n-1],r=0;n===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,s=s.substring(r)),this.lineStartOffsets.push(r);let a=0;if(!i){const c=s.trimStart();a=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);const l=n===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-a,s.length):s.length;for(let c=0;c<l;c++)this.elements.push(s.charCodeAt(c));n<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new pe(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(t=>String.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=Hq(e>0?this.elements[e-1]:-1),i=Hq(e<this.elements.length?this.elements[e]:-1);if(t===7&&i===8)return 0;if(t===8)return 150;let n=0;return t!==i&&(n+=10,t===0&&i===1&&(n+=1)),n+=Bq(t),n+=Bq(i),n}translateOffset(e,t="right"){const i=C_(this.firstElementOffsetByLineIdx,s=>s<=e),n=e-this.firstElementOffsetByLineIdx[i];return new M(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+n+(n===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const t=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(t)?k.fromPositions(i,i):k.fromPositions(t,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!q_(this.elements[e]))return;let t=e;for(;t>0&&q_(this.elements[t-1]);)t--;let i=e;for(;i<this.elements.length&&q_(this.elements[i]);)i++;return new pe(t,i)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!q_(this.elements
Line truncated
|
||||
`).length>=15&&KCe(h,f=>f.length>=2)>=2}),r=XCe(o,r),r}function KCe(o,e){let t=0;for(const i of o)e(i)&&t++;return t}function GCe(o,e,t,i){const n=[],s=o.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new nk(l.original,e,l)),r=new Set(o.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new nk(l.modified,t,l))),a=new Set;for(const l of s){let c=-1,d;for(const h of r){const u=l.computeSimilarity(h);u>c&&(c=u,d=h)}if(c>.9&&d&&(r.delete(d),n.push(new ds(l.range,d.range)),a.add(l.source),a.add(d.source)),!i.isValid())return{moves:n,excludedChanges:a}}return{moves:n,excludedChanges:a}}function ZCe(o,e,t,i,n,s){const r=[],a=new kH;for(const u of o)for(let f=u.original.startLineNumber;f<u.original.endLineNumberExclusive-2;f++){const g=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;a.add(g,{range:new ke(f,f+3)})}const l=[];o.sort(kn(u=>u.modified.startLineNumber,lo));for(const u of o){let f=[];for(let g=u.modified.startLineNumber;g<u.modified.endLineNumberExclusive-2;g++){const m=`${t[g-1]}:${t[g+1-1]}:${t[g+2-1]}`,_=new ke(g,g+3),b=[];a.forEach(m,({range:C})=>{for(const v of f)if(v.originalLineRange.endLineNumberExclusive+1===C.endLineNumberExclusive&&v.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){v.originalLineRange=new ke(v.originalLineRange.startLineNumber,C.endLineNumberExclusive),v.modifiedLineRange=new ke(v.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),b.push(v);return}const w={modifiedLineRange:_,originalLineRange:C};l.push(w),b.push(w)}),f=b}if(!s.isValid())return[]}l.sort(R6(kn(u=>u.modifiedLineRange.length,lo)));const c=new Tr,d=new Tr;for(const u of l){const f=u.modifiedLineRange.startLineNumber-u.originalLineRange.startLineNumber,g=c.subtractFrom(u.modifiedLineRange),m=d.subtractFrom(u.originalLineRange).getWithDelta(f),_=g.getIntersection(m);for(const b of _.ranges){if(b.length<3)continue;const C=b,w=b.delta(-f);r.push(new ds(w,C)),c.addRange(C),d.addRange(w)}}r.sort(kn(u=>u.original.startLineNumber,lo));const h=new jL(o);for(let u=0;u<r.length;u++){const f=r[u],g=h.findLastMonotonous(L=>L.original.startLineNumber<=f.original.startLineNumber),m=b_(o,L=>L.modified.startLineNumber<=f.modified.startLineNumber),_=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-m.modified.startLineNumber),b=h.findLastMonotonous(L=>L.original.startLineNumber<f.original.endLineNumberExclusive),C=b_(o,L=>L.modified.startLineNumber<f.modified.endLineNumberExclusive),w=Math.max(b.original.endLineNumberExclusive-f.original.endLineNumberExclusive,C.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let v;for(v=0;v<_;v++){const L=f.original.startLineNumber-v-1,x=f.modified.startLineNumber-v-1;if(L>i.length||x>n.length||c.contains(x)||d.contains(L)||!Vq(i[L-1],n[x-1],s))break}v>0&&(d.addRange(new ke(f.original.startLineNumber-v,f.original.startLineNumber)),c.addRange(new ke(f.modified.startLineNumber-v,f.modified.startLineNumber)));let S;for(S=0;S<w;S++){const L=f.original.endLineNumberExclusive+S,x=f.modified.endLineNumberExclusive+S;if(L>i.length||x>n.length||c.contains(x)||d.contains(L)||!Vq(i[L-1],n[x-1],s))break}S>0&&(d.addRange(new ke(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+S)),c.addRange(new ke(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+S))),(v>0||S>0)&&(r[u]=new ds(new ke(f.original.startLineNumber-v,f.original.endLineNumberExclusive+S),new ke(f.modified.startLineNumber-v,f.modified.endLineNumberExclusive+S)))}return r}function Vq(o,e,t){if(o.trim()===e.trim())return!0;if(o.length>300&&e.length>300)return!1;const n=new Oq().compute(new sk([o],new k(1,1,1,o.length),!1),new sk([e],new k(1,1,1,e.length),!1),t);let s=0;const r=Ji.invert(n.diffs,o.length);for(const d of r)d.seq1Range.forEach(h=>{uO(o.charCodeAt(h))||s++});function a(d){let h=0;for(let u=0;u<o.length;u++)uO(d.charCodeAt(u))||h++;return h}const l=a(o.length>e.length?o:e);return s/l>.6&&l>10}function YCe(o){if(o.length===0)return o;o.sort(kn(t=>t.original.startLineNumber,lo));const e=[o[0]];for(let t=1;t<o.length;t++){const i=e[e.length-1],n=o[t],s=n.original.startLineNumber-i.original.endLineNumberExclusive,r=n.modified.startLineNumber-i.modified.endLineNumberExclusive;if(s>=0&&r>=0&&s+r<=2){e[e.length-1]=i.join(n);continue}e.push(n)}return e}function XCe(o,e){const t=new jL(o);return e=e.filter(i=>{const n=t.findLastMonotonous(a=>a.original.startLineNumber<i.original.endLineNumberExclusive)||new ds(new ke(1,1),new ke(1,1)),s=b_(o,a=>a.modified.startLineNumber<i.modified.endLineNumberExclusive);return n!==s}),e}function zq(o,e,t){let i=t;return i=Uq(o,e,i),i=Uq(o,e,i),i=QCe(o,e,i),i}function Uq(o,e,t){if(t.length===0)return t;const i=[];i.push(t[0]);for(let s=1;s<t.length;s++){const r=i[i.length-1];let a=t[s];if(a.seq1Range.isEmpty||a.seq2Range.isEmpty){const l=a.seq1Range.start-r.seq1Range.endExclusive;let c;for(c=1;c<=l&&!(o.getElement(a.seq1Range.start-c)!==o.getElement(a.seq1Range.endExclusive-c)||e.ge
Line truncated
|
||||
`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function Kq(o){let e=0;for(;e<o.length&&(o.charCodeAt(e)===32||o.charCodeAt(e)===9);)e++;return e}class n1e{constructor(){this.dynamicProgrammingDiffing=new zCe,this.myersDiffingAlgorithm=new Oq}computeDiff(e,t,i){if(e.length<=1&&Ut(e,t,(x,I)=>x===I))return new ik([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new ik([new qo(new ke(1,e.length+1),new ke(1,t.length+1),[new Is(new k(1,1,e.length,e[e.length-1].length+1),new k(1,1,t.length,t[t.length-1].length+1))])],[],!1);const n=i.maxComputationTimeMs===0?dw.instance:new VCe(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,r=new Map;function a(x){let I=r.get(x);return I===void 0&&(I=r.size,r.set(x,I)),I}const l=e.map(x=>a(x.trim())),c=t.map(x=>a(x.trim())),d=new qq(l,e),h=new qq(c,t),u=d.length+h.length<1700?this.dynamicProgrammingDiffing.compute(d,h,n,(x,I)=>e[x]===t[I]?t[I].length===0?.1:1+Math.log(1+t[I].length):.99):this.myersDiffingAlgorithm.compute(d,h,n);let f=u.diffs,g=u.hitTimeout;f=zq(d,h,f),f=t1e(d,h,f);const m=[],_=x=>{if(s)for(let I=0;I<x;I++){const D=b+I,R=C+I;if(e[D]!==t[R]){const F=this.refineDiff(e,t,new Ji(new pe(D,D+1),new pe(R,R+1)),n,s,i);for(const O of F.mappings)m.push(O);F.hitTimeout&&(g=!0)}}};let b=0,C=0;for(const x of f){Xd(()=>x.seq1Range.start-b===x.seq2Range.start-C);const I=x.seq1Range.start-b;_(I),b=x.seq1Range.endExclusive,C=x.seq2Range.endExclusive;const D=this.refineDiff(e,t,x,n,s,i);D.hitTimeout&&(g=!0);for(const R of D.mappings)m.push(R)}_(e.length-b);const w=new ax(e),v=new ax(t),S=tk(m,w,v);let L=[];return i.computeMoves&&(L=this.computeMoves(S,e,t,l,c,n,s,i)),Xd(()=>{function x(D,R){if(D.lineNumber<1||D.lineNumber>R.length)return!1;const F=R[D.lineNumber-1];return!(D.column<1||D.column>F.length+1)}function I(D,R){return!(D.startLineNumber<1||D.startLineNumber>R.length+1||D.endLineNumberExclusive<1||D.endLineNumberExclusive>R.length+1)}for(const D of S){if(!D.innerChanges)return!1;for(const R of D.innerChanges)if(!(x(R.modifiedRange.getStartPosition(),t)&&x(R.modifiedRange.getEndPosition(),t)&&x(R.originalRange.getStartPosition(),e)&&x(R.originalRange.getEndPosition(),e)))return!1;if(!I(D.modified,t)||!I(D.original,e))return!1}return!0}),new ik(S,L,g)}computeMoves(e,t,i,n,s,r,a,l){return qCe(e,t,i,n,s,r).map(h=>{const u=this.refineDiff(t,i,new Ji(h.original.toOffsetRange(),h.modified.toOffsetRange()),r,a,l),f=tk(u.mappings,new ax(t),new ax(i),!0);return new Aq(h,f)})}refineDiff(e,t,i,n,s,r){const l=s1e(i).toRangeMapping2(e,t),c=new sk(e,l.originalRange,s),d=new sk(t,l.modifiedRange,s),h=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,n):this.myersDiffingAlgorithm.compute(c,d,n);let u=h.diffs;return u=zq(c,d,u),u=jq(c,d,u,(g,m)=>g.findWordContaining(m)),r.extendToSubwords&&(u=jq(c,d,u,(g,m)=>g.findSubWordContaining(m),!0)),u=JCe(c,d,u),u=i1e(c,d,u),{mappings:u.map(g=>new Is(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:h.hitTimeout}}}function s1e(o){return new ds(new ke(o.seq1Range.start+1,o.seq1Range.endExclusive+1),new ke(o.seq2Range.start+1,o.seq2Range.endExclusive+1))}var o1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r1e=function(o,e){return function(t,i){e(t,i,o)}};let fO=class extends A{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=Le(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Le(this,void 0),this.diff=this._diff,this._unchangedRegions=Le(this,void 0),this.unchangedRegions=j(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a)?.regions??[]:(Dt(l=>{for(const c of this._unchangedRegions.read(void 0)?.regions||[])c.collapseAll(l)}),[])),this.movedTextToCompare=Le(this,void 0),this._activeMovedText=Le(this,void 0),this._hoveredMovedText=Le(this,void 0),this.activeMovedText=j(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new Xt,this._diffProvider=j(this,a=>{const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=co("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(ue(()=>this._cancellationTokenSource.cancel()));const n=_r("contentChangedSignal"),s=this._register(new wt(()=>n.trigger(void 0),200));this._register(Se(a=>{const l=this._unchangedRegions.read(a);if(!l||l.regions.some(g=>g.isDragged.read(a)))return;const c=l.originalDecorationIds.map(g=>e.original.getDecorationRange(g)).map(g=>g?ke.fromRangeInclusive(g):void 0),d=l.modifiedDecorationIds.map(g=>e.m
Line truncated
|
||||
`:`\r
|
||||
`),await this._clipboardService.writeText(w)})),i.getOption(104)||_.push(new Mo("diff.inline.revertChange",p(115,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),_},autoSelectFirstItem:!0})};this._register(Si(this._diffActions,"mousedown",g=>{if(!g.leftButton)return;const{top:m,height:_}=mi(this._diffActions),b=Math.floor(d/3);g.preventDefault(),f(g.posx,m+_+b)})),this._register(i.onMouseMove(g=>{(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._getViewZoneId()?(h=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,d),this.visibility=!0):this.visibility=!1})),this._register(i.onMouseDown(g=>{g.event.leftButton&&(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._getViewZoneId()&&(g.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,d),f(g.event.posx,g.event.posy+d))}))}_updateLightBulbPosition(e,t,i){const{top:n}=mi(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c<this._viewLineCounts.length;c++)if(l+=this._viewLineCounts[c],r<l)return c}return r}}const Zq=Sl("diffEditorWidget",{createHTML:o=>o});function hw(o,e,t,i,n=!1){dn(i,e.fontInfo);const s=t.length>0,r=new uh(1e4);let a=0,l=0;const c=[];for(let f=0;f<o.lineTokens.length;f++){const g=f+1,m=o.lineTokens[f],_=o.lineBreakData[f],b=os.filter(t,g,1,Number.MAX_SAFE_INTEGER);if(_){let C=0;for(const w of _.breakOffsets){const v=m.sliceAndInflate(C,w,0);a=Math.max(a,Yq(l,v,os.extractWrapped(b,C,w),s,o.mightContainNonBasicASCII,o.mightContainRTL,e,r,n)),l++,C=w}c.push(_.breakOffsets.length)}else c.push(1),a=Math.max(a,Yq(l,m,b,s,o.mightContainNonBasicASCII,o.mightContainRTL,e,r,n)),l++}a+=e.scrollBeyondLastColumn;const d=r.build(),h=Zq?Zq.createHTML(d):d;i.innerHTML=h;const u=a*e.typicalHalfwidthCharacterWidth;return{heightInLines:l,minWidthInPx:u,viewLineCounts:c}}class uw{constructor(e,t=e.map(s=>null),i=!0,n=!0){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}}class dd{static fromEditor(e){const t=e.getOptions(),i=t.get(59),n=t.get(165);return new dd(e.getModel()?.getOptions().tabSize||0,i,t.get(40),i.typicalHalfwidthCharacterWidth,t.get(118),t.get(75),n.decorationsWidth,t.get(133),t.get(113),t.get(108),t.get(60),t.get(117).verticalScrollbarSize)}constructor(e,t,i,n,s,r,a,l,c,d,h,u,f=!0){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=s,this.lineHeight=r,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=d,this.fontLigatures=h,this.verticalScrollbarSize=u,this.setWidth=f}withSetWidth(e){return new dd(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,this.scrollBeyondLastColumn,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,e)}withScrollBeyondLastColumn(e){return new dd(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,e,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,this.setWidth)}}function Yq(o,e,t,i,n,s,r,a,l){a.appendString('<div class="view-line'),!l&&!i&&a.appendString(" char-delete"),a.appendString('" style="top:'),a.appendString(String(o*r.lineHeight)),r.setWidth?a.appendString('px;width:1000000px;">'):a.appendString('px;">');const c=e.getLineContent(),d=Vo.isBasicASCII(c,n),h=Vo.containsRTL(c,d,s),u=h_(new Vc(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,c,!1,d,h,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==Fc.OFF,null,null,r.verticalScrollbarSize),a);return a.appendString("</div>"),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}const Wa=We("clipboardService"),hd=We("contextViewService"),Ko=We("contextMenuService");var d1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xq=function(o,e){return function(t,i){e(t,i,o)}};let pO=class extends A{constructor(e,t,i,n,s,r,a,l,c,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=d,this._originalTopPadding=Le(this,
Line truncated
|
||||
[{1}] {2}`,n,xO.modifierLabels[so].altKey,l)}return n}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&P1e(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(ve.isThemeIcon(n)){const s=ve.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=ue(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=Rf(this._themeService.getColorTheme().type)?Nl(n.dark):Nl(n.light),i.classList.add("icon"),this._itemClassDispose.value=jr(ue(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};Uh=fk([Ns(2,ot),Ns(3,hi),Ns(4,xe),Ns(5,li),Ns(6,Ko),Ns(7,bn)],Uh);class EO extends Uh{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=EO._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=p(1632,"{1} to {0}",this._action.label,t):this.label.textContent=p(1633,"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let NO=class extends lk{constructor(e,t,i,n,s){const r={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(ve.isThemeIcon(e.item.icon)?ve.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>i.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},n,r),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),it(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!ve.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Rf(this._themeService.getColorTheme().type)?Nl(i.dark):Nl(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};NO=fk([Ns(2,ot),Ns(3,Ko),Ns(4,li)],NO);let TO=class extends Fa{constructor(e,t,i,n,s,r,a,l){super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._defaultActionDisposables=this._register(new U),this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c;const d=t?.persistLastActionId?l.get(this._storageKey,1):void 0;d&&(c=e.actions.find(u=>d===u.id)),c||(c=e.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(Uh,c,{keybinding:this._getDefaultActionKeybindingLabel(c)}));const h={keybindingProvider:u=>this._keybindingService.lookupKeybinding(u.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??this._register(new hf)};this._dropdown=this._register(new lk(e,e.actions,this._contextMenuService,h)),this._register(this._dropdown.actionRunner.onDidRun(u=>{u.action instanceof Po&&this.update(u.action)}))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(Uh,e,{keybinding:this._getDefaultActionKeybindingLabel(e)})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends hf{async runAction(t,i){await t.run(void 0)}}),this._container&&this._defaultAction.render(Dy(this._container,Q(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=Q(".action-container");this._defaultAction.render(Z(this._container,t)),this._register(W(t,te.KEY_DOWN,n=>{const s=new St(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=Q(".dropdown-action-container");this._dropdown.render(Z(this._container,i)),this._register(W(i,te.KEY_DOWN,n=>{const s=new St(n);s.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),s.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defau
Line truncated
|
||||
`),split:o=>o.split(`\r
|
||||
`),parse:o=>xk.split(o).filter(e=>!e.startsWith("#"))}),hc=class hc{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+hc.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new hc((this.value?[this.value,...e]:e).join(hc.sep))}};hc.sep=".",hc.None=new hc("@@none@@"),hc.Empty=new hc("");let si=hc;const Eve={ctrlCmd:!1,alt:!1};var Sw;(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(Sw||(Sw={}));var Ha;(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(Ha||(Ha={}));var Bt;(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage",o[o.NextSeparator=8]="NextSeparator",o[o.PreviousSeparator=9]="PreviousSeparator"})(Bt||(Bt={}));var kk;(function(o){o[o.Title=1]="Title",o[o.Inline=2]="Inline"})(kk||(kk={}));const Zn=We("quickInputService"),kK={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Nve{}const Tve={DragAndDropContribution:"workbench.contributions.dragAndDrop"};ei.add(Tve.DragAndDropContribution,new Nve);const NS=class NS{constructor(){}static getInstance(){return NS.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};NS.INSTANCE=new NS;let $O=NS;function IK(o){if(ma&&typeof globalThis.vscode?.webUtils?.getPathForFile=="function")return globalThis.vscode.webUtils.getPathForFile(o)}function DK(o){const e=new yK;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,UO(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,Rve(n))}}return e}function Rve(o){const e=IK(o),t=e?be.parse(e):void 0;return Dve(o.name,t,async()=>new Uint8Array(await o.arrayBuffer()))}const Mve=Object.freeze([kK.EDITORS,kK.FILES,og.RESOURCES,og.INTERNAL_URI_LIST]);function EK(o,e=!1){const t=DK(o),i=t.get(og.INTERNAL_URI_LIST);if(i)t.replace(_i.uriList,i);else if(e||!t.has(_i.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=IK(r);try{a?n.push(be.file(a).toString()):n.push(be.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(_i.uriList,UO(xk.create(n)))}for(const n of Mve)t.delete(n);return t}const yw=We("IWorkspaceEditService");class jO{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(jh.is(t))return jh.lift(t);if(J_.is(t))return J_.lift(t);throw new Error("Unsupported edit")})}}class jh extends jO{static is(e){return e instanceof jh?!0:nn(e)&&be.isUri(e.resource)&&nn(e.textEdit)}static lift(e){return e instanceof jh?e:new jh(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class J_ extends jO{static is(e){return e instanceof J_?!0:nn(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof J_?e:new J_(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const qO=We("IEditorCancelService"),NK=new ae("cancellableOperation",!1,p(934,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));je(qO,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=NK.bindTo(n.get(xe)),r=new Jn;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class Pve extends Xt{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(qO).add(e,this))}dispose(){this._unregister(),super.dispose()}}re(new class extends Bi{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:NK})}runEditorCommand(o,e){o.get(qO).cancel(e)}});let TK=class kB{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?tf("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof kB))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new kB(e,
Line truncated
|
||||
`):o}function zK(o){return o.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${o.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p(30,"A system error occurred ({0})",o.message):o.message||p(31,"An unknown error occurred. Please consult the log for more details.")}function Rk(o=null,e=!1){if(!o)return p(32,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=wa(o),i=Rk(t[0],e);return t.length>1?p(33,"{0} ({1} errors in total)",i,t.length):i}if(ji(o))return o;if(o.detail){const t=o.detail;if(t.error)return r4(t.error,e);if(t.exception)return r4(t.exception,e)}return o.stack?r4(o,e):o.message?o.message:p(34,"An unknown error occurred. Please consult the log for more details.")}const Mk=Q,iwe={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class nb extends A{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const n=this.options.keybindingLabelForeground;this.domNode=Z(e,Mk(".monaco-keybinding")),n&&(this.domNode.style.color=n),this.hover=this._register(ta().setupManagedHover(Zs("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&nb.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let i=1;i<e.length;i++)Z(this.domNode,Mk("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,e[i],this.matches?this.matches.chordPart:null);const t=this.options.disableTitle??!1?void 0:this.keybinding.getAriaLabel()||void 0;this.hover.update(t),this.domNode.setAttribute("aria-label",t||"")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){pn(this.domNode),this.keyElements.clear()}renderChord(e,t,i){const n=xO.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,!!i?.ctrlKey,n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,!!i?.shiftKey,n.separator),t.altKey&&this.renderKey(e,n.altKey,!!i?.altKey,n.separator),t.metaKey&&this.renderKey(e,n.metaKey,!!i?.metaKey,n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,!!i?.keyCode,"")}renderKey(e,t,i,n){Z(e,this.createKeyElement(t,i?".highlight":"")),n&&Z(e,Mk("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){Z(e,this.createKeyElement(p(15,"Unbound")))}createKeyElement(e,t=""){const i=Mk("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),this.options.keybindingLabelBackground&&(i.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(i.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(i.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),i}static areSame(e,t){return e===t||!e&&!t?!0:!!e&&!!t&&fo(e.firstPart,t.firstPart)&&fo(e.chordPart,t.chordPart)}}const Hl=We("layoutService");var UK=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pk=function(o,e){return function(t,i){e(t,i,o)}};const $K="acceptSelectedCodeAction",jK="previewSelectedCodeAction";class nwe{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??e.label??""}disposeTemplate(e){}}class swe{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.label??""}disposeTemplate(e){}}let a4=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=document.createElement("span");n.className="description",e.append(n);const s=new nb(e,so);return{container:e,icon:t,text:i,description:n,keybinding:s}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=ve.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=J(e.group.icon.color.id))):(i.icon.className=ve.asClassName(Y.lig
Line truncated
|
||||
{1}`,a.title,Rk(b)))}finally{d.dispose()}if(s.isCancellationRequested)return;const u=BK(r.uri,e,h),f=e[0],g=r.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let m,_;try{m=await this._bulkEditService.apply(u,{editor:this._editor,token:s}),_=r.getDecorationRange(g[0])}catch(b){return c(b,p(933,`Error applying edit '{0}':
|
||||
{1}`,a.title,Rk(b)))}finally{r.deltaDecorations(g,[])}s.isCancellationRequested||i&&m.isApplied&&t.allEdits.length>1&&this.show(_??f,t,l)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(h4,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i,this._getAdditionalActions()))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};Ok=KK([sb(5,ge),sb(6,yw),sb(7,hi)],Ok);var lwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},md=function(o,e){return function(t,i){e(t,i,o)}},na;const GK="editor.changePasteType",cwe="editor.pasteAs.preferences",u4=new ae("pasteWidgetVisible",!1,p(912,"Whether the paste widget is showing")),f4="application/vnd.code.copymetadata";let _d=(Mp=class extends A{static get(e){return e.getContribution(na.ID)}constructor(e,t,i,n,s,r,a,l,c,d){super(),this._logService=i,this._bulkEditService=n,this._clipboardService=s,this._commandService=r,this._configService=a,this._languageFeaturesService=l,this._quickInputService=c,this._progressService=d,this._editor=e;const h=e.getContainerDomNode();this._register(W(h,"copy",u=>this.handleCopy(u))),this._register(W(h,"cut",u=>this.handleCopy(u))),this._register(W(h,"paste",u=>this.handlePaste(u),!0)),this._pasteProgressManager=this._register(new Ik("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Ok,"pasteIntoEditor",e,u4,{id:GK,label:p(913,"Show paste options...")},()=>na._configureDefaultAction?[na._configureDefaultAction]:[]))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}async pasteAs(e){this._logService.trace("CopyPasteController.pasteAs"),this._editor.focus();try{this._logService.trace("Before calling editor.action.clipboardPasteAction"),this._pasteAsActionContext={preferred:e},await this._commandService.executeCommand("editor.action.clipboardPasteAction")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(97).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){let t=null;if(e.clipboardData){const[_,b]=Af.getTextData(e.clipboardData);t=(b||wl.INSTANCE.get(_))?.id||null,this._logService.trace("CopyPasteController#handleCopy for id : ",t," with text.length : ",_.length)}else this._logService.trace("CopyPasteController#handleCopy");if(!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),n=this._editor.getSelections();if(!i||!n?.length)return;const s=this._editor.getOption(45);let r=n;const a=n.length===1&&n[0].isEmpty();if(a){if(!s)return;r=[new k(r[0].startLineNumber,1,r[0].startLineNumber,1+i.getLineLength(r[0].startLineNumber))]}const l=this._editor._getViewModel()?.getPlainTextToCopy(n,s,gn),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:a,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const u=DK(e.clipboardData),f=h.flatMap(_=>_.copyMimeTypes??[]),g=t??Of();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:f,defaultPastePayload:d});const m=h.map(_=>({providerMimeTypes:_.copyMimeTypes,operation:Vi(b=>_.prepareDocumentPaste(i,r,u,b).catch(C=>{console.error(C)}))}));na._currentCopyOperation?.operations.forEach(_=>_.operation.cancel()),na._currentCopyOperation={handle:g,operations:m}}async handlePaste(e){if(e.clipboardData){const[c,d]=Af.getTextData(e.clipboardData),h=d||wl.INSTANCE.get(c);this._logService.trace("CopyPasteController#handlePaste for id : ",h?.id)}else this._logService.trace("CopyPasteController#handlePaste");if(!e.clipboardData||!this._editor.hasTextFocus())return;So.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),i=this._editor.getSelections();if(!i?.length||!t||this._editor.getOption(104)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const n=this.fetchCopyMetadata(e);this._logService.trace("CopyPasteController#handlePaste with metadata : ",n?.id," and text.length : ",e.clipboardData.getData("text/plain").length);const s=EK(e.clipboardData);s.delete(f4);const r=Array.from(e.clipboardData.files).map(c=>c.type),a=[...e.clipboardData.types,...r,...n?.providerCopyMimeTypes??[],_i.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(c=>{const d=this._pasteAsActionContext?.preferred;return d&&!this.providerMatchesPreference(c,d)?!1:c.pasteMimeTypes?.some(h=
Line truncated
|
||||
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
||||
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
||||
}`),this.styleElement.textContent=t.join(`
|
||||
`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};PN.InstanceCount=0;let Z4=PN;const oZ={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class Gh extends go{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new P),this._onKeyDown=this._register(new P),this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ve.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(ta().setupManagedHover(e.hoverDelegate??Zs("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(this.enabled){if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)}})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(...ve.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(...ve.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled")}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled")}setTitle(e){this._hover.update(e),this.domNode.setAttribute("aria-label",e)}}const cB=class cB extends go{constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new P),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";const t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}};cB.CLASS_NAME="monaco-checkbox";let Hw=cB;class rZ extends Hw{constructor(e,t,i){const n=new Gh({title:e,isChecked:t,icon:Y.check,actionClassName:Hw.CLASS_NAME,hoverDelegate:i.hoverDelegate,...oZ});super(n,n.domNode,i),this._register(n),this._register(this.checkbox.onChange(s=>{this.applyStyles(),this._onChange.fire(s)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon(Y.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}}class aZ extends Hw{constructor(e,t,i){let n;switch(t){case!0:n=Y.check;break;case"partial":n=Y.dash;break;case!1:n=void 0;break}const s=new Gh({title:e,isChecked:t===!0,icon:n,actionClassName:rZ.CLASS_NAME,hoverDelegate:i.hoverDelegate,...oZ});super(s,s.domNode,i),this._state=t,this._register(s),this._register(this.checkbox.onChange(r=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(r)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=e===!0,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon(Y.check);break;case"partial":this.checkbox.setIcon(Y.dash);break;case!1:this.checkbox.setIcon(void 0);break}super.applyStyles(e)}}const mSe=p(2,"Match Case"),_Se=p(3,"Match Whole Word"),bSe=p(4,"Use Regular Expression");cla
Line truncated
|
||||
`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function ySe(o,e){return Y4(o)!==0}function Y4(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 0;default:return 0}}class LSe{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class xSe{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new LSe(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;if(e.length>this._limit){const t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}const ub=Q;let kSe=class extends go{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this.hover=this._register(new ct),this._onDidChange=this._register(new P),this._onDidHeightChange=this._register(new P),this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=Z(e,ub(".monaco-inputbox.idle"));const n=this.options.flexibleHeight?"textarea":"input",s=Z(this.element,ub(".ibwrapper"));if(this.input=Z(s,ub(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=Z(s,ub("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new vz(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),Z(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const r=this._register(new gt(e.ownerDocument,"selectionchange")),a=ie.filter(r.event,()=>e.ownerDocument.getSelection()?.anchorNode===s);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Ys(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover.value||(this.hover.value=this._registerLine truncated
|
||||
`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=Mc(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=Mc(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=Mc(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=Mc(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=Mc(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=Mc(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:s,deleteCount:r,elements:a})=>this.view.splice(s,r,a)));const t=ie.forEach(e.onDidSpliceModel,s=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(s),this.selection.onDidModelSplice(s)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);const i=this.modelDisposables.add(new P),n=this.modelDisposables.add(new fr(0));this.modelDisposables.add(ie.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{const s=new Set;for(const r of this.focus.getNodes())s.add(r);for(const r of this.selection.getNodes())s.add(r);i.fire([...s.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=ie.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel}dispose(){pt(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}class n5{constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new ESe(e,null,t),this.onDidSpliceModel=this.model.onDidSpliceModel,this.onDidSpliceRenderedNodes=this.model.onDidSpliceRenderedNodes,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,t.sorter&&(this.sorter={compare(i,n){return t.sorter.compare(i.element,n.element)}}),this.identityProvider=t.identityProvider}setChildren(e,t=Ye.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Ye.empty(),i){const n=new Set,s=new Set,r=l=>{if(l.element===null)return;const c=l;if(n.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();s.add(d),this.nodesByIdentity.set(d,c)}i.onDidCreateNode?.(c)},
Line truncated
|
||||
`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"⏎"})}}class jw{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||fo(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class qw extends A{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new jw(Z(e,Q(".monaco-icon-label")))),this.labelContainer=Z(this.domNode.element,Q(".monaco-icon-label-container")),this.nameContainer=Z(this.labelContainer,Q("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new Sye(this.nameContainer,!!t.supportIcons)):this.nameNode=new vye(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??Zs("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];let r="";i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(typeof i.title=="string"?r+=i.title:r+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let l;!a||!ai(a)?(l=Q(".monaco-icon-label-iconpath"),this.domNode.element.prepend(l)):l=a,l.style.backgroundImage=Nl(i?.iconPath),l.style.backgroundRepeat="no-repeat",l.style.backgroundPosition="center",l.style.backgroundSize="contain"}else a&&a.remove();if(this.domNode.classNames=n,this.domNode.element.setAttribute("aria-label",r),this.labelContainer.classList.value="",this.labelContainer.classList.add(...s),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof Xh?(l.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(l.element,i?.descriptionTitle)):(l.textContent=t&&i?.labelEscapeNewLines?Xh.escapeNewLines(t,[]):t||"",this.setupHover(l.element,i?.descriptionTitle||""),l.empty=!t)}if(i?.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=i?.suffix??""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}let n=e;if(this.creationOptions?.hoverTargetOverride){if(!Zi(e,this.creationOptions.hoverTargetOverride))throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement");n=this.creationOptions.hoverTargetOverride}const s=ta().setupManagedHover(this.hoverDelegate,n,t);s&&this.customHovers.set(e,s)}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new jw(lse(this.nameContainer,Q("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new jw(Z(e.element,Q("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new jw(Z(this.labelContainer,Q("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new Xh(Z(e.element,Q("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new jw(Z(e.element,Q("span.label-description"))))}return this.descriptionNode}}class vye{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&fo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=Z(this.container,Q("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],s=t?.domId&&`${t?.domId}_${i}`;Z(this.container,Q("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&Z(this.container,Q("span.label-separator",void 0,t?.separator||"/"))}}}}function wye(o,e,t){if(!t)return;let i=0;return o.map(n=>{const s={start:i,end:i+n.length},r=t.map(a=>Kn.intersect(s,a)).filter(a=>!Kn.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class Sye extends A{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&fo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.r
Line truncated
|
||||
`)))}onDragOver(){return!1}drop(){}dispose(){this.disposables.dispose()}};N5=jZ([Ug(0,zg)],N5);let T5=class extends sI{constructor(e,t,i,n,s,r,a,l,c){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},r),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=r,this._peekViewService=a,this._uriLabel=l,this._keybindingService=c,this._disposeOnNewModel=new U,this._callOnDispose=new U,this._onDidSelectReference=new P,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new dt(0,0),this._isClosing=!1,this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}get isClosing(){return this._isClosing}dispose(){this._isClosing=!0,this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),pt(this._preview),pt(this._previewNotAvailableMessage),pt(this._tree),pt(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(oSe)||$.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(sSe)||$.transparent,primaryHeadingColor:e.getColor(tZ),secondaryHeadingColor:e.getColor(iZ)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Z(e,Q("div.messages")),gs(this._messageContainer),this._splitView=new sZ(e,{orientation:1}),this._previewContainer=Z(e,Q("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Cd,this._previewContainer,t,{},this.editor),gs(this._previewContainer),this._previewNotAvailableMessage=this._instantiationService.createInstance(Jf,p(1079,"no preview available"),Fo,Jf.DEFAULT_CREATION_OPTIONS,null),this._treeContainer=Z(e,Q("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new kye,keyboardNavigationLabelProvider:this._instantiationService.createInstance(I5),identityProvider:new Lye,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:rSe},dnd:this._instantiationService.createInstance(N5)};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Si(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Dye,"ReferencesWidget",this._treeContainer,new yye,[this._instantiationService.createInstance(kI),this._instantiationService.createInstance(II)],this._instantiationService.createInstance(k5),i),this._splitView.addView({onDidChange:ie.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},oI.Distribute),this._splitView.addView({onDidChange:ie.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},oI.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof Sd&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")})),gs(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new dt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=p(1080,"No results"),uo(this._messageContainer),Promise.resolve(void 0)):(gs(this._messageContainer),this._decorationsManager=new
Line truncated
|
||||
`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=Ld._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new ce(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.ignore||i.push(fi.delete(new k(t+n,r.commentStrOffset+1,t+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let s=0,r=e.length;s<r;s++){const a=e[s];a.ignore||i.push(fi.insert(new M(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,r,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(let u=0,f=t[l].commentStrOffset;h<s&&u<f;u++)h=Ld.nextVisibleColumn(h,n,d.charCodeAt(u)===9,1);h<s&&(s=h)}s=Math.floor(s/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(r=0,a=t[l].commentStrOffset;h<s&&r<a;r++)h=Ld.nextVisibleColumn(h,n,d.charCodeAt(r)===9,1);h>s?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class J5 extends le{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(Jt);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(29),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>k.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d<l.length;d++){const h=l[d];c.selection.endLineNumber===h.selection.startLineNumber&&(c.index<h.index?h.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=h))}for(const d of l)s.push(new Ld(i,d.selection,r.indentSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Zye extends J5{constructor(){super(0,{id:"editor.action.commentLine",label:H(892,"Toggle Line Comment"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:de.MenubarEditMenu,group:"5_insert",title:p(890,"&&Toggle Line Comment"),order:1}})}}class Yye extends J5{constructor(){super(1,{id:"editor.action.addCommentLine",label:H(893,"Add Line Comment"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2081),weight:100}})}}class Xye extends J5{constructor(){super(2,{id:"editor.action.removeCommentLine",label:H(894,"Remove Line Comment"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2099),weight:100}})}}class Qye extends le{constructor(){super({id:"editor.action.blockComment",label:H(895,"Toggle Block Comment"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:de.MenubarEditMenu,group:"5_insert",title:p(891,"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(Jt);if(!t.hasModel())return;const n=t.getOption(29),s=[],r=t.getSelections();for(const a of r)s.push(new Jh(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}ne(Zye),ne(Yye),ne(Xye),ne(Qye);var Jye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gg=function(o,e){return function(t,i){e(t,i,o)}},eF;let e0=(qp=class{static get(e){return e.getContribution(eF.ID)}constructor(e,t,i,n,s,r,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new U,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){const d=this._contextViewService.getContextViewElement(),h=c.srcElement;h.shadowRoot&&ah(d)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(30)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOpti
Line truncated
|
||||
If there are multiple edits for this kind, the editor will show a picker. If there are no edits of this kind, the editor will show an error message.`)}}},{type:"object",required:["preferences"],properties:{preferences:{type:"array",description:p(909,`List of preferred paste edit kind to try applying.
|
||||
The first edit matching the preferences will be applied.`),items:{type:"string"}}}}]},Kp)),ne(class extends le{constructor(){super({id:"editor.action.pasteAsText",label:H(911,"Paste as Text"),precondition:T.writable})}run(o,e){return _d.get(e)?.pasteAs({providerId:Lg.id})}});class oLe{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class sY{constructor(e){this.identifier=e}}const oY=We("treeViewsDndService");je(oY,oLe,1);var rLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},AI=function(o,e){return function(t,i){e(t,i,o)}},xd;const aLe="editor.dropIntoEditor.preferences",rY="editor.changeDropType",nF=new ae("dropWidgetVisible",!1,p(929,"Whether the drop widget is showing"));let Sb=(Gp=class extends A{static get(e){return e.getContribution(xd.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=$O.getInstance(),this._dropProgressManager=this._register(t.createInstance(Ik,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Ok,"dropIntoEditor",e,nF,{id:rY,label:p(930,"Show drop options...")},()=>xd._configureDefaultAction?[xd._configureDefaultAction]:[])),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;xd._currentDropOperation?.cancel(),e.focus(),e.setPosition(t);const n=Vi(async s=>{const r=new U,a=r.add(new ud(e,1,void 0,s));try{const l=await this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const c=e.getModel();if(!c)return;const d=this._languageFeaturesService.documentDropEditProvider.ordered(c).filter(u=>u.dropMimeTypes?u.dropMimeTypes.some(f=>l.matches(f)):!0),h=r.add(await this.getDropEdits(d,c,t,l,a.token));if(a.token.isCancellationRequested)return;if(h.edits.length){const u=this.getInitialActiveEditIndex(c,h.edits),f=e.getOption(43).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([k.fromPositions(t)],{activeEditIndex:u,allEdits:h.edits},f,async g=>g,s)}}finally{r.dispose(),xd._currentDropOperation===n&&(xd._currentDropOperation=void 0)}});this._dropProgressManager.showWhile(t,p(931,"Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),xd._currentDropOperation=n}async getDropEdits(e,t,i,n,s){const r=new U,a=await Em(Promise.all(e.map(async c=>{try{const d=await c.provideDocumentDropEdits(t,i,n,s);return d&&r.add(d),d?.edits.map(h=>({...h,providerId:c.id}))}catch(d){Do(d)||console.error(d),console.error(d)}})),s),l=wa(a??[]).flat();return{edits:HK(l),dispose:()=>r.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(aLe,{resource:e.uri});for(const n of Array.isArray(i)?i:[]){const s=new si(n),r=t.findIndex(a=>a.kind&&s.contains(a.kind));if(r>=0)return r}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new yK;const t=EK(e.dataTransfer);if(this.treeItemsTransfer.hasData(sY.prototype)){const i=this.treeItemsTransfer.getData(sY.prototype);if(Array.isArray(i))for(const n of i){const s=await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,a]of s)t.replace(r,a)}}return t}},xd=Gp,Gp.ID="editor.contrib.dropIntoEditorController",Gp);Sb=xd=rLe([AI(1,ge),AI(2,Me),AI(3,he),AI(4,oY)],Sb),Qe(Sb.ID,Sb,2),cb(i4),re(new class extends Bi{constructor(){super({id:rY,precondition:nF,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){Sb.get(e)?.changeDropType()}}),re(new class extends Bi{constructor(){super({id:"editor.hideDropWidget",precondition:nF,kbOpts:{weight:100,primary:9}})}runEditorCommand(o,e,t){Sb.get(e)?.clearWidgets()}});const us=class us{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationId
Line truncated
|
||||
`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1<n){const l=o.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return t.finalize()}const kd=new ae("findWidgetVisible",!1);kd.toNegated();const OI=new ae("findInputFocussed",!1),oF=new ae("replaceInputFocussed",!1),FI={primary:545,mac:{primary:2593}},WI={primary:565,mac:{primary:2613}},BI={primary:560,mac:{primary:2608}},HI={primary:554,mac:{primary:2602}},VI={primary:558,mac:{primary:2606}},Vt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},eu=19999,uLe=240;class t0{constructor(e,t){this._toDispose=new U,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new No,this._decorations=new sF(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new wt(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,pt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},uLe)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,eu);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=sv(n.map(l=>l.range),l=>k.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(50).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new M(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d
Line truncated
|
||||
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return wY(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return SY(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(vY|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._replaceInput.inputBox.insertAtCursor(`
|
||||
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return wY(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return SY(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const i=this._codeEditor.getOption(50).history,n=this._codeEditor.getOption(50).replaceHistory;this._findInput=this._register(new cF(null,this._contextViewProvider,{width:FLe,label:LLe,placeholder:xLe,appendCaseSensitiveLabel:this._keybindingLabelFor(Vt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Vt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Vt.ToggleRegexCommand),validation:u=>{if(u.length===0||!this._findInput.getRegex())return null;try{return new RegExp(u,"gu"),null}catch(f){return{content:f.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>mY(this._keybindingService),inputBoxStyles:uk,toggleStyles:hk,history:i==="workspace"?this._findWidgetSearchHistory:new Set([])},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(u=>{u.equals(3)&&!this._codeEditor.getOption(50).findOnType&&this._state.change({searchString:this._findInput.getValue()},!0),this._onFindInputKeyDown(u)})),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||!this._codeEditor.getOption(50).findOnType||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(u=>{u.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),u.preventDefault())})),this._register(this._findInput.onRegexKeyDown(u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),u.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(u=>{this._tryUpdateHeight()&&this._showViewZone()})),Ws&&this._register(this._findInput.onMouseDown(u=>this._onFindInputMouseDown(u))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const s=this._register(W_());this._prevBtn=this._register(new Lb({label:kLe+this._keybindingLabelFor(Vt.PreviousMatchFindAction),icon:wLe,hoverDelegate:s,onTrigger:()=>{Qd(this._codeEditor.getAction(Vt.PreviousMatchFindAction)).run().then(void 0,Ee)}},this._hoverService)),this._nextBtn=this._register(new Lb({label:ILe+this._keybindingLabelFor(Vt.NextMatchFindAction),icon:SLe,hoverDelegate:s,onTrigger:()=>{Qd(this._codeEditor.getAction(Vt.NextMatchFindAction)).run().then(void 0,Ee)}},this._hoverService));const r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);const a=document.createElement("div");a.className="find-actions",r.appendChild(a),a.appendChild(this._matchesCount),a.appendChild(this._prevBtn.domNode),a.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Gh({icon:bLe,title:DLe+this._keybindingLabelFor(Vt.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:s,inputActiveOptionBackground:J(U1),inputActiveOptionBorder:J(IL),inputActiveOptionForeground:J(DL)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let u=this._codeEditor.getSelections();u=u.map(f=>(f.endColumn===1&&f.endLineNumber>f.startLineNumber&&(f=f.setEndPosition(f.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(f.endLineNumber-1))),f.isEmpty()?null:f)).filter(f=>!!f),u.length&&this._state.change({searchScope:u},!0)}}else this._state.change({searchScope:null},!0)})),a.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Lb({label:ELe+this._keybindingLabelFor(Vt.CloseFindWidgetCommand),icon:kq,hoverDelegate:s,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:u=>{u.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),u.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new dF(null,void 0,{label:NLe,placeholder:TLe,appendPreserveCaseLabel:this._keybindingLabelFor(Vt.TogglePreserveCaseCommand),history:n==="workspace"?this._replaceWidgetHistory:new Se
Line truncated
|
||||
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|
||||
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
|
||||
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
|
||||
`,constraint:PY,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?DY(t,!1,s,r):xb(t,!1,s,r)}}class Sxe extends Pn{constructor(){super({id:"editor.unfoldRecursively",label:H(978,"Unfold Recursively"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2142),weight:100}})}invoke(e,t,i,n){xb(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class yxe extends Pn{constructor(){super({id:"editor.fold",label:H(979,"Fold"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
|
||||
* 'levels': Number of levels to fold.
|
||||
* 'direction': If 'up', folds given number of levels up otherwise folds down.
|
||||
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
|
||||
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
|
||||
`,constraint:PY,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),r=n&&n.levels,a=n&&n.direction;typeof r!="number"&&typeof a!="string"?txe(t,!0,s):a==="up"?DY(t,!0,r||1,s):xb(t,!0,r||1,s)}}class Lxe extends Pn{constructor(){super({id:"editor.toggleFold",label:H(980,"Toggle Fold"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);CF(t,1,n)}}class xxe extends Pn{constructor(){super({id:"editor.foldRecursively",label:H(981,"Fold Recursively"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);xb(t,!0,Number.MAX_VALUE,n)}}class kxe extends Pn{constructor(){super({id:"editor.toggleFoldRecursively",label:H(982,"Toggle Fold Recursively"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);CF(t,Number.MAX_VALUE,n)}}class Ixe extends Pn{constructor(){super({id:"editor.foldAllBlockComments",label:H(983,"Fold All Block Comments"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())wF(t,$c.Comment.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+oo(a.blockCommentStartToken));vF(t,l,!0)}}}}class Dxe extends Pn{constructor(){super({id:"editor.foldAllMarkerRegions",label:H(984,"Fold All Regions"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())wF(t,$c.Region.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);vF(t,l,!0)}}}}class Exe extends Pn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:H(985,"Unfold All Regions"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())wF(t,$c.Region.value,!1);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);vF(t,l,!1)}}}}class Nxe extends Pn{constructor(){super({id:"editor.foldAllExcept",label:H(986,"Fold All Except Selected"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);EY(t,!0,n)}}class Txe extends Pn{constructor(){super({id:"editor.unfoldAllExcept",label:H(987,"Unfold All Except Selected"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);EY(t,!1,n)}}class Rxe extends Pn{constructor(){super({id:"editor.foldAll",label:H(988,"Fold All"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2069),weight:100}})}invoke(e,t,i){xb(t,!0)}}class Mxe extends Pn{constructor(){super({id:"editor.unfoldAll",label:H(989,"Unfold All"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2088),weight:100}})}invoke(e,t,i){xb(t,!1)}}const DC=class DC extends Pn{getFoldingLevel(){return parseInt(this.id.substr(DC.ID_PREFIX.length))}invoke(e,t,i){ixe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}};DC.ID_PREFIX="editor.foldLevel",DC.ID=e=>DC.ID_PREFIX+e;let KI=DC;class Pxe extends Pn{constructor(){super({id:"editor.gotoParentFold",label:H(990,"Go to Parent Fold"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=nxe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Axe extends Pn{constructor(){super({id:"editor.gotoPreviousFold",label:H(991,"Go to Previous Folding Range"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=sxe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Oxe extends Pn{constructor(){super({id:"editor.gotoNextFold",label:H(992,"Go to Next Folding Range"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=oxe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Fxe extends Pn{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:H(993,"Create Folding Range from Selection"),precondition:vn,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2135),weight:100}})}invoke(e,t,i){const n=[],s=i.getSelections();if(s){for(const r of s){let a=r.endLineNumber;r.endColumn===
Line truncated
|
||||
`)))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}}class rD{constructor(e,t,i,n=[]){this.column=e,this.text=t,this.preview=i,this._inlineDecorations=n,this.lines=ro(this.text).map((s,r)=>({line:s,lineDecorations:os.filter(this._inlineDecorations,r+1,1,s.length+1)}))}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,i)=>t.line===e.lines[i].line&&os.equalsArr(t.lineDecorations,e.lines[i].lineDecorations))}}class MF{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new rD(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=ro(this.text)}renderForScreenReader(e){return this.newLines.join(`
|
||||
`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,i)=>t===e.newLines[i])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function iX(o,e){return Ut(o,e,nX)}function nX(o,e){return o===e?!0:!o||!e?!1:o instanceof h0&&e instanceof h0||o instanceof MF&&e instanceof MF?o.equals(e):!1}function Dd(o,e,t){const i=t?o.range.intersectRanges(t):o.range;if(!i)return o;const n=o.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=e.getValueInRange(i,1),r=Gr(s,n),a=$i.ofText(s.substring(0,r)).addToPosition(o.range.getStartPosition()),l=n.substring(r),c=k.fromPositions(a,o.range.getEndPosition());return new Oi(c,l)}function sX(o,e){return o.text.startsWith(e.text)&&Eke(o.range,e.range)}function Eke(o,e){return e.getStartPosition().equals(o.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(o.getEndPosition())}function oX(o,e,t,i,n=0){let s=Dd(o,e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=e.getLineContent(s.range.startLineNumber),a=It(r).length;if(s.range.startColumn-1<=a){const g=It(s.text).length,m=r.substring(s.range.startColumn-1,a),[_,b]=[s.range.getStartPosition(),s.range.getEndPosition()],C=_.column+m.length<=b.column?_.delta(0,m.length):b,w=k.fromPositions(C,b),v=s.text.startsWith(m)?s.text.substring(m.length):s.text.substring(g);s=new Oi(w,v)}const c=e.getValueInRange(s.range),d=Nke(c,s.text);if(!d)return;const h=s.range.startLineNumber,u=new Array;if(t==="prefix"){const g=d.filter(m=>m.originalLength===0);if(g.length>1||g.length===1&&g[0].originalStart!==c.length)return}const f=s.text.length-n;for(const g of d){const m=s.range.startColumn+g.originalStart+g.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===s.range.startLineNumber&&m<i.column||g.originalLength>0)return;if(g.modifiedLength===0)continue;const _=g.modifiedStart+g.modifiedLength,b=Math.max(g.modifiedStart,Math.min(_,f)),C=s.text.substring(g.modifiedStart,b),w=s.text.substring(b,Math.max(g.modifiedStart,_));C.length>0&&u.push(new rD(m,C,!1)),w.length>0&&u.push(new rD(m,w,!0))}return new h0(h,u)}let aD;function Nke(o,e){if(aD?.originalValue===o&&aD?.newValue===e)return aD?.changes;{let t=aX(o,e,!0);if(t){const i=rX(t);if(i>0){const n=aX(o,e,!1);n&&rX(n)<i&&(t=n)}}return aD={originalValue:o,newValue:e,changes:t},t}}function rX(o){let e=0;for(const t of o)e+=t.originalLength;return e}function aX(o,e,t){if(o.length>5e3||e.length>5e3)return;function i(c){let d=0;for(let h=0,u=c.length;h<u;h++){const f=c.charCodeAt(h);f>d&&(d=f)}return d}const n=Math.max(i(o),i(e));function s(c){if(c<0)throw new Error("unexpected");return n+c+1}function r(c){let d=0,h=0;const u=new Int32Array(c.length);for(let f=0,g=c.length;f<g;f++)if(t&&c[f]==="("){const m=h*100+d;u[f]=s(2*m),d++}else if(t&&c[f]===")"){d=Math.max(d-1,0);const m=h*100+d;u[f]=s(2*m+1),d===0&&h++}else u[f]=c.charCodeAt(f);return u}const a=r(o),l=r(e);return new jl({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}function Tke(o,e){let t,i=!1;const n=new F6(new xn(o,void 0,e.update),(s,r)=>{i||(t=e.initial instanceof Function?e.initial():e.initial,i=!0);const a=e.update(s,t,r);return t=a,a},e.changeTracker,()=>{i&&(e.disposeFinal?.(t),i=!1)},e.equalityComparer??Ro,(s,r,a)=>{if(!i)throw new Ce("Can only set when there is a listener! This is to prevent leaks.");lf(r,l=>{t=s,n.setValue(s,l,a)})},Gi.ofCaller());return n}var Rke=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lX=function(o,e){return function(t,i){e(t,i,o)}};class Mke{constructor(e,t){this._baseService=e,this._intercept=t}publicLog2(e,t){this._intercept(e,t),this._baseService.publicLog2(e,t)}}let PF=class extends Mke{constructor(e,t){super(e,(i,n)=>{let s=!0;n&&AF in n&&(s=!!n[AF]),s&&t.getDataChannel("editTelemetry").sendData({eventName:i,data:n})})}};PF=Rke([lX(0,Vn),lX(1,TF)],PF);const AF=Symbol("shouldForwardToChannel");function Pke(o){return{[AF]:o}}function Ake(o){if(!o)return!1;const e=o.toLowerCase();return e==="github.copilot"||e==="github.copilot-chat"}function Oke(o){const e=o.map(i=>new Cn(pe.ofStartAndLength(i.rangeOffset,i.rangeLength),i.text));return e.reverse(),new qc(e)}function Fke(o,e){o.publicLog2("inlineCompletion.endOfLife",e)}const Wke=3;class Bke{computeDiff(e,t,i){const s=new zke(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),r=[];let a=null;for(const l of s.changes){let c;l.originalEndLineNumber===0?c=new ke(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new ke(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new ke(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new ke(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let h=new qo(c,d,l.charChanges?.map(u=>new Is(new k(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn),new k(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===h.modified.startLineNumber||a.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new
Line truncated
|
||||
`)))this._editor.revealPosition(n);else{const r=new k(i.startLineNumber-1,1,i.endLineNumber+1,1);this._editor.revealRange(r,1)}this._editor.focus()})}async handleInlineSuggestionShown(e,t,i){await e.reportInlineEditShown(this._commandService,t,i)}};KF=dIe([Yg(7,ge),Yg(8,Tt),Yg(9,Jt),Yg(10,bn),Yg(11,he),Yg(12,et),Yg(13,hD)],KF);var Ed;(function(o){o[o.Undo=0]="Undo",o[o.Redo=1]="Redo",o[o.AcceptWord=2]="AcceptWord",o[o.Other=3]="Other"})(Ed||(Ed={}));function GF(o,e,t){if(e.length===1)return[];const i=new wg(o),n=i.getTransformer(),s=n.getOffset(e[0]),r=e.slice(1).map(u=>n.getOffset(u));t=t.removeCommonPrefixAndSuffix(i);const a=n.getStringReplacement(t),l=a.replaceRange.start-s,c=a.replaceRange.join(pe.emptyAt(s)),d=i.getValueOfOffsetRange(c);return r.map(u=>{const f=u+l,g=f+a.replaceRange.length,m=new pe(f,g),_=m.join(pe.emptyAt(u));if(i.getValueOfOffsetRange(_)!==d)return;const C=new Cn(m,a.newText);return n.getTextReplacement(C)}).filter(sn)}class hIe extends A{constructor(e,t,i){super(),i&&this._register({dispose:()=>i()}),this._register(ni(e).setDecorations(Et(t.map(r=>({range:r,options:{description:"animation",className:"edits-fadeout-decoration",zIndex:1}})))));const n=new xke(1,0,1e3,Ike),s=new Dke(n);this._register(Se(r=>{const a=s.getValue(r);e.getContainerDomNode().style.setProperty("--animation-opacity",a.toString()),n.isFinished()&&this.dispose()}))}}var uIe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vX=function(o,e){return function(t,i){e(t,i,o)}},_0;class ZF{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const n=i[0].score[0];for(let s=0;s<i.length;s++){const{score:r,completion:a}=i[s];if(r[0]!==n)break;if(a.preselect)return s}return 0}}class wX extends ZF{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}class fIe extends ZF{constructor(){super("recentlyUsed"),this._cache=new dl(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(i.length===0)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const s=i[0].score[0];let r=-1,a=-1,l=-1;for(let c=0;c<i.length&&i[c].score[0]===s;c++){const d=`${e.getLanguageId()}/${i[c].textLabel}`,h=this._cache.peek(d);if(h&&h.touch>l&&h.type===i[c].completion.kind&&h.insertText===i[c].completion.insertText&&(l=h.touch,a=c),i[c].completion.preselect&&r===-1)return r=c}return a!==-1?a:r!==-1?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:S_.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class gIe extends ZF{constructor(){super("recentlyUsedByPrefix"),this._trie=eb.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let r=this._trie.get(s);if(r||(r=this._trie.findSubstr(s)),r)for(let a=0;a<i.length;a++){const{kind:l,insertText:c}=i[a].completion;if(l===r.type&&c===r.insertText)return a}return super.select(e,t,i)}toJSON(){const e=[];return this._trie.forEach((t,i)=>e.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:S_.fromString(i.type),this._trie.set(t,i)}}}let YF=(Ou=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new U,this._persistSoon=new wt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===zh.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const n=_0._strategyCtors.get(i)||wX;this._strategy=new n;try{const r=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,a=this._storageService.get(`${_0._storagePrefix}/${i}`,r);a&&this._strategy.fromJSON(JSON.parse(a))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shar
Line truncated
|
||||
`,s+=`prefix: ${e.word??"(no prefix)"}
|
||||
`,s+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
|
||||
`,s+=`distance: ${e.distance} (localityBonus-setting)
|
||||
`,s+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
|
||||
`,s+=`commit_chars: ${e.completion.commitCharacters?.join("")}
|
||||
`,n=new qn().appendCodeblock("empty",s),i=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!i3(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),i){const s=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=s,this._type.title=s,uo(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(s))}else pn(this._type),this._type.title="",gs(this._type),this.domNode.classList.add("no-type");if(pn(this._docs),typeof n=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),pn(this._docs);const s=this._markdownRenderer.render(n,{asyncRenderCallback:()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}});this._docs.appendChild(s.element),this._renderDisposeable.add(s)}this.domNode.classList.toggle("detail-and-doc",!!i&&!!n),this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=s=>{s.preventDefault(),s.stopPropagation()},this._close.onclick=s=>{s.preventDefault(),s.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new dt(e,t);dt.equals(i,this._size)||(this._size=i,ese(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}focus(){this.domNode.focus()}};n3=LIe([xIe(1,ge)],n3);class kIe{constructor(e,t){this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new U,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new B4,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=rh(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),r=new dt(220,2*s.lineHeight),a=e.top,l=(function(){const S=n.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),L=-s.borderWidth+e.left+e.width,x=new dt(S,n.height-e.top-s.borderHeight-s.verticalPadding),I=x.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:L,fit:S-t.width,maxSizeTop:x,maxSizeBottom:I,minSize:r.with(Math.min(S,r.width))}})(),c=(function(){const S=e.left-s.borderWidth-s.horizontalPadding,L=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),x=new dt(S,n.height-e.top-s.borderHeight-s.verticalPadding),I=x.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:L,fit:S-t.width,maxSizeTop:x,maxSizeBottom:I,minSize:r.with(Math.min(S,r.width))}})(),d=(function(){const S=e.left,L=-s.borderWidth+e.top+e.height,x=new dt(e.width-s.borderHeight,n.height-e.top-e.height-s.verticalPadding);return{top:L,left:S,fit:x.height-t.height,maxSizeBottom:x,maxSizeTop:x,minSize:r.with(x.width)}})(),h=[l,c,d],u=h.find(S=>S.fit>=0)??h.sort((S,L)=>L.fit-S.fit)[0],f=e.top+e.height-s.borderHeight;let g,m=t.height;const _=Math.max(u.maxSizeTop.height,u.maxSizeBottom.height);m>_&&(m=_);let b;i?m<=u.maxSizeTop.height?(g=!0,b=u.maxSizeTop):(g=!1,b=u.maxSizeBottom):m<=u.maxSizeBottom.height?(g=!1,b=u.maxSizeBottom):(g=!0,b=u.m
Line truncated
|
||||
`)&&d&&!x&&"diff-range-empty"),inlineClassName:x?L3("strike-through","inlineCompletions"):null,zIndex:1}})}if(L.modified.contains(I.modifiedRange.startLineNumber)&&u.push({range:I.modifiedRange,options:I.modifiedRange.isEmpty()&&d&&!x&&c?C:b}),x){const D=a.getValueOfRange(I.modifiedRange),R=D.length>3?[{text:D.slice(0,1),extraClasses:["start"],offsetRange:new pe(I.modifiedRange.startColumn-1,I.modifiedRange.startColumn)},{text:D.slice(1,-1),extraClasses:[],offsetRange:new pe(I.modifiedRange.startColumn,I.modifiedRange.endColumn-2)},{text:D.slice(-1),extraClasses:["end"],offsetRange:new pe(I.modifiedRange.endColumn-2,I.modifiedRange.endColumn-1)}]:[{text:D,extraClasses:["start","end"],offsetRange:new pe(I.modifiedRange.startColumn-1,I.modifiedRange.endColumn)}];this._tokenizationFinished.read(s);const F=this._modifiedTextModel.tokenization.getLineTokens(I.modifiedRange.startLineNumber);for(const{text:O,extraClasses:B,offsetRange:V}of R)h.push({range:k.fromPositions(I.originalRange.getEndPosition()),options:{description:"inserted-text",before:{tokens:F.getTokensInRange(V),content:O,inlineClassName:L3("inlineCompletions-char-insert",I.modifiedRange.isSingleLine()&&r.mode==="insertionInline"&&"single-line-inline",...B),cursorStops:yr.None,attachedData:new B3(this)},zIndex:2,showIfCollapsed:!0}})}}}if(r.isInDiffEditor)for(const L of r.diff)L.original.isEmpty||h.push({range:L.original.toExclusiveRange(),options:w});return{originalDecorations:h,modifiedDecorations:u}}),this._register(ni(this._originalEditor).setDecorations(this._decorations.map(s=>s?.originalDecorations??[])));const n=this._state.map(s=>s?.modifiedCodeEditor);this._register(Bn((s,r)=>{const a=n.read(s);a&&r.add(ni(a).setDecorations(this._decorations.map(l=>l?.modifiedDecorations??[])))})),this._register(this._originalEditor.onMouseUp(s=>{if(s.target.type!==6)return;const r=s.target.detail.injectedText?.options.attachedData;r instanceof B3&&r.owner===this&&this._onDidClick.fire(s.event)}))}}class B3{constructor(e){this.owner=e}}function jDe(o){return o.innerChanges?o.innerChanges.every(e=>ok(e.modifiedRange)&&ok(e.originalRange)):!1}let qDe=0;function KDe(o){return rt(o.onDidChangeTokens,()=>qDe++)}var GDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ZDe=function(o,e){return function(t,i){e(t,i,o)}};let H3=class extends A{constructor(e,t,i,n,s,r){super(),this._editor=e,this._host=t,this._model=i,this._ghostTextIndicator=n,this._focusIsInMenu=s,this._instantiationService=r,this._editorObs=ni(this._editor),this._tabAction=j(d=>this._model.read(d)?.tabAction.read(d)??Xn.Inactive),this._constructorDone=Le(this,!1),this._uiState=j(this,d=>{const h=this._model.read(d);if(!h||!this._constructorDone.read(d))return;const u=h.inlineEdit;let f=Is.fromEdit(u.edit),g=u.edit.apply(u.originalText),m=tk(f,u.originalText,new kh(g)),_=this.determineRenderState(h,d,m,new kh(g));if(!_){h.abort(`unable to determine view: tried to render ${this._previousView?.view}`);return}if(_.kind===xt.SideBySide){const C=bDe(g,u.modifiedLineRange,l.getOptions().tabSize);g=C.applyToString(g),f=gDe(f,C),m=tk(f,u.originalText,new kh(g))}return this._previewTextModel.setLanguage(this._editor.getModel().getLanguageId()),this._previewTextModel.getValue()!==g&&this._previewTextModel.setValue(g),h.showCollapsed.read(d)&&!this._indicator.read(d)?.isHoverVisible.read(d)&&(_={kind:xt.Collapsed,viewData:_.viewData}),h.handleInlineEditShown(_.kind,_.viewData),{state:_,diff:m,edit:u,newText:g,newTextLineCount:u.modifiedLineRange.length,isInDiffEditor:h.isInDiffEditor}}),this._previewTextModel=this._register(this._instantiationService.createInstance(Jf,"",this._editor.getModel().getLanguageId(),{...Jf.DEFAULT_CREATION_OPTIONS,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},null)),this._indicatorCyclicDependencyCircuitBreaker=Le(this,!1),this._indicator=j(this,d=>{if(!this._indicatorCyclicDependencyCircuitBreaker.read(d))return;const h=In({owner:this,equalsFn:rf(UR())},f=>{const g=this._ghostTextIndicator.read(f);if(g)return g.lineRange;const m=this._uiState.read(f);if(m){if(m.state?.kind==="custom"){const _=m.state.displayLocation?.range;if(!_)throw new Ce("custom view should have a range");return new ke(_.startLineNumber,_.endLineNumber)}return m.state?.kind==="insertionMultiLine"?this._insertion.originalLines.read(f):m.edit.displayRange}}),u=j(this,f=>{const g=this._model.read(f);if(g)return g;const m=this._ghostTextIndicator.read(f);return m?m.model:g});return d.store.add(this._instantiationService.createInstance(D3,this._editorObs,h,this._gutterIndicatorOffset,u,this._inlineEditsIsHovered,this._focusIsInMenu))}),this._inlineEditsIsHovered=j(this,d=>this._sideBySide.isHovered.read(d)||
Line truncated
|
||||
.monaco-editor .ghost-text-decoration,
|
||||
.monaco-editor .ghost-text-decoration-preview,
|
||||
.monaco-editor .ghost-text {
|
||||
font-family: ${this._fontFamily.read(s)};
|
||||
}`))),this._register(new O4(this._editor,this._model,this._instantiationService))}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.get().ownsViewZone(e)??!1}};U3=iEe([nEe(3,ge)],U3);var sEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Md=function(o,e){return function(t,i){e(t,i,o)}},Xa;let Ms=(qd=class extends A{static getInFocusedEditorOrParent(e){const t=YG(e);return t?Xa.get(t):null}static get(e){return eke(e.getContribution(Xa.ID))}constructor(e,t,i,n,s,r,a,l,c,d){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=l,this._keybindingService=c,this._accessibilityService=d,this._editorObs=ni(this.editor),this._positions=j(this,g=>this._editorObs.selections.read(g)?.map(m=>m.getEndPosition())??[new M(1,1)]),this._suggestWidgetAdapter=this._register(new zIe(this._editorObs,g=>this.model.get()?.handleSuggestAccepted(g),()=>this.model.get()?.selectedInlineCompletion.get()?.getSingleTextEdit())),this._enabledInConfig=rt(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).enabled),this._isScreenReaderEnabled=rt(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=rt(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=j(this,g=>this._enabledInConfig.read(g)&&(!this._isScreenReaderEnabled.read(g)||!this._editorDictationInProgress.read(g))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._focusIsInMenu=Le(this,!1),this._focusIsInEditorOrMenu=j(this,g=>{const m=this._editorObs.isFocused.read(g),_=this._focusIsInMenu.read(g);return m||_}),this._cursorIsInIndentation=j(this,g=>{const m=this._editorObs.cursorPosition.read(g);if(m===null)return!1;const _=this._editorObs.model.read(g);if(!_)return!1;this._editorObs.versionId.read(g);const b=_.getLineIndentColumn(m.lineNumber);return m.column<=b}),this.model=mr(this,g=>{if(this._editorObs.isReadonly.read(g))return;const m=this._editorObs.model.read(g);return m?this._instantiationService.createInstance(KF,m,this._suggestWidgetAdapter.selectedItem,this._editorObs.versionId,this._positions,this._debounceValue,this._enabled,this.editor):void 0}).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=_r(this),this._hideInlineEditOnSelectionChange=this._editorObs.getOption(71).map(g=>!0),this._view=this._register(this._instantiationService.createInstance(U3,this.editor,this.model,this._focusIsInMenu)),Xa._instances.add(this),this._register(ue(()=>Xa._instances.delete(this))),this._register(Se(g=>{const m=this.model.read(g);if(!m)return;const _=m.state.read(g);if(!_||!this._focusIsInEditorOrMenu.read(void 0))return;const b=_.kind==="inlineEdit"?_.nextEditUri:void 0;for(const C of Xa._instances)C!==this&&(b&&ch(b,C.editor.getModel()?.uri)?C.model.read(void 0)?.trigger():C.reject())})),this._register(Se(g=>{const m=this.model.read(g),_=this.editor.getModel()?.uri;!m||!_||g.store.add(m.onDidAccept(()=>{for(const b of Xa._instances){if(b===this)continue;const C=b.model.read(void 0)?.state.read(void 0);C?.kind==="inlineEdit"&&ch(C.nextEditUri,_)&&b.model.read(void 0)?.stop("automatic")}}))})),this._register(Sa(this._editorObs.onDidType,(g,m)=>{this._enabled.get()&&this.model.get()?.trigger()})),this._register(Sa(this._editorObs.onDidPaste,(g,m)=>{this._enabled.get()&&this.model.get()?.trigger()})),this._register(this._commandService.onDidExecuteCommand(g=>{if(new Set([Jm.Tab.id,Jm.DeleteLeft.id,Jm.DeleteRight.id,Aw,"acceptSelectedSuggestion"]).has(g.commandId)&&e.hasTextFocus()&&this._enabled.get()){let _=!1;g.commandId===Aw&&(_=!0),this._editorObs.forceUpdate(b=>{this.model.get()?.trigger(b,{noDelay:_})})}})),this._register(Sa(this._editorObs.selections,(g,m,_)=>{if(_.some(b=>b.reason===3||b.source==="api")){if(!this._hideInlineEditOnSelectionChange.get()&&this.model.get()?.state.get()?.kind==="inlineEdit")return;const b=this.model.get();if(!b)return;b.state.get()?.kind==="ghostText"&&this.model.get()?.stop()}})),this._register(Se(g=>{const m=this._focusIsInEditorOrMenu.read(g),_=this.model.read(void 0);if(m){const b=_?.state.read(void 0);(!b||b.kind!=="inlineEdit"||!b.nextEditUri)&&Dt(C=>{for(const w of Xa._instances)w!==this&&w.model.read(void 0)?.stop("automatic",C)});return}this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationSer
Line truncated
|
||||
`),c=`${r.documentValue}
|
||||
|
||||
// <json>
|
||||
${l}
|
||||
// </json>
|
||||
`;return await i.writeText(c),{reproCase:c}}}var fEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},T0=function(o,e){return function(t,i){e(t,i,o)}};class gEe{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let G3=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=r,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Ms.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new Mw(1e3,this,k.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(i.type===7&&t.shouldShowHoverAt(i.range))return new Mw(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new Mw(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(i.type===9&&i.element){const n=v0.getWarningWidgetContext(i.element);if(n&&t.shouldShowHoverAt(n.range))return new Mw(1e3,this,n.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if(this._editor.getOption(71).showToolbar!=="onHover")return[];const i=Ms.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new gEe(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new U,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&i.add(this.renderScreenReaderText(e,n));const s=n.controller.model.get(),r=document.createElement("div");e.fragment.appendChild(r),i.add(Bn((l,c)=>{const d=c.add(this._instantiationService.createInstance(hb.hot.read(l),this._editor,!1,Et(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands,s.warning,()=>{e.onContentsChanged()}));r.replaceChildren(d.getDomNode())})),s.triggerExplicitly();const a={hoverPart:n,hoverElement:r,dispose(){i.dispose()}};return new Mg([a])}renderScreenReaderText(e,t){const i=new U,n=Q,s=n("div.hover-row.markdown-hover"),r=Z(s,n("div.hover-contents",{"aria-live":"assertive"})),a=new fd({editor:this._editor},this._languageService,this._openerService),l=c=>{const d=p(1197,"Suggestion:"),h=i.add(a.render(new qn().appendText(d).appendCodeblock("text",c),{asyncRenderCallback:()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()}}));r.replaceChildren(h.element)};return i.add(Se(c=>{const d=t.controller.model.read(c)?.primaryGhostText.read(c);if(d){const h=this._editor.getModel().getLineContent(d.lineNumber);l(d.renderForScreenReader(h))}else Yi(r)})),e.fragment.appendChild(s),i}};G3=fEe([T0(1,Mt),T0(2,Js),T0(3,bn),T0(4,ge),T0(5,Vn)],G3);class pEe{}Qe(Ms.ID,tke(Ms.hot),3),ne(oEe),ne(rEe),re(new aEe),ne($3),ne(j3),ne(lEe),ne(cEe),ne(dEe),ne(q3),ne(DD),ne(hEe),mt(K3),ne(uEe),mt($F),mt(jF),Pg.register(G3),YI.register(new pEe);var mEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z3=function(o,e){return function(t,i){e(t,i,o)}},R0;let M0=(Wu=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new U,this.toUnhookForKeyboard=new U,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new tI(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{Ee(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(R0.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!th
Line truncated
|
||||
|
||||
`))});break;case"saveTextureAtlas":i.invokeFunction(async r=>{const a=r.get(pd),l=r.get(yX),c=a.getWorkspace().folders;if(c.length>0){const d=ls.atlas,h=[];for(const[u,f]of d.pages.entries())h.push(l.writeFile(be.joinPath(c[0].uri,`textureAtlasPage${u}_actual.png`),sh.wrap(new Uint8Array(await(await f.source.convertToBlob()).arrayBuffer()))),l.writeFile(be.joinPath(c[0].uri,`textureAtlasPage${u}_usage.png`),sh.wrap(new Uint8Array(await(await f.getUsagePreview()).arrayBuffer()))));await Promise.all(h)}});break;case"drawGlyph":i.invokeFunction(async r=>{const a=r.get(Me),l=r.get(yX),c=r.get(Zn),h=r.get(pd).getWorkspace().folders;if(h.length===0)return;const u=ls.atlas,f=a.getValue("editor.fontFamily"),g=a.getValue("editor.fontSize"),m=new gv(g,f,ft().devicePixelRatio,ls.decorationStyleCache);let _=await c.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!_)return;const b=_.match(/0x(?<codePoint>[0-9a-f]+)/i)?.groups?.codePoint;b!==void 0&&(_=String.fromCodePoint(parseInt(b,16)));const C=0,v=u.getGlyph(m,_,C,0,0);if(!v)return;const S=u.pages[v.pageIndex].source.getContext("2d")?.getImageData(v.x,v.y,v.w,v.h);if(!S)return;const L=new OffscreenCanvas(S.width,S.height);Vf(L.getContext("2d")).putImageData(S,0,0);const I=await L.convertToBlob({type:"image/png"}),D=be.joinPath(h[0].uri,`glyph_${_}_${C}_${g}px_${f.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await l.writeFile(D,sh.wrap(new Uint8Array(await I.arrayBuffer())))});break}}}ne(IEe);var Qa;(function(o){o.NoAutoFocus="noAutoFocus",o.FocusIfVisible="focusIfVisible",o.AutoFocusImmediately="autoFocusImmediately"})(Qa||(Qa={}));class DEe extends le{constructor(){super({id:xG,label:H(1102,"Show or Focus Hover"),metadata:{description:H(1103,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[Qa.NoAutoFocus,Qa.FocusIfVisible,Qa.AutoFocusImmediately],enumDescriptions:[p(1099,"The hover will not automatically take focus."),p(1100,"The hover will take focus only if it is already visible."),p(1101,"The hover will automatically take focus when it appears.")],default:Qa.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Yn.get(t);if(!n)return;const s=i?.focus;let r=Qa.FocusIfVisible;Object.values(Qa).includes(s)?r=s:typeof s=="boolean"&&s&&(r=Qa.AutoFocusImmediately);const a=c=>{const d=t.getPosition(),h=new k(d.lineNumber,d.column,d.lineNumber,d.column);n.showContentHover(h,1,2,c)},l=t.getOption(2)===2;n.isHoverVisible?r!==Qa.NoAutoFocus?n.focus():a(l):a(l||r===Qa.AutoFocusImmediately)}}class EEe extends le{constructor(){super({id:n0e,label:H(1104,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:H(1105,"Show the definition preview hover in the editor.")}})}run(e,t){const i=Yn.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new k(n.lineNumber,n.column,n.lineNumber,n.column),r=M0.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,2,!0)})}}class NEe extends le{constructor(){super({id:s0e,label:H(1106,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){Yn.get(t)?.hideContentHover()}}class TEe extends le{constructor(){super({id:o0e,label:H(1107,"Scroll Up Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:16,weight:100},metadata:{description:H(1108,"Scroll up the editor hover.")}})}run(e,t){const i=Yn.get(t);i&&i.scrollUp()}}class REe extends le{constructor(){super({id:r0e,label:H(1109,"Scroll Down Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:18,weight:100},metadata:{description:H(1110,"Scroll down the editor hover.")}})}run(e,t){const i=Yn.get(t);i&&i.scrollDown()}}class MEe extends le{constructor(){super({id:a0e,label:H(1111,"Scroll Left Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:15,weight:100},metadata:{description:H(1112,"Scroll left the editor hover.")}})}run(e,t){const i=Yn.get(t);i&&i.scrollLeft()}}class PEe extends le{constructor(){super({id:l0e,label:H(1113,"Scroll Right Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:17,weight:100},metadata:{description:H(1114,"Scroll right the editor hover.")}})}run(e,t){const i=Yn.get(t);i&&i.scrollRight()}}class AEe extends le{constructor(){super({id:c0e,label:H(1115,"Page Up Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:H(1116,"Page up the editor hover.")}})}run(e,t){const i=Yn.get(t);i&&i.pageUp()}}class OEe extends le{constructor(){super({id:d0e,label:H(1117,"Page Down Hover"),precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:12,secondary:[530],weight:100
Line truncated
|
||||
`);s===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":`
|
||||
`):this._isCopyingDown?t.addEditOperation(new k(i.startLineNumber,1,i.startLineNumber,1),s+`
|
||||
`):t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),`
|
||||
`+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,s=i.startColumn,r=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(r=r+this._endLineNumberDelta,a=1),i=ce.createWithDirection(n,s,r,a,this._selectionDirection)}return i}}var pNe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mNe=function(o,e){return function(t,i){e(t,i,o)}};let p7=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=()=>e.getLanguageId(),n=(h,u)=>e.getLanguageIdAtPosition(h,u),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));const{tabSize:a,indentSize:l,insertSpaces:c}=e.getOptions(),d=this.buildIndentConverter(a,l,c);if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){const h=r.startLineNumber,u=this._isMovingDown?h+1:h-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(h,1,h,1),e.getLineContent(u)),t.addEditOperation(new k(u,1,u,e.getLineMaxColumn(u)),null)),r=new ce(u,1,u,1)}else{let h,u;if(this._isMovingDown){h=r.endLineNumber+1,u=e.getLineContent(h),t.addEditOperation(new k(h-1,e.getLineMaxColumn(h-1),h,e.getLineMaxColumn(h)),null);let f=u;if(this.shouldAutoIndent(e,r)){const g=this.matchEnterRule(e,d,a,h,r.startLineNumber-1);if(g!==null){const _=It(e.getLineContent(h)),b=g+xo(_,a);f=O0(b,a,c)+this.trimStart(u)}else{const _={tokenization:{getLineTokens:C=>C===r.startLineNumber?e.tokenization.getLineTokens(h):e.tokenization.getLineTokens(C),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:C=>C===r.startLineNumber?e.getLineContent(h):e.getLineContent(C)},b=P1(this._autoIndent,_,e.getLanguageIdAtPosition(h,1),r.startLineNumber,d,this._languageConfigurationService);if(b!==null){const C=It(e.getLineContent(h)),w=xo(b,a),v=xo(C,a);w!==v&&(f=O0(w,a,c)+this.trimStart(u))}}t.addEditOperation(new k(r.startLineNumber,1,r.startLineNumber,1),f+`
|
||||
`);const m=this.matchEnterRuleMovingDown(e,d,a,r.startLineNumber,h,f);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,r,a,c,m);else{const _={tokenization:{getLineTokens:C=>C===r.startLineNumber?e.tokenization.getLineTokens(h):C>=r.startLineNumber+1&&C<=r.endLineNumber+1?e.tokenization.getLineTokens(C-1):e.tokenization.getLineTokens(C),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:C=>C===r.startLineNumber?f:C>=r.startLineNumber+1&&C<=r.endLineNumber+1?e.getLineContent(C-1):e.getLineContent(C)},b=P1(this._autoIndent,_,e.getLanguageIdAtPosition(h,1),r.startLineNumber+1,d,this._languageConfigurationService);if(b!==null){const C=It(e.getLineContent(r.startLineNumber)),w=xo(b,a),v=xo(C,a);if(w!==v){const S=w-v;this.getIndentEditsOfMovingBlock(e,t,r,a,c,S)}}}}else t.addEditOperation(new k(r.startLineNumber,1,r.startLineNumber,1),f+`
|
||||
`)}else if(h=r.startLineNumber-1,u=e.getLineContent(h),t.addEditOperation(new k(h,1,h+1,1),null),t.addEditOperation(new k(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),`
|
||||
`+u),this.shouldAutoIndent(e,r)){const f={tokenization:{getLineTokens:m=>m===h?e.tokenization.getLineTokens(r.startLineNumber):e.tokenization.getLineTokens(m),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:m=>m===h?e.getLineContent(r.startLineNumber):e.getLineContent(m)},g=this.matchEnterRule(e,d,a,r.startLineNumber,r.startLineNumber-2);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,r,a,c,g);else{const m=P1(this._autoIndent,f,e.getLanguageIdAtPosition(r.startLineNumber,1),h,d,this._languageConfigurationService);if(m!==null){const _=It(e.getLineContent(r.startLineNumber)),b=xo(m,a),C=xo(_,a);if(b!==C){const w=b-C;this.getIndentEditsOfMovingBlock(e,t,r,a,c,w)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,i){return{shiftIndent:n=>Lr.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>Lr.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let r=s.indentation;s.indentAction===Ai.None||s.indentAction===Ai.Indent?r=s.indentation+s.appendText:s.indentAction===Ai.IndentOutdent?r=s.indentation:s.indentAction===Ai.Outdent&&(r=t.unshiftIndent(s.indentation)+s.appendText);const a=e.getLineContent(n);if(this.trimStart(a).indexOf(this.trimStart(r))>=0){const l=It(e.getLineContent(n));let c=It(r);const d=mV(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));const h=xo(c,i),u=xo(l,i);return h-u}}return null}matchEnterRuleMovingDown(e,t,i,n,s,r){if(Kr(r)>=0){const a=e.getLineMaxColumn(s),l=Ym(this._autoIndent,e,new k(s,a,s,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){const d=e.getLineContent(a);if(Kr(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Ym(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,s,r){let a=s;for(;a>=1;){let d;if(a===s&&r!==void 0?d=r:d=e.getLineContent(a),Kr(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Ym(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,r){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),c=It(l),h=xo(c,n)+r,u=O0(h,n,s);u!==c&&(t.addEditOperation(new k(a,1,a,c.length+1),u),a===i.endLineNumber&&i.endColumn<=c.length+1&&u===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};p7=pNe([mNe(3,Jt)],p7);const hB=class hB{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=_Ne(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;const n=mQ(e,t,i);if(!n)return!1;for(let s=0,r=n.before.length;s<r;s++)if(n.before[s]!==n.after[s])return!0;return!1}};hB._COLLATOR=Sf.Collator();let F0=hB;function mQ(o,e,t){const i=e.startLineNumber;let n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;const s=[];for(let a=i;a<=n;a++)s.push(o.getLineContent(a));let r=s.slice(0);return r.sort(F0._COLLATOR.value.compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:r}}function _Ne(o,e,t){const i=mQ(o,e,t);return i?fi.replace(new k(i.startLineNumber,1,i.endLineNumber,o.getLineMaxColumn(i.endLineNumber)),i.after.join(`
|
||||
`)):null}class _Q extends le{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,a)=>({selection:r,index:a,ignore:!1}));i.sort((r,a)=>k.compareRangesUsingStarts(r.selection,a.selection));let n=i[0];for(let r=1;r<i.length;r++){const a=i[r];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const s=[];for(const r of i)s.push(new pQ(r.selection,this.down,r.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class bNe extends _Q{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:H(1239,"Copy Line Up"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:de.MenubarSelectionMenu,group:"2_line",title:p(1234,"&&Copy Line Up"),order:1}})}}class CNe extends _Q{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:H(1240,"Copy Line Down"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:de.MenubarSelectionMenu,group:"2_line",title:p(1235,"Co&&py Line Down"),order:2}})}}class vNe extends le{constructor(){super({id:"editor.action.duplicateSelection",label:H(1241,"Duplicate Selection"),precondition:T.writable,menuOpts:{menuId:de.MenubarSelectionMenu,group:"2_line",title:p(1236,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),r=t.getModel();for(const a of s)if(a.isEmpty())n.push(new pQ(a,!0));else{const l=new ce(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new goe(l,r.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class bQ extends le{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(Jt),n=[],s=t.getSelections()||[],r=t.getOption(16);for(const a of s)n.push(new p7(a,this.down,r,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class wNe extends bQ{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:H(1242,"Move Line Up"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:de.MenubarSelectionMenu,group:"2_line",title:p(1237,"Mo&&ve Line Up"),order:3}})}}class SNe extends bQ{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:H(1243,"Move Line Down"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:de.MenubarSelectionMenu,group:"2_line",title:p(1238,"Move &&Line Down"),order:4}})}}class CQ extends le{constructor(e,t){super(t),this.descending=e}run(e,t){if(!t.hasModel())return;const i=t.getModel();let n=t.getSelections();n.length===1&&n[0].isEmpty()&&(n=[new ce(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);for(const r of n)if(!F0.canRun(t.getModel(),r,this.descending))return;const s=[];for(let r=0,a=n.length;r<a;r++)s[r]=new F0(n[r],this.descending);t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class yNe extends CQ{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:H(1244,"Sort Lines Ascending"),precondition:T.writable})}}class LNe extends CQ{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:H(1245,"Sort Lines Descending"),precondition:T.writable})}}class xNe extends le{constructor(){super({id:"editor.action.removeDuplicateLines",label:H(1246,"Delete Duplicate Lines"),precondition:T.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const n=[],s=[];let r=0,a=!0,l=t.getSelections();l.length===1&&l[0].isEmpty()&&(l=[new ce(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],a=!1);for(const c of l){const d=new Set,h=[];for(let m=c.startLineNumber;m<=c.endLineNumber;m++){const _=i.getLineContent(m);d.has(_)||(h.push(_),d.add(_))}const u=new ce(c.startLineNumber,1,c.endLineNumber,i.getLineMaxColumn(c.endLineNumber)),f=c.startLineNumber-r,g=new ce(f,1,f+h.length-1,h[h.length-1].length);n.push(fi.replace(u,h.join(`
|
||||
`))),s.push(g),r+=c.endLineNumber-c.startLineNumber+1-h.length}t.pushUndoStop(),t.executeEdits(this.id,n,a?s:void 0),t.pushUndoStop()}}class kNe extends le{constructor(){super({id:"editor.action.reverseLines",label:H(1247,"Reverse lines"),precondition:T.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections();let s=n;s.length===1&&s[0].isEmpty()&&(s=[new ce(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);const r=[],a=[];for(let l=0;l<s.length;l++){const c=s[l],d=n[l];let h=c.endLineNumber;c.startLineNumber<c.endLineNumber&&c.endColumn===1&&h--;let u=new k(c.startLineNumber,1,h,i.getLineMaxColumn(h));h===i.getLineCount()&&i.getLineContent(u.endLineNumber)===""&&(u=u.setEndPosition(u.endLineNumber-1,i.getLineMaxColumn(u.endLineNumber-1)));const f=[];for(let b=u.endLineNumber;b>=u.startLineNumber;b--)f.push(i.getLineContent(b));const g=fi.replace(u,f.join(`
|
||||
`));r.push(g);const m=function(b){return b<=u.endLineNumber?u.endLineNumber-b+u.startLineNumber:b},_=function(b){if(b.isEmpty())return new ce(m(b.positionLineNumber),b.positionColumn,m(b.positionLineNumber),b.positionColumn);{const C=m(b.selectionStartLineNumber),w=m(b.positionLineNumber),v=b.selectionStartColumn,S=b.positionColumn;return new ce(C,v,w,S)}};a.push(_(d))}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}}const rT=class rT extends le{constructor(){super({id:rT.ID,label:H(1248,"Trim Trailing Whitespace"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:Ei(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(d=>new M(d.positionLineNumber,d.positionColumn)));const s=t.getSelection();if(s===null)return;const r=e.get(Me),a=t.getModel(),l=r.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:a?.getLanguageId(),resource:a?.uri}),c=new fNe(s,n,l);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop()}};rT.ID="editor.action.trimTrailingWhitespace";let m7=rT;class INe extends le{constructor(){super({id:"editor.action.deleteLines",label:H(1249,"Delete Line"),precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0;const r=[],a=[];for(let l=0,c=i.length;l<c;l++){const d=i[l];let h=d.startLineNumber,u=d.endLineNumber,f=1,g=n.getLineMaxColumn(u);u<n.getLineCount()?(u+=1,g=1):h>1&&(h-=1,f=n.getLineMaxColumn(h)),r.push(fi.replace(new ce(h,f,u,g),"")),a.push(new ce(h-s,d.positionColumn,h-s,d.positionColumn)),s+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let r=s.endLineNumber;return s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(r-=1),{startLineNumber:s.startLineNumber,selectionStartColumn:s.selectionStartColumn,endLineNumber:r,positionColumn:s.positionColumn}});t.sort((s,r)=>s.startLineNumber===r.startLineNumber?s.endLineNumber-r.endLineNumber:s.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let s=1;s<t.length;s++)n.endLineNumber+1>=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class DNe extends le{constructor(){super({id:"editor.action.indentLines",label:H(1250,"Indent Line"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,gh.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class ENe extends le{constructor(){super({id:"editor.action.outdentLines",label:H(1251,"Outdent Line"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2140,weight:100}})}run(e,t){Jm.Outdent.runEditorCommand(e,t,null)}}class NNe extends le{constructor(){super({id:"editor.action.insertLineBefore",label:H(1252,"Insert Line Above"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,lL.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class TNe extends le{constructor(){super({id:"editor.action.insertLineAfter",label:H(1253,"Insert Line Below"),precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,lL.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class vQ extends le{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let l=0,c=n.length-1;l<c;l++){const d=n[l],h=n[l+1];k.intersectRanges(d,h)===null?s.push(d):n[l+1]=k.plusRange(d,h)}s.push(n[n.length-1]);const r=this._getEndCursorState(i,s),a=s.map(l=>fi.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,r),t.pushUndoStop()}}class RNe extends vQ{constructor(){super({id:"deleteAllLeft",label:H(1254,"Delete All Left"),precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(r=>{let a;if(r.endColumn===1&&s>0){const l=r.startLineNumber-s;a=new ce(l,r.startColumn,l,r.startColumn)}else a=new ce(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);s+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(k.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){const r=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineLength(r)+1;return new k(r,a,s.startLineNumber,1)}else return new k(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new k(s.startLineNumber
Line truncated
|
||||
`);return new V0(e,t,n,c,s,r,d)}constructor(e,t,i,n,s,r,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=r,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new qD(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new qD(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new ce(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new qD(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new qD(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new ce(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824)}}const lT=class lT extends A{static get(e){return e.getContribution(lT.ID)}constructor(e){super(),this._sessionDispose=this._register(new U),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=V0.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new ce(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!xQ(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(r,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.len
Line truncated
|
||||
`):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
||||
`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(`
|
||||
`)};const r=await s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p(1365,"No result.")),n);return r}}async function OTe(o,e,t,i){const n=new E7(e,t,o),s=await n.resolveRenameLocation(He.None);return s?.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,He.None)}let hu=(fm=class{static get(e){return e.getContribution(D7.ID)}constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new U,this._cts=new Xt,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(k7,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new Xt,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),i=new E7(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider()){e("skeleton has no provider");return}const n=new ud(this.editor,5,void 0,this._cts.token);let s;try{e("resolving rename location");const g=i.resolveRenameLocation(n.token);this._progressService.showWhile(g,250),s=await g,e("resolved rename location")}catch(g){g instanceof cr?e("resolve rename location cancelled",JSON.stringify(g,null," ")):(e("resolve rename location failed",g instanceof Error?g:JSON.stringify(g,null," ")),(typeof g=="string"||Rl(g))&&So.get(this.editor)?.showMessage(g||p(1366,"An unknown error occurred while resolving rename location"),t));return}finally{n.dispose()}if(!s){e("returning early - no loc");return}if(s.rejectReason){e(`returning early - rejected with reason: ${s.rejectReason}`,s.rejectReason),So.get(this.editor)?.showMessage(s.rejectReason,t);return}if(n.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const r=new ud(this.editor,5,s.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async g=>[g,await g.supportsAutomaticNewSymbolNamesTriggerKind??!1])),d=(g,m)=>{let _=c.slice();return g===lv.Automatic&&(_=_.filter(([b,C])=>C)),_.map(([b])=>b.provideNewSymbolNames(a,s.range,g,m))};e("creating rename input field and awaiting its result");const h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),u=await this._renameWidget.getInput(s.range,s.text,h,l.length>0?d:void 0,r);if(e("received response from rename input field"),typeof u=="boolean"){e(`returning early - rename input field response - ${u}`),u&&this.editor.focus(),r.dispose();return}this.editor.focus(),e("requesting rename edits");const f=Em(i.provideRenameEdits(u.newName,r.token),r.token).then(async g=>{if(!g){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(g.rejectReason){e(`returning early - rejected with reason: ${g.rejectReason}`),this._notificationService.info(g.rejectReason);return}this.editor.setSelection(k.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(g,{editor:this.editor,showPreview:u.wantsPreview,label:p(1367,"Renaming '{0}' to '{1}'",s?.text,u.newName),code:"undoredo.rename",quotableLabel:p(1368,"Renaming {0} to {1}",s?.text,u.newName),respectAutoSaveConfig:!0,reason:jn.rename()}).then(m=>{e("edits applied"),m.ariaSummary&&ps(p(1369,"Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,u.newName,m.ariaSummary))}).catch(m=>{e(`error when applying edits ${JSON.stringify(m,null," ")}`),this._notificationService.error(p(1370,"Rename failed to apply edits")),this._logService.error(m)})},g=>{e("error when providing rename edits",JSON.stringify(g,null," ")),this._notificationService.error(p(1371,"Rename failed to compute edits")),this._logService.error(g)}).finally(()=>{r.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}},D7=fm,fm.ID="editor.contrib.renameController",fm);hu=D7=ATe([ip(1,ge),ip(2,hi),ip(3,yw),ip(4,sd),ip(5,Rt),ip(6,ZD),ip(7,he)],hu);class FTe extends le{constructor(){super({id:"editor.action.rename",label:H(1373,"Rename Symbol"),precondition:K.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modif
Line truncated
|
||||
`||o===" "}var gRe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jQ=function(o,e){return function(t,i){e(t,i,o)}};let j7=class extends A{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=Z(e,Q("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??Zs("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const r=this._register(new gt(this.el,"click")),a=this._register(new gt(this.el,"keypress")),l=ie.chain(a.event,h=>h.map(u=>new St(u)).filter(u=>u.keyCode===3)),c=this._register(new gt(this.el,Pt.Tap)).event;this._register($n.addTarget(this.el));const d=ie.any(r.event,l,c);this._register(d(h=>{this.enabled&&(st.stop(h,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};j7=gRe([jQ(3,Qs),jQ(4,Js)],j7);var qQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KQ=function(o,e){return function(t,i){e(t,i,o)}};const pRe=26;let q7=class extends A{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(K7))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,pRe)}};q7=qQ([KQ(1,ge)],q7);let K7=class extends A{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(fd,{}),this.element=Q("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=Q("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){pn(this.element)}show(e){pn(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=Z(this.element,Q("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(Q(`div${ve.asCSSSelector(e.icon)}`));const n=Z(this.element,Q("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Z(this.element,Q("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(j7,this.messageActionsContainer,{...r,tabIndex:-1},{}));const s=Z(this.element,Q("div.action-container"));this.actionBar=this._register(new Ys(s)),this.actionBar.push(this._register(new Mo("banner.close",p(1518,"Close Banner"),ve.asClassName(kq),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};K7=qQ([KQ(0,ge)],K7);const GQ=We("workspaceTrustManagementService");var G7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gb=function(o,e){return function(t,i){e(t,i,o)}};const mRe=Wt("extensions-warning-message",Y.warning,p(1519,"Icon shown with a warning message in the extensions editor."));let K0=(WC=class extends A{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:p(1520,"This document contains many non-basic ASCII unicode characters"),command:new Z0};else if(s.ambiguousCharacterCount>=r)a={message:p(1521,"This document contains many ambiguous unicod
Line truncated
|
||||
`)}const sMe={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[xi]:"#FFFFFE",[bl]:"#000000",[zV]:"#E5EBF1",[tv]:"#D3D3D3",[iv]:"#939393",[iM]:"#ADD6FF4D"}},oMe={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[xi]:"#1E1E1E",[bl]:"#D4D4D4",[zV]:"#3A3D41",[tv]:"#404040",[iv]:"#707070",[iM]:"#ADD6FF26"}},rMe={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"m
Line truncated
|
||||
`)}}}class TJ{getIcon(e){const t=Sq();let i=e.defaults;for(;ve.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Pd="vs",Qb="vs-dark",ap="hc-black",lp="hc-light",RJ=ei.as(MV.ColorContribution),cMe=ei.as(Nz.ThemingContribution);class MJ{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(CE(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,$.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=M9(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,$.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=RJ.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Pd:return Er.LIGHT;case ap:return Er.HIGH_CONTRAST_DARK;case lp:return Er.HIGH_CONTRAST_LIGHT;default:return Er.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=M9(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=NJ.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=zn.getForeground(s),a=zn.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}get tokenColorMap(){return[]}}function CE(o){return o===Pd||o===Qb||o===ap||o===lp}function M9(o){switch(o){case Pd:return sMe;case Qb:return oMe;case ap:return rMe;case lp:return aMe}}function vE(o){const e=M9(o);return new MJ(o,e)}class dMe extends A{constructor(){super(),this._onColorThemeChange=this._register(new P),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new P),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new TJ,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Pd,vE(Pd)),this._knownThemes.set(Qb,vE(Qb)),this._knownThemes.set(ap,vE(ap)),this._knownThemes.set(lp,vE(lp));const e=this._register(lMe(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
||||
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Pd),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),EB(bt,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return ky(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Ir(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),A.None}_registerShadowDomContainer(e){const t=Ir(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!CE(t.base)&&!CE(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new MJ(e,t)),CE(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Pd),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=bt.matchMedia("(forced-colors: active)").matches;if(e!==Ta(this._theme.type)){let t;Rf(this._theme.type)?t=e?ap:Qb:t=e?lp:Pd,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};cMe.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of RJ.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${eM(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(`
|
||||
`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(nMe(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join(`
|
||||
`),this._updateCSS(),di.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
||||
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}class hMe extends le{constructor(){super({id:"editor.action.toggleHighContrast",label:f9.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(ir),n=i.getColorTheme();Ta(n.type)?(i.setTheme(this._originalThemeName||(Rf(n.type)?Qb:Pd)),this._originalThemeName=null):(i.setTheme(Rf(n.type)?ap:lp),this._originalThemeName=n.themeName)}}ne(hMe);var P9;(function(o){o[o.Unknown=0]="Unknown",o[o.Disabled=1]="Disabled",o[o.Enabled=2]="Enabled"})(P9||(P9={}));var A9;(function(o){o[o.Invoke=1]="Invoke",o[o.Auto=2]="Auto"})(A9||(A9={}));var O9;(function(o){o[o.None=0]="None",o[o.KeepWhitespace=1]="KeepWhitespace",o[o.InsertAsSnippet=4]="InsertAsSnippet"})(O9||(O9={}));var F9;(function(o){o[o.Method=0]="Method",o[o.Function=1]="Function",o[o.Constructor=2]="Constructor",o[o.Field=3]="Field",o[o.Variable=4]="Variable",o[o.Class=5]="Class",o[o.Struct=6]="Struct",o[o.Interface=7]="Interface",o[o.Module=8]="Module",o[o.Property=9]="Property",o[o.Event=10]="Event",o[o.Operator=11]="Operator",o[o.Unit=12]="Unit",o[o.Value=13]="Value",o[o.Constant=14]="Constant",o[o.Enum=15]="Enum",o[o.EnumMember=16]="EnumMember",o[o.Keyword=17]="Keyword",o[o.Text=18]="Text",o[o.Color=19]="Color",o[o.File=20]="File",o[o.Reference=21]="Reference",o[o.Customcolor=22]="Customcolor",o[o.Folder=23]="Folder",o[o.TypeParameter=24]="TypeParameter",o[o.User=25]="User",o[o.Issue=26]="Issue",o[o.Tool=27]="Tool",o[o.Snippet=28]="Snippet"})(F9||(F9={}));var W9;(function(o){o[o.Deprecated=1]="Deprecated"})(W9||(W9={}));var B9;(function(o){o[o.Invoke=0]="Invoke",o[o.TriggerCharacter=1]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(B9||(B9={}));var H9;(function(o){o[o.EXACT=0]="EXACT",o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW"})(H9||(H9={}));var V9;(function(o){o[o.NotSet=0]="NotSet",o[o.ContentFlush=1]="ContentFlush",o[o.RecoverFromMarkers=2]="RecoverFromMarkers",o[o.Explicit=3]="Explicit",o[o.Paste=4]="Paste",o[o.Undo=5]="Undo",o[o.Redo=6]="Redo"})(V9||(V9={}));var z9;(function(o){o[o.LF=1]="LF",o[o.CRLF=2]="CRLF"})(z9||(z9={}));var U9;(function(o){o[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write"})(U9||(U9={}));var $9;(function(o){o[o.None=0]="None",o[o.Keep=1]="Keep",o[o.Brackets=2]="Brackets",o[o.Advanced=3]="Advanced",o[o.Full=4]="Full"})($9||($9={}));var j9;(function(o){o[o.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",o[o.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",o[o.accessibilitySupport=2]="accessibilitySupport",o[o.accessibilityPageSize=3]="accessibilityPageSize",o[o.allowOverflow=4]="allowOverflow",o[o.allowVariableLineHeights=5]="allowVariableLineHeights",o[o.allowVariableFonts=6]="allowVariableFonts",o[o.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",o[o.ariaLabel=8]="ariaLabel",o[o.ariaRequired=9]="ariaRequired",o[o.autoClosingBrackets=10]="autoClosingBrackets",o[o.autoClosingComments=11]="autoClosingComments",o[o.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",o[o.autoClosingDelete=13]="autoClosingDelete",o[o.autoClosingOvertype=14]="autoClosingOvertype",o[o.autoClosingQuotes=15]="autoClosingQuotes",o[o.autoIndent=16]="autoIndent",o[o.autoIndentOnPaste=17]="autoIndentOnPaste",o[o.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",o[o.automaticLayout=19]="automaticLayout",o[o.autoSurround=20]="autoSurround",o[o.bracketPairColorization=21]="bracketPairColorization",o[o.guides=22]="guides",o[o.codeLens=23]="codeLens",o[o.codeLensFontFamily=24]="codeLensFontFamily",o[o.codeLensFontSize=25]="codeLensFontSize",o[o.colorDecorators=26]="colorDecorators",o[o.colorDecoratorsLimit=27]="colorDecoratorsLimit",o[o.columnSelection=28]="columnSelection",o[o.comments=29]="comments",o[o.contextmenu=30]="contextmenu",o[o.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",o[o.cursorBlinking=32]="cursorBlinking",o[o.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",o[o.cursorStyle=34]="cursorStyle",o[o.cursorSurroundingLines=35]="cursorSurroundingLines",o[o.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",o[o.cursorWidth=37]="cursorWidth",o[o.cursorHeight=38]="cursorHeight",o[o.disableLayerHinting=39]="disableLayerHinting",o[o.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",o[o.domReadOnly=41]="domReadOnly",o[o.dragAndDrop=42]="dragAndDrop",o[o.dropIntoEditor=43]="dropIntoEditor",o[o.editContext=44]="editContext",o[o.emptySelectionClipboard=45]="emptySelectionClipboard",o[o.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",o[o.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",o[o.extraEditorClassName=48]="extraEditorClassN
Line truncated
|
||||
`);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){const h=c.substring(0,d.index),u=(h.match(/\n/g)||[]).length,f=r+u,g=d[0].split(`
|
||||
`),m=g.length,_=f+m-1,b=h.lastIndexOf(`
|
||||
`)+1,C=d.index-b+1,w=g[g.length-1],v=m===1?C+d[0].length:w.length+1,S={startLineNumber:f,startColumn:C,endLineNumber:_,endColumn:v},L=(d.groups??{}).label??"",x=((d.groups??{}).separator??"")!=="",I={range:S,text:L,hasSeparatorLine:x,shouldBeInComments:!0};(I.text||I.hasSeparatorLine)&&(t.length===0||t[t.length-1].range.endLineNumber<I.range.startLineNumber)&&t.push(I),s.lastIndex=d.index+d[0].length}}return t}function BMe(o){o=o.trim();const e=o.startsWith("-");return o=o.replace(PMe,""),{text:o,hasSeparatorLine:e}}class HMe{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new M(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new sme(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;const i=ro(t);if(i.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);const n=new Uint32Array(i.length-1);for(let s=1;s<i.length;s++)this._lines.splice(e.lineNumber+s-1,0,i[s]),n[s-1]=i[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}const $J=60*1e3;class VMe extends A{constructor(e,t,i=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const n=new uR;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round($J/2)),this._register(n)}}dispose(){for(const e in this._syncedModels)pt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const i of e){const n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>$J&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new U;s.add(i.onDidChangeContent(r=>{this._proxy.$acceptModelChanged(n.toString(),r)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(ue(()=>{this._proxy.$acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],pt(t)}}class zMe{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new UMe(be.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class UMe extends HMe{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;i<this._lines.length;i++){const n=this._lines[i],s=this.offsetAt(new M(i+1,1)),r=n.matchAll(e);for(const a of r)(a.index||a.index===0)&&(a.index=a.index+s),t.push(a)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const i=T1(e.column,y2(t)
Line truncated
|
||||
`:e,l=a.length;let c=i.embeddedLanguageData,d=i.stack,h=0,u=null,f=!0;for(;f||h<l;){const g=h,m=d.depth,_=u?u.groups.length:0,b=d.state;let C=null,w=null,v=null,S=null,L=null;if(u){C=u.matches;const D=u.groups.shift();w=D.matched,v=D.action,S=u.rule,u.groups.length===0&&(u=null)}else{if(!f&&h>=l)break;f=!1;let D=this._lexer.tokenizer[b];if(!D&&(D=yE(this._lexer,b),!D))throw Gt(this._lexer,"tokenizer state is not defined: "+b);const R=a.substr(h);for(const F of D)if((h===0||!F.matchOnlyAtLineStart)&&(C=R.match(F.resolveRegex(b)),C)){w=C[0],v=F.action;break}}if(C||(C=[""],w=""),v||(h<l&&(C=[a.charAt(h)],w=C[0]),v=this._lexer.defaultToken),w===null)break;for(h+=w.length;ZMe(v)&&KJ(v)&&v.test;)v=v.test(w,C,b,h===l);let x=null;if(typeof v=="string"||Array.isArray(v))x=v;else if(v.group)x=v.group;else if(v.token!==null&&v.token!==void 0){if(v.tokenSubst?x=_u(this._lexer,v.token,w,C,b):x=v.token,v.nextEmbedded)if(v.nextEmbedded==="@pop"){if(!c)throw Gt(this._lexer,"cannot pop embedded language if not inside one");c=null}else{if(c)throw Gt(this._lexer,"cannot enter embedded language from within an embedded language");L=_u(this._lexer,v.nextEmbedded,w,C,b)}if(v.goBack&&(h=Math.max(0,h-v.goBack)),v.switchTo&&typeof v.switchTo=="string"){let D=_u(this._lexer,v.switchTo,w,C,b);if(D[0]==="@"&&(D=D.substr(1)),yE(this._lexer,D))d=d.switchTo(D);else throw Gt(this._lexer,"trying to switch to a state '"+D+"' that is undefined in rule: "+this._safeRuleName(S))}else{if(v.transform&&typeof v.transform=="function")throw Gt(this._lexer,"action.transform not supported");if(v.next)if(v.next==="@push"){if(d.depth>=this._lexer.maxStack)throw Gt(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(b)}else if(v.next==="@pop"){if(d.depth<=1)throw Gt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(S));d=d.pop()}else if(v.next==="@popall")d=d.popall();else{let D=_u(this._lexer,v.next,w,C,b);if(D[0]==="@"&&(D=D.substr(1)),yE(this._lexer,D))d=d.push(D);else throw Gt(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(S))}}v.log&&typeof v.log=="string"&&YMe(this._lexer,this._lexer.languageId+": "+_u(this._lexer,v.log,w,C,b))}if(x===null)throw Gt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(S));const I=D=>{const R=this._languageService.getLanguageIdByLanguageName(D)||this._languageService.getLanguageIdByMimeType(D)||D,F=this._getNestedEmbeddedLanguageData(R);if(h<l){const O=e.substr(h);return this._nestedTokenize(O,t,bu.create(d,F),n+h,s)}else return bu.create(d,F)};if(Array.isArray(x)){if(u&&u.groups.length>0)throw Gt(this._lexer,"groups cannot be nested: "+this._safeRuleName(S));if(C.length!==x.length+1)throw Gt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(S));let D=0;for(let R=1;R<C.length;R++)D+=C[R].length;if(D!==w.length)throw Gt(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(S));u={rule:S,matches:C,groups:[]};for(let R=0;R<x.length;R++)u.groups[R]={action:x[R],matched:C[R+1]};h-=w.length;continue}else{if(x==="@rematch"&&(h-=w.length,w="",C=null,x="",L!==null))return I(L);if(w.length===0){if(l===0||m!==d.depth||b!==d.state||(u?u.groups.length:0)!==_)continue;throw Gt(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(S))}let D=null;if(qJ(x)&&x.indexOf("@brackets")===0){const R=x.substr(9),F=iPe(this._lexer,w);if(!F)throw Gt(this._lexer,"@brackets token returned but no bracket defined as: "+w);D=GJ(F.token+R)}else{const R=x===""?"":x+this._lexer.tokenPostfix;D=GJ(R)}g<r&&s.emit(g+n,D)}if(L!==null)return I(L)}return bu.create(d,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new tC(e,A_);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),di.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=di.get(e);return t?new tC(e,t.getInitialState()):new tC(e,A_)}};lS=W8=JMe([ePe(4,Me)],lS);function iPe(o,e){if(!e)return null;e=Ad(o,e);const t=o.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}const nPe=Sl("standaloneColorizer",{createHTML:o=>o});class B8{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(s);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const c=d=>{const h=nPe?.createHTML(d)??d;i.innerHTML=h};return this.colorize(t,l||"",a,n).then(c,d=>console.error(d))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let r=4;n&&typeof n.tabSize=="number"&&(r=n.tabSize),yR(t)&&(t=t.substr(1));const a=ro(t);if(!e.isRegisteredLanguageId(i))return YJ(a,r,s);const l=await di.getOrCrea
Line truncated
|
||||
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class dPe{constructor(e,t,i,n,s,r,a){this.id=++tee,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new nee),this.removedResources.has(t)||this.removedResources.set(t,new iee(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new nee),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new iee(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class see{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(`
|
||||
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new S$(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a<l;a++,n++){const c=this._past[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class z8{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const oee=new see("","");oee.locked=!0;let U8=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(`
|
||||
`))}pushElement(e,t=YP.None,i=Xf.None){if(e.type===0){const n=IE(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new DE(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],r=[];for(const a of e.resources){const l=IE(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),s.push(l),r.push(c))}s.length===1?this._pushElement(new DE(e,s[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new dPe(e,s,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],s=e.strResources[t];let r;this._editStacks.has(s)?r=this._editStacks.get(s):(r=new see(n,s),this._editStacks.set(s,r)),r.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=IE(s.resource),a=this.getUriComparisonKey(s.resource),l=new DE(s,r,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=IE(s.resource),a=this.getUriComparisonKey(s.resource),l=new DE(s,r,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new S$(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();r&&r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Xf){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Ee(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return A.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?A.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(A.None);const i=e.actual.prepareUndoRedo();return i?Xu(i)?t(i):i.then(n=>t(n)):t(A.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||oee);return new z8(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new EE(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new EE}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p(2014,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p(2015,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p(2016,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,p(2017,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,p
Line truncated
|
||||
:host {
|
||||
all: initial; /* 1st rule so subsequent properties are reset. */
|
||||
}
|
||||
|
||||
.codicon[class*='codicon-'] {
|
||||
font: normal normal normal 16px/1 codicon;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
text-rendering: auto;
|
||||
text-align: center;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
:host {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
||||
}
|
||||
|
||||
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
||||
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
|
||||
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
|
||||
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
|
||||
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif; }
|
||||
|
||||
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
|
||||
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
|
||||
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
|
||||
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
|
||||
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
|
||||
|
||||
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
|
||||
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
|
||||
`;var _Pe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bPe=function(o,e){return function(t,i){e(t,i,o)}};let NE=class extends A{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new K8(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(me(t))?n=1:i?n=3:n=2:n=1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s={close:()=>{this.openContextView===s&&this.hideContextView()}};return this.openContextView=s,s}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};NE=_Pe([bPe(0,Hl)],NE);class CPe extends NE{getContextViewElement(){return this.contextView.getViewElement()}}function cee(o){const e=o;return typeof e=="object"&&"markdown"in e&&"markdownNotSupportedFallback"in e}class vPe{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(ji(e)||ai(e)||e===void 0)n=e;else{this._cancellationTokenSource=new Xt;const s=this._cancellationTokenSource.token;let r;if(cee(e)?Ku(e.markdown)?r=e.markdown(s).then(a=>a??e.markdownNotSupportedFallback):r=e.markdown??e.markdownNotSupportedFallback:r=e.element(s),r instanceof Promise?(this._hoverWidget||this.show(p(75,"Loading..."),t,i),n=await r):n=r,this.isDisposed||s.isCancellationRequested)return}this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return e?Rl(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var wPe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nC=function(o,e){return function(t,i){e(t,i,o)}};let G8=class extends A{constructor(e,t,i,n,s,r){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=n,this._layoutService=s,this._accessibilityService=r,this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(i.onDidShowContextMenu(()=>this.hideHover())),this._contextViewHandler=this._register(new NE(this._layoutService)),this._register(rn.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:199,when:T.editorTextFocus.negate(),primary:Ei(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,i,n){const s=this._createHover(e,i);if(s)return this._showHover(s,e,t),s}showDelayedHover(e,t){if(e.id===void 0&&(e.id=dee(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked)return;if(vu(this._currentHoverOptions)===vu(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===t?.groupId)return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&vu(this._currentHoverOptions)===vu(e))return this._currentDelayedHover;const i=this._createHover(e,void 0);if(!i){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}return this._currentDelayedHover=i,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t?.groupId,al(this._configurationService.getValue("workbench.hover.delay")).then(()=>{i&&!i.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(i,e))}),i}setupDelayedHover(e,t,i){const n=()=>({...typeof t=="function"?t():t,target:e});return this._setupDelayedHover(e,n,i)}setupDelayedHoverAtMouse(e,t,i){const n=s=>({...typeof t=="function"?t():t,target:{targetElements:[e],x:s!==void 0?s.x+10:void 0}});return this._setupDelayedHover(e,n,i)}_setupDelayedHover(e,t,i){const n=new U;return n.add(W(e,te.MOUSE_OVER,s=>{this.showDe
Line truncated
|
||||
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const r of e.keys)this.affectedKeys.add(r);for(const[,r]of e.overrides)for(const a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=RE.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){const a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!fo(a,l)}return!0}}const ME={kind:0},IPe={kind:1};function DPe(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}class hS{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=hS.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n<s;n++){const r=this._keybindings[n];if(r.chords.length===0)continue;const a=r.when?.substituteConstants();a&&a.type===0||this._addKeyPress(r.chords[0],r)}}static _isTargetedForRemoval(e,t,i){if(t){for(let n=0;n<t.length;n++)if(t[n]!==e.chords[n])return!1}return!(i&&i.type!==1&&(!e.when||!Rse(i,e.when)))}static handleRemovals(e){const t=new Map;for(let n=0,s=e.length;n<s;n++){const r=e[n];if(r.command&&r.command.charAt(0)==="-"){const a=r.command.substring(1);t.has(a)?t.get(a).push(r):t.set(a,[r])}}if(t.size===0)return e;const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];if(!r.command||r.command.length===0){i.push(r);continue}if(r.command.charAt(0)==="-")continue;const a=t.get(r.command);if(!a||!r.isDefault){i.push(r);continue}let l=!1;for(const c of a){const d=c.when;if(this._isTargetedForRemoval(r,c.chords,d)){l=!0;break}}if(!l){i.push(r);continue}}return i}_addKeyPress(e,t){const i=this._map.get(e);if(typeof i>"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a<s.chords.length&&a<t.chords.length;a++)if(s.chords[a]!==t.chords[a]){r=!1;break}r&&hS.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t>"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i<n;i++)if(t[i]===e){t.splice(i,1);return}}}static whenIsEntirelyIncluded(e,t){return!t||t.type===1?!0:!e||e.type===1?!1:h2(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t,i=!1){const n=this._lookupMap.get(e);if(typeof n>"u"||n.length===0)return null;if(n.length===1&&!i)return n[0];for(let s=n.length-1;s>=0;s--){const r=n[s];if(t.contextMatchesRules(r.when))return r}return i?null:n[n.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),ME;let r=null;if(n.length<2)r=s;else{r=[];for(let l=0,c=s.length;l<c;l++){const d=s[l];if(n.length>d.chords.length)continue;let h=!0;for(let u=1;u<n.length;u++)if(d.chords[u]!==n[u]){h=!1;break}h&&r.push(d)}}const a=this._findCommand(e,r);return a?n.length<a.chords.length?(this._log(`\\ From ${r.length} keybinding entries, awaiting ${a.chords.length-n.length} more chord(s), when: ${fee(a.when)}, source: ${gee(a)}.`),IPe):(this._log(`\\ From ${r.length} keybinding entries, matched ${a.command}, when: ${fee(a.when)}, source: ${gee(a)}.`),DPe(a.command,a.commandArgs,a.bubble)):(this._log(`\\ From ${r.length} keybinding entries, no when clauses matched the context.`),ME)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(hS._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function fee(o){return o?`${o.serialize()}`:"no when condition"}function gee(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}const EPe=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class NPe extends A{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ie.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryServi
Line truncated
|
||||
.monaco-menu {
|
||||
font-size: 13px;
|
||||
border-radius: 5px;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
${yee(Y.menuSelection)}
|
||||
${yee(Y.menuSubmenu)}
|
||||
|
||||
.monaco-menu .monaco-action-bar {
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .actions-container {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.reverse .actions-container {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
transition: transform 50ms ease;
|
||||
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item .icon,
|
||||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-label {
|
||||
font-size: 11px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
|
||||
color: var(--vscode-disabledForeground);
|
||||
}
|
||||
|
||||
/* Vertical actions */
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
display: block;
|
||||
border-bottom: 1px solid var(--vscode-menu-separatorBackground);
|
||||
padding-top: 1px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* Action Items */
|
||||
.monaco-menu .monaco-action-bar .action-item.select-container {
|
||||
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
|
||||
flex: 1;
|
||||
max-width: 170px;
|
||||
min-width: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
margin-left: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
padding: 0;
|
||||
transform: none;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.active {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
height: 2em;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin: 0 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
|
||||
opacity: unset;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label {
|
||||
flex: 1 1 auto;
|
||||
text-decoration: none;
|
||||
padding: 0 1em;
|
||||
background: none;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
display: inline-block;
|
||||
flex: 2 1 auto;
|
||||
padding: 0 1em;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
||||
font-size: 16px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
|
||||
margin-left: auto;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
position: static;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
width: 100%;
|
||||
height: 0px !important;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
|
||||
padding: 0.7em 1em 0.1em 1em;
|
||||
font-weight: bold;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
width: 1em;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
|
||||
visibility: visible;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Context Menu */
|
||||
|
||||
.context-view.monaco-menu-container {
|
||||
outline: 0;
|
||||
border: none;
|
||||
animation: fadeIn 0.083s linear;
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.context-view.monaco-menu-container :focus,
|
||||
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
|
||||
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.hc-black .context-view.monaco-menu-container,
|
||||
.hc-light .context-view.monaco-menu-container,
|
||||
:host-context(.hc-black) .context-view.monaco-menu-container,
|
||||
:host-context(.hc-light) .context-view.monaco-menu-container {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Vertical Action Bar Styles */
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
|
||||
.monaco-menu .monaco-action-bar.vertical .keybinding {
|
||||
font-size: inherit;
|
||||
padding: 0 2em;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||||
font-size: inherit;
|
||||
width: 2em;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
font-size: inherit;
|
||||
margin: 5px 0 !important;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
|
||||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
font-size: 60%;
|
||||
padding: 0 1.8em;
|
||||
}
|
||||
|
||||
.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,
|
||||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
height: 100%;
|
||||
mask-size: 10px 10px;
|
||||
-webkit-mask-size: 10px 10px;
|
||||
}
|
||||
|
||||
.monaco-menu .action-item {
|
||||
cursor: default;
|
||||
}`;if(e){t+=`
|
||||
/* Arrows */
|
||||
.monaco-scrollable-element > .scrollbar > .scra {
|
||||
cursor: pointer;
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .visible {
|
||||
opacity: 1;
|
||||
|
||||
/* Background rule added for IE9 - to allow clicks on dom node */
|
||||
background:rgba(0,0,0,0);
|
||||
|
||||
transition: opacity 100ms linear;
|
||||
}
|
||||
.monaco-scrollable-element > .invisible {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.monaco-scrollable-element > .invisible.fade {
|
||||
transition: opacity 800ms linear;
|
||||
}
|
||||
|
||||
/* Scrollable Content Inset Shadow */
|
||||
.monaco-scrollable-element > .shadow {
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.top {
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 3px;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.left {
|
||||
display: block;
|
||||
top: 3px;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 3px;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.top-left-corner {
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 3px;
|
||||
width: 3px;
|
||||
}
|
||||
/* Fix for https://github.com/microsoft/vscode/issues/103170 */
|
||||
.monaco-menu .action-item .monaco-submenu {
|
||||
z-index: 1;
|
||||
}
|
||||
`;const i=o.scrollbarShadow;i&&(t+=`
|
||||
.monaco-scrollable-element > .shadow.top {
|
||||
box-shadow: ${i} 0 6px 6px -6px inset;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .shadow.left {
|
||||
box-shadow: ${i} 6px 0 6px -6px inset;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .shadow.top.left {
|
||||
box-shadow: ${i} 6px 6px 6px -6px inset;
|
||||
}
|
||||
`);const n=o.scrollbarSliderBackground;n&&(t+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider {
|
||||
background: ${n};
|
||||
}
|
||||
`);const s=o.scrollbarSliderHoverBackground;s&&(t+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
||||
background: ${s};
|
||||
}
|
||||
`);const r=o.scrollbarSliderActiveBackground;r&&(t+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider.active {
|
||||
background: ${r};
|
||||
}
|
||||
`)}return t}class VPe{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=Ui();let i;const n=ai(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,layer:e.layer,render:s=>{this.lastContainer=s;const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(Q(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=W(this.block,te.MOUSE_DOWN,d=>d.stopPropagation()));const a=new U,l=e.actionRunner||a.add(new hf);l.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),i=new rC(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},z1e),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);const c=me(s);return a.add(W(c,te.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(W(c,te.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;const h=new yn(c,d);let u=h.target;if(!h.rightButton){for(;u;){if(u===s)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),jr(a,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide?.(!!s),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(Ui()===this.lastContainer||Zi(Ui(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Do(e.error)&&this.notificationService.error(e.error)}}var zPe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aC=function(o,e){return function(t,i){e(t,i,o)}};let iW=class extends A{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new VPe(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new P),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new P),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=nW.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),Pc.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};iW=zPe([aC(0,Vn),aC(1,hi),aC(2,hd),aC(3,ot),aC(4,Cr),aC(5,xe)],iW);var nW;(function(o){function e(i){return i&&i.menuId instanceof de}function t(i,n,s){if(!e(i))return i;const{menuId:r,menuActionOptions:a,contextKeyService:l}=i;return{...i,getActions:()=>{let c=[];if(r){const d=n.getMenuActions(r,l??s,a);c=q1e(d)}return i.getActions?Xi.join(i.getActions(),c):c}}}o.transform=t})(nW||(nW={}));var FE;(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(FE||(FE={}));var sW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WE=function(o,e){return function(t,i){e(t,i,o)}};let oW=class{constructor(e){this._commandService=e}async open(e,t){if(!fy(e,we.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=be.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let i=[];try{i=BA(decodeURIComponent(e.query))}catch{try{i=BA(e.query)}catch{}}ret
Line truncated
|
||||
`?r=2:a===`
|
||||
`&&(r=1);let l=Un.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=Un.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=Un.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=Un.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:c,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:so===3||so===2?`
|
||||
`:`\r
|
||||
`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){const n=typeof e=="string"?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=lC._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const r=i[n],a=this._models[r],l=a.model.getLanguageId(),c=a.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:l,resource:c})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:l,resource:c}))continue;const d=t[l+c],h=this.getCreationOptions(l,c,a.model.isForSimpleWidget);lC._setModelOptionsForModel(a.model,h,d)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&fo(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(up(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(up(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(up(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=this._instantiationService.createInstance(Jf,e,t,s,i);if(i&&this._disposedModels.has(up(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=this._getSHA1Computer(),u=h.canComputeSHA1(r)?h.computeSHA1(r)===c.sha1:!1;if(u||c.sharesUndoRedoStack){for(const f of d.past)Zc(f)&&f.matchesResource(i)&&f.setModel(r);for(const f of d.future)Zc(f)&&f.matchesResource(i)&&f.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,f=>Zc(f)&&f.matchesResource(i)),u&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=up(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new qPe(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,Fo,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=up(e),i=this._models[t];return i?i.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===we.file||e.scheme===we.vscodeRemote||e.scheme===we.vscodeUserData||e.scheme===we.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=up(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let s=!1,r=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const c=this._undoRedoService.getElements(e.uri);if(c.past.length>0||c.future.length>0){for(const d of c.past)Zc(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri));for(const d of c.future)Zc(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri))}}const a=lC.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(!n&&(r>a||!l.canComputeSHA1(e))){const c=i.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>Zc(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new GPe(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVer
Line truncated
|
||||
`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};gW=iAe([Iee(0,Me),Iee(1,Qs)],gW);const Nee="done",Tee="active",pW="infinite",mW="infinite-long-running",Ree="discrete",ET=class ET extends A{constructor(e,t){super(),this.progressSignal=this._register(new ct),this.workedVal=0,this.showDelayedScheduler=this._register(new wt(()=>uo(this.element),0)),this.longRunningScheduler=this._register(new wt(()=>this.infiniteLongRunning(),ET.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Tee,pW,mW,Ree),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Nee),this.element.classList.contains(pW)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Ree,Nee,mW),this.element.classList.add(Tee,pW),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(mW)}getContainer(){return this.element}};ET.LONG_RUNNING_INFINITE_THRESHOLD=1e4;let _W=ET;const dAe=Q;class hAe extends A{constructor(e,t,i){super(),this.parent=e,this.onDidChange=s=>this.findInput.onDidChange(s),this.container=Z(this.parent,dAe(".quick-input-box")),this.findInput=this._register(new fZ(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="textbox",n.ariaHasPopup="menu",n.ariaAutoComplete="list"}get onKeyDown(){return this.findInput.onKeyDown}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}get ariaLabel(){return this.findInput.inputBox.inputElement.getAttribute("aria-label")||""}set ariaLabel(e){this.findInput.inputBox.inputElement.setAttribute("aria-label",e)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.findInput.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===ii.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===ii.Info?1:e===ii.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===ii.Info?1:e===ii.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const Mee=new Ln(()=>{const o=Sf.Collator(void 0,{numeric:!0,sensitivity:"base"}).value;return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});new Ln(()=>({collator:Sf.Collator(void 0,{numeric:!0}).value})),new Ln(()=>({collator:Sf.Collator(void 0,{numeric:!0,sensitivity:"accent"}).value}));function uAe(o,e,t=!1){const i=o||"",n=e||"",s=Mee.value.collator.compare(i,n);return Mee.value.collatorIsNumeric&&s===0&&i!==n?i<n?-1:1:s}function fAe(o,e,t){const i=o.toLowerCase(),n=e.toLowerCase(),s=gAe(o,e,t);if(s)return s;const r=i.endsWith(t),a=n.endsWith(t);if(r!==a)return r?-1:1;const l=uAe(i,n);return l!==0?l:i.localeCompare(n)}function gAe(o,e,t){const i=o.toLowerCase(),n=e.toLowerCase(),s=i.startsWith(t),r=n.startsWith(t);if(s!==r)return s?-1:1;if(s&&r){if(i.length<n.length)return-1;if(i.length>n.length)return 1}return 0}var VE=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bW=function(o,e){return function(t,i){e(t,i,o)}},CW;const nc=Q;class Pee{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new Ln(()=>{const n=i.label??"",s=cg(n).text.trim(),r=i.ariaLabel||[n,this.saneDesc
Line truncated
|
||||
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}loadViewState(){try{const e=JSON.parse(this.storageService.get(LW,-1,"{}"));if(e.top!==void 0||e.left!==void 0)return e}catch{}}saveViewState(e){this.layoutService.activeContainer===this.layoutService.mainContainer&&(e!==void 0?this.storageService.store(LW,JSON.stringify(e),-1,1):this.storageService.remove(LW,-1))}},yW=ym,ym.MAX_WIDTH=600,ym);xW=yW=Bee([gp(1,Hl),gp(2,ge),gp(3,xe),gp(4,Es)],xW);let kW=class extends A{constructor(e,t,i,n,s,r,a){super(),this._container=e,this._quickInputContainer=t,this._quickInputDragAreas=i,this._layoutService=s,this.configurationService=a,this.dndViewState=Le(this,void 0),this._snapThreshold=20,this._snapLineHorizontalRatio=.25,this._quickInputAlignmentContext=oAe.bindTo(r);const l=j1e(this.configurationService)==="custom";this._controlsOnLeft=l&&XT===1,this._controlsOnRight=l&&(XT===3||XT===2),this._registerLayoutListener(),this.registerMouseListeners(),this.dndViewState.set({...n,done:!0},void 0)}reparentUI(e){this._container=e}layoutContainer(e=this._layoutService.activeContainerDimension){const t=this.dndViewState.get(),i=this._quickInputContainer.getBoundingClientRect();if(t?.top&&t?.left){const n=Math.round(t.left*100)/100,s=e.width,r=i.width,a=n*s-r/2;this._layout(t.top*e.height,a)}}_registerLayoutListener(){this._register(ie.filter(this._layoutService.onDidLayoutContainer,e=>e.container===this._container)(e=>this.layoutContainer(e.dimension)))}registerMouseListeners(){const e=this._quickInputContainer;this._register(Q6(e,t=>{const i=new yn(me(e),t);i.detail===2&&this._quickInputDragAreas.some(({node:n,includeChildren:s})=>s?Zi(i.target,n):i.target===n)&&this.dndViewState.set({top:void 0,left:void 0,done:!0},void 0)})),this._register(X6(e,t=>{const i=me(this._layoutService.activeContainer),n=new yn(i,t);if(!this._quickInputDragAreas.some(({node:h,includeChildren:u})=>u?Zi(n.target,h):n.target===h))return;const s=this._quickInputContainer.getBoundingClientRect(),r=n.browserEvent.clientX-s.left,a=n.browserEvent.clientY-s.top;let l=!1;const c=Jne(i,h=>{new yn(i,h).preventDefault(),l||(l=!0),this._layout(h.clientY-a,h.clientX-r)}),d=Q6(i,h=>{if(l){const u=this.dndViewState.get();this.dndViewState.set({top:u?.top,left:u?.left,done:!0},void 0)}c.dispose(),d.dispose()})}))}_layout(e,t){const i=this._getTopSnapValue(),n=this._getCenterYSnapValue(),s=this._getCenterXSnapValue();e=Math.max(0,Math.min(e,this._container.clientHeight-this._quickInputContainer.clientHeight)),e<this._layoutService.activeContainerOffset.top&&(this._controlsOnLeft?t=Math.max(t,80/UT(ft())):this._controlsOnRight&&(t=Math.min(t,this._container.clientWidth-this._quickInputContainer.clientWidth-140/UT(ft()))));const r=Math.abs(e-i)<this._snapThreshold;e=r?i:e;const a=Math.abs(e-n)<this._snapThreshold;e=a?n:e;const l=e/this._container.clientHeight;t=Math.max(0,Math.min(t,this._container.clientWidth-this._quickInputContainer.clientWidth));const c=Math.abs(t-s)<this._snapThreshold;t=c?s:t;const d=this._container.clientWidth,h=this._quickInputContainer.clientWidth,f=(t+h/2)/d;if(this.dndViewState.set({top:l,left:f,done:!1},void 0),c){if(r){this._quickInputAlignmentContext.set("top");return}else if(a){this._quickInputAlignmentContext.set("center");return}}this._quickInputAlignmentContext.set(void 0)}_getTopSnapValue(){return this._layoutService.activeContainerOffset.quickPickTop}_getCenterYSnapValue(){return Math.round(this._container.clientHeight*this._snapLineHorizontalRatio)}_getCenterXSnapValue(){return Math.round(this._container.clientWidth/2)-Math.round(this._quickInputContainer.clientWidth/2)}};kW=Bee([gp(4,Hl),gp(5,xe),gp(6,Me)],kW);var EAe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CS=function(o,e){return function(t,i){e(t,i,o)}};let IW=class extends Nde{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(hW))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=s,this._onShow=this._register(new P),this._onHide=this._register(new P),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(r=>{r.get(Js).open(s,{allowCommands:!0,fromUserGesture:!0})})},
Line truncated
|
||||
(-> incoming)[${[...i.incoming.keys()].join(", ")}]
|
||||
(outgoing ->)[${[...i.outgoing.keys()].join(",")}]
|
||||
`);return e.join(`
|
||||
`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const zAe=!1;class Kee extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph:
|
||||
${e.toString()}`}}class jE{constructor(e=new O_,t=!1,i,n=zAe){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(ge,this),this._globalGraph=n?i?._globalGraph??new qee(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,pt(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)Xu(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends jE{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=SS.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:r=>{if(n)throw YS("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);if(!a)throw new Error(`[invokeFunction] unknown service '${r}'`);return a},getIfExists:r=>{if(n)throw YS("service accessor is only valid during the invocation of its target method");return this._getOrCreateServiceInstance(r,i)}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){this._throwIfDisposed();let i,n;return e instanceof gl?(i=SS.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=SS.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=La.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof gl)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof gl?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new qee(l=>l.id.toString());let s=0;const r=[{id:e,desc:t,_trace:i}],a=new Set;for(;r.length;){const l=r.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),n.lookupOrInsertNode(l),s++>1e3)throw new Kee(n);for(const c of La.getServiceDependencies(l.desc.ctor)){const d=this._getServiceInstanceOrDescriptor(c.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(c.id)),d instanceof gl){const h={id:c.id,desc:d,_trace:l._trace.branch(c.id,!0)};n.insertEdge(l,h),r.push(h)}}}}for(;;){const l=n.roots();if(l.length===0){if(!n.isEmpty())throw new Kee(n);break}for(const{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof gl){const h=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setCreatedServiceInstance(c.id,h)}n.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof gl)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,r){if(n){const a=new jE(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);const l=new Map,c=new bie(()=>{const d=a._createInstance(t,i,s);for(const[h,u]of l){const f=d[h];if(typeof f=="function")for(const g of u)g.disposable=f.apply(d,g.listener)}return l.clear(),r.add(d),d});return new Proxy(Object.create(null),{get(d,h){if(!c.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let g=l.get
Line truncated
|
||||
`).slice(3,4).join(`
|
||||
`)):ar._None}static traceCreation(e,t){return e?new ar(1,t.name):ar._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new ar(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;ar._totals+=e;let t=!1;function i(s,r){const a=[],l=new Array(s+1).join(" ");for(const[c,d,h]of r._dep)if(d&&h){t=!0,a.push(`${l}CREATES -> ${c}`);const u=i(s+1,h);u&&a.push(u)}else a.push(`${l}uses -> ${c}`);return a.join(`
|
||||
`)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${ar._totals.toFixed(2)}ms)`];(e>2||t)&&ar.all.add(n.join(`
|
||||
`))}};ar.all=new Set,ar._None=new class extends ar{constructor(){super(0,null)}stop(){}branch(){return this}},ar._totals=0;let SS=ar;const UAe=new Set([we.inMemory,we.vscodeSourceControl,we.walkThrough,we.walkThroughSnippet,we.vscodeChatCodeBlock,we.vscodeTerminal]);class $Ae{constructor(){this._byResource=new Li,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new Li,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??Ye.empty():be.isUri(e)?this._byResource.get(e)?.values()??Ye.empty():Ye.map(Ye.concat(...this._byOwner.values()),t=>t[1])}}class jAe{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Li,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(UAe.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===oi.Error?t.errors+=1:i===oi.Warning?t.warnings+=1:i===oi.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class mp{constructor(){this._onMarkerChanged=new jB({delay:0,merge:mp._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new $Ae,this._stats=new jAe(this),this._filteredResources=new Li}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(E6(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const r=mp._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:f,origin:g}=i;if(r)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,h=h>0?h:c,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:f,origin:g}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const r=Ye.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(is(t)){const s=new Li;for(const{resource:r,marker:a}of t){const l=mp._toMarker(e,r,a);if(!l)continue;const c=s.get(r);c?c.push(l):(s.set(r,[l]),i.push(r))}for(const[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}_createFilteredMarker(e,t){const i=t.length===1?p(1721,'Problems are paused because: "{0}"',t[0]):p(1722,'Problems are paused because: "{0}" and {1} more',t[0],t.length-1);return{owner:"markersFilter",resource:e,severity:oi.Info,message:i,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const r=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);if(r?.length)return[this._createFilteredMarker(i,r)];const a=this._data.get(i,t);if(!a)return[];const l=[];for(const c of a){if(s>0&&l.length===s)break;const d=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);d?.length?l.push(this._createFilteredMarker(i,d)):mp._accept(c,n)&&l.push(c)}return l}else{const r=!t&&!i?this._data.values():this._data.values(i??t),a=[],l=new Hse;for(const c of r)for(const d of c){if(l.has(d.resource))continue;if(s>0&&a.length===s)break;const h=e.ignoreResourceFilters?void 0:this._filteredResources.get(d.resource);h?.length?(a.push(this._createFilteredMarker(d.resource,h)),l.add(d.resource)):mp._accept(d,n)&&a.push(d)}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Li;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}class qAe extends A{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=wn.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=wn.createEmptyModel(this.logService);const e=ei.as(ka.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const s=i[n],r=t[n];s!==void 0?this._configurationModel.setValue(
Line truncated
|
||||
|
||||
`+t),bt.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const n=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&n.push(e.cancelButton),t=await n[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:ii.Error,message:e,detail:t})}}const HS=class HS{info(e){return this.notify({severity:ii.Info,message:e})}warn(e){return this.notify({severity:ii.Warning,message:e})}error(e){return this.notify({severity:ii.Error,message:e})}notify(e){switch(e.severity){case ii.Error:console.error(e.message);break;case ii.Warning:console.warn(e.message);break;default:console.log(e.message);break}return HS.NO_OP}prompt(e,t,i,n){return HS.NO_OP}status(e,t){return{close:()=>{}}}};HS.NO_OP=new Lue;let HW=HS,VW=class{constructor(e){this._onWillExecuteCommand=new P,this._onDidExecuteCommand=new P,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Xe.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};VW=oc([Ri(0,ge)],VW);let hC=class extends NPe{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=f=>{const g=new U;g.add(W(f,te.KEY_DOWN,m=>{const _=new St(m);this._dispatch(_,_.target)&&(_.preventDefault(),_.stopPropagation())})),g.add(W(f,te.KEY_UP,m=>{const _=new St(m);this._singleModifierDispatch(_,_.target)&&_.preventDefault()})),this._domNodeListeners.push(new JAe(f,g))},l=f=>{for(let g=0;g<this._domNodeListeners.length;g++){const m=this._domNodeListeners[g];m.domNode===f&&(this._domNodeListeners.splice(g,1),m.dispose())}},c=f=>{f.getOption(70)||a(f.getContainerDomNode())},d=f=>{f.getOption(70)||l(f.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);const h=f=>{a(f.getContainerDomNode())},u=f=>{l(f.getContainerDomNode())};this._register(r.onDiffEditorAdd(h)),this._register(r.onDiffEditorRemove(u)),r.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return jr(Xe.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>({keybinding:nR(i.keybinding,so),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),ue(()=>{for(let i=0;i<this._dynamicKeybindings.length;i++)if(this._dynamicKeybindings[i]===t[0]){this._dynamicKeybindings.splice(i,t.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(rn.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new hS(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return bt.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new pee(void 0,s.command,s.commandArgs,r,t,null,!1);else{const l=uS.resolveKeybinding(a,so);for(const c of l)i[n++]=new pee(c,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Sc(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new uS([t],so)}};hC=oc([Ri(0,xe),Ri(1,Tt),Ri(2,Vn),Ri(3,hi),Ri(4,Rt),Ri(5,et)],hC);class JAe extends A{constructor(e,t){super(),this.domNode=e,this._register(t)}}function Gee(o){return o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof be)}let qE=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new P,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new qAe(e);this._configuration=new RE(t.reload(),wn.createEmptyModel(e),wn.createEmptyModel(e),wn.createEmptyModel(e),wn.createEmptyModel(e),wn.createEmptyModel(e),new Li,wn.createEmptyModel(e),new Li,e),t.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=Gee(e)?e:Gee(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new kPe({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);n.source=8,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,
Line truncated
|
||||
`:`\r
|
||||
`}};UW=oc([Ri(0,Me)],UW);class eOe{publicLog2(){}}const VS=class VS{constructor(){const e=be.from({scheme:VS.SCHEME,authority:"model",path:"/"});this.workspace={id:PK,folders:[new Qve({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===VS.SCHEME?this.workspace.folders[0]:null}};VS.SCHEME="inmemory";let $W=VS;function KE(o,e,t){if(!e||!(o instanceof qE))return;const i=[];Object.keys(e).forEach(n=>{mwe(n)&&i.push([`editor.${n}`,e[n]]),t&&_we(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let jW=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:jO.convert(e),n=new Map;for(const a of i){if(!(a instanceof jh))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(fi.replaceMove(k.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:tf(g9.bulkEditServiceSummary,s,r),isApplied:s>0}}};jW=oc([Ri(0,Qt)],jW);class tOe{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return vr(e)}}let qW=class extends CPe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};qW=oc([Ri(0,Hl),Ri(1,et)],qW);class iOe{constructor(){this._neverEmitter=new P,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class nOe extends Q8{constructor(){super()}}class sOe extends KAe{constructor(){super(new Xse)}}let KW=class extends iW{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};KW=oc([Ri(0,Vn),Ri(1,hi),Ri(2,hd),Ri(3,ot),Ri(4,Cr),Ri(5,xe)],KW);const oOe={esmModuleLocation:void 0,label:"editorWorkerService"};let GW=class extends O8{constructor(e,t,i,n,s){super(oOe,e,t,i,n,s)}};GW=oc([Ri(0,Qt),Ri(1,ZD),Ri(2,Rt),Ri(3,Jt),Ri(4,he)],GW);class rOe{async playSignal(e,t){}}je(Rt,sOe,0),je(Me,qE,0),je(ZD,zW,0),je(NQ,UW,0),je(pd,$W,0),je(zg,tOe,0),je(Vn,eOe,0),je(Y0,QAe,0),je(k4,XAe,0),je(hi,HW,0),je(zl,mp,0),je(Mt,nOe,0),je(ir,dMe,0),je(Qt,cW,0),je(j2,lW,0),je(xe,FW,0),je(X$,YAe,0),je(sd,BW,0),je(Es,O1e,0),je(Xs,GW,0),je(yw,jW,0),je(GQ,iOe,0),je(ns,WW,0),je(bn,RW,0),je(Fr,dye,0),je(Tt,VW,0),je(ot,hC,0),je(Zn,EW,0),je(hd,qW,0),je(Js,aW,0),je(Wa,PW,0),je(Ko,KW,0),je(Cr,PO,0),je(nd,rOe,0),je(jP,GAe,0),je(PH,toe,0),je(TF,lke,0);var De;(function(o){const e=new O_;for(const[l,c]of nV())e.set(l,c);const t=new jE(e,!0);e.set(ge,t);function i(l){n||r({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof gl?t.invokeFunction(d=>d.get(l)):c}o.get=i;let n=!1;const s=new P;function r(l){if(n)return t;n=!0;for(const[d,h]of nV())e.get(d)||e.set(d,h);for(const d in l)if(l.hasOwnProperty(d)){const h=We(d);e.get(h)instanceof gl&&e.set(h,l[d])}const c=Xwe();for(const d of c)try{t.createInstance(d)}catch(h){Ee(h)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const c=new U,d=c.add(s.event(()=>{d.dispose(),c.add(l())}));return c}o.withServices=a})(De||(De={}));var ZW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zt=function(o,e){return function(t,i){e(t,i,o)}};let aOe=0,Zee=!1;function lOe(o){if(!o){if(Zee)return;Zee=!0}mse(o||bt.document.body)}let GE=class extends sg{constructor(e,t,i,n,s,r,a,l,c,d,h,u,f){const g={...t};g.ariaLabel=g.ariaLabel||u9.editorViewAccessibleLabel,super(e,g,{},i,n,s,r,c,d,h,u,f),l instanceof hC?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,lOe(g.ariaContainerElement),Eme((m,_)=>i.createInstance(Q_,m,{instantHover:_},{})),Abe(a)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++aOe,s=K.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an un
Line truncated
|
||||
`);let r=t;return s!==-1&&(r=t.substring(0,s)),Xee(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return Xee(o,t,e.createById(i),n)}function Xee(o,e,t,i){return o.createModel(e,t,i)}N("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},p(139,"The background color of the diff editor's header")),N("multiDiffEditor.background",xi,p(140,"The background color of the multi file diff editor")),N("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},p(141,"The border color of the multi file diff editor"));var cOe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qee=function(o,e){return function(t,i){e(t,i,o)}};class dOe{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let QW=class extends A{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=Le(this,void 0),this._collapsed=j(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=Le(this,500),this.contentHeight=j(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=Le(this,0),this._modifiedWidth=Le(this,0),this._originalContentWidth=Le(this,0),this._originalWidth=Le(this,0),this.maxScroll=j(this,l=>{const c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),d=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>d?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:d,width:this._originalWidth.read(l)}}),this._elements=Je("div.multiDiffEntry",[Je("div.header@header",[Je("div.header-content",[Je("div.collapse-button@collapseButton"),Je("div.file-path",[Je("div.title.modified.show-file-icons@primaryPath",[]),Je("div.status.deleted@status",["R"]),Je("div.title.original.show-file-icons@secondaryPath",[])]),Je("div.actions@actions")])]),Je("div.editorParent",[Je("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Bl,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=ni(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=ni(this.editor.getOriginalEditor()).isFocused,this.isFocused=j(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new U),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=new Tk(this._elements.collapseButton,{});this._register(Se(l=>{r.element.className="",r.icon=this._collapsed.read(l)?Y.chevronRight:Y.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Se(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{const c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{const c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{g1(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;const c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(Se(l=>{const c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new O_([xe,this._contextKeyService])));this._register(a.createInstance(bw,this._elements.actions,de.MultiDiffEditorFileToolbar,{actionRunner:this._register(new gK(()=>this._viewModel.get()?.modifiedUri)
Line truncated
|
||||
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:Ad(t,a.open),close:Ad(t,a.close)});else throw Gt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function t4e(o){Gm.registerLanguage(o)}function i4e(){let o=[];return o=o.concat(Gm.getLanguages()),o}function n4e(o){return De.get(Mt).languageIdCodec.encodeLanguageId(o)}function s4e(o,e){return De.withServices(()=>{const i=De.get(Mt).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function o4e(o,e){return De.withServices(()=>{const i=De.get(Mt).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function r4e(o,e){if(!De.get(Mt).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return De.get(Jt).register(o,e,100)}class a4e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return yS.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new YL(n.tokens,n.endState)}}class yS{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const a=e[s];let l=a.startIndex;s===0?l=0:l<n&&(l=n),i[s]=new rv(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),r=yS._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new HM(r,a)}tokenize(e,t,i){return yS.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let r=0,a=0;for(let c=0,d=t.length;c<d;c++){const h=t[c],u=n.match(i,h.scopes)|1024;if(r>0&&s[r-1]===u)continue;let f=h.startIndex;c===0?f=0:f<a&&(f=a),s[r++]=f,s[r++]=u,a=f}const l=new Uint32Array(r);for(let c=0;c<r;c++)l[c]=s[c];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new YL(s,r)}}function l4e(o){return typeof o.getInitialState=="function"}function c4e(o){return"tokenizeEncoded"in o}function ste(o){return o&&typeof o.then=="function"}function d4e(o){const e=De.get(ir);if(o){const t=[null];for(let i=1,n=o.length;i<n;i++)t[i]=$.fromHex(o[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function ote(o,e){return c4e(e)?new a4e(o,e):new yS(o,e,De.get(Mt),De.get(ir))}function nB(o,e){const t=new zhe(async()=>{const i=await Promise.resolve(e.create());return i?l4e(i)?ote(o,i):new lS(De.get(Mt),De.get(ir),o,nte(o,i),De.get(Me)):null});return di.registerFactory(o,t)}function h4e(o,e){if(!De.get(Mt).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return ste(e)?nB(o,{create:()=>e}):di.register(o,ote(o,e))}function u4e(o,e){const t=i=>new lS(De.get(Mt),De.get(ir),o,nte(o,i),De.get(Me));return ste(e)?nB(o,{create:()=>e}):di.register(o,t(e))}function f4e(o,e){return De.get(he).referenceProvider.register(o,e)}function g4e(o,e){return De.get(he).renameProvider.register(o,e)}function p4e(o,e){return De.get(he).newSymbolNamesProvider.register(o,e)}function m4e(o,e){return De.get(he).signatureHelpProvider.register(o,e)}function _4e(o,e){return De.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new k(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new k(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function b4e(o,e){return De.get(he).documentSymbolProvider.register(o,e)}function C4e(o,e){return De.get(he).documentHighlightProvider.register(o,e)}function v4e(o,e){return De.get(he).linkedEditingRangeProvider.register(o,e)}function w4e(o,e){return De.get(he).definitionProvider.register(o,e)}function S4e(o,e){return De.get(he).implementationProvider.register(o,e)}function y4e(o,e){return De.get(he).typeDefinitionProvider.register(o,e)}function L4e(o,e){return De.get(he).codeLensProvider.register(o,e)}function x4e(o,e,t){return De.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=De.get(zl).read({resource:n.uri}).filter(d=>k.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function k4e(o,e){return De.g
Line truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background);overflow-wrap:initial}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .editorCanvas{position:absolute;width:100%;height:100%;z-index:0;pointer-events:none}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .view-overlays>div,.monaco-editor .margin-view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monacLine truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/editor/editor.main",["exports","require","vs/nls.messages-loader!","../basic-languages/monaco.contribution","../language/css/monaco.contribution","../language/html/monaco.contribution","../language/json/monaco.contribution","../language/typescript/monaco.contribution","../editor.api-i0YVFWkl"],(function(a,n,d,w,U,j,S,h,o){"use strict";function l(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const u=l(n),g=""+new URL(n.toUrl("../assets/json.worker-DghZTZS7.js"),document.baseURI).href,_=""+new URL(n.toUrl("../assets/css.worker-cO8rX8Iy.js"),document.baseURI).href,m=""+new URL(n.toUrl("../assets/html.worker-BruuIJkK.js"),document.baseURI).href,k=""+new URL(n.toUrl("../assets/ts.worker-C4E4vgbE.js"),document.baseURI).href,y=""+new URL(n.toUrl("../assets/editor.worker-DM0G1eFj.js"),document.baseURI).href,f=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:o.CancellationTokenSource,Emitter:o.Emitter,KeyCode:o.KeyCode,KeyMod:o.KeyMod,MarkerSeverity:o.MarkerSeverity,MarkerTag:o.MarkerTag,Position:o.Position,Range:o.Range,Selection:o.Selection,SelectionDirection:o.SelectionDirection,Token:o.Token,Uri:o.Uri,editor:o.editor,languages:o.languages},Symbol.toStringTag,{value:"Module"}));self.MonacoEnvironment={getWorker:function(t,e){return e==="json"?new Worker(r(g)):e==="css"||e==="scss"||e==="less"?new Worker(r(_)):e==="html"||e==="handlebars"||e==="razor"?new Worker(r(m)):e==="typescript"||e==="javascript"?new Worker(r(k)):new Worker(r(y))}};function r(t){const e=new Blob([["const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`importScripts(ttPolicy?.createScriptURL(${JSON.stringify(t)}) ?? ${JSON.stringify(t)});`,"globalThis.postMessage({ type: 'vscode-worker-ready' });"].join("")],{type:"application/javascript"});return URL.createObjectURL(e)}const b=u.toUrl("vs/editor/editor.main.css"),c=document.createElement("link");c.rel="stylesheet",c.href=b,document.head.appendChild(c),a.m=f,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/handlebars-NccI6MVO",["exports","./editor.api-i0YVFWkl"],(function(e,t){"use strict";const n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{tokeLine truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/html-K7M-xuod",["exports","./editor.api-i0YVFWkl"],(function(e,t){"use strict";const n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${n.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},r={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};e.conf=i,e.language=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/htmlMode-DtjCNH-N",["exports","./workers-CbP2cVmy","./lspLanguageFeatures-A02kBDb6","./editor.api-i0YVFWkl"],(function(n,v,e,i){"use strict";class l{constructor(d){this._defaults=d,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=v.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...d){let t;return this._getClient().then(r=>{t=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(d)}).then(r=>t)}}class s extends e.CompletionAdapter{constructor(d){super(d,[".",":","<",'"',"=","/"])}}function f(o){const d=new l(o),t=(...c)=>d.getLanguageServiceWorker(...c);let r=o.languageId;i.languages.registerCompletionItemProvider(r,new s(t)),i.languages.registerHoverProvider(r,new e.HoverAdapter(t)),i.languages.registerDocumentHighlightProvider(r,new e.DocumentHighlightAdapter(t)),i.languages.registerLinkProvider(r,new e.DocumentLinkAdapter(t)),i.languages.registerFoldingRangeProvider(r,new e.FoldingRangeAdapter(t)),i.languages.registerDocumentSymbolProvider(r,new e.DocumentSymbolAdapter(t)),i.languages.registerSelectionRangeProvider(r,new e.SelectionRangeAdapter(t)),i.languages.registerRenameProvider(r,new e.RenameAdapter(t)),r==="html"&&(i.languages.registerDocumentFormattingEditProvider(r,new e.DocumentFormattingEditProvider(t)),i.languages.registerDocumentRangeFormattingEditProvider(r,new e.DocumentRangeFormattingEditProvider(t)))}function u(o){const d=[],t=[],r=new l(o);d.push(r);const c=(...g)=>r.getLanguageServiceWorker(...g);function A(){const{languageId:g,modeConfiguration:m}=o;a(t),m.completionItems&&t.push(i.languages.registerCompletionItemProvider(g,new s(c))),m.hovers&&t.push(i.languages.registerHoverProvider(g,new e.HoverAdapter(c))),m.documentHighlights&&t.push(i.languages.registerDocumentHighlightProvider(g,new e.DocumentHighlightAdapter(c))),m.links&&t.push(i.languages.registerLinkProvider(g,new e.DocumentLinkAdapter(c))),m.documentSymbols&&t.push(i.languages.registerDocumentSymbolProvider(g,new e.DocumentSymbolAdapter(c))),m.rename&&t.push(i.languages.registerRenameProvider(g,new e.RenameAdapter(c))),m.foldingRanges&&t.push(i.languages.registerFoldingRangeProvider(g,new e.FoldingRangeAdapter(c))),m.selectionRanges&&t.push(i.languages.registerSelectionRangeProvider(g,new e.SelectionRangeAdapter(c))),m.documentFormattingEdits&&t.push(i.languages.registerDocumentFormattingEditProvider(g,new e.DocumentFormattingEditProvider(c))),m.documentRangeFormattingEdits&&t.push(i.languages.registerDocumentRangeFormattingEditProvider(g,new e.DocumentRangeFormattingEditProvider(c)))}return A(),d.push(h(t)),h(d)}function h(o){return{dispose:()=>a(o)}}function a(o){for(;o.length;)o.pop().dispose()}n.CompletionAdapter=e.CompletionAdapter,n.DefinitionAdapter=e.DefinitionAdapter,n.DiagnosticsAdapter=e.DiagnosticsAdapter,n.DocumentColorAdapter=e.DocumentColorAdapter,n.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,n.DocumentHighlightAdapter=e.DocumentHighlightAdapter,n.DocumentLinkAdapter=e.DocumentLinkAdapter,n.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,n.DocumentSymbolAdapter=e.DocumentSymbolAdapter,n.FoldingRangeAdapter=e.FoldingRangeAdapter,n.HoverAdapter=e.HoverAdapter,n.ReferenceAdapter=e.ReferenceAdapter,n.RenameAdapter=e.RenameAdapter,n.SelectionRangeAdapter=e.SelectionRangeAdapter,n.fromPosition=e.fromPosition,n.fromRange=e.fromRange,n.toRange=e.toRange,n.toTextEdit=e.toTextEdit,n.WorkerManager=l,n.setupMode=u,n.setupMode1=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
define("vs/jsonMode-CJjR_ECa",["exports","./workers-CbP2cVmy","./lspLanguageFeatures-A02kBDb6","./editor.api-i0YVFWkl"],(function(m,y,u,p){"use strict";class B{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=y.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(e=>{t=e}).then(e=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(e=>t)}}function F(n,i=!1){const t=n.length;let e=0,s="",k=0,o=16,c=0,r=0,T=0,I=0,f=0;function N(l,A){let b=0,w=0;for(;b<l;){let g=n.charCodeAt(e);if(g>=48&&g<=57)w=w*16+g-48;else if(g>=65&&g<=70)w=w*16+g-65+10;else if(g>=97&&g<=102)w=w*16+g-97+10;else break;e++,b++}return b<l&&(w=-1),w}function V(l){e=l,s="",k=0,o=16,f=0}function U(){let l=e;if(n.charCodeAt(e)===48)e++;else for(e++;e<n.length&&a(n.charCodeAt(e));)e++;if(e<n.length&&n.charCodeAt(e)===46)if(e++,e<n.length&&a(n.charCodeAt(e)))for(e++;e<n.length&&a(n.charCodeAt(e));)e++;else return f=3,n.substring(l,e);let A=e;if(e<n.length&&(n.charCodeAt(e)===69||n.charCodeAt(e)===101))if(e++,(e<n.length&&n.charCodeAt(e)===43||n.charCodeAt(e)===45)&&e++,e<n.length&&a(n.charCodeAt(e))){for(e++;e<n.length&&a(n.charCodeAt(e));)e++;A=e}else f=3;return n.substring(l,A)}function sn(){let l="",A=e;for(;;){if(e>=t){l+=n.substring(A,e),f=2;break}const b=n.charCodeAt(e);if(b===34){l+=n.substring(A,e),e++;break}if(b===92){if(l+=n.substring(A,e),e++,e>=t){f=2;break}switch(n.charCodeAt(e++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
|
||||
`;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const g=N(4);g>=0?l+=String.fromCharCode(g):f=4;break;default:f=5}A=e;continue}if(b>=0&&b<=31)if(E(b)){l+=n.substring(A,e),f=2;break}else f=6;e++}return l}function q(){if(s="",f=0,k=e,r=c,I=T,e>=t)return k=t,o=17;let l=n.charCodeAt(e);if(R(l)){do e++,s+=String.fromCharCode(l),l=n.charCodeAt(e);while(R(l));return o=15}if(E(l))return e++,s+=String.fromCharCode(l),l===13&&n.charCodeAt(e)===10&&(e++,s+=`
|
||||
`),c++,T=e,o=14;switch(l){case 123:return e++,o=1;case 125:return e++,o=2;case 91:return e++,o=3;case 93:return e++,o=4;case 58:return e++,o=6;case 44:return e++,o=5;case 34:return e++,s=sn(),o=10;case 47:const A=e-1;if(n.charCodeAt(e+1)===47){for(e+=2;e<t&&!E(n.charCodeAt(e));)e++;return s=n.substring(A,e),o=12}if(n.charCodeAt(e+1)===42){e+=2;const b=t-1;let w=!1;for(;e<b;){const g=n.charCodeAt(e);if(g===42&&n.charCodeAt(e+1)===47){e+=2,w=!0;break}e++,E(g)&&(g===13&&n.charCodeAt(e)===10&&e++,c++,T=e)}return w||(e++,f=1),s=n.substring(A,e),o=13}return s+=String.fromCharCode(l),e++,o=16;case 45:if(s+=String.fromCharCode(l),e++,e===t||!a(n.charCodeAt(e)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=U(),o=11;default:for(;e<t&&un(l);)e++,l=n.charCodeAt(e);if(k!==e){switch(s=n.substring(k,e),s){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return s+=String.fromCharCode(l),e++,o=16}}function un(l){if(R(l)||E(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function cn(){let l;do l=q();while(l>=12&&l<=15);return l}return{setPosition:V,getPosition:()=>e,scan:i?cn:q,getToken:()=>o,getTokenValue:()=>s,getTokenOffset:()=>k,getTokenLength:()=>e-k,getTokenStartLine:()=>r,getTokenStartCharacter:()=>k-I,getTokenError:()=>f}}function R(n){return n===32||n===9}function E(n){return n===10||n===13}function a(n){return n>=48&&n<=57}var d;(function(n){n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.space=32]="space",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.asterisk=42]="asterisk",n[n.backslash=92]="backslash",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.plus=43]="plus",n[n.slash=47]="slash",n[n.formFeed=12]="formFeed",n[n.tab=9]="tab"})(d||(d={})),new Array(20).fill(0).map((n,i)=>" ".repeat(i));const O=200;new Array(O).fill(0).map((n,i)=>`
|
||||
`+" ".repeat(i)),new Array(O).fill(0).map((n,i)=>"\r"+" ".repeat(i)),new Array(O).fill(0).map((n,i)=>`\r
|
||||
`+" ".repeat(i)),new Array(O).fill(0).map((n,i)=>`
|
||||
`+" ".repeat(i)),new Array(O).fill(0).map((n,i)=>"\r"+" ".repeat(i)),new Array(O).fill(0).map((n,i)=>`\r
|
||||
`+" ".repeat(i));var W;(function(n){n.DEFAULT={allowTrailingComma:!1}})(W||(W={}));const z=F;var h;(function(n){n[n.None=0]="None",n[n.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=2]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",n[n.InvalidUnicode=4]="InvalidUnicode",n[n.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",n[n.InvalidCharacter=6]="InvalidCharacter"})(h||(h={}));var M;(function(n){n[n.OpenBraceToken=1]="OpenBraceToken",n[n.CloseBraceToken=2]="CloseBraceToken",n[n.OpenBracketToken=3]="OpenBracketToken",n[n.CloseBracketToken=4]="CloseBracketToken",n[n.CommaToken=5]="CommaToken",n[n.ColonToken=6]="ColonToken",n[n.NullKeyword=7]="NullKeyword",n[n.TrueKeyword=8]="TrueKeyword",n[n.FalseKeyword=9]="FalseKeyword",n[n.StringLiteral=10]="StringLiteral",n[n.NumericLiteral=11]="NumericLiteral",n[n.LineCommentTrivia=12]="LineCommentTrivia",n[n.BlockCommentTrivia=13]="BlockCommentTrivia",n[n.LineBreakTrivia=14]="LineBreakTrivia",n[n.Trivia=15]="Trivia",n[n.Unknown=16]="Unknown",n[n.EOF=17]="EOF"})(M||(M={}));var j;(function(n){n[n.InvalidSymbol=1]="InvalidSymbol",n[n.InvalidNumberFormat=2]="InvalidNumberFormat",n[n.PropertyNameExpected=3]="PropertyNameExpected",n[n.ValueExpected=4]="ValueExpected",n[n.ColonExpected=5]="ColonExpected",n[n.CommaExpected=6]="CommaExpected",n[n.CloseBraceExpected=7]="CloseBraceExpected",n[n.CloseBracketExpected=8]="CloseBracketExpected",n[n.EndOfFileExpected=9]="EndOfFileExpected",n[n.InvalidCommentToken=10]="InvalidCommentToken",n[n.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=12]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",n[n.InvalidUnicode=14]="InvalidUnicode",n[n.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",n[n.InvalidCharacter=16]="InvalidCharacter"})(j||(j={}));function J(n){return{getInitialState:()=>new D(null,null,!1,null),tokenize:(i,t)=>nn(n,i,t)}}const L="delimiter.bracket.json",S="delimiter.array.json",Q="delimiter.colon.json",Y="delimiter.comma.json",G="keyword.json",X="keyword.json",Z="string.value.json",$="number.json",K="string.key.json",x="comment.block.json",C="comment.line.json";class v{constructor(i,t){this.parent=i,this.type=t}static pop(i){return i?i.parent:null}static push(i,t){return new v(i,t)}static equals(i,t){if(!i&&!t)return!0;if(!i||!t)return!1;for(;i&&t;){if(i===t)return!0;if(i.type!==t.type)return!1;i=i.parent,t=t.parent}return!0}}class D{constructor(i,t,e,s){this._state=i,this.scanError=t,this.lastWasColon=e,this.parents=s}clone(){return new D(this._state,this.scanError,this.lastWasColon,this.parents)}equals(i){return i===this?!0:!i||!(i instanceof D)?!1:this.scanError===i.scanError&&this.lastWasColon===i.lastWasColon&&v.equals(this.parents,i.parents)}getStateData(){return this._state}setStateData(i){this._state=i}}function nn(n,i,t,e=0){let s=0,k=!1;switch(t.scanError){case 2:i='"'+i,s=1;break;case 1:i="/*"+i,s=2;break}const o=z(i);let c=t.lastWasColon,r=t.parents;const T={tokens:[],endState:t.clone()};for(;;){let I=e+o.getPosition(),f="";const N=o.scan();if(N===17)break;if(I===e+o.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+i.substr(o.getPosition(),3));switch(k&&(I-=s),k=s>0,N){case 1:r=v.push(r,0),f=L,c=!1;break;case 2:r=v.pop(r),f=L,c=!1;break;case 3:r=v.push(r,1),f=S,c=!1;break;case 4:r=v.pop(r),f=S,c=!1;break;case 6:f=Q,c=!0;break;case 5:f=Y,c=!1;break;case 8:case 9:f=G,c=!1;break;case 7:f=X,c=!1;break;case 10:const U=(r?r.type:0)===1;f=c||U?Z:K,c=!1;break;case 11:f=$,c=!1;break}switch(N){case 12:f=C;break;case 13:f=x;break}T.endState=new D(t.getStateData(),o.getTokenError(),c,r),T.tokens.push({startIndex:I,scopes:f})}return T}let _;function en(){return new Promise((n,i)=>{if(!_)return i("JSON not registered!");n(_)})}class tn extends u.DiagnosticsAdapter{constructor(i,t,e){super(i,t,e.onDidChange),this._disposables.push(p.editor.onWillDisposeModel(s=>{this._resetSchema(s.uri)})),this._disposables.push(p.editor.onDidChangeModelLanguage(s=>{this._resetSchema(s.model.uri)}))}_resetSchema(i){this._worker().then(t=>{t.resetSchema(i.toString())})}}function ln(n){const i=[],t=[],e=new B(n);i.push(e),_=(...o)=>e.getLanguageServiceWorker(...o);function s(){const{languageId:o,modeConfiguration:c}=n;H(t),c.documentFormattingEdits&&t.push(p.languages.registerDocumentFormattingEditProvider(o,new u.DocumentFormattingEditProvider(_))),c.documentRangeFormattingEdits&&t.push(p.languages.registerDocumentRangeFormattingEditProvider(o,new u.DocumentRangeFormattingEditProvider(_))),c.completionItems&&t.push(p.languages.registerCompletionItemProvider(o,new u.CompletionAdapter(_,[" ",":",'"']))),c.hovers&&t.push(p.languages.registerHoverProvider(o,new u.HoverAdapter(_))),c.documentSymbols&&t.push(p.languages.registerDocumentSymbolProvider(o,new u.DocumentSymbolAdapter(_))),c.tokens&&t.push(p.languages.setTokensProvider(o,J(!0))),c.colors&&t.push(p.languages.registerColorProvider(o,new u.
Line truncated
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/language/css/monaco.contribution",["require","exports","../../editor.api-i0YVFWkl"],(function(c,s,n){"use strict";class o{constructor(e,d,f){this._onDidChange=new n.Emitter,this._languageId=e,this.setOptions(d),this.setModeConfiguration(f)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}const r={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},i={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},a=new o("css",r,i),u=new o("scss",r,i),g=new o("less",r,i);n.languages.css={cssDefaults:a,lessDefaults:g,scssDefaults:u};function l(){return new Promise((t,e)=>c(["../../cssMode-CGp6dFmI"],t,e))}n.languages.onLanguage("less",()=>{l().then(t=>t.setupMode(g))}),n.languages.onLanguage("scss",()=>{l().then(t=>t.setupMode(u))}),n.languages.onLanguage("css",()=>{l().then(t=>t.setupMode(a))}),s.cssDefaults=a,s.lessDefaults=g,s.scssDefaults=u,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/language/html/monaco.contribution",["require","exports","../../editor.api-i0YVFWkl"],(function(D,n,u){"use strict";class p{constructor(t,c,i){this._onDidChange=new u.Emitter,this._languageId=t,this.setOptions(c),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(t){this._options=t||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(t){this._modeConfiguration=t||Object.create(null),this._onDidChange.fire(this)}}const s={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function o(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===a,documentFormattingEdits:e===a,documentRangeFormattingEdits:e===a}}const a="html",m="handlebars",h="razor",g=r(a,s,o(a)),b=g.defaults,l=r(m,s,o(m)),L=l.defaults,d=r(h,s,o(h)),v=d.defaults;u.languages.html={htmlDefaults:b,razorDefaults:v,handlebarDefaults:L,htmlLanguageService:g,handlebarLanguageService:l,razorLanguageService:d,registerHTMLLanguageService:r};function S(){return new Promise((e,t)=>D(["../../htmlMode-DtjCNH-N"],e,t))}function r(e,t=s,c=o(e)){const i=new p(e,t,c);let f;const C=u.languages.onLanguage(e,async()=>{f=(await S()).setupMode(i)});return{defaults:i,dispose(){C.dispose(),f?.dispose(),f=void 0}}}n.handlebarDefaults=L,n.handlebarLanguageService=l,n.htmlDefaults=b,n.htmlLanguageService=g,n.razorDefaults=v,n.razorLanguageService=d,n.registerHTMLLanguageService=r,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/language/json/monaco.contribution",["require","exports","../../editor.api-i0YVFWkl"],(function(r,s,n){"use strict";class g{constructor(e,l,d){this._onDidChange=new n.Emitter,this._languageId=e,this.setDiagnosticsOptions(l),this.setModeConfiguration(d)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}const u={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},c={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},o=new g("json",u,c),i=()=>a().then(t=>t.getWorker());n.languages.json={jsonDefaults:o,getWorker:i};function a(){return new Promise((t,e)=>r(["../../jsonMode-CJjR_ECa"],t,e))}n.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),n.languages.onLanguage("json",()=>{a().then(t=>t.setupMode(o))}),s.getWorker=i,s.jsonDefaults=o,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/language/typescript/monaco.contribution",["require","exports","../../editor.api-i0YVFWkl"],(function(S,n,a){"use strict";const y="5.4.5";var u=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(u||{}),c=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(c||{}),l=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(l||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),b=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(b||{});class _{constructor(t,s,i,r,o){this._onDidChange=new a.Emitter,this._onDidExtraLibsChange=new a.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(t),this.setDiagnosticsOptions(s),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this.setModeConfiguration(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(t,s){let i;if(typeof s>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=s,this._extraLibs[i]&&this._extraLibs[i].content===t)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:t,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let o=this._extraLibs[i];o&&o.version===r&&(delete this._extraLibs[i],this._removedExtraLibs[i]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(t){for(const s in this._extraLibs)this._removedExtraLibs[s]=this._extraLibs[s].version;if(this._extraLibs=Object.create(null),t&&t.length>0)for(const s of t){const i=s.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,r=s.content;let o=1;this._removedExtraLibs[i]&&(o=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:r,version:o}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(t){this._compilerOptions=t||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(t){this._diagnosticsOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(t){this._workerOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(t){this._inlayHintsOptions=t||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(t){}setEagerModelSync(t){this._eagerModelSync=t}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(t){this._modeConfiguration=t||Object.create(null),this._onDidChange.fire(void 0)}}const v=y,L={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},f=new _({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},L),d=new _({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},L),E=()=>h().then(e=>e.getTypeScriptWorker()),m=()=>h().then(e=>e.getJavaScriptWorker());a.languages.typescript={ModuleKind:u,JsxEmit:c,NewLineKind:l,ScriptTarget:g,ModuleResolutionKind:b,typescriptVersion:v,typescriptDefaults:f,javascriptDefaults:d,getTypeScriptWorker:E,getJavaScriptWorker:m};function h(){return new Promise((e,t)=>S(["../../tsMode-i88JHxDY"],e,t))}a.languages.onLanguage("typescript",()=>h().then(e=>e.setupTypeScript(f))),a.languages.onLanguage("javascript",()=>h().then(e=>e.setupJavaScript(d))),n.JsxEmit=c,n.ModuleKind=u,n.ModuleResolutionKind=b,n.NewLineKind=l,n.ScriptTarget=g,n.getJavaScriptWorker=m,n.getTypeScriptWorker=E,n.javascriptDefaults=d,n.typescriptDefaults=f,n.typescriptVersion=v,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/liquid-STktYroN",["exports","./editor.api-i0YVFWkl"],(function(e,t){"use strict";const i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=><!]+/,identifier:/[a-zA-Z_][\w]*/,tokenizer:{root:[[/\{\%\s*comment\s*\%\}/,"comment.start.liquid","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@liquidState.root"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.root"}],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],comment:[[/\{\%\s*endcomment\s*\%\}/,"comment.end.liquid","@pop"],[/./,"comment.content.liquid"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};e.conf=n,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
define("vs/lspLanguageFeatures-A02kBDb6",["exports","./editor.api-i0YVFWkl"],(function(b,l){"use strict";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var V;(function(e){function n(i){return typeof i=="string"}e.is=n})(V||(V={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var C;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(C||(C={}));var k;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=C.MAX_VALUE),t===Number.MAX_VALUE&&(t=C.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return u.objectLiteral(t)&&u.uinteger(t.line)&&u.uinteger(t.character)}e.is=i})(k||(k={}));var h;(function(e){function n(r,t,a,o){if(u.uinteger(r)&&u.uinteger(t)&&u.uinteger(a)&&u.uinteger(o))return{start:k.create(r,t),end:k.create(a,o)};if(k.is(r)&&k.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${o}]`)}e.create=n;function i(r){let t=r;return u.objectLiteral(t)&&k.is(t.start)&&k.is(t.end)}e.is=i})(h||(h={}));var j;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return u.objectLiteral(t)&&h.is(t.range)&&(u.string(t.uri)||u.undefined(t.uri))}e.is=i})(j||(j={}));var ee;(function(e){function n(r,t,a,o){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:o}}e.create=n;function i(r){let t=r;return u.objectLiteral(t)&&h.is(t.targetRange)&&u.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||u.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var U;(function(e){function n(r,t,a,o){return{red:r,green:t,blue:a,alpha:o}}e.create=n;function i(r){const t=r;return u.objectLiteral(t)&&u.numberRange(t.red,0,1)&&u.numberRange(t.green,0,1)&&u.numberRange(t.blue,0,1)&&u.numberRange(t.alpha,0,1)}e.is=i})(U||(U={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return u.objectLiteral(t)&&h.is(t.range)&&U.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return u.objectLiteral(t)&&u.string(t.label)&&(u.undefined(t.textEdit)||_.is(t))&&(u.undefined(t.additionalTextEdits)||u.typedArray(t.additionalTextEdits,_.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,o,s,f){const g={startLine:r,endLine:t};return u.defined(a)&&(g.startCharacter=a),u.defined(o)&&(g.endCharacter=o),u.defined(s)&&(g.kind=s),u.defined(f)&&(g.collapsedText=f),g}e.create=n;function i(r){const t=r;return u.objectLiteral(t)&&u.uinteger(t.startLine)&&u.uinteger(t.startLine)&&(u.undefined(t.startCharacter)||u.uinteger(t.startCharacter))&&(u.undefined(t.endCharacter)||u.uinteger(t.endCharacter))&&(u.undefined(t.kind)||u.string(t.kind))}e.is=i})(re||(re={}));var S;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return u.defined(t)&&j.is(t.location)&&u.string(t.message)}e.is=i})(S||(S={}));var E;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(E||(E={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return u.objectLiteral(r)&&u.string(r.href)}e.is=n})(ae||(ae={}));var y;(function(e){function n(r,t,a,o,s,f){let g={range:r,message:t};return u.defined(a)&&(g.severity=a),u.defined(o)&&(g.code=o),u.defined(s)&&(g.source=s),u.defined(f)&&(g.relatedInformation=f),g}e.create=n;function i(r){var t;let a=r;return u.defined(a)&&h.is(a.range)&&u.string(a.message)&&(u.number(a.severity)||u.undefined(a.severity))&&(u.integer(a.code)||u.string(a.code)||u.undefined(a.code))&&(u.undefined(a.codeDescription)||u.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(u.string(a.source)||u.undefined(a.source))&&(u.undefined(a.relatedInformation)||u.typedArray(a.relatedInformation,S.is))}e.is=i})(y||(y={}));var L;(function(e){function n(r,t,...a){let o={title:r,command:t};return u.defined(a)&&a.length>0&&(o.arguments=a),o}e.create=n;function i(r){let t=r;return u.defined(t)&&u.string(t.title)&&u.string(t.command)}e.is=i})(L||(L={}));var _;(function(e){function n(a,o){return{range:a,newText:o}}e.replace=n;function i(a,o){return{range:{start:a,end:a},newText:o}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const o=a;return u.objectLiteral(o)&&u.string(o.newText)&&h.is(o.range)}e.is=t})(_||(_={}));var O;(function(e){function n(r,t,a){const o={label:r};return t!==void 0&&(o.needsConfirmation=t),a!==void 0&&(o.description=a),o}e.create=n;function i(r){const t=r;return u.objectLiteral(t)&&u.string(t.label)&&(u.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(u.string(t.description)||t.descrLine truncated
|
||||
`,a==="\r"&&t+1<i.length&&i.charAt(t+1)===`
|
||||
`&&t++}r&&i.length>0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return k.create(0,n);for(;r<t;){let o=Math.floor((r+t)/2);i[o]>n?t=o:r=o+1}let a=r-1;return k.create(a,n-i[a])}offsetAt(n){let i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;let r=i[n.line],t=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(r+n.character,t),r)}get lineCount(){return this.getLineOffsets().length}}var u;(function(e){const n=Object.prototype.toString;function i(c){return typeof c<"u"}e.defined=i;function r(c){return typeof c>"u"}e.undefined=r;function t(c){return c===!0||c===!1}e.boolean=t;function a(c){return n.call(c)==="[object String]"}e.string=a;function o(c){return n.call(c)==="[object Number]"}e.number=o;function s(c,Z,Lt){return n.call(c)==="[object Number]"&&Z<=c&&c<=Lt}e.numberRange=s;function f(c){return n.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}e.integer=f;function g(c){return n.call(c)==="[object Number]"&&0<=c&&c<=2147483647}e.uinteger=g;function d(c){return n.call(c)==="[object Function]"}e.func=d;function m(c){return c!==null&&typeof c=="object"}e.objectLiteral=m;function w(c,Z){return Array.isArray(c)&&c.every(Z)}e.typedArray=w})(u||(u={}));class Ke{constructor(n,i,r){this._languageId=n,this._worker=i,this._disposables=[],this._listener=Object.create(null);const t=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let f;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(f),f=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},a=o=>{l.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),f=this._listener[s];f&&(f.dispose(),delete this._listener[s])};this._disposables.push(l.editor.onDidCreateModel(t)),this._disposables.push(l.editor.onWillDisposeModel(a)),this._disposables.push(l.editor.onDidChangeModelLanguage(o=>{a(o.model),t(o.model)})),this._disposables.push(r(o=>{l.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(a(s),t(s))})})),this._disposables.push({dispose:()=>{l.editor.getModels().forEach(a);for(let o in this._listener)this._listener[o].dispose()}}),l.editor.getModels().forEach(t)}dispose(){this._disposables.forEach(n=>n&&n.dispose()),this._disposables.length=0}_doValidate(n,i){this._worker(n).then(r=>r.doValidation(n.toString())).then(r=>{const t=r.map(o=>tt(n,o));let a=l.editor.getModel(n);a&&a.getLanguageId()===i&&l.editor.setModelMarkers(a,i,t)}).then(void 0,r=>{console.error(r)})}}function et(e){switch(e){case E.Error:return l.MarkerSeverity.Error;case E.Warning:return l.MarkerSeverity.Warning;case E.Information:return l.MarkerSeverity.Info;case E.Hint:return l.MarkerSeverity.Hint;default:return l.MarkerSeverity.Info}}function tt(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:et(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}class nt{constructor(n,i){this._worker=n,this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(n,i,r,t){const a=n.uri;return this._worker(a).then(o=>o.doComplete(a.toString(),x(i))).then(o=>{if(!o)return;const s=n.getWordUntilPosition(i),f=new l.Range(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),g=o.items.map(d=>{const m={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:at(d.command),range:f,kind:it(d.kind)};return d.textEdit&&(rt(d.textEdit)?m.range={insert:A(d.textEdit.insert),replace:A(d.textEdit.replace)}:m.range=A(d.textEdit.range),m.insertText=d.textEdit.newText),d.additionalTextEdits&&(m.additionalTextEdits=d.additionalTextEdits.map(I)),d.insertTextFormat===Q.Snippet&&(m.insertTextRules=l.languages.CompletionItemInsertTextRule.InsertAsSnippet),m});return{isIncomplete:o.isIncomplete,suggestions:g}})}}function x(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Y(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function A(e){if(e)return new l.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function rt(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function it(e){const n=l.languages.CompletionItemKind;switch(e){case p.Text:return n.Text;case p.Method:return n.Method;case p.Function:return n.Function;case p.Constructor:return n.Constructor;case p.Field:return n.Field;case p.Variable:return n.Variable;case p.Class:return n.Class;case p.Interface:return n.Interface;case p.Module:return n.Module;case p.Property:return n.Property;case p.Unit:return n.Unit;case p.Value:return n.Value;case p.Enum:return n.Enum;case
Line truncated
|
||||
`+e.value+"\n```\n"}}function st(e){if(e)return Array.isArray(e)?e.map(Qe):[Qe(e)]}class ct{constructor(n){this._worker=n}provideDocumentHighlights(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDocumentHighlights(t.toString(),x(i))).then(a=>{if(a)return a.map(o=>({range:A(o.range),kind:dt(o.kind)}))})}}function dt(e){switch(e){case F.Read:return l.languages.DocumentHighlightKind.Read;case F.Write:return l.languages.DocumentHighlightKind.Write;case F.Text:return l.languages.DocumentHighlightKind.Text}return l.languages.DocumentHighlightKind.Text}class ft{constructor(n){this._worker=n}provideDefinition(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDefinition(t.toString(),x(i))).then(a=>{if(a)return[Ge(a)]})}}function Ge(e){return{uri:l.Uri.parse(e.uri),range:A(e.range)}}class lt{constructor(n){this._worker=n}provideReferences(n,i,r,t){const a=n.uri;return this._worker(a).then(o=>o.findReferences(a.toString(),x(i))).then(o=>{if(o)return o.map(Ge)})}}class gt{constructor(n){this._worker=n}provideRenameEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(o=>o.doRename(a.toString(),x(i),r)).then(o=>ht(o))}}function ht(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=l.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:A(t.range),text:t.newText}})}return{edits:n}}class mt{constructor(n){this._worker=n}provideDocumentSymbols(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentSymbols(r.toString())).then(t=>{if(t)return t.map(a=>pt(a)?Je(a):{name:a.name,detail:"",containerName:a.containerName,kind:Ye(a.kind),range:A(a.location.range),selectionRange:A(a.location.range),tags:[]})})}}function pt(e){return"children"in e}function Je(e){return{name:e.name,detail:e.detail??"",kind:Ye(e.kind),range:A(e.range),selectionRange:A(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Je(n))}}function Ye(e){let n=l.languages.SymbolKind;switch(e){case v.File:return n.File;case v.Module:return n.Module;case v.Namespace:return n.Namespace;case v.Package:return n.Package;case v.Class:return n.Class;case v.Method:return n.Method;case v.Property:return n.Property;case v.Field:return n.Field;case v.Constructor:return n.Constructor;case v.Enum:return n.Enum;case v.Interface:return n.Interface;case v.Function:return n.Function;case v.Variable:return n.Variable;case v.Constant:return n.Constant;case v.String:return n.String;case v.Number:return n.Number;case v.Boolean:return n.Boolean;case v.Array:return n.Array}return n.Function}class vt{constructor(n){this._worker=n}provideLinks(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentLinks(r.toString())).then(t=>{if(t)return{links:t.map(a=>({range:A(a.range),url:a.target}))}})}}class bt{constructor(n){this._worker=n}provideDocumentFormattingEdits(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.format(t.toString(),null,Ze(i)).then(o=>{if(!(!o||o.length===0))return o.map(I)}))}}class At{constructor(n){this._worker=n,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(o=>o.format(a.toString(),Y(i),Ze(r)).then(s=>{if(!(!s||s.length===0))return s.map(I)}))}}function Ze(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}class wt{constructor(n){this._worker=n}provideDocumentColors(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentColors(r.toString())).then(t=>{if(t)return t.map(a=>({color:a.color,range:A(a.range)}))})}provideColorPresentations(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getColorPresentations(t.toString(),i.color,Y(i.range))).then(a=>{if(a)return a.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=I(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(I)),s})})}}class kt{constructor(n){this._worker=n}provideFoldingRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getFoldingRanges(t.toString(),i)).then(a=>{if(a)return a.map(o=>{const s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=xt(o.kind)),s})})}}function xt(e){switch(e){case M.Comment:return l.languages.FoldingRangeKind.Comment;case M.Imports:return l.languages.FoldingRangeKind.Imports;case M.Region:return l.languages.FoldingRangeKind.Region}}class Et{constructor(n){this._worker=n}provideSelectionRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getSelectionRanges(t.toString(),i.map(x))).then(a=>{if(a)return a.map(o=>{const s=[];for(;o;)s.push({range:A(o.range)}),o=o.parent;return s})})}}b.CompletionAdapter=nt,b.DefinitionAdapter=ft,b.DiagnosticsAdapter=Ke,b.DocumentColorAdapter=wt,b.DocumentFormattingEditProvider=bt,b.DocumentHighlightAdapter=ct,b.DocumentLinkAdapter=vt,b.DocumentRangeFormattingEditProvider=At,b.DocumentSymbolAdapter=mt,b.FoldingRangeAdapter=kt,b.HoverAdapter=ut,b.ReferenceAdapter=lt,b.RenameAdapter=gt,b.SelectionRangeAdapter=Et,b.fromPosition=x,b.fromRange=Y,b.toRange=A,b.toTextEdit=I}));
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/mdx-C6mq4H94",["exports","./editor.api-i0YVFWkl"],(function(t,e){"use strict";const o={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.languages.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.languages.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.languages.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.languages.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.languages.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.languages.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.languages.IndentAction.Outdent}},...Array.from({length:100},(s,n)=>({beforeText:new RegExp(`^${n}\\. .+`),action:{indentAction:e.languages.IndentAction.None,appendText:`${n+1}. `}}))]},i={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};t.conf=o,t.language=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/nls.messages-loader",["exports"],(function(s){"use strict";function a(o,l,n,t){const e=t["vs/nls"]?.availableLanguages?.["*"];!e||e==="en"?n({}):l([`vs/nls.messages.${e}`],()=>{n({})})}s.load=a,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
define("vs/nls.messages.de",["./_commonjsHelpers-CT9FvmAN"],(function(r){"use strict";var e={};/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/var n;function i(){return n||(n=1,globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","Eingabe","Groß-/Kleinschreibung beachten","Nur ganzes Wort suchen","Regulären Ausdruck verwenden","Eingabe","Groß-/Kleinschreibung beibehalten",'Überprüfen Sie dies in der barrierefreien Ansicht mit "{0}".','Überprüfen Sie dies in der barrierefreien Ansicht über den Befehl "Barrierefreie Ansicht öffnen", der zurzeit nicht über eine Tastenzuordnung ausgelöst werden kann.',"Fehler: {0}","Warnung: {0}","Info: {0}"," oder {0} für Verlauf"," ({0} für Verlauf)","Gelöschte Eingabe","Ungebunden","Auswahlfeld","Weitere Aktionen...","Zum Suchen eingeben","Schließen","Zum Suchen eingeben","Keine Ergebnisse gefunden.","Keine Ergebnisse","{0} Ergebnisse","Zum Filtern Text eingeben","Zum Suchen eingeben","Filter","Fuzzyübereinstimmung","(leer)","{0}: {1}","Ein Systemfehler ist aufgetreten ({0}).","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.","{0} ({1} Fehler gesamt)","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.","STRG","UMSCHALTTASTE","ALT","Windows","STRG","UMSCHALTTASTE","ALT","Super","Steuern","UMSCHALTTASTE","Option","Befehl","Steuern","UMSCHALTTASTE","ALT","Windows","Steuern","UMSCHALTTASTE","ALT","Super","Editor","Auf den Editor kann zurzeit nicht zugegriffen werden.","{0} Um den für die Sprachausgabe optimierten Modus zu aktivieren, verwenden Sie {1}","{0} Um den für die Sprachausgabe optimierten Modus zu aktivieren, öffnen Sie die Schnellauswahl mit {1}, und führen Sie den Befehl „Barrierefreiheitsmodus der Bildschirmsprachausgabe umschalten“ aus, der derzeit nicht über die Tastatur ausgelöst werden kann.","{0} Weisen Sie eine Tastenzuordnung für den Befehl „Barrierefreiheitsmodus der Sprachausgabe umschalten“ zu, indem Sie mit auf den Editor für Tastenzuordnungen zugreifen {1} und ihn ausführen.","Editor","Auch bei längeren Zeilen am Ende bleiben","Auch bei längeren Zeilen am Ende bleiben","Sekundäre Cursor entfernt","&&Rückgängig","Rückgängig","Rückgängig","&&Wiederholen","Wiederholen","Wiederholen","&&Alles auswählen","Alle auswählen","Alle auswählen","Verwenden des DOM-basierten Renderings","Halten Sie die {0}-Taste gedrückt, um mit der Maus darauf zu zeigen.","Wird geladen...","Gibt an, ob der Standbymodus von Inlinevervollständigungen derzeit aktiviert ist","Dauer für die Aktivierung des Standbymodus von Codevervollständigungen und NES auswählen","Standbymodus von Inlinevorschlägen aktivieren","Aktivierung des Standbymodus von Inlinevorschlägen abbrechen","Die Anzahl der Cursor wurde auf {0} beschränkt. Erwägen Sie die Verwendung von [Suchen und Ersetzen](https://code.visualstudio.com/docs/editor/codebasics#_find-und-ersetzen) für größere Änderungen, oder erhöhen Sie die Multicursorbegrenzungseinstellung des Editors.","Erhöhen des Grenzwerts für mehrere Cursor",'"Unveränderte Bereiche reduzieren" umschalten','"Verschobene Codeblöcke anzeigen" umschalten','"Bei eingeschränktem Speicherplatz Inlineansicht verwenden" umschalten',"Diff-Editor","Seite wechseln","Vergleichsmodus beenden","Alle unveränderten Regionen reduzieren","Alle unveränderten Regionen anzeigen","Zurücksetzen","Barrierefreier Diff-Viewer","Zum nächsten Unterschied wechseln","Zum vorherigen Unterschied wechseln",'Symbol für "Einfügen" im barrierefreien Diff-Viewer.','Symbol für "Entfernen" im barrierefreien Diff-Viewer.','Symbol für "Schließen" im barrierefreien Diff-Viewer.',"Schließen","Barrierefreier Diff-Viewer. Verwenden Sie den Pfeil nach oben und unten, um zu navigieren.","keine geänderten Zeilen","1 Zeile geändert","{0} Zeilen geändert","Unterschied {0} von {1}: ursprüngliche Zeile {2}, {3}, geänderte Zeile {4}, {5}","leer","{0}: unveränderte Zeile {1}","{0} ursprüngliche Zeile {1} geänderte Zeile {2}","+ {0} geänderte Zeile(n) {1}","– {0} Originalzeile {1}"," verwenden Sie {0}, um die Hilfe zur Barrierefreiheit zu öffnen.","Gelöschte Zeilen kopieren","Gelöschte Zeile kopieren","Geänderte Zeilen kopieren","Geänderte Zeile kopieren","Gelöschte Zeile kopieren ({0})","Geänderte Zeile ({0}) kopieren","Diese Änderung rückgängig machen","Bei eingeschränktem Speicherplatz Inlineansicht verwenden","Verschobene Codeblöcke anzeigen","Block wiederherstellen","Auswahl wiederherstellen","Barrierefreien Diff-Viewer öffnen","Unveränderten Bereich falten","{0} ausgeblendete Linien","Klicken oder ziehen Sie, um oben mehr anzuzeigen.","Unveränderte Regionen anzeigen","Klicken oder ziehen Sie, um unten mehr anzuzeigen.","{0} ausgeblendete Linien","Zum Auffalten doppelklicken","Code mit Änderungen in Zeile {0}-{1} verschoben","Code mit Änderungen aus Zeile {0}-{1} verschoben","Code in Zeile {0}-{1} verschoben","Code aus Zeile {0}-{1} verschobenLine truncated
|
||||
– Verwenden Sie 0, um die Zeilenhöhe automatisch anhand des Schriftgrads zu berechnen.\r
|
||||
– Werte zwischen 0 und 8 werden als Multiplikator mit dem Schriftgrad verwendet.\r
|
||||
– Werte größer oder gleich 8 werden als effektive Werte verwendet.`,"Steuert, ob die Minimap angezeigt wird.","Die Minimap wird immer angezeigt.","Die Minimap wird ausgeblendet, wenn sich der Cursor nicht über der Minimap befindet, und eingeblendet, wenn der Cursor auf die Minimap zeigt.","Die Minimap wird nur angezeigt, wenn der Editor gescrollt wird.","Steuert, ob die Minimap automatisch ausgeblendet wird.","Die Minimap hat die gleiche Größe wie der Editor-Inhalt (und kann scrollen).","Die Minimap wird bei Bedarf vergrößert oder verkleinert, um die Höhe des Editors zu füllen (kein Scrollen).","Die Minimap wird bei Bedarf verkleinert, damit sie nicht größer als der Editor ist (kein Scrollen).","Legt die Größe der Minimap fest.","Steuert die Seite, wo die Minimap gerendert wird.","Steuert, wann der Schieberegler für die Minimap angezeigt wird.","Maßstab des in der Minimap gezeichneten Inhalts: 1, 2 oder 3.","Die tatsächlichen Zeichen in einer Zeile rendern im Gegensatz zu Farbblöcken.","Begrenzen Sie die Breite der Minimap, um nur eine bestimmte Anzahl von Spalten zu rendern.","Steuert, ob benannte Bereiche als Abschnittsheader in der Minimap angezeigt werden.","Steuert, ob „MARK: Kommentare“ als Abschnittsheader in der Minimap angezeigt werden.",'Definiert den regulären Ausdruck, der zum Suchen von Abschnittsheadern in Kommentaren verwendet wird. Der RegEx muss eine benannte Übereinstimmungsgruppe "label" (geschrieben als "(?<label>.+)") enthalten, die den Abschnittsheader kapselt, andernfalls funktioniert er nicht. Optional können Sie eine andere Übereinstimmungsgruppe mit dem Namen "separator" einschließen. Verwenden Sie \\n im Muster, um mehrzeilige Header zuzuordnen.',"Steuert den Schriftgrad von Abschnittsüberschriften in der Minimap.","Steuert den Abstand (in Pixeln) zwischen den Zeichen der Abschnittsüberschrift. Dies erleichtert die Lesbarkeit der Kopfzeile bei kleinen Schriftgrößen.","Steuert den Abstand zwischen dem oberen Rand des Editors und der ersten Zeile.","Steuert den Abstand zwischen dem unteren Rand des Editors und der letzten Zeile.","Aktiviert ein Pop-up, das Dokumentation und Typ eines Parameters anzeigt während Sie tippen.","Steuert, ob das Menü mit Parameterhinweisen zyklisch ist oder sich am Ende der Liste schließt.","Schnelle Vorschläge werden im Vorschlagswidget angezeigt","Schnelle Vorschläge werden als inaktiver Text angezeigt","Schnelle Vorschläge sind deaktiviert","Schnellvorschläge innerhalb von Zeichenfolgen aktivieren.","Schnellvorschläge innerhalb von Kommentaren aktivieren.","Schnellvorschläge außerhalb von Zeichenfolgen und Kommentaren aktivieren.","Steuert, ob Vorschläge während des Tippens automatisch angezeigt werden sollen. Dies kann bei der Eingabe von Kommentaren, Zeichenketten und anderem Code kontrolliert werden. Schnellvorschläge können so konfiguriert werden, dass sie als Geistertext oder mit dem Vorschlags-Widget angezeigt werden. Beachten Sie auch die {0}-Einstellung, die steuert, ob Vorschläge durch Sonderzeichen ausgelöst werden.","Zeilennummern werden nicht dargestellt.","Zeilennummern werden als absolute Zahl dargestellt.","Zeilennummern werden als Abstand in Zeilen an Cursorposition dargestellt.","Zeilennummern werden alle 10 Zeilen dargestellt.","Steuert die Anzeige von Zeilennummern.","Anzahl der Zeichen aus Festbreitenschriftarten, ab der dieses Editor-Lineal gerendert wird.","Farbe dieses Editor-Lineals.","Vertikale Linien nach einer bestimmten Anzahl von Monospacezeichen rendern. Verwenden Sie mehrere Werte für mehrere Linien. Wenn das Array leer ist, werden keine Linien gerendert.","Die vertikale Bildlaufleiste wird nur bei Bedarf angezeigt.","Die vertikale Bildlaufleiste ist immer sichtbar.","Die vertikale Bildlaufleiste wird immer ausgeblendet.","Steuert die Sichtbarkeit der vertikalen Bildlaufleiste.","Die horizontale Bildlaufleiste wird nur bei Bedarf angezeigt.","Die horizontale Bildlaufleiste ist immer sichtbar.","Die horizontale Bildlaufleiste wird immer ausgeblendet.","Steuert die Sichtbarkeit der horizontalen Bildlaufleiste.","Die Breite der vertikalen Bildlaufleiste.","Die Höhe der horizontalen Bildlaufleiste.","Steuert, ob Klicks nach Seite scrollen oder zur Klickposition springen.","Wenn diese Option festgelegt ist, wird die Größe des Editorinhalts nicht durch die horizontale Scrollleiste vergrößert.","Legt fest, ob alle nicht einfachen ASCII-Zeichen hervorgehoben werden. Nur Zeichen zwischen U+0020 und U+007E, Tabulator, Zeilenvorschub und Wagenrücklauf gelten als einfache ASCII-Zeichen.","Legt fest, ob Zeichen, die nur als Platzhalter dienen oder überhaupt keine Breite haben, hervorgehoben werden.","Legt fest, ob Zeichen hervorgehoben werden, die mit einfachen ASCII-Zeichen verwechselt werden können, mit Ausnahme derjenigen, die im aktuellen Gebietsschema des Benutzers üblich sind.","Steuert, ob Zeichen in Kommentaren auch mit Unicode-Hervorhebung versehen werden sollen.","S
Line truncated
|
||||
Wenn mehrere Bearbeitungen für diese Art vorhanden sind, zeigt der Editor eine Auswahl an. Wenn keine Bearbeitungen dieser Art vorhanden sind, zeigt der Editor eine Fehlermeldung an.`,`Liste der bevorzugten Einfügebearbeitungsarten, die angewendet werden sollen.\r
|
||||
Die erste Bearbeitung, die den Einstellungen entspricht, wird angewendet.`,"Einfügen als...","Als Text einfügen","Gibt an, ob das Einfügewidget angezeigt wird.","Einfügeoptionen anzeigen...","Leer","Es wurden keine Einfügebearbeitungen für „{0}“ gefunden.","Die Einfügebearbeitung für '{0}' wird aufgelöst. Klicken Sie hier, um den Vorgang abzubrechen.","Einfügehandler werden ausgeführt. Klicken Sie hier, um den Vorgang abzubrechen und ein einfaches Einfügen auszuführen.","Konfigurieren der Standardaktion zum Einfügen","Einfügeaktion auswählen","Einfügehandler werden ausgeführt","Nur-Text einfügen","URI einfügen","URI einfügen","Pfade einfügen","Pfad einfügen","Relative Pfade einfügen","Relativen Pfad einfügen","HTML einfügen","Gibt an, ob das Ablagewidget angezeigt wird.","Ablageoptionen anzeigen...","Drophandler werden ausgeführt. Klicken Sie hier, um den Vorgang abzubrechen.",`Fehler beim Auflösen der Bearbeitung "{0}":\r
|
||||
{1}`,`Fehler beim Anwenden der Bearbeitung "{0}":\r
|
||||
{1}`,'Gibt an, ob der Editor einen abbrechbaren Vorgang ausführt, z. B. "Verweisvorschau".',"Die Datei ist zu groß, um einen Vorgang zum Ersetzen aller Elemente auszuführen.","&&Suchen","Keine Übereinstimmungen. Versuchen Sie, nach etwas anderem zu suchen.","Geben Sie eine Zahl ein, um zu einer bestimmten Übereinstimmung zu wechseln (zwischen 1 und {0}).","Zahl zwischen 1 und {0} eingeben","Zahl zwischen 1 und {0} eingeben","&&Ersetzen","Suchen","Mit Argumenten suchen","Mit Auswahl suchen","Weitersuchen","Vorheriges Element suchen","Zu Übereinstimmung wechseln ...","Nächste Auswahl suchen","Vorherige Auswahl suchen","Ersetzen","Symbol für die Anzeige, dass das Editor-Such-Widget zugeklappt wurde.","Symbol für die Anzeige, dass das Editor-Such-Widget aufgeklappt wurde.",'Symbol für "In Auswahl suchen" im Editor-Such-Widget.','Symbol für "Ersetzen" im Editor-Such-Widget.','Symbol für "Alle ersetzen" im Editor-Such-Widget.','Symbol für "Vorheriges Element suchen" im Editor-Such-Widget.','Symbol für "Nächstes Element suchen" im Editor-Such-Widget.',"Suchen/Ersetzen","Suchen","Suchen","Vorherige Übereinstimmung","Nächste Übereinstimmung","In Auswahl suchen","Schließen","Ersetzen","Ersetzen","Ersetzen","Alle ersetzen","Ersetzen umschalten","Nur die ersten {0} Ergebnisse wurden hervorgehoben, aber alle Suchoperationen werden auf dem gesamten Text durchgeführt.","{0} von {1}","Keine Ergebnisse","{0} gefunden",'{0} für "{1}" gefunden','{0} für "{1}" gefunden, bei {2}','{0} für "{1}" gefunden',"Auffalten","Faltung rekursiv aufheben","Falten","Einklappung umschalten","Rekursiv falten","Rekursiv falten umschalten","Alle Blockkommentare falten","Alle Regionen falten","Alle Regionen auffalten","Alle bis auf ausgewählte falten","Alle bis auf ausgewählte auffalten","Alle falten","Alle auffalten","Zur übergeordneten Reduzierung wechseln","Zum vorherigen Faltbereich wechseln","Zum nächsten Faltbereich wechseln","Faltungsbereich aus Auswahl erstellen","Manuelle Faltbereiche entfernen","Importfaltung umschalten","Faltebene {0}","Hintergrundfarbe hinter gefalteten Bereichen. Die Farbe darf nicht deckend sein, sodass zugrunde liegende Dekorationen nicht ausgeblendet werden.","Farbe des reduzierten Texts nach der ersten Zeile eines gefalteten Bereichs.","Farbe des Faltsteuerelements im Editor-Bundsteg.","Symbol für aufgeklappte Bereiche im Editor-Glyphenrand.","Symbol für zugeklappte Bereiche im Editor-Glyphenrand.","Symbol für manuell reduzierte Bereiche im Glyphenrand des Editors.","Symbol für manuell erweiterte Bereiche im Glyphenrand des Editors.","Klicken Sie hier, um den Bereich zu erweitern.","Klicken Sie hier, um den Bereich zu reduzieren.","Schriftgrad des Editors erhöhen","Schriftgrad des Editors verringern","Editor-Schriftgrad zurücksetzen","Dokument formatieren","Auswahl formatieren","Symbol für den Marker zum Wechseln zum nächsten Element.","Symbol für den Marker zum Wechseln zum vorherigen Element.","Nächstes &&Problem","Vorheriges &&Problem","Gehe zu nächstem Problem (Fehler, Warnung, Information)","Gehe zu vorigem Problem (Fehler, Warnung, Information)","Gehe zu dem nächsten Problem in den Dateien (Fehler, Warnung, Info)","Gehe zu dem vorherigen Problem in den Dateien (Fehler, Warnung, Info)","Fehler","Warnung","Info","Hinweis","{0} bei {1}. ","{0} von {1} Problemen","{0} von {1} Problemen","Editormarkierung: Farbe bei Fehler des Navigationswidgets.","Hintergrund der Fehlerüberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Farbe bei Warnung des Navigationswidgets.","Hintergrund der Warnungsüberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Farbe bei Information des Navigationswidgets.","Hintergrund der Informationsüberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Hintergrund des Navigationswidgets.","Vorschau","Definitionen",'Keine Definition gefunden für "{0}".',"Keine Definition gefunden","Gehe &&zu Definition","Deklarationen",'Keine Deklaration für "{0}" gefunden.',"Keine Deklaration gefunden.","Gehe zu &&Deklaration",'Keine Deklaration für "{0}" gefunden.',"Keine Deklaration gefunden.","Typdefinitionen",'Keine Typendefinition gefunden für "{0}"',"Keine Typendefinition gefunden","Zur &&Typdefinition wechseln","Implementierungen",'Keine Implementierung gefunden für "{0}"',"Keine Implementierung gefunden","Gehe zu &&Implementierungen",'Für "{0}" wurden keine Verweise gefunden.',"Keine Referenzen gefunden","Gehe zu &&Verweisen","Verweise","Verweise","Speicherorte",'Keine Ergebnisse für "{0}"',"Verweise","Gehe zu Definition","Definition an der Seite öffnen","Definition einsehen","Zur Deklaration wechseln","Vorschau für Deklaration anzeigen","Zur Typdefinition wechseln","Vorschau der Typdefinition anzeigen","Gehe zu Implementierungen","Vorschau für Implementierungen anzeigen","Gehe zu Verweisen","Vorschau für Verweise anzeigen","Zum beliebigem Symbol wechseln","Klicken Sie, um {0} Definitionen a
Line truncated
|
||||
\r
|
||||
Es wird empfohlen, sie aus der Datei zu entfernen. Dies kann über "editor.unusualLineTerminators" konfiguriert werden.`,"&&Ungewöhnliche Zeilenabschlusszeichen entfernen","Ignorieren","Hintergrundfarbe eines Symbols beim Lesezugriff, z.B. beim Lesen einer Variablen. Die Farbe darf nicht deckend sein, damit sie nicht die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe eines Symbols bei Schreibzugriff, z.B. beim Schreiben in eine Variable. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Die Hintergrundfarbe eines Textteils für ein Symbol. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden.","Randfarbe eines Symbols beim Lesezugriff, wie etwa beim Lesen einer Variablen.","Randfarbe eines Symbols beim Schreibzugriff, wie etwa beim Schreiben einer Variablen.","Die Rahmenfarbe eines Textteils für ein Symbol.","Übersichtslinealmarkerfarbd für das Hervorheben von Symbolen. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Übersichtslinealmarkerfarbe für Symbolhervorhebungen bei Schreibzugriff. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Die Markierungsfarbe des Übersichtslineals eines Textteils für ein Symbol. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden.","Gehe zur nächsten Symbolhervorhebungen","Gehe zur vorherigen Symbolhervorhebungen","Symbol-Hervorhebung ein-/ausschalten","Wort löschen","Fehler an Position","Fehler","Warnung an Position","Warnung","Fehler in der Zeile","Fehler in Zeile","Warnung in der Zeile","Warnung in Zeile","Gefalteter Bereich in der Zeile","Gefaltet","Haltepunkt in der Zeile","Haltepunkt","Inlinevorschlag in der Zeile","Nächster Bearbeitungsvorschlag in der Zeile","Nächster Bearbeitungsvorschlag","Terminale schnelle Problembehebung","Schnelle Problembehebung","Debugger auf Haltepunkt beendet","Haltepunkt","Keine Inlay-Hinweise in der Zeile","Keine Inlay-Hinweise","Aufgabe abgeschlossen","Aufgabe abgeschlossen","Aufgabe fehlgeschlagen","Fehler bei Aufgabe","Terminalbefehl fehlgeschlagen","Befehl fehlgeschlagen","Terminalbefehl erfolgreich","Befehl erfolgreich","Terminalglocke","Terminalglocke","Notebookzelle abgeschlossen","Notebookzelle abgeschlossen","Notebookzelle fehlgeschlagen","Notebookzelle fehlgeschlagen","Vergleichslinie eingefügt","Vergleichslinie gelöscht","Vergleichslinie geändert","Geänderte Datei im Chat bearbeiten","Aus Chatbearbeitungen geänderte Datei","Chatanfrage gesendet","Chatanfrage gesendet","Chatantwort empfangen","Codeaktionsanforderung ausgelöst","Codeaktionsanforderung ausgelöst","Angewendete Codeaktion","Status","Status","Löschen","Löschen","Speichern","Speichern","Format","Formatieren","Sprachaufzeichnung gestartet","Sprachaufzeichnung beendet","Bearbeitungen beibehalten","Bearbeitungen beibehalten","Bearbeitungen rückgängig machen","Bearbeitungen rückgängig gemacht","Chatbenutzeraktion erforderlich","Chatbenutzeraktion erforderlich","Ansehen","Hilfe","Test","Datei","Einstellungen","Entwickler","{0} ({1})","{0} ({1})",`{0}\r
|
||||
[{1}] {2}`,"{1} bis {0}","{0} ({1})","Ausblenden","Menü zurücksetzen",'"{0}" ausblenden',"Tastenzuordnung konfigurieren","{0} zum Anwenden, {1} für Vorschau","{0} zum Anwenden","{0} deaktiviert, Grund: {1}","Aktionswidget","Hintergrundfarbe für umgeschaltete Aktionselemente in der Aktionsleiste.","Gibt an, ob die Aktionswidgetliste sichtbar ist.","Codeaktionswidget ausblenden","Vorherige Aktion auswählen","Nächste Aktion auswählen","Ausgewählte Aktion akzeptieren","Vorschau für ausgewählte Elemente anzeigen","Außerkraftsetzungen für die Standardsprachkonfiguration","Konfigurieren Sie Einstellungen, die für {0} überschrieben werden sollen.","Zu überschreibende Editor-Einstellungen für eine Sprache konfigurieren.","Diese Einstellung unterstützt keine sprachspezifische Konfiguration.","Zu überschreibende Editor-Einstellungen für eine Sprache konfigurieren.","Diese Einstellung unterstützt keine sprachspezifische Konfiguration.","Eine leere Eigenschaft kann nicht registriert werden.",'"{0}" kann nicht registriert werden. Stimmt mit dem Eigenschaftsmuster "\\\\[.*\\\\]$" zum Beschreiben sprachspezifischer Editor-Einstellungen überein. Verwenden Sie den Beitrag "configurationDefaults".','{0}" kann nicht registriert werden. Diese Eigenschaft ist bereits registriert.','"{0}" kann nicht registriert werden. Die zugeordnete Richtlinie {1} ist bereits bei {2} registriert.',"Ein Befehl, der Informationen zu Kontextschlüsseln zurückgibt","Leerer Kontextschlüsselausdruck","Haben Sie vergessen, einen Ausdruck zu schreiben? Sie können auch „false“ oder „true“ festlegen, um immer auf „false“ oder „true“ auszuwerten.","„in“ nach „not“.","schließende Klammer „)“","Unerwartetes Token","Haben Sie vergessen, && oder || vor dem Token einzufügen?","Unerwartetes Ende des Ausdrucks.","Haben Sie vergessen, einen Kontextschlüssel zu setzen?",`Erwartet: {0}\r
|
||||
Empfangen: „{1}“.`,"Gibt an, ob macOS als Betriebssystem verwendet wird.","Gibt an, ob Linux als Betriebssystem verwendet wird.","Gibt an, ob Windows als Betriebssystem verwendet wird.","Gibt an, ob es sich bei der Plattform um einen Webbrowser handelt.","Gibt an, ob macOS auf einer Nicht-Browser-Plattform als Betriebssystem verwendet wird.","Gibt an, ob iOS als Betriebssystem verwendet wird.","Gibt an, ob es sich bei der Plattform um einen mobilen Webbrowser handelt.","Qualitätstyp des VS Codes","Gibt an, ob sich der Tastaturfokus in einem Eingabefeld befindet.","Meinten Sie {0}?","Meinten Sie {0} oder {1}?","Meinten Sie {0}, {1} oder {2}?","Haben Sie vergessen, das Anführungszeichen zu öffnen oder zu schließen?","Haben Sie vergessen, das Zeichen „/“ (Schrägstrich) zu escapen? Setzen Sie zwei Backslashes davor, um es zu escapen, z. B. „\\\\/“.","Gibt an, ob Vorschläge sichtbar sind.","({0}) wurde gedrückt. Es wird auf die zweite Taste in der Kombination gewartet...","({0}) wurde gedrückt. Es wird auf die zweite Taste in der Kombination gewartet...","Die Tastenkombination ({0}, {1}) ist kein Befehl.","Die Tastenkombination ({0}, {1}) ist kein Befehl.","Workbench","Ist unter Windows und Linux der STRG-Taste und unter macOS der Befehlstaste zugeordnet.","Ist unter Windows und Linux der ALT-Taste und unter macOS der Wahltaste zugeordnet.",'Der Modifizierer zum Hinzufügen eines Elements in Bäumen und Listen zu einer Mehrfachauswahl mit der Maus (zum Beispiel im Explorer, in geöffneten Editoren und in der SCM-Ansicht). Die Mausbewegung "Seitlich öffnen" wird – sofern unterstützt – so angepasst, dass kein Konflikt mit dem Modifizierer für Mehrfachauswahl entsteht.',"Steuert, wie Elemente in Strukturen und Listen mithilfe der Maus geöffnet werden (sofern unterstützt). Bei übergeordneten Elementen, deren untergeordnete Elemente sich in Strukturen befinden, steuert diese Einstellung, ob ein Einfachklick oder ein Doppelklick das übergeordnete Elemente erweitert. Beachten Sie, dass einige Strukturen und Listen diese Einstellung ggf. ignorieren, wenn sie nicht zutrifft.","Steuert, ob Listen und Strukturen ein horizontales Scrollen in der Workbench unterstützen. Warnung: Das Aktivieren dieser Einstellung kann sich auf die Leistung auswirken.","Steuert, ob Klicks in der Bildlaufleiste Seite für Seite scrollen.","Steuert den Struktureinzug in Pixeln.","Steuert, ob die Struktur Einzugsführungslinien rendern soll.","Steuert, ob Listen und Strukturen einen optimierten Bildlauf verwenden.",'Ein Multiplikator, der für die Mausrad-Bildlaufereignisse "deltaX" und "deltaY" verwendet werden soll.',"Multiplikator für Scrollgeschwindigkeit bei Drücken von ALT.","Elemente beim Suchen hervorheben. Die Navigation nach oben und unten durchläuft dann nur die markierten Elemente.","Filterelemente bei der Suche.","Steuert den Standardsuchmodus für Listen und Strukturen in der Workbench.","Bei der einfachen Tastaturnavigation werden Elemente in den Fokus genommen, die mit der Tastatureingabe übereinstimmen. Die Übereinstimmungen gelten nur für Präfixe.","Hervorheben von Tastaturnavigationshervorgebungselemente, die mit der Tastatureingabe übereinstimmen. Beim nach oben und nach unten Navigieren werden nur die hervorgehobenen Elemente durchlaufen.","Durch das Filtern der Tastaturnavigation werden alle Elemente herausgefiltert und ausgeblendet, die nicht mit der Tastatureingabe übereinstimmen.",'Steuert die Tastaturnavigation in Listen und Strukturen in der Workbench. Kann "simple" (einfach), "highlight" (hervorheben) und "filter" (filtern) sein.',"Bitte verwenden Sie stattdessen „workbench.list.defaultFindMode“ und „workbench.list.typeNavigationMode“.","Verwenden Sie bei der Suche eine Fuzzyübereinstimmung.","Verwenden Sie bei der Suche eine zusammenhängende Übereinstimmung.","Steuert den Typ der Übereinstimmung, der beim Durchsuchen von Listen und Strukturen in der Workbench verwendet wird.","Steuert, wie Strukturordner beim Klicken auf die Ordnernamen erweitert werden. Beachten Sie, dass einige Strukturen und Listen diese Einstellung ggf. ignorieren, wenn sie nicht zutrifft.","Steuert, ob fester Bildlauf in Strukturen aktiviert ist.","Steuert die Anzahl der festen Elemente, die in der Struktur angezeigt werden, wenn {0} aktiviert ist.",'Steuert die Funktionsweise der Typnavigation in Listen und Strukturen in der Workbench. Bei einer Festlegung auf "trigger" beginnt die Typnavigation, sobald der Befehl "list.triggerTypeNavigation" ausgeführt wird.',"Fehler","Warnung","Info","Fehler","Warnungen","Infos",'Probleme sind angehalten, Grund: "{0}"','Probleme sind angehalten, Grund: "{0}" und {1} weitere',"zuletzt verwendet","ähnliche Befehle","häufig verwendet","andere Befehle","ähnliche Befehle","{0}, {1}",'Der Befehl "{0}" hat zu einem Fehler geführt.',"{0}, {1}","Gibt an, ob sich der Tastaturfokus innerhalb des Steuerelements für die Schnelleingabe befindet.","Die Ausrichtung d
Line truncated
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
define("vs/nls.messages.es",["./_commonjsHelpers-CT9FvmAN"],(function(o){"use strict";var e={};/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/var a;function r(){return a||(a=1,globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","entrada","Coincidir mayúsculas y minúsculas","Solo palabras completas","Usar expresión regular","entrada","Conservar may/min","Inspeccione esto en la vista accesible con {0}.","Inspeccione esto en la vista accesible mediante el comando Abrir vista accesible, que actualmente no se puede desencadenar mediante el enlace de teclado.","Error: {0}","Advertencia: {0}","Información: {0}"," o {0} para el historial"," ({0} para el historial)","Entrada borrada","Sin enlazar","Seleccionar cuadro","Más Acciones...","Escriba texto para buscar","Cerrar","Escriba texto para buscar","No se encontraron resultados.","No hay resultados","{0} resultados","Escriba texto para filtrar","Escriba texto para buscar","Filtrar","Coincidencia aproximada","(vacío)","{0}: {1}","Error del sistema ({0})","Se ha producido un error desconocido. Consulte el registro para obtener más detalles.","Se ha producido un error desconocido. Consulte el registro para obtener más detalles.","{0} ({1} errores en total)","Se ha producido un error desconocido. Consulte el registro para obtener más detalles.","Ctrl","Mayús","Alt","Windows","Ctrl","Mayús","Alt","Super","Control","Mayús","Opción","Comando","Control","Mayús","Alt","Windows","Control","Mayús","Alt","Super","editor","No se puede acceder al editor en este momento.","{0} Para habilitar el modo optimizado para lectores de pantalla, use {1}","{0} Para habilitar el modo optimizado para lector de pantalla, abra la selección rápida con {1} y ejecute el comando Alternar modo de accesibilidad del lector de pantalla, que actualmente no se puede desencadenar mediante el teclado.","{0} Para asignar un enlace de teclado para el comando Alternar modo de accesibilidad del lector de pantalla, acceda al editor de enlaces de teclado con {1} y ejecútelo.","editor","Anclar al final incluso cuando se vayan a líneas más largas","Anclar al final incluso cuando se vayan a líneas más largas","Cursores secundarios quitados","&&Deshacer","Deshacer","Deshacer","&&Rehacer","Rehacer","Rehacer","&&Seleccionar todo","Seleccionar todo","Seleccionar todo","Uso de la representación basada en DOM","Mantenga presionada la tecla {0} para pasar el mouse","Cargando...","Si las finalizaciones insertadas están pospuestas actualmente","Selecciona la duración de la posposición para las finalizaciones de código y NES","Posponer sugerencias insertadas","Cancelar posponer sugerencias insertadas","El número de cursores se ha limitado a {0}. Considere la posibilidad de usar [buscar y reemplazar](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) para realizar cambios mayores o aumentar la configuración del límite de varios cursores del editor.","Aumentar el límite de varios cursores","Alternar contraer regiones sin cambios","Alternar Mostrar bloques de código movidos","Alternar el uso de la vista insertada cuando el espacio es limitado","Editor de diferencias","Lado del conmutador","Salir de la comparación de movimientos","Contraer todas las regiones sin cambios","Mostrar todas las regiones sin cambios","Revertir","Visor de diferencias accesibles","Ir a la siguiente diferencia","Ir a la diferencia anterior",'Icono de "Insertar" en el visor de diferencias accesible.','Icono de "Quitar" en el visor de diferencias accesible.','Icono de "Cerrar" en el visor de diferencias accesible.',"Cerrar","Visor de diferencias accesible. Utilice la flecha hacia arriba y hacia abajo para navegar.","no se han cambiado líneas","1 línea cambiada","{0} líneas cambiadas","Diferencia {0} de {1}: línea original {2}, {3}, línea modificada {4}, {5}","vacío","{0} línea sin cambios {1}","{0} línea original {1} línea modificada {2}","+ {0} línea modificada {1}","- {0} línea original {1}"," use {0} para abrir la ayuda de accesibilidad.","Copiar líneas eliminadas","Copiar línea eliminada","Copiar líneas cambiadas","Copiar línea cambiada","Copiar la línea eliminada ({0})","Copiar línea cambiada ({0})","Revertir este cambio","Uso de la vista insertada cuando el espacio es limitado","Mostrar bloques de código movidos","Revertir bloque","Revertir selección","Abrir visor de diferencias accesibles","Plegar la región sin cambios","{0} líneas ocultas","Haga clic o arrastre para mostrar más arriba","Mostrar región sin cambios","Hacer clic o arrastrar para mostrar más abajo","{0} líneas ocultas","Doble clic para desplegar","Código movido con cambios en la línea {0}-{1}","Código movido con cambios de la línea {0}-{1}","Código movido a la línea {0}-{1}","Código movido de la línea {0}-{1}","Revertir los cambios seleccionados","Revertir el cambio","Color del borde del texto que se movió en el editor de diferencias.","Color del borde de texto activo que se movió en el editor de diferencias.","Color de la sombra paralela en torno a los widgets de región sin camLine truncated
|
||||
- Use 0 para calcular automáticamente el alto de línea a partir del tamaño de la fuente.\r
|
||||
- Los valores entre 0 y 8 se usarán como multiplicador con el tamaño de fuente.\r
|
||||
- Los valores mayores o igual que 8 se usarán como valores efectivos.`,"Controla si se muestra el minimapa.","El minimapa siempre se muestra.","El minimapa se oculta cuando el ratón no está sobre él y se muestra cuando el ratón está sobre el minimapa.","El minimapa solo se muestra cuando se desplaza el editor","Controla si el minimapa se oculta automáticamente.","El minimapa tiene el mismo tamaño que el contenido del editor (y podría desplazarse).","El minimapa se estirará o reducirá según sea necesario para ocupar la altura del editor (sin desplazamiento).","El minimapa se reducirá según sea necesario para no ser nunca más grande que el editor (sin desplazamiento).","Controla el tamaño del minimapa.","Controla en qué lado se muestra el minimapa.","Controla cuándo se muestra el control deslizante del minimapa.","Escala del contenido dibujado en el minimapa: 1, 2 o 3.","Represente los caracteres reales en una línea, por oposición a los bloques de color.","Limite el ancho del minimapa para representar como mucho un número de columnas determinado.","Controla si las regiones con nombre se muestran como encabezados de sección en el minimapa.","Controla si los comentarios MARK: se muestran como encabezados de sección en el minimapa.","Define la expresión regular usada para buscar encabezados de sección en los comentarios. La expresión regular debe contener un grupo de coincidencias con nombre 'label' (escrito como '(?<label>.+)') que encapsula el encabezado de sección; de lo contrario, no funcionará. Opcionalmente, puede incluir otro grupo de coincidencias denominado 'separador'. Use \\n en el patrón para hacer coincidir los encabezados de varias líneas.","Controla el tamaño de fuente de los encabezados de sección en el minimapa.","Controla la cantidad de espacio (en píxeles) entre los caracteres del encabezado de sección. Esto aumenta la legibilidad del encabezado en tamaños de fuente pequeños.","Controla la cantidad de espacio entre el borde superior del editor y la primera línea.","Controla el espacio entre el borde inferior del editor y la última línea.","Habilita un elemento emergente que muestra documentación de los parámetros e información de los tipos mientras escribe.","Controla si el menú de sugerencias de parámetros se cicla o se cierra al llegar al final de la lista.","Las sugerencias rápidas se muestran dentro del widget de sugerencias","Las sugerencias rápidas se muestran como texto fantasma","Las sugerencias rápidas están deshabilitadas","Habilita sugerencias rápidas en las cadenas.","Habilita sugerencias rápidas en los comentarios.","Habilita sugerencias rápidas fuera de las cadenas y los comentarios.","Controla si las sugerencias deben mostrarse automáticamente al escribir. Puede controlarse para la escritura en comentarios, cadenas y otro código. Las sugerencias rápidas pueden configurarse para mostrarse como texto fantasma o con el widget de sugerencias. Tenga en cuenta también la configuración de {0} que controla si los caracteres especiales desencadenan las sugerencias.","Los números de línea no se muestran.","Los números de línea se muestran como un número absoluto.","Los números de línea se muestran como distancia en líneas a la posición del cursor.","Los números de línea se muestran cada 10 líneas.","Controla la visualización de los números de línea.","Número de caracteres monoespaciales en los que se representará esta regla del editor.","Color de esta regla del editor.","Muestra reglas verticales después de un cierto número de caracteres monoespaciados. Usa múltiples valores para mostrar múltiples reglas. Si la matriz está vacía, no se muestran reglas.","La barra de desplazamiento vertical estará visible solo cuando sea necesario.","La barra de desplazamiento vertical estará siempre visible.","La barra de desplazamiento vertical estará siempre oculta.","Controla la visibilidad de la barra de desplazamiento vertical.","La barra de desplazamiento horizontal estará visible solo cuando sea necesario.","La barra de desplazamiento horizontal estará siempre visible.","La barra de desplazamiento horizontal estará siempre oculta.","Controla la visibilidad de la barra de desplazamiento horizontal.","Ancho de la barra de desplazamiento vertical.","Altura de la barra de desplazamiento horizontal.","Controla si al hacer clic se desplaza por página o salta a la posición donde se hace clic.","Cuando se establece, la barra de desplazamiento horizontal no aumentará el tamaño del contenido del editor.","Controla si se resaltan todos los caracteres ASCII no básicos. Solo los caracteres entre U+0020 y U+007E, tabulación, avance de línea y retorno de carro se consideran ASCII básicos.","Controla si se resaltan los caracteres que solo reservan espacio o que no tienen ancho.","Controla si se resaltan caracteres que se pueden confundir con caracteres ASCII básicos, excepto los que son comunes en la configuración regi
Line truncated
|
||||
En caso de haber varias ediciones para esta variante, el editor mostrará un selector. En caso de que no haya ediciones de este tipo, el editor mostrará un mensaje de error.`,`Lista de variantes de edición de pegado preferidas para su intento de aplicación.\r
|
||||
Se aplicará la primera edición que coincida con las preferencias.`,"Pegar como...","Pegar como texto","Si se muestra el widget de pegado","Mostrar opciones de pegado...","vacío","No se encontraron ediciones de pegado para '{0}'","Resolviendo la edición de pegado para '{0}'. Haga clic para cancelar","Ejecutando controladores de pegado. Haga clic para cancelar y hacer pegado básico","Configurar la acción de pegado predeterminada","Seleccionar acción pegar","Ejecutando controladores de pegado","Insertar texto sin formato","Insertar URIs","Insertar URI","Insertar rutas de acceso","Insertar ruta de acceso","Insertar rutas de acceso relativas","Insertar ruta de acceso relativa","Insertar HTML","Si se muestra el widget de colocación","Mostrar opciones de colocación...","Ejecutando controladores de colocación. Haga clic para cancelar.",`Error al resolver la edición "{0}":\r
|
||||
{1}`,`Error al aplicar la edición ''{0}:\r
|
||||
{1}`,'Indica si el editor ejecuta una operación que se puede cancelar como, por ejemplo, "Inspeccionar referencias"',"El archivo es demasiado grande para realizar una operación de reemplazar todo.","&&Buscar","No hay coincidencias. Intente buscar otra cosa.","Escriba un número para ir a una coincidencia específica (entre 1 y {0})","Escriba un número entre 1 y {0}","Escriba un número entre 1 y {0}","&&Reemplazar","Buscar","Búsqueda con argumentos","Buscar con selección","Buscar siguiente","Buscar anterior","Ir a Coincidencia...","Buscar selección siguiente","Buscar selección anterior","Reemplazar","Icono para indicar que el widget de búsqueda del editor está contraído.","Icono para indicar que el widget de búsqueda del editor está expandido.",'Icono para "Buscar en selección" en el widget de búsqueda del editor.','Icono para "Reemplazar" en el widget de búsqueda del editor.','Icono para "Reemplazar todo" en el widget de búsqueda del editor.','Icono para "Buscar anterior" en el widget de búsqueda del editor.','Icono para "Buscar siguiente" en el widget de búsqueda del editor.',"Buscar y reemplazar","Buscar","Buscar","Coincidencia anterior","Coincidencia siguiente","Buscar en selección","Cerrar","Reemplazar","Reemplazar","Reemplazar","Reemplazar todo","Alternar reemplazar","Sólo los primeros {0} resultados son resaltados, pero todas las operaciones de búsqueda trabajan en todo el texto.","{0} de {1}","No hay resultados","Encontrados: {0}",'{0} encontrado para "{1}"','{0} encontrado para "{1}", en {2}','{0} encontrado para "{1}"',"Desplegar","Desplegar de forma recursiva","Plegar","Alternar plegado","Plegar de forma recursiva","Alternar plegado recursivo","Cerrar todos los comentarios de bloque","Plegar todas las regiones","Desplegar Todas las Regiones","Plegar todas excepto las seleccionadas","Desplegar todas excepto las seleccionadas","Plegar todo","Desplegar todo","Ir al plegado primario","Ir al rango de plegado anterior","Ir al rango de plegado siguiente","Crear rango de plegado a partir de la selección","Quitar rangos de plegado manuales","Alternar plegamiento de importación","Nivel de plegamiento {0}","Color de fondo detrás de los rangos plegados. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del texto contraído después de la primera línea de un rango doblado.","Color del control plegable en el medianil del editor.","Icono de rangos expandidos en el margen de glifo del editor.","Icono de rangos contraídos en el margen de glifo del editor.","Icono de intervalos contraídos manualmente en el margen del glifo del editor.","Icono de intervalos expandidos manualmente en el margen del glifo del editor.","Haga clic para expandir el rango.","Haga clic para contraer el intervalo.","Aumentar el tamaño de fuente del editor","Disminuir el tamaño de fuente del editor","Restablecer tamaño de fuente del editor","Dar formato al documento","Dar formato a la selección","Icono para ir al marcador siguiente.","Icono para ir al marcador anterior.","Siguiente &&problema","Anterior &&problema","Ir al siguiente problema (Error, Advertencia, Información)","Ir al problema anterior (Error, Advertencia, Información)","Ir al siguiente problema en Archivos (Error, Advertencia, Información)","Ir al problema anterior en Archivos (Error, Advertencia, Información)","Error","Advertencia","Información","Sugerencia","{0} en {1}. ","{0} de {1} problemas","{0} de {1} problema","Color de los errores del widget de navegación de marcadores del editor.","Fondo del encabezado del error del widget de navegación del marcador de editor.","Color de las advertencias del widget de navegación de marcadores del editor.","Fondo del encabezado de la advertencia del widget de navegación del marcador de editor.","Color del widget informativo marcador de navegación en el editor.","Fondo del encabezado de información del widget de navegación del marcador de editor.","Fondo del widget de navegación de marcadores del editor.","Ver","Definiciones",'No se encontró ninguna definición para "{0}"',"No se encontró ninguna definición","Ir a &&definición","Declaraciones","No se encontró ninguna definición para '{0}'","No se encontró ninguna declaración","Ir a &&declaración","No se encontró ninguna definición para '{0}'","No se encontró ninguna declaración","Definiciones de tipo",'No se encontró ninguna definición de tipo para "{0}"',"No se encontró ninguna definición de tipo","Ir a la definición de &&tipo","Implementaciones",'No se encontró ninguna implementación para "{0}"',"No se encontró ninguna implementación","Ir a &&implementaciones",'No se ha encontrado ninguna referencia para "{0}".',"No se encontraron referencias","Ir a &&referencias","Referencias","Referencias","Ubicaciones",'No hay resultados para "{0}"',"Referencias","Ir a definición","Abrir definición en el lateral","Ver la definición sin salir","Ir a Definición","Inspeccionar Definición","Ir a la d
Line truncated
|
||||
\r
|
||||
Se recomienda eliminarlos del archivo. Esto puede configurarse mediante "editor.unusualLineTerminators".`,"&&Quitar terminadores de línea inusuales","Omitir","Color de fondo de un símbolo durante el acceso de lectura, como la lectura de una variable. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de fondo de un símbolo durante el acceso de escritura, como escribir en una variable. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de fondo de la presencia textual para un símbolo. Para evitar ocultar cualquier decoración subyacente, el color no debe ser opaco.","Color de fondo de un símbolo durante el acceso de lectura; por ejemplo, cuando se lee una variable.","Color de fondo de un símbolo durante el acceso de escritura; por ejemplo, cuando se escribe una variable.","Color de borde de una repetición textual de un símbolo.","Color del marcador de regla general para destacados de símbolos. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de marcador de regla general para destacados de símbolos de acceso de escritura. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del marcador de regla de información general de una repetición textual de un símbolo. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Ir al siguiente símbolo destacado","Ir al símbolo destacado anterior","Desencadenar los símbolos destacados","Eliminar palabra","Error en la posición","Error","Advertencia en posición","Advertencia","Error en la línea","Error en la línea","Advertencia en la línea","Advertencia en la línea","Área doblada en la línea","Contraída","Punto de interrupción en la línea","Punto de interrupción","Sugerencia insertada en la línea","Siguiente sugerencia de edición en línea","Siguiente sugerencia de edición","Corrección rápida del terminal","Corrección rápida","Depurador detenido en el punto de interrupción","Punto de interrupción","No hay sugerencias de incrustación en la línea","No hay sugerencias de incrustación","Tarea completada.","Tarea completada.","Error en la tarea","Error en la tarea","Error del comando de terminal","Error del comando","Comando de terminal correcto","Comando correcto","Campana de terminal","Campana de terminal","Celda del bloc de notas completada","Celda del bloc de notas completada","Error en la celda del bloc de notas","Error en la celda del bloc de notas","Línea de diferencia insertada","Línea de diferencia eliminada","Línea de diferencia modificada","Editar archivo modificado de chat","Archivo modificado desde ediciones de chat","Se envió una solicitud de chat","Se envió una solicitud de chat","Respuesta de chat recibida","Solicitud de acción de código desencadenada","Solicitud de acción de código desencadenada","Acción de código aplicada","Progreso","Progreso","Borrar","Borrar","Guardar","Guardar","Formato","Formato","Grabación de voz iniciada","Grabación de voz detenida","Ediciones guardadas","Ediciones guardadas","Deshacer ediciones","Ediciones deshechas","Acción necesaria por parte del usuario del chat","Acción necesaria por parte del usuario del chat","Ver","Ayuda","Probar","archivo","Preferencias","Desarrollador","{0} ({1})","{0} ({1})",`{0}\r
|
||||
[{1}] {2}`,"{1} al {0}","{0} ({1})","Ocultar","Menú Restablecer",'Ocultar "{0}"',"Configurar el enlace de teclado","{0} para aplicar, {1} para previsualizar","{0} para aplicar","{0}, Motivo de deshabilitación: {1}","Widget de acción","Color de fondo de los elementos de acción alternados en la barra de acciones.","Si la lista de widgets de acción es visible","Ocultar el widget de acción","Seleccione la acción anterior","Seleccione la siguiente acción","Aceptar la acción seleccionada","Vista previa de la acción seleccionada","La configuración del lenguaje predeterminada se reemplaza","Configure los valores que se van a invalidar para {0}.","Establecer los valores de configuración que se reemplazarán para un lenguaje.","Esta configuración no admite la configuración por idioma.","Establecer los valores de configuración que se reemplazarán para un lenguaje.","Esta configuración no admite la configuración por idioma.","No se puede registrar una propiedad vacía.",`No se puede registrar "{0}". Coincide con el patrón de propiedad '\\\\[.*\\\\]$' para describir la configuración del editor específica del lenguaje. Utilice la contribución "configurationDefaults".`,'No se puede registrar "{0}". Esta propiedad ya está registrada.','No se puede registrar "{0}". La directiva asociada {1} ya está registrada con {2}.',"Comando que devuelve información sobre las claves de contexto","Expresión de clave de contexto vacía",'¿Ha olvidado escribir una expresión? también puede poner "false" o "true" para evaluar siempre como false o true, respectivamente.',"'in' después de 'not'.","paréntesis de cierre ')'","Token inesperado","¿Ha olvidado poner && o || antes del token?","Final de expresión inesperado","¿Ha olvidado poner una clave de contexto?",`Esperado: {0}\r
|
||||
recibido: '{1}'.`,"Si el sistema operativo es macOS","Si el sistema operativo es Linux","Si el sistema operativo es Windows","Si la plataforma es un explorador web","Si el sistema operativo es macOS en una plataforma que no es de explorador","Si el sistema operativo es IOS","Si la plataforma es un explorador web móvil","Tipo de calidad de VS Code","Si el foco del teclado está dentro de un cuadro de entrada","¿Quiso decir {0}?","¿Quiso decir {0} o {1}?","¿Quiso decir {0}, {1} o {2}?","¿Ha olvidado abrir o cerrar la cita?",`¿Ha olvidado escapar el carácter "/" (barra diagonal)?Coloque dos barras diagonales inversas antes de que escape, por ejemplo, '\\\\/'.`,"Indica si las sugerencias están visibles.","Se presionó ({0}). Esperando la siguiente tecla...","Se ha presionado ({0}). Esperando la siguiente tecla...","La combinación de claves ({0}, {1}) no es un comando.","La combinación de claves ({0}, {1}) no es un comando.","Área de trabajo",'Se asigna a "Control" en Windows y Linux y a "Comando" en macOS.','Se asigna a "Alt" en Windows y Linux y a "Opción" en macOS.',"El modificador que se utilizará para agregar un elemento en los árboles y listas para una selección múltiple con el ratón (por ejemplo en el explorador, abiertos editores y vista de scm). Los gestos de ratón 'Abrir hacia' - si están soportados - se adaptarán de forma tal que no tenga conflicto con el modificador múltiple.","Controla cómo abrir elementos en los árboles y las listas mediante el mouse (si se admite). Tenga en cuenta que algunos árboles y listas pueden optar por ignorar esta configuración si no es aplicable.","Controla si las listas y los árboles admiten el desplazamiento horizontal en el área de trabajo. Advertencia: La activación de esta configuración repercute en el rendimiento.","Controla si los clics en la barra de desplazamiento se desplazan página por página.","Controla la sangría de árbol en píxeles.","Controla si el árbol debe representar guías de sangría.","Controla si las listas y los árboles tienen un desplazamiento suave.",'Se usará un multiplicador en los eventos de desplazamiento de la rueda del mouse "deltaX" y "deltaY". ','Multiplicador de la velocidad de desplazamiento al presionar "Alt".',"Resalta elementos al buscar. Navegar más arriba o abajo pasará solo por los elementos resaltados.","Filtre elementos al buscar.","Controla el modo de búsqueda predeterminado para listas y árboles en el área de trabajo.","La navegación simple del teclado se centra en elementos que coinciden con la entrada del teclado. El emparejamiento se hace solo en prefijos.","Destacar la navegación del teclado resalta los elementos que coinciden con la entrada del teclado. Más arriba y abajo la navegación atravesará solo los elementos destacados.","La navegación mediante el teclado de filtro filtrará y ocultará todos los elementos que no coincidan con la entrada del teclado.","Controla el estilo de navegación del teclado para listas y árboles en el área de trabajo. Puede ser simple, resaltar y filtrar.",'Use "workbench.list.defaultFindMode" y "workbench.list.typeNavigationMode" en su lugar.',"Usar coincidencias aproximadas al buscar.","Use coincidencias contiguas al buscar.","Controla el tipo de coincidencia que se usa al buscar listas y árboles en el área de trabajo.","Controla cómo se expanden las carpetas de árbol al hacer clic en sus nombres. Tenga en cuenta que algunos árboles y listas pueden optar por omitir esta configuración si no es aplicable.","Controla si el desplazamiento permanente está habilitado en los árboles.","Controla el número de elementos permanentes que se muestran en el árbol cuando {0} está habilitado.",'Controla el funcionamiento de la navegación por tipos en listas y árboles del área de trabajo. Cuando se establece en "trigger", la navegación por tipos comienza una vez que se ejecuta el comando "list.triggerTypeNavigation".',"Error","Advertencia","Información","Errores","Advertencias","Información",'Los problemas están en pausa porque: "{0}"','Los problemas están en pausa porque: "{0}" y {1} más',"usado recientemente","comandos similares","usados habitualmente","otros comandos","comandos similares","{0}, {1}",'El comando "{0}" ha dado lugar a un error',"{0}, {1}","Si el foco del teclado está dentro del control de entrada rápida","Alineación de la entrada rápida","El tipo de la entrada rápida visible actualmente","Si el cursor de la entrada rápida está al final del cuadro de entrada","Atrás",'Presione "Entrar" para confirmar su entrada o "Esc" para cancelar',"{0}/{1}","Escriba para restringir los resultados.","Aceptar",'{0} (Presione "Entrar" para confirmar o "Esc" para cancelar)',"Se usa en el contexto de cualquier tipo de entrada rápida. Si cambia un enlace de teclado para este comando, también debe cambiar todos los demás enlaces de teclado (variantes modificadoras) de este comando.","Se usa en el contexto de la selección rápida
Line truncated
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
define("vs/nls.messages.fr",["./_commonjsHelpers-CT9FvmAN"],(function(s){"use strict";var e={};/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/var r;function i(){return r||(r=1,globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","entrée","Respecter la casse","Mot entier","Utiliser une expression régulière","entrée","Préserver la casse","Inspectez ceci dans l’affichage accessible avec {0}.","Inspectez ceci dans l’affichage accessible via la commande Open Accessible View qui ne peut pas être déclenchée via une combinaison de touches pour l’instant.","Erreur : {0}","Avertissement : {0}","Info : {0}"," ou {0} pour l'histoire"," ({0} pour l'histoire)","Entrée effacée","Indépendant","Zone de sélection","Plus d'actions...","Entrer le texte à rechercher","Fermer","Entrer le texte à rechercher","Aucun résultat trouvé.","Aucun résultat","{0} résultats","Type à filtrer","Entrer le texte à rechercher","Filtrer","Correspondance approximative","(vide)","{0}: {1}","Une erreur système s'est produite ({0})","Une erreur inconnue s’est produite. Veuillez consulter le journal pour plus de détails.","Une erreur inconnue s’est produite. Veuillez consulter le journal pour plus de détails.","{0} ({1} erreurs au total)","Une erreur inconnue s’est produite. Veuillez consulter le journal pour plus de détails.","Ctrl","Maj","Alt","Windows","Ctrl","Maj","Alt","Super","Contrôle","Maj","Option","Commande","Contrôle","Maj","Alt","Windows","Contrôle","Maj","Alt","Super","éditeur","L’éditeur n’est pas accessible pour le moment.","{0} Pour activer le mode optimisé du lecteur d’écran, utilisez {1}","{0} Pour activer le mode optimisé du lecteur d’écran, ouvrez la sélection rapide avec {1} et exécutez la commande Activer/Désactiver le mode d’accessibilité du lecteur d’écran, qui n’est pas déclenchable via le clavier pour le moment.","{0} Attribuez une combinaison de touches à la commande Activer/Désactiver le mode d’accessibilité du lecteur d’écran en accédant à l’éditeur de combinaisons de touches avec {1} et exécutez-la.","éditeur","Aligner par rapport à la fin même en cas de passage à des lignes plus longues","Aligner par rapport à la fin même en cas de passage à des lignes plus longues","Curseurs secondaires supprimés","Ann&&uler","Annuler","Annuler","&&Rétablir","Rétablir","Rétablir","&&Sélectionner tout","Tout sélectionner","Tout sélectionner","Utiliser le rendu basé sur DOM","Maintenez la touche {0} enfoncée pour pointer avec la souris","Chargement...","Indique si les complétions en ligne sont actuellement répétées","Sélectionnez la durée de répétition pour les complétions de code et NES","Répétition des suggestions inline","Annuler la répétition des suggestions inline","Le nombre de curseurs a été limité à {0}. Envisagez d’utiliser [rechercher et remplacer](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) pour les modifications plus importantes ou augmentez la limite du nombre de curseurs multiples du paramètre.","Augmenter la limite de curseurs multiples","Activer/désactiver réduire les régions inchangées","Activer/désactiver l’affichage des blocs de code déplacés","Activer/désactiver Utiliser la vue inline lorsque l'espace est limité","Éditeur de différences","Changer de côté","Quitter Comparer le déplacement","Réduire toutes les régions inchangées","Afficher toutes les régions inchangées","Restaurer","Visionneuse Diff accessible","Accéder à la différence suivante","Accéder la différence précédente","Icône « Insérer » dans la visionneuse diff accessible.","Icône « Supprimer » dans la visionneuse diff accessible.","Icône de « Fermer » dans la visionneuse diff accessible.","Fermer","Visionneuse diff accessible. Utilisez les flèches haut et bas pour naviguer.","aucune ligne changée","1 ligne changée","{0} lignes changées","Différence {0} sur {1} : ligne d'origine {2}, {3}, ligne modifiée {4}, {5}","vide","{0} ligne inchangée {1}","{0} ligne d'origine {1} ligne modifiée {2}","+ {0} ligne modifiée {1}","- {0} ligne d'origine {1}"," utilisez {0} pour ouvrir l’aide sur l’accessibilité.","Copier les lignes supprimées","Copier la ligne supprimée","Copier les lignes modifiées","Copier la ligne modifiée","Copier la ligne supprimée ({0})","Copier la ligne modifiée ({0})","Annuler la modification","Utiliser la vue inline lorsque l'espace est limité","Afficher les blocs de code déplacés","Rétablir le bloc","Rétablir la sélection","Ouvrir la visionneuse diff accessible","Replier la région inchangée","{0} lignes masquées","Cliquez ou faites glisser pour afficher plus d'éléments au-dessus","Afficher la région inchangée","Cliquez ou faites glisser pour afficher plus d'éléments en dessous","{0} lignes masquées","Double-cliquer pour déplier","Code déplacé avec des modifications vers la ligne {0}-{1}","Code déplacé avec des modifications à partir de la ligne {0}-{1}","Code déplacé vers la ligne {0}-{1}","Code dLine truncated
|
||||
- Utilisez 0 pour calculer automatiquement la hauteur de ligne à partir de la taille de police.\r
|
||||
: les valeurs comprises entre 0 et 8 sont utilisées comme multiplicateur avec la taille de police.\r
|
||||
: les valeurs supérieures ou égales à 8 seront utilisées comme valeurs effectives.`,"Contrôle si la minimap est affichée.","Le minimap est toujours affiché.","Le minimap est masqué lorsque la souris n’est pas au-dessus du minimap et affiché lorsque la souris est au-dessus du minimap.","Le minimap n’est affiché que lorsque l’éditeur est défilé.","Contrôle si la minimap est masquée automatiquement.","Le minimap a la même taille que le contenu de l'éditeur (défilement possible).","Le minimap s'agrandit ou se réduit selon les besoins pour remplir la hauteur de l'éditeur (pas de défilement).","Le minimap est réduit si nécessaire pour ne jamais dépasser la taille de l'éditeur (pas de défilement).","Contrôle la taille du minimap.","Contrôle le côté où afficher la minimap.","Contrôle quand afficher le curseur du minimap.","Échelle du contenu dessiné dans le minimap : 1, 2 ou 3.","Afficher les caractères réels sur une ligne par opposition aux blocs de couleur.","Limiter la largeur de la minimap pour afficher au plus un certain nombre de colonnes.","Contrôle si les régions nommées sont affichées en tant qu’en-têtes de section dans la minimap.","Contrôle si les commentaires MARK : sont affichés en tant qu’en-têtes de section dans la minimap.","Définit l’expression régulière utilisée pour rechercher les en-têtes de section dans les commentaires. Le regex doit contenir un groupe de correspondance nommé « label » (écrit sous la forme « ( ?<label>.+) » qui encapsule l’en-tête de section, sinon il ne fonctionnera pas. Vous pouvez éventuellement inclure un autre groupe de correspondance nommé « séparateur ». Utilisez \\n dans le modèle pour faire correspondre les en-têtes multilignes.","Contrôle la taille de police des en-têtes de section dans le minimap.","Contrôle la quantité d’espace (en pixels) entre les caractères de l’en-tête de section. Cela permet de lire l’en-tête en petites tailles de police.","Contrôle la quantité d’espace entre le bord supérieur de l’éditeur et la première ligne.","Contrôle la quantité d'espace entre le bord inférieur de l'éditeur et la dernière ligne.","Active une fenêtre contextuelle qui affiche de la documentation sur les paramètres et des informations sur les types à mesure que vous tapez.","Détermine si le menu de suggestions de paramètres se ferme ou reviens au début lorsque la fin de la liste est atteinte.","Des suggestions rapides s’affichent dans le widget de suggestion","Les suggestions rapides s’affichent sous forme de texte fantôme","Les suggestions rapides sont désactivées","Activez les suggestions rapides dans les chaînes.","Activez les suggestions rapides dans les commentaires.","Activez les suggestions rapides en dehors des chaînes et des commentaires.","Contrôle si les suggestions doivent s’afficher automatiquement lors de la saisie. Cela peut être contrôlé pour la saisie dans des commentaires, des chaînes et d’autres codes. Vous pouvez configurer la suggestion rapide pour qu’elle s’affiche sous forme de texte fantôme ou avec le widget de suggestion. Tenez également compte du {0}-setting qui contrôle si les suggestions sont déclenchées par des caractères spéciaux.","Les numéros de ligne ne sont pas affichés.","Les numéros de ligne sont affichés en nombre absolu.","Les numéros de ligne sont affichés sous la forme de distance en lignes à la position du curseur.","Les numéros de ligne sont affichés toutes les 10 lignes.","Contrôle l'affichage des numéros de ligne.","Nombre de caractères monospace auxquels cette règle d'éditeur effectue le rendu.","Couleur de cette règle d'éditeur.","Rendre les règles verticales après un certain nombre de caractères à espacement fixe. Utiliser plusieurs valeurs pour plusieurs règles. Aucune règle n'est dessinée si le tableau est vide.","La barre de défilement verticale sera visible uniquement lorsque cela est nécessaire.","La barre de défilement verticale est toujours visible.","La barre de défilement verticale est toujours masquée.","Contrôle la visibilité de la barre de défilement verticale.","La barre de défilement horizontale sera visible uniquement lorsque cela est nécessaire.","La barre de défilement horizontale est toujours visible.","La barre de défilement horizontale est toujours masquée.","Contrôle la visibilité de la barre de défilement horizontale.","Largeur de la barre de défilement verticale.","Hauteur de la barre de défilement horizontale.","Contrôle si les clics permettent de faire défiler par page ou d’accéder à la position de clic.","Lorsqu'elle est définie, la barre de défilement horizontale n'augmentera pas la taille du contenu de l'éditeur.","Contrôle si tous les caractères ASCII non basiques sont mis en surbrillance. Seuls les caractères compris entre U+0020 et U+007E, tabulation, saut de ligne et retour chariot sont considérés co
Line truncated
|
||||
S’il existe plusieurs modifications de ce type, l’éditeur affiche un sélecteur. S’il n’existe aucune modification de ce type, l’éditeur affiche un message d’erreur.`,`Liste du type de modification de collage préféré à appliquer.\r
|
||||
La première modification correspondant aux préférences est appliquée.`,"Coller en tant que...","Coller au format texte","Si le widget de collage est affiché","Afficher les options de collage...","vide","Nous n’avons trouvé aucune modification de collage n’a été trouvée pour « {0} »","Résolution de la modification du collage pour '{0}'. Cliquez pour annuler","Exécution des gestionnaires de collage. Cliquez pour annuler et effectuer un collage de base","Configurer l’action de collage par défaut","Sélectionner l’action Coller","Exécution des gestionnaires de collage","Insérer du texte brut","Insérer des URI","Insérer un URI","Insérer des chemins d’accès","Insérer un chemin d’accès","Insérer des chemins d’accès relatifs","Insérer un chemin d’accès relatif","Insérer du code HTML","Indique si le widget de suppression s’affiche","Afficher les options de suppression...","Exécution des gestionnaires de dépôt. Cliquez pour annuler",`Erreur lors de la résolution de la modification «{0}» :\r
|
||||
{1}`,`Erreur lors de l’application de la modification «{0}» :\r
|
||||
{1}`,"Indique si l'éditeur exécute une opération annulable, par exemple 'Avoir un aperçu des références'","Le fichier est trop volumineux pour effectuer une opération Tout remplacer.","&&Rechercher","Aucune correspondance. Essayez de rechercher autre chose.","Tapez un nombre pour accéder à une correspondance spécifique (entre 1 et {0})","Veuillez entrer un nombre compris entre 1 et {0}","Veuillez entrer un nombre compris entre 1 et {0}","&&Remplacer","Rechercher","Trouver avec des arguments","Rechercher dans la sélection","Rechercher suivant","Rechercher précédent","Accéder à la correspondance...","Sélection suivante","Sélection précédente","Remplacer","Icône permettant d'indiquer que le widget de recherche de l'éditeur est réduit.","Icône permettant d'indiquer que le widget de recherche de l'éditeur est développé.","Icône de l'option Rechercher dans la sélection dans le widget de recherche de l'éditeur.","Icône de l'option Remplacer dans le widget de recherche de l'éditeur.","Icône de l'option Tout remplacer dans le widget de recherche de l'éditeur.","Icône de l'option Rechercher précédent dans le widget de recherche de l'éditeur.","Icône de l'option Rechercher suivant dans le widget de recherche de l'éditeur.","Rechercher/remplacer","Rechercher","Rechercher","Correspondance précédente","Correspondance suivante","Rechercher dans la sélection","Fermer","Remplacer","Remplacer","Remplacer","Tout remplacer","Activer/désactiver le remplacement","Seuls les {0} premiers résultats sont mis en évidence, mais toutes les opérations de recherche fonctionnent sur l’ensemble du texte.","{0} sur {1}","Aucun résultat","{0} trouvé(s)","{0} trouvé pour '{1}'","{0} trouvé pour '{1}', sur {2}","{0} trouvé pour '{1}'","Déplier","Déplier de manière récursive","Plier","Activer/désactiver le pliage","Plier de manière récursive","Activer/désactiver le repli récursif","Replier tous les commentaires de bloc","Replier toutes les régions","Déplier toutes les régions","Plier tout, sauf les éléments sélectionnés","Déplier tout, sauf les éléments sélectionnés","Plier tout","Déplier tout","Atteindre le pli parent","Accéder à la plage de pliage précédente","Accéder à la plage de pliage suivante","Créer une plage de pliage à partir de la sélection","Supprimer les plages de pliage manuelles","Activer/désactiver le pliage d’importation","Niveau de pliage {0}","Couleur d'arrière-plan des gammes pliées. La couleur ne doit pas être opaque pour ne pas cacher les décorations sous-jacentes.","Couleur du texte réduit après la première ligne d’une plage pliée.","Couleur du contrôle de pliage dans la marge de l'éditeur.","Icône des plages développées dans la marge de glyphes de l'éditeur.","Icône des plages réduites dans la marge de glyphes de l'éditeur.","Icône pour les plages réduites manuellement dans la marge de glyphe de l’éditeur.","Icône pour les plages développées manuellement dans la marge de glyphe de l’éditeur.","Cliquez pour développer la plage.","Cliquez pour réduire la plage.","Augmenter la taille de police de l’éditeur","Diminuer la taille de police de l’éditeur","Réinitialiser la taille de police de l’éditeur","Mettre le document en forme","Mettre la sélection en forme","Icône du prochain marqueur goto.","Icône du précédent marqueur goto.","&&Problème suivant","&&Problème précédent","Aller au problème suivant (Erreur, Avertissement, Info)","Aller au problème précédent (Erreur, Avertissement, Info)","Aller au problème suivant dans Fichiers (Erreur, Avertissement, Info)","Aller au problème précédent dans Fichiers (Erreur, Avertissement, Info)","Erreur","Avertissement","Info","Conseil","{0} à {1}. ","{0} problèmes sur {1}","{0} problème(s) sur {1}","Couleur d'erreur du widget de navigation dans les marqueurs de l'éditeur.","Arrière-plan du titre d’erreur du widget de navigation dans les marqueurs de l’éditeur.","Couleur d'avertissement du widget de navigation dans les marqueurs de l'éditeur.","Arrière-plan du titre d’erreur du widget de navigation dans les marqueurs de l’éditeur.","Couleur d’information du widget de navigation du marqueur de l'éditeur.","Arrière-plan du titre des informations du widget de navigation dans les marqueurs de l’éditeur.","Arrière-plan du widget de navigation dans les marqueurs de l'éditeur.","Aperçu","Définitions","Définition introuvable pour '{0}'","Définition introuvable","Atteindre la &&définition","Déclarations","Aucune déclaration pour '{0}'","Aucune déclaration","Atteindre la &&déclaration","Aucune déclaration pour '{0}'","Aucune déclaration","Définitions de type","Définition de type introuvable pour '{0}'","Définition de type introuvable","Accéder à la définition de &&type","Implémentations","Implémentation introuvable pour '{0}'","Implémentation introuvable","Atteindre les &&implémentations","Aucune référen
Line truncated
|
||||
[{1}] {2}`,"Du {1} au {0}","{0} ({1})","Masquer","Réinitialiser le menu","Masquer «{0}»","Configurer la combinaison de touches","{0} à Appliquer, {1} à la Préversion","{0} pour appliquer","{0}, raison désactivée : {1}","Widget d’action","Couleur d'arrière-plan des éléments d'action activés dans la barre d'action.","Indique si la liste des widgets d’action est visible","Masquer le widget d’action","Sélectionner l’action précédente","Sélectionner l’action suivante","Accepter l’action sélectionnée","Aperçu de l’action sélectionnée","Substitutions de configuration du langage par défaut","Configurer les paramètres à remplacer pour {0}.","Configurez les paramètres d'éditeur à remplacer pour un langage.","Ce paramètre ne prend pas en charge la configuration par langage.","Configurez les paramètres d'éditeur à remplacer pour un langage.","Ce paramètre ne prend pas en charge la configuration par langage.","Impossible d'inscrire une propriété vide","Impossible d'inscrire '{0}'. Ceci correspond au modèle de propriété '\\\\[.*\\\\]$' permettant de décrire les paramètres d'éditeur spécifiques à un langage. Utilisez la contribution 'configurationDefaults'.","Impossible d'inscrire '{0}'. Cette propriété est déjà inscrite.","Impossible d’inscrire '{0}'. Le {1} de stratégie associé est déjà inscrit auprès de {2}.","Commande qui retourne des informations sur les clés de contexte","Expression de clé de contexte vide","Avez-vous oublié d’écrire une expression ? Vous pouvez également placer 'false' ou 'true' pour toujours donner la valeur false ou true, respectivement.","'in' après 'not'.","parenthèse fermante ')'","Jeton inattendu","Avez-vous oublié de placer && ou || avant le jeton ?","Fin d’expression inattendue","Avez-vous oublié de placer une clé de contexte ?",`Attendu : {0}\r
|
||||
Reçu : '{1}'.`,"Indique si le système d'exploitation est macOS","Indique si le système d'exploitation est Linux","Indique si le système d'exploitation est Windows","Indique si la plateforme est un navigateur web","Indique si le système d'exploitation est macOS sur une plateforme qui n'est pas un navigateur","Indique si le système d’exploitation est Linux","Indique si la plateforme est un navigateur web mobile","Type de qualité de VS Code","Indique si le focus clavier se trouve dans une zone d'entrée","Voulez-vous dire {0}?","Voulez-vous dire {0} ou {1}?","Voulez-vous dire {0}, {1} ou {2}?","Avez-vous oublié d’ouvrir ou de fermer le devis ?","Avez-vous oublié d’échapper le caractère « / » (barre oblique) ? Placez deux barre obliques inverses avant d’y échapper, par ex., « \\\\/ ».","Indique si les suggestions sont visibles","Touche ({0}) utilisée. En attente d'une seconde touche...","({0}) a été enfoncé. En attente de la touche suivante de la pression...","La combinaison de touches ({0}, {1}) n’est pas une commande.","La combinaison de touches ({0}, {1}) n’est pas une commande.","Banc d'essai","Mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans macOS.","Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans macOS.","Le modificateur à utiliser pour ajouter un élément dans les arbres et listes pour une sélection multiple avec la souris (par exemple dans l’Explorateur, les éditeurs ouverts et la vue scm). Les mouvements de la souris 'Ouvrir à côté' (si pris en charge) s'adapteront tels qu’ils n'entrent pas en conflit avec le modificateur multiselect.","Contrôle l'ouverture des éléments dans les arborescences et les listes à l'aide de la souris (si cela est pris en charge). Notez que certaines arborescences et listes peuvent choisir d'ignorer ce paramètre, s'il est non applicable.","Contrôle si les listes et les arborescences prennent en charge le défilement horizontal dans le banc d'essai. Avertissement : L'activation de ce paramètre a un impact sur les performances.","Contrôle si les clics dans la barre de défilement page par page.","Contrôle la mise en retrait de l'arborescence, en pixels.","Contrôle si l'arborescence doit afficher les repères de mise en retrait.","Détermine si les listes et les arborescences ont un défilement fluide.","Un multiplicateur à utiliser sur les `deltaX` et `deltaY` des événements de défilement de roulette de souris.","Multiplicateur de vitesse de défilement quand vous appuyez sur 'Alt'.","Mettez en surbrillance les éléments lors de la recherche. La navigation vers le haut et le bas traverse uniquement les éléments en surbrillance.","Filtrez des éléments lors de la recherche.","Contrôle le mode de recherche par défaut pour les listes et les arborescences dans Workbench.","La navigation au clavier Simple place le focus sur les éléments qui correspondent à l'entrée de clavier. La mise en correspondance est effectuée sur les préfixes uniquement.","La navigation de mise en surbrillance au clavier met en surbrillance les éléments qui correspondent à l'entrée de clavier. La navigation ultérieure vers le haut ou vers le bas parcourt uniquement les éléments mis en surbrillance.","La navigation au clavier Filtrer filtre et masque tous les éléments qui ne correspondent pas à l'entrée de clavier.","Contrôle le style de navigation au clavier pour les listes et les arborescences dans le banc d'essai. Les options sont Simple, Mise en surbrillance et Filtrer.","Utilisez 'workbench.list.defaultFindMode' et 'workbench.list.typeNavigationMode' à la place.","Utilisez la correspondance approximative lors de la recherche.","Utilisez des correspondances contiguës lors de la recherche.","Contrôle le type de correspondance utilisé lors de la recherche de listes et d’arborescences dans le banc d’essai.","Contrôle la façon dont les dossiers de l'arborescence sont développés quand vous cliquez sur les noms de dossiers. Notez que certaines arborescences et listes peuvent choisir d'ignorer ce paramètre, s'il est non applicable.","Contrôle si le défilement rémanent est activé dans les arborescences.","Contrôle le nombre d’éléments rémanents affichés dans l’arborescence lorsque {0} est activé.","Contrôle le fonctionnement de la navigation de type dans les listes et les arborescences du banc d'essai. Quand la valeur est 'trigger', la navigation de type commence une fois que la commande 'list.triggerTypeNavigation' est exécutée.","Erreur","Avertissement","Info","Erreurs","Avertissements","Infos","Les problèmes sont suspendus car : « {0} »","Les problèmes sont suspendus car : « {0} » et {1} de plus","récemment utilisées","commandes similaires","utilisés le plus souvent","autres commandes","commandes similaires","{0}, {1}","La commande « {0} » a entraîné une erreur","{0}, {1}","Indique si le focus clavier se trouve à l’intérieur du contrôle d’
Line truncated
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
define("vs/nls.messages.it",["./_commonjsHelpers-CT9FvmAN"],(function(o){"use strict";var e={};/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/var i;function a(){return i||(i=1,globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","input","Maiuscole/minuscole","Parola intera","Usa espressione regolare","input","Mantieni maiuscole/minuscole","Ispezionarlo nella visualizzazione accessibile con {0}.","Ispezionarlo nella visualizzazione accessibile tramite il comando Apri visualizzazione accessibile che attualmente non è attivabile tramite il tasto di scelta rapida.","Errore: {0}","Avviso: {0}","Info: {0}"," o {0} per la cronologia"," ({0} per la cronologia)","Input cancellato","Non associato","Casella di selezione","Altre azioni...","Digitare per la ricerca","Chiudi","Digitare per la ricerca","Non sono stati trovati risultati.","Nessun risultato","{0} risultati","Digitare per filtrare","Digitare per la ricerca","Filtro","Corrispondenza fuzzy","(vuoto)","{0}: {1}","Si è verificato un errore di sistema ({0})","Si è verificato un errore sconosciuto. Per altri dettagli, vedere il log.","Si è verificato un errore sconosciuto. Per altri dettagli, vedere il log.","{0} ({1} errori in totale)","Si è verificato un errore sconosciuto. Per altri dettagli, vedere il log.","CTRL","MAIUSC","ALT","Windows","CTRL","MAIUSC","ALT","Super","CTRL","MAIUSC","Opzione","Comando","CTRL","MAIUSC","ALT","Windows","CTRL","MAIUSC","ALT","Super","editor","L'editor non è accessibile in questo momento.","{0} Per abilitare la modalità ottimizzata per l'utilità per la lettura dello schermo usare {1}","{0} Per abilitare la modalità ottimizzata per l'utilità per la lettura dello schermo, aprire la selezione rapida con {1} ed eseguire il comando Attiva/Disattiva modalità di accessibilità dell'utilità per la lettura dello schermo, attualmente non attivabile tramite tastiera.","{0} Assegnare un tasto di scelta rapida per il comando Attiva/Disattiva modalità di accessibilità dell'utilità per la lettura dello schermo accedendo all'editor dei tasti di scelta rapida con {1} ed eseguirlo.","editor","Si attiene alla fine anche quando si passa a righe più lunghe","Si attiene alla fine anche quando si passa a righe più lunghe","Cursori secondari rimossi","&&Annulla","Annulla azione","Annulla azione","&&Ripeti","Ripeti","Ripeti","&&Seleziona tutto","Seleziona tutto","Seleziona tutto","Usa rendering basato su DOM","Tieni premuto il tasto {0} per passare il mouse","Caricamento…","Indica se i completamenti inline sono rinviati","Seleziona la durata del rinvio per i completamenti del codice e NES","Rinvia suggerimenti inline","Annulla il rinvio dei suggerimenti inline","Il numero di cursori è stato limitato a {0}. Provare a usare [Trova e sostituisci](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) per modifiche di dimensioni maggiori o aumentare l'impostazione del limite di più cursori dell'editor.","Aumentare limite multi-cursore","Attiva/Disattiva comprimi aree non modificate","Attiva/Disattiva mostra blocchi di codice spostati","Attiva/disattiva la visualizzazione inline quando lo spazio è limitato","Editor diff","Interruttore laterale","Esci da Sposta confronto","Comprimi tutte le aree non modificate","Mostra tutte le aree non modificate","Ripristina","Visualizzatore differenze accessibile","Vai alla differenza successiva","Vai alla differenza precedente",'Icona per "Inserisci" nel visualizzatore differenze accessibile.','Icona per "Rimuovi" nel visualizzatore differenze accessibile.','Icona per "Chiudi" nel visualizzatore differenze accessibile.',"Chiudi","Visualizzatore differenze accessibile. Usare le frecce SU e GIÙ per spostarsi.","nessuna riga modificata","1 riga modificata","{0} righe modificate","Differenza {0} di {1}: riga originale {2}, {3}, riga modificata {4}, {5}","vuota","{0} riga non modificata {1}","{0} riga originale {1} riga modificata {2}","+ {0} riga modificata {1}","- {0} riga originale {1}"," utilizzare {0} per aprire la Guida all'accessibilità.","Copia le righe eliminate","Copia la riga eliminata","Copia righe modificate","Copia riga modificata","Copia la riga eliminata ({0})","Copia riga modificata ({0})","Ripristina questa modifica","Usa la visualizzazione inline quando lo spazio è limitato","Mostra blocchi di codice spostati","Ripristina blocco","Ripristina selezione","Apri Visualizzatore differenze accessibile","Ridurre area non modificata","{0} righe nascoste","Fai clic o trascina per visualizzare altri elementi sopra","Mostra area non modificata","Fai clic o trascina per visualizzare altri elementi sotto","{0} righe nascoste","Fare doppio clic per espandere","Codice spostato con modifiche alla riga {0}-{1}","Codice spostato con modifiche dalla riga {0}-{1}","Codice spostato alla riga {0}-{1}","Codice spostato dalla riga {0}-{1}","Ripristina modifiche selezionate","Annulla modifica","Colore del bordo per il testo spostato nell'editor diff.","Colore del bordo attivo per il testo spostato nell'editor diff.","Colore dell'ombreggiatura intorno ai widget dell'area non moLine truncated
|
||||
- Usare 0 per calcolare automaticamente l'altezza della riga dalle dimensioni del carattere.\r
|
||||
- I valori compresi tra 0 e 8 verranno usati come moltiplicatore con le dimensioni del carattere.\r
|
||||
- I valori maggiori o uguali a 8 verranno usati come valori effettivi.`,"Controlla se la minimappa è visualizzata.","La minimappa è sempre visibile.","La minimappa viene nascosta quando il mouse non si trova su di essa e viene visualizzata quando invece si trova su di essa.","La minimappa viene visualizzata solo quando si scorre l'editor","Controlla se la minimappa viene nascosta automaticamente.","La minimappa ha le stesse dimensioni del contenuto dell'editor (e potrebbe supportare lo scorrimento).","Se necessario, la minimappa si ridurrà o si ingrandirà in modo da adattarsi all'altezza dell'editor (nessuno scorrimento).","Se necessario, la minimappa si ridurrà in modo che la larghezza non superi mai quella dell'editor (nessuno scorrimento).","Controlla le dimensioni della minimappa.","Definisce il lato in cui eseguire il rendering della minimappa.","Controlla se il dispositivo di scorrimento della minimappa è visualizzato.","Scala del contenuto disegnato nella minimappa: 1, 2 o 3.","Esegue il rendering dei caratteri effettivi di una riga in contrapposizione ai blocchi colore.","Limita la larghezza della minimappa in modo da eseguire il rendering al massimo di un certo numero di colonne.","Controlla se le aree denominate vengono visualizzate come intestazioni di sezione nella minimappa.","Controlla se i commenti MARK: vengono visualizzati come intestazioni di sezione nella minimappa.","Definisce l'espressione regolare utilizzata per trovare le intestazioni di sezione nei commenti. L'espressione regolare deve contenere un gruppo di corrispondenze denominato 'label' (scritto come '(?<label>.+)') che incapsula l'intestazione di sezione, altrimenti non funzionerà. Facoltativamente è possibile includere un altro gruppo di corrispondenze denominato 'separatore'. Usare \\n nel modello per trovare le intestazioni su più righe.","Controlla le dimensioni del carattere delle intestazioni di sezione nella minimappa.","Controllare la quantità di spazio (in pixel) tra i caratteri dell’intestazione di sezione. Ciò contribuisce alla leggibilità dell’intestazione in caratteri di piccole dimensioni.","Controlla la quantità di spazio tra il bordo superiore dell'editor e la prima riga.","Controlla la quantità di spazio tra il bordo inferiore dell'editor e l'ultima riga.","Abilita un popup che mostra documentazione sui parametri e informazioni sui tipi mentre si digita.","Controlla se il menu dei suggerimenti per i parametri esegue un ciclo o si chiude quando viene raggiunta la fine dell'elenco.","I suggerimenti rapidi vengono visualizzati all'interno del widget dei suggerimenti","I suggerimenti rapidi vengono visualizzati come testo fantasma","I suggerimenti rapidi sono disabilitati","Abilita i suggerimenti rapidi all'interno di stringhe.","Abilita i suggerimenti rapidi all'interno di commenti.","Abilita i suggerimenti rapidi all'esterno di stringhe e commenti.","Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione. Questo può essere controllato per digitare commenti, stringhe e altro codice. Il suggerimento rapido può essere configurato per essere visualizzato come testo fantasma o con il widget dei suggerimenti. Tenere anche conto dell'impostazione {0}che controlla se i suggerimenti vengono attivati da caratteri speciali.","I numeri di riga non vengono visualizzati.","I numeri di riga vengono visualizzati come numeri assoluti.","I numeri di riga vengono visualizzati come distanza in linee alla posizione del cursore.","I numeri di riga vengono visualizzati ogni 10 righe.","Controlla la visualizzazione dei numeri di riga.","Numero di caratteri a spaziatura fissa in corrispondenza del quale verrà eseguito il rendering di questo righello dell'editor.","Colore di questo righello dell'editor.","Esegue il rendering dei righelli verticali dopo un certo numero di caratteri a spaziatura fissa. Usare più valori per più righelli. Se la matrice è vuota, non viene disegnato alcun righello.","La barra di scorrimento verticale sarà visibile solo quando necessario.","La barra di scorrimento verticale sarà sempre visibile.","La barra di scorrimento verticale sarà sempre nascosta.","Controlla la visibilità della barra di scorrimento verticale.","La barra di scorrimento orizzontale sarà visibile solo quando necessario.","La barra di scorrimento orizzontale sarà sempre visibile.","La barra di scorrimento orizzontale sarà sempre nascosta.","Controlla la visibilità della barra di scorrimento orizzontale.","Larghezza della barra di scorrimento verticale.","Altezza della barra di scorrimento orizzontale.","Controlla se i clic consentono di attivare lo scorrimento per pagina o di passare direttamente alla posizione di clic.","Se impostata, la barra di scorrimento orizzontale non aumenterà le dimensioni del contenuto dell'editor.","Controlla se tutti i caratteri ASCII non di base sono evidenziati. Solo i caratteri compresi tra U+0020 e U+007E, tabulazione, avanzamento riga e
Line truncated
|
||||
Esistono più modifiche per questo tipo; l'editor mostrerà una selezione. Se non esistono modifiche di questo tipo, l'editor mostrerà un messaggio di errore.`,`Elenco del tipo di modifica di incollaggio preferito per provare l'applicazione.\r
|
||||
Verrà applicata la prima modifica corrispondente alle preferenze.`,"Incolla come...","Incolla come testo","Indica se il widget dell'operazione Incolla viene visualizzato","Mostra opzioni operazione Incolla...","vuoto","Non è stata trovata alcuna modifica incolla per '{0}'","Risoluzione della modifica incolla per '{0}'. Fare clic per annullare","Esecuzione dei gestori incolla. Fare clic per annullare ed eseguire incolla di base","Configura l’azione Incolla predefinita","Seleziona azione Incolla","Esecuzione dei gestori Incolla in corso","Inserire testo normale","Inserire l'URL","Inserire l'Uri","Inserire percorsi","Inserire percorso","Inserire percorsi relativi","Inserire percorso relativo","Inserisci HTML","Indica se il widget di rilascio viene visualizzato","Mostra opzioni di rilascio...","Esecuzione dei gestori di rilascio. Fare clic per annullare",`Errore durante la risoluzione della modifica '{0}':\r
|
||||
{1}`,`Errore durante l'applicazione della modifica '{0}':\r
|
||||
{1}`,"Indica se l'editor esegue un'operazione annullabile, ad esempio 'Anteprima riferimenti'","Il file è troppo grande per eseguire un'operazione di sostituzione.","&&Trova","Nessuna corrispondenza. Provare a cercare qualcos'altro.","Digitare un numero per passare a una corrispondenza specifica (tra 1 e {0})","Digitare un numero compreso tra 1 e {0}","Digitare un numero compreso tra 1 e {0}","&&Sostituisci","Trova","Trova con argomenti","Trova con selezione","Trova successivo","Trova precedente","Andare a Corrispondenza...","Trova selezione successiva","Trova selezione precedente","Sostituisci","Icona per indicare che il widget di ricerca dell'editor è compresso.","Icona per indicare che il widget di ricerca dell'editor è espanso.","Icona per 'Trova nella selezione' nel widget di ricerca dell'editor.","Icona per 'Sostituisci' nel widget di ricerca dell'editor.","Icona per 'Sostituisci tutto' nel widget di ricerca dell'editor.","Icona per 'Trova precedente' nel widget di ricerca dell'editor.","Icona per 'Trova successivo' nel widget di ricerca dell'editor.","Trova/Sostituisci","Trova","Trova","Risultato precedente","Risultato successivo","Trova nella selezione","Chiudi","Sostituisci","Sostituisci","Sostituisci","Sostituisci tutto","Attiva/Disattiva sostituzione","Solo i primi {0} risultati vengono evidenziati, ma tutte le operazioni di ricerca funzionano su tutto il testo.","{0} di {1}","Nessun risultato","{0} trovato","{0} trovati per '{1}'","{0} trovati per '{1}' alla posizione {2}","{0} trovati per '{1}'","Espandi","Espandi in modo ricorsivo","Riduci","Attiva/Disattiva riduzione","Riduci in modo ricorsivo","Attiva/disattiva riduzione in modo ricorsivo","Riduci tutti i blocchi commento","Riduci tutte le regioni","Espandi tutte le regioni","Riduci tutto tranne selezionato","Espandi tutto tranne selezionato","Riduci tutto","Espandi tutto","Vai alla cartella principale","Passa all'intervallo di riduzione precedente","Passa all'intervallo di riduzione successivo","Creare intervallo di riduzione dalla selezione","Rimuovi intervalli di riduzione manuale","Attiva/Disattiva importazione riduzione","Livello riduzione {0}","Colore di sfondo degli intervalli con riduzione. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del testo compresso dopo la prima riga di un intervallo ridotto.","Colore del controllo di riduzione nella barra di navigazione dell'editor.","Icona per gli intervalli espansi nel margine del glifo dell'editor.","Icona per gli intervalli compressi nel margine del glifo dell'editor.","Icona per gli intervalli compressi nel margine del glifo dell'editor.","Icona per gli intervalli espansi manualmente nel margine del glifo dell'editor.","Fare clic per espandere l’intervallo.","Fare clic per comprimere l'intervallo.","Aumenta le dimensioni del carattere dell'editor","Riduci le dimensioni del carattere dell'editor","Reimposta dimensioni carattere editor","Formatta documento","Formatta selezione","Icona per il marcatore Vai a successivo.","Icona per il marcatore Vai a precedente.","&&Problema successivo","&&Problema precedente","Vai al problema successivo (Errore, Avviso, Informazioni)","Vai al problema precedente (Errore, Avviso, Informazioni)","Vai al problema successivo nei file (Errore, Avviso, Informazioni)","Vai al problema precedente nei file (Errore, Avviso, Informazioni)","Errore","Avviso","Info","Suggerimento","{0} a {1}. ","{0} di {1} problemi","{0} di {1} problema","Colore per gli errori del widget di spostamento tra marcatori dell'editor.","Intestazione errore per lo sfondo del widget di spostamento tra marcatori dell'editor.","Colore per gli avvisi del widget di spostamento tra marcatori dell'editor.","Intestazione avviso per lo sfondo del widget di spostamento tra marcatori dell'editor.","Colore delle informazioni del widget di navigazione marcatori dell'editor.","Intestazione informativa per lo sfondo del widget di spostamento tra marcatori dell'editor.","Sfondo del widget di spostamento tra marcatori dell'editor.","Anteprima","Definizioni","Non è stata trovata alcuna definizione per '{0}'","Non è stata trovata alcuna definizione","Vai alla &&definizione","Dichiarazioni","Non è stata trovata alcuna dichiarazione per '{0}'","Dichiarazione non trovata","Vai a &&dichiarazione","Non è stata trovata alcuna dichiarazione per '{0}'","Dichiarazione non trovata","Definizioni di tipo","Non sono state trovate definizioni di tipi per '{0}'","Non sono state trovate definizioni di tipi","Vai alla &&definizione di tipo","Implementazioni","Non sono state trovate implementazioni per '{0}'","Non sono state trovate implementazioni","Vai a &&Implementazioni","Non sono stati trovati riferimenti per '{0}'","Non sono stati trovati riferimenti","Vai a &&riferimenti","Riferimenti","Riferimenti","Posizioni","Nessun risultato per '{0}'","Riferimenti","Vai alla definizione","Apri definizione lateralmente","Visualizza in anteprima la definizione","Vai a dichiaraz
Line truncated
|
||||
[{1}] {2}`,"{1} per {0}","{0} ({1})","Nascondi","Reimposta menu","Nascondi '{0}'","Configura tasto di scelta rapida","{0} per Applica, {1} per Anteprima","{0} da applicare","{0}, Motivo disabilitato: {1}","Widget azione","Colore di sfondo per le azioni attivate o disattivate nella barra delle azioni.","Indica se l'elenco di widget azione è visibile","Nascondi widget azione","Seleziona azione precedente","Seleziona azione successiva","Accetta l'azione selezionata","Anteprima azione selezionata","Override configurazione predefinita del linguaggio","Configura le impostazioni di cui eseguire l'override per {0}.","Consente di configurare le impostazioni dell'editor di cui eseguire l'override per un linguaggio.","Questa impostazione non supporta la configurazione per lingua.","Consente di configurare le impostazioni dell'editor di cui eseguire l'override per un linguaggio.","Questa impostazione non supporta la configurazione per lingua.","Non è possibile registrare una proprietà vuota","Non è possibile registrare '{0}'. Corrisponde al criterio di proprietà '\\\\[.*\\\\]$' per la descrizione delle impostazioni dell'editor specifiche del linguaggio. Usare il contributo 'configurationDefaults'.","Non è possibile registrare '{0}'. Questa proprietà è già registrata.","Impossibile registrare '{0}'. Il {1} dei criteri associato è già registrato con {2}.","Comando che restituisce informazioni sulle chiavi di contesto","Espressione chiave di contesto vuota","Si è dimenticato di scrivere un'espressione? È anche possibile inserire 'false' o 'true' per restituire sempre rispettivamente false o true.","'in' dopo 'not'.","Parentesi chiusa ')'","Token imprevisto","Si è dimenticato di inserire && o || prima del token?","Fine imprevista dell'espressione","Si è dimenticato di inserire una chiave di contesto?",`Previsto: {0}\r
|
||||
Ricevuto: '{1}'.`,"Indica se il sistema operativo è macOS","Indica se il sistema operativo è Linux","Indica se il sistema operativo è Windows","Indica se la piattaforma è un Web browser","Indica se il sistema operativo è macOS in una piattaforma non basata su browser","Indica se il sistema operativo è iOS","Indica se la piattaforma è un Web browser per dispositivi mobili","Tipo di qualità del VS Code","Indica se lo stato attivo della tastiera si trova all'interno di una casella di input","Si intendeva {0}?","Si intendeva {0} o {1}?","Si intendeva {0}, {1} o {2}?","Si è dimenticato di aprire o chiudere la citazione?","Si è dimenticato di eseguire il carattere di escape '/' (slash)? Inserire due barre rovesciate prima del carattere di escape, ad esempio '\\\\/'.","Indica se i suggerimenti sono visibili","È stato premuto ({0}). In attesa del secondo tasto...","È stato premuto ({0}). In attesa del prossimo tasto...","La combinazione di tasti ({0}, {1}) non è un comando.","La combinazione di tasti ({0}, {1}) non è un comando.","Workbench","Rappresenta il tasto 'Control' in Windows e Linux e il tasto 'Comando' in macOS.","Rappresenta il tasto 'Alt' in Windows e Linux e il tasto 'Opzione' in macOS.","Il modificatore da utilizzare per aggiungere un elemento di alberi e liste ad una selezione multipla con il mouse (ad esempio in Esplora Risorse, apre gli editor e le viste scm). Le gesture del mouse 'Apri a lato' - se supportate - si adatteranno in modo da non creare conflitti con il modificatore di selezione multipla.","Controlla l'apertura degli elementi di alberi ed elenchi tramite il mouse (se supportato). Tenere presente che alcuni alberi ed elenchi potrebbero scegliere di ignorare questa impostazione se non è applicabile.","Controlla se elenchi e alberi supportano lo scorrimento orizzontale nell'area di lavoro. Avviso: l'attivazione di questa impostazione può influire sulle prestazioni.","Controlla se i clic nella barra di scorrimento scorrono pagina per pagina.","Controlla il rientro dell'albero in pixel.","Controlla se l'albero deve eseguire il rendering delle guide per i rientri.","Controlla se elenchi e alberi prevedono lo scorrimento uniforme.","Moltiplicatore da usare sui valori `deltaX` e `deltaY` degli eventi di scorrimento della rotellina del mouse.","Moltiplicatore della velocità di scorrimento quando si preme `Alt`.","Evidenziare gli elementi durante la ricerca. L'ulteriore spostamento verso l'alto e verso il basso attraverserà solo gli elementi evidenziati.","Filtra gli elementi durante la ricerca.","Controlla la modalità di ricerca predefinita per elenchi e alberi nel workbench.","Con lo stile di spostamento da tastiera simple lo stato attivo si trova sugli elementi che corrispondono all'input da tastiera. L'abbinamento viene effettuato solo in base ai prefissi.","Con lo stile di spostamento da tastiera highlight vengono evidenziati gli elementi corrispondenti all'input da tastiera. Spostandosi ulteriormente verso l'alto o verso il basso ci si sposterà solo negli elementi evidenziati.","Con lo stile di spostamento da tastiera filter verranno filtrati e nascosti tutti gli elementi che non corrispondono all'input da tastiera.","Controlla lo stile di spostamento da tastiera per elenchi e alberi nel workbench. Le opzioni sono: simple, highlight e filter.","In alternativa, usare 'workbench.list.defaultFindMode' e 'workbench.list.typeNavigationMode'.","Usa la corrispondenza fuzzy durante la ricerca.","Usa corrispondenza contigua durante la ricerca.","Controlla il tipo di corrispondenza usato per la ricerca di elenchi e alberi nel workbench.","Controlla l'espansione delle cartelle di alberi quando si fa clic sui nomi delle cartelle. Tenere presente che alcuni alberi ed elenchi potrebbero scegliere di ignorare questa impostazione se non è applicabile.","Controlla se lo scorrimento permanente è abilitato negli alberi.","Controlla il numero di elementi permanenti visualizzati nell'albero quando {0} è abilitato.","Controlla il funzionamento dello spostamento dei tipi in elenchi e alberi nel workbench. Se impostato su 'trigger', l'esplorazione del tipo inizia dopo l'esecuzione del comando 'list.triggerTypeNavigation'.","Errore","Avviso","Info","Errori","Avvisi","Messaggi informativi",'I problemi sono sospesi perché: "{0}"','I problemi sono sospesi perché: "{0}" e altri {1}',"usate di recente","comandi simili","più usato","altri comandi","comandi simili","{0}, {1}","Il comando '{0}' ha restituito un errore","{0}, {1}","Indica se lo stato attivo della tastiera si trova all'interno del controllo di input rapido","L'allineamento dell'inserimento rapido","Tipo dell'input rapido attualmente visibile","Indica se il cursore nell'input rapido si trova alla fine della casella di input","Indietro","Premere 'INVIO' per confermare l'input oppure 'ESC' per annullare","{0}/{1}","Digitare per ridurre il numero di risultati.","OK","{0} (premere 'INVIO' per confermare oppure 'ESC' per annullare)","Usa
Line truncated
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
define("vs/nls.messages.ja",(function(){"use strict";/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","入力","大文字と小文字を区別する","単語単位で検索する","正規表現を使用する","入力","保持する","{0} を使用して、ユーザー補助対応のビューでこれを検査します。","キー バインドを介して現在トリガーできない [ユーザー補助対応のビューを開く] コマンドを使用して、ユーザー補助対応のビューでこれを検査します。","エラー: {0}","警告: {0}","情報: {0}"," または履歴の {0}"," (履歴の {0})","クリアされた入力","バインドなし","ボックスを選択","その他の操作...","入力して検索","閉じる","入力して検索","結果が見つかりません。","結果はありません","{0} 件の結果","入力してフィルター","入力して検索","フィルター","あいまい一致","(空)","{0}: {1}","システム エラーが発生しました ({0})","不明なエラーが発生しました。ログで詳細を確認してください。","不明なエラーが発生しました。ログで詳細を確認してください。","{0} (合計 {1} エラー)","不明なエラーが発生しました。ログで詳細を確認してください。","Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","オプション","コマンド","Control","Shift","Alt","Windows","Control","Shift","Alt","Super","エディター","この時点では、エディターにアクセスできません。","{0} スクリーン リーダー最適化モードを有効にするには、{1} を使用します","{0} スクリーン リーダー最適化モードを有効にするには、{1} でクイック ピックを開き、[スクリーン リーダー アクセシビリティ モードの切り替え] コマンドを実行します。これは現在キーボードからトリガーできません。","{0} {1} でキーバインド エディターにアクセスし、スクリーン リーダー アクセシビリティ モードの切り替えコマンドにキーバインドを割り当てて実行してください。","エディター","長い行に移動しても行末に位置します","長い行に移動しても行末に位置します","セカンダリ カーソルが削除されました","元に戻す(&&U)","元に戻す","元に戻す","やり直し(&&R)","やり直し","やり直し","すべて選択(&&S)","すべてを選択","すべてを選択","DOM ベースのレンダリングを使用する","{0} キーを押しながらマウス ポインターを合わせます","読み込み中...","インライン補完が現在一時停止されているかどうか","コード補完と NES の再通知期間を選択する","インライン提案の再通知","インライン提案の再通知をキャンセル","カーソルの数は {0} に制限されています。大きな変更を行う場合は、[検索と置換](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) を使用することを検討してください。","マルチ カーソルの上限を増やす","変更されていない領域の折りたたみの切り替え","移動したコード ブロックの表示の切り替え","スペースが制限されている場合に [インライン ビューの使用] を切り替える","差分エディター","サイドの切り替え","比較移動の終了","変更されていないすべてのリージョンを折りたたむ","変更されていないすべてのリージョンを表示する","元に戻す","アクセシビリティの高い差分ビューアー","次の差分に移動","前の差分に移動","アクセシビリティの高い差分ビューアーの [挿入] のアイコン。","アクセシビリティの高い差分ビューアーの [削除] のアイコン。","アクセシビリティの高い差分ビューアーの [閉じる] のアイコン。","閉じる","アクセス可能な Diff Viewer。上下方向キーを使用して移動します。","変更された行はありません","1 行が変更されました","{0} 行が変更されました","相違 {0}/{1}: 元の行 {2}、{3}。変更された行 {4}、{5}","空白","{0} 変更されていない行 {1}","{0} 元の行 {1} 変更された行 {2}","+ {0} 変更された行 {1}","- {0} 元の行 {1}"," {0}を使用して、アクセシビリティのヘルプを開きます。","削除された行のコピー","削除された行のコピー","変更された行のコピー","変更された行のコピー","削除された行のコピー ({0})","変更された行のコピー ({0})","この変更を元に戻す","スペースが制限されている場合はインライン ビューを使用する","移動されたコード ブロックの表示","ブロックを元に戻す","選択範囲を元に戻す","アクセシビLine truncated
|
||||
- 0 を使用してフォント サイズから行の高さを自動的に計算します。\r
|
||||
- 0 から 8 までの値は、フォント サイズの乗数として使用されます。\r
|
||||
- 8 以上の値は有効値として使用されます。`,"ミニマップを表示するかどうかを制御します。","ミニマップは常に表示されます。","ミニマップは、マウスがミニマップ上にない場合に非表示になり、マウスがミニマップの上にあるときに表示されます。","ミニマップは、エディターがスクロールされているときにのみ表示されます","ミニマップを自動的に非表示するかどうかを制御します。","ミニマップのサイズは、エディターのコンテンツと同じです (スクロールする場合があります)。","ミニマップは、必要に応じて、エディターの高さを埋めるため、拡大または縮小します (スクロールしません)。","ミニマップは必要に応じて縮小し、エディターより大きくなることはありません (スクロールしません)。","ミニマップのサイズを制御します。","ミニマップを表示する場所を制御します。","ミニマップ スライダーを表示するタイミングを制御します。","ミニマップに描画されるコンテンツのスケール: 1、2、または 3。","行にカラー ブロックではなく実際の文字を表示します。","表示するミニマップの最大幅を特定の列数に制限します。","ミニマップの名前付き領域をセクション ヘッダーとして表示するかどうかを制御します。","MARK: コメントをミニマップのセクション ヘッダーとして表示するかどうかを制御します。","コメント内のセクション ヘッダーを検索するために使用する正規表現を定義します。正規表現には、セクション ヘッダーをカプセル化する名前付き一致グループ 'label' ('(?<label>.+)' と記述) が含まれている必要があります。それ以外の場合は機能しません。必要に応じて、'separator' という名前の別の一致グループを含めることができます。パターン内の \\n を使用して、複数行のヘッダーを照合します。","ミニマップのセクション ヘッダーのフォント サイズを制御します。","セクション ヘッダーの文字間隔をピクセル単位で制御します。これにより、小さいフォント サイズのヘッダーを読み取りやすくなります。","エディターの上端と最初の行の間の余白の大きさを制御します。","エディターの下端と最後の行の間の余白の大きさを制御します。","入力時にパラメーター ドキュメントと型情報を表示するポップアップを有効にします。","パラメーター ヒント メニューを周回するか、リストの最後で閉じるかどうかを制御します。","提案ウィジェット内にクイック候補が表示される","クイック候補がゴースト テキストとして表示される","クイック候補が無効になっています","文字列内でクイック候補を有効にします。","コメント内でクイック候補を有効にします。","文字列およびコメント外でクイック候補を有効にします。","入力中に候補を自動的に表示するかどうかを制御します。これは、コメント、文字列、およびその他のコードを入力するために制御できます。クイック提案は、ゴースト テキストとして表示するか、提案ウィジェットで表示するように構成できます。また、提案が特殊文字によってトリガーされるかどうかを制御する {0}-設定にも注意してください。","行番号は表示されません。","行番号は、絶対値として表示されます。","行番号は、カーソル位置までの行数として表示されます。","行番号は 10 行ごとに表示されます。","行番号の表示を制御します。","このエディターのルーラーがレンダリングする単一領域の文字数。","このエディターのルーラーの色です。","特定の等幅文字数の後に垂直ルーラーを表示します。複数のルーラーには複数の値を使用します。配列が空の場合はルーラーを表示しません。","垂直スクロールバーは、必要な場合にのみ表示されます。","垂直スクロールバーは常に表示されます。","垂直スクロールバーは常に非表示になります。","垂直スクロールバーの表示を制御します。","水平スクロールバーは、必要な場合にのみ表示されます。","水平スクロールバーは常に表示されます。","水平スクロールバーは常に非表示になります。","水平スクロールバーの表示を制御します。","垂直スクロールバーの幅。","水平スクロールバーの高
Line truncated
|
||||
この種類の編集が複数ある場合は、エディターにピッカーが表示されます。この種類の編集がない場合は、エディターにエラー メッセージが表示されます。`,`適用を試みるユーザー設定の貼り付け編集の種類の一覧。\r
|
||||
ユーザー設定に一致する最初の編集が適用されます。`,"貼り付けのオプション...","テキストとして貼り付け","貼り付けウィジェットが表示されているかどうか","貼り付けオプションを表示...","空","'{0}' の貼り付けの編集が見つかりませんでした","'{0}' の貼り付けの編集を解決しています。クリックしてキャンセル","貼り付けハンドラーを実行しています。クリックしてキャンセルし、基本的な貼り付けを行います","既定の貼り付けアクションを構成する","貼り付け操作の選択","貼り付けハンドラーを実行しています...","プレーンテキストの挿入","URI の挿入","URI の挿入","パスの挿入","パスの挿入","相対パスの挿入","相対パスの挿入","HTML の挿入","ドロップ ウィジェットが表示されているかどうか","ドロップ オプションを表示...","ドロップ ハンドラーを実行しています。クリックしてキャンセルします",`編集 '{0}' の解決中にエラーが発生しました:\r
|
||||
{1}`,`編集 '{0}' の適用中にエラーが発生しました:\r
|
||||
{1}`,"エディターで取り消し可能な操作 ('参照をここに表示' など) を実行するかどうか","ファイルが大きすぎるため、すべての置換アクションを実行できません。","検索(&&F)","一致しません。他の項目を検索してみてください。","特定の一致に移動する数値を入力します (1 から {0})","1 ~ {0} の数を入力してください。","1 ~ {0} の数を入力してください。","置換(&&R)","検索","引数を使用して検索","選択範囲で検索","次を検索","前を検索","[一致] に移動...","次の選択項目を検索","前の選択項目を検索","置換","エディターの検索ウィジェットが折りたたまれていることを示すアイコン。","エディターの検索ウィジェットが展開されていることを示すアイコン。","エディターの検索ウィジェット内の '選択範囲を検索' のアイコン。","エディターの検索ウィジェット内の '置換' のアイコン。","エディターの検索ウィジェット内の 'すべて置換' のアイコン。","エディターの検索ウィジェット内の '前を検索' のアイコン。","エディターの検索ウィジェット内の '次を検索' のアイコン。","検索/置換","検索","検索","前の一致項目","次の一致項目","選択範囲を検索","閉じる","置換","置換","置換","すべて置換","置換の切り替え","最初の {0} 件の結果だけが強調表示されますが、すべての検索操作はテキスト全体で機能します。","{0} / {1} 件","結果はありません。","{0} が見つかりました","{0} が '{1}' で見つかりました","{0} は '{1}' で {2} に見つかりました","{0} が '{1}' で見つかりました","展開","再帰的に展開する","折りたたみ","折りたたみの切り替え","再帰的に折りたたむ","折りたたみを再帰的に切り替える","すべてのブロック コメントの折りたたみ","すべての領域を折りたたむ","すべての領域を展開","選択した項目を除くすべて折りたたみ","選択した項目を除くすべて展開","すべて折りたたみ","すべて展開","親フォールドに移動する","前のフォールディング範囲に移動する","次のフォールディング範囲に移動する","選択範囲から折りたたみ範囲を作成する","手動折りたたみ範囲を削除する","折りたたみのインポートの切り替え","レベル {0} で折りたたむ","折り曲げる範囲の背景色。基の装飾を隠さないように、色は不透明であってはなりません。","折りたたまれた範囲の最初の行の後で折りたたまれたテキストの色。","エディターの余白にある折りたたみコントロールの色。","エディターのグリフ余白内の展開された範囲のアイコン。","エディターのグリフ余白内の折りたたまれた範囲のアイコン。","エディターのグリフ余白内の折りたたまれた範囲のアイコン。","エディターのグリフ余白内で手動で展開された範囲のアイコン。","クリックして範囲を展開します。","クリックして範囲を折りたたみます。","エディターのフォント サイズを拡大","エディターのフォント サイズを縮小","エディターのフォント サイズをリセット","ドキュメントのフォーマット","選択範囲のフォーマット","次のマーカーへ移動するためのアイコン。","前のマーカーへ移動するためのアイコン。","次の問題箇所(&&P)","前の問題箇所(&&P)","次の問題 (エラー、警告、情報) へ移動","前の問題 (エラー、警告、情報) へ移動","ファイル内の次の問題 (エラー、警告、情報) へ移動","ファイル内の前の問題 (エラー、警告、情報) へ移動","エラー","警告","情報","ヒント","{0} ({1})。","{1} 件中 {0} 件の問題","問題 {0} / {1}","エディターのマーカー ナビゲーション ウィジェットのエラーの色。","エディターのマーカー ナビゲーション ウィジェット エラーの見出しの背景。","エディターのマーカー ナビゲーション ウィジェットの警告の色。","エディターのマーカー ナビゲーション ウィジェット警告の見出しの背景。","エディターのマーカー ナビゲーション ウィジェットの情報の色。","エディターのマーカー ナビゲーション ウィジェット情報の見出しの背景。","エディターのマーカー ナビゲーション ウィジェットの背景。","ピーク","定義","'{0}' の定義は見つかりません","定義が見つかりません","定義に移動(&&D)","宣言","'{0}' の宣言が見つかりません","宣言が見つかりませ
Line truncated
|
||||
\r
|
||||
それらをファイルから削除することをお勧めします。これは 'editor.unusualLineTerminators' を使用して構成できます。`,"特殊な行の終端記号を削除する(&&R)","無視する","変数の読み取りなど、読み取りアクセス中のシンボルの背景色。下にある装飾を隠さないために、色は不透過であってはなりません。","変数への書き込みなど、書き込みアクセス中のシンボル背景色。下にある装飾を隠さないために、色は不透過であってはなりません。","記号のテキスト出現の背景色。基になる装飾が非表示ならないように、この色を不透明にすることはできません。","変数の読み取りなど読み取りアクセス中のシンボルの境界線の色。","変数への書き込みなど書き込みアクセス中のシンボルの境界線の色。","記号のテキスト出現箇所の境界線の色。","シンボルによって強調表示される概要ルーラーのマーカーの色。マーカーの色は、基になる装飾を隠さないように不透明以外にします。","書き込みアクセス シンボルを強調表示する概要ルーラーのマーカー色。下にある装飾を隠さないために、色は不透過であってはなりません。","記号のテキスト出現の概要ルール マーカーの色。基になる装飾が非表示ならないように、この色を不透明にすることはできません。","次のシンボル ハイライトに移動","前のシンボル ハイライトに移動","シンボル ハイライトをトリガー","単語の削除","位置でのエラー","エラー","位置での警告","警告","行のエラー","行のエラー","行の警告","行の警告","行の折りたたまれた面","折りたたみ済み","行のブレークポイント","ブレークポイント","行のインライン候補","次の編集提案行","次の編集提案","ターミナル クイック修正","クイック修正","ブレークポイントでデバッガーが停止しました","ブレークポイント","行にインレイ ヒントがありません","インレイ ヒントがありません","タスクが完了しました","タスクが完了しました","タスクが失敗しました","タスクが失敗しました","ターミナル コマンドが失敗しました","コマンドに失敗しました","ターミナル コマンドに成功しました","コマンドが成功しました","ターミナル ベル","ターミナル ベル","ノートブック セルが完了しました","ノートブック セルが完了しました","ノートブック セルが失敗しました","ノートブック セルが失敗しました","差分行が挿入されました","差分行が削除されました","変更された差分行","変更されたファイルのチャット編集","チャットの編集からファイルが変更されました","チャット要求が送信されました","チャット要求が送信されました","チャット応答を受信しました","コード アクション要求がトリガーされました","コード アクション要求がトリガーされました","コード アクションが適用されました","進行状況","進行状況","クリア","クリア","保存","保存","形式","形式","音声録音が開始されました","音声録音が停止されました","保持された編集","保持された編集","編集を元に戻す","編集が元に戻されました","チャット ユーザー操作が必要です","チャット ユーザー操作が必要です","表示","ヘルプ","テスト","ファイル","基本設定","開発者","{0} ({1})","{0} ({1})",`{0}\r
|
||||
[{1}] {2}`,"{1} から {0}","{0} ({1})","非表示","メニューのリセット","'{0}' の非表示","キーバインドの構成","{0} で適用する、{1} でプレビューする","{0} を押して適用","{0}、無効になった理由: {1}","アクション ウィジェット","アクション バーの切り替え済みアクション項目の背景色。","アクション ウィジェットの一覧が表示されるかどうか","アクション ウィジェットを非表示にする","前のアクションを選択","次のアクションを選択","選択した操作を承諾","選択したアクションのプレビュー","既定の言語構成のオーバーライド","{0} の場合にオーバーライドされる設定を構成します。","言語に対して上書きされるエディター設定を構成します。","この設定では、言語ごとの構成はサポートされていません。","言語に対して上書きされるエディター設定を構成します。","この設定では、言語ごとの構成はサポートされていません。","空のプロパティは登録できません","'{0}' を登録できません。これは、言語固有のエディター設定を記述するプロパティ パターン '\\\\[.*\\\\]$' に一致しています。'configurationDefaults' コントリビューションを使用してください。","'{0}' を登録できません。このプロパティは既に登録されています。","'{0}' を登録できません。関連付けられたポリシー {1} は既に {2} に登録されています。","コンテキスト キーに関する情報を返すコマンド","空のコンテキスト キー式","式を書き忘れましたか? 'false' または 'true' を指定すると、それぞれ常に false または true と評価できます。","'not' の後に 'in' があります。","終わりかっこ ')'","予期しないトークン","トークンの前に && または || を指定し忘れましたか?","予期しない式の終わり","コンテキスト キーを指定し忘れましたか?",`期待値: {0}\r
|
||||
受取済み: '{1}'。`,"オペレーティング システムが macOS であるかどうか","オペレーティング システムが Linux であるかどうか","オペレーティング システムが Windows であるかどうか","プラットフォームが Web ブラウザーであるかどうか","オペレーティング システムが非ブラウザー プラットフォーム上の macOS であるかどうか","オペレーティング システムが iOS であるかどうか","プラットフォームがモバイル Web ブラウザーであるかどうか","VS Code の品質の種類","キーボードのフォーカスが入力ボックス内にあるかどうか","{0} を意図していましたか?","{0} または {1} を意図していましたか?","{0}、{1}、または {2} を意図していましたか?","見積もりを開いたり閉じたりし忘れましたか?","'/' (スラッシュ) 文字をエスケープし忘れましたか? エスケープする前に '\\\\/' などの 2 つの円記号を指定してください。","候補を表示するかどうか","({0}) が渡されました。2 番目のキーを待っています...","({0}) が渡されました。次のキーを待っています...","キーの組み合わせ ({0}、{1}) はコマンドではありません。","キーの組み合わせ ({0}、{1}) はコマンドではありません。","ワークベンチ","Windows および Linux 上の `Control` キーと macOS 上の `Command` キーに割り当てます。","Windows および Linux 上の `Alt` キーと macOS 上の `Option` キーに割り当てます。","マウスを使用して項目を複数選択するときに使用する修飾キーです (たとえば、エクスプローラーでエディターと scm ビューを開くなど)。'横に並べて開く' マウス ジェスチャー (がサポートされている場合) は、複数選択の修飾キーと競合しないように調整されます。","マウスを使用して、ツリーとリスト内の項目を開く方法を制御します (サポートされている場合)。適用できない場合、一部のツリーやリストではこの設定が無視されることがあります。","リストとツリーがワークベンチで水平スクロールをサポートするかどうかを制御します。警告: この設定をオンにすると、パフォーマンスに影響があります。","スクロールバーのクリックでページごとにスクロールするかどうかを制御します。","ツリーのインデントをピクセル単位で制御します。","ツリーでインデントのガイドを表示するかどうかを制御します。","リストとツリーでスムーズ スクロールを使用するかどうかを制御します。","マウス ホイール スクロール イベントの `deltaX` と `deltaY` で使用される乗数。","`Alt` を押すと、スクロール速度が倍増します。","検索時に要素を強調表示します。さらに上下のナビゲーションでは、強調表示された要素のみがスキャンされます。","検索時に要素をフィルター処理します。","ワークベンチのリストとツリーの既定の検索モードを制御します。","簡単なキーボード ナビゲーションは、キーボード入力に一致する要素に焦点を当てます。一致処理はプレフィックスでのみ実行されます。","キーボード ナビゲーションの強調表示を使用すると、キーボード入力に一致する要素が強調表示されます。上および下への移動は、強調表示されている要素のみを移動します。","キーボード ナビゲーションのフィルターでは、キーボード入力に一致しないすべての要素がフィルター処理され、非表示になります。","ワークベンチのリストおよびツリーのキーボード ナビゲーション スタイルを制御します。単純、強調表示、フィルターを指定できます。","代わりに 'workbench.list.defaultFindMode' と 'workbench.list.typeNavigationMode' を使用してください。","検索時にあいまい一致を使用します。","検索時に連続一致を使用します。","ワークベンチでリストとツリーを検索するときに使用される一致の種類を制御します。","フォルダー名をクリックしたときにツリー フォルダーが展開される方法を制御します。適用できない場合、一部のツリーやリストではこの設定が無視されることがあります。","ツリーで固定スクロールを有効にするかどうかを制御します。","{0} が有効な場合に、ツリーに表示される固定要素の数を制御します。","ワークベンチのリストとツリーで型ナビゲーションがどのように機能するかを
Line truncated
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
define("vs/nls.messages.ko",(function(){"use strict";/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/globalThis._VSCODE_NLS_MESSAGES=["{0}({1})","입력","대/소문자 구분","단어 단위로","정규식 사용","입력","대/소문자 보존","{0}을(를) 사용하여 접근성 보기에서 이를 검사합니다.","현재 키 바인딩을 통해 트리거할 수 없는 접근성 보기 열기 명령을 통해 접근성 보기에서 이를 검사합니다.","오류: {0}","경고: {0}","정보: {0}"," 또는 {0} 기록의 경우"," ({0} 기록용)","입력이 지워짐","바인딩 안 됨","Box 선택","기타 작업...","입력하여 검색","닫기","입력하여 검색","결과를 찾을 수 없습니다.","결과 없음","{0}개 결과","필터링할 형식","입력하여 검색","필터","유사 항목 일치","(비어 있음)","{0}: {1}","시스템 오류가 발생했습니다({0}).","알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참조하세요.","알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참조하세요.","{0}(총 {1}개의 오류)","알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참조하세요.","Ctrl","Shift","<Alt>","Windows","Ctrl","Shift","<Alt>","슈퍼","Ctrl","Shift","옵션","명령","Ctrl","Shift","<Alt>","Windows","Ctrl","Shift","<Alt>","슈퍼","편집기","현재 편집기에 액세스할 수 없습니다.","{0} 화면 읽기 프로그램 최적화 모드를 사용하도록 설정하려면 {1}을(를) 사용합니다.","{0} 화면 읽기 프로그램 최적화 모드를 사용하도록 설정하려면 {1}을(를) 사용하여 빠른 선택을 열고 화면 읽기 프로그램 접근성 모드 토글 명령을 실행합니다(이 명령은 현재 키보드를 통해 트리거할 수 없음).","{0} {1}을(를) 사용하여 키 바인딩 편집기에 액세스하여 화면 읽기 프로그램 접근성 모드 토글 명령에 대한 키 바인딩을 할당하고 실행하세요.","편집기","더 긴 줄로 이동하는 경우에도 끝에 고정","더 긴 줄로 이동하는 경우에도 끝에 고정","보조 커서가 제거됨","실행 취소(&&U)","실행 취소","실행 취소","다시 실행(&&R)","다시 실행","다시 실행","모두 선택(&&S)","모두 선택","모두 선택","DOM 기반 렌더링 사용","{0} 키를 눌러 마우스를 위에 놓기","로드 중...","인라인 완성이 현재 다시 알림 상태인지 여부","코드 완성 및 NES에 대한 다시 알림 기간 선택","인라인 제안 다시 알림","인라인 제안 다시 알림 취소","커서 수를 {0}개로 제한했습니다. 더 큰 변경 내용을 위해서는 [찾아서 교체](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)를 사용하거나 편집기 다중 커서 제한 설정을 늘리는 것이 좋습니다.","다중 커서 제한 늘리기","변경되지 않은 영역 축소 토글","이동된 코드 블록 표시 토글","공간이 제한된 경우 인라인 보기 사용 설정/해제","diff 편집기","스위치 쪽","비교 이동 종료","변경되지 않은 모든 영역 축소","변경되지 않은 모든 영역 표시","되돌리기","액세스 가능한 Diff 뷰어","다음 다른 항목으로 이동","다음 다른 항목으로 이동","액세스 가능한 Diff 뷰어의 '삽입' 아이콘.","액세스 가능한 Diff 뷰어의 '제거' 아이콘.","접근 가능한 Diff 뷰어의 '닫기' 아이콘.","닫기","액세스 가능한 Diff 뷰어입니다. 탐색하려면 위쪽 및 아래쪽 화살표를 사용합니다.","변경된 줄 없음","선 1개 변경됨","줄 {0}개 변경됨","차이 {0}/{1}: 원래 줄 {2}, {3}, 수정된 줄 {4}, {5}","비어 있음","{0} 변경되지 않은 줄 {1}","{0} 원래 줄 {1} 수정된 줄 {2}","+ {0} 수정된 줄 {1}","- {0} 원래 줄 {1}"," {0}을(를) 사용하여 접근성 도움말을 엽니다.","삭제된 줄 복사","삭제된 줄 복사","변경된 줄 복사","변경된 줄 복사","삭제된 줄 복사({0})","변경된 줄({0}) 복사","이 변경 내용 되돌리기","공간이 제한된 경우 인라인 보기 사용","이동된 코드 블록 표시","블록 되돌리기","선택 항목 되돌리기","액세스 가능한 Diff 뷰어 열기","변경되지 않은 영역 접기","숨겨진 선 {0}개","위에 자세히 표시하려면 클릭하거나 끌어다 놓기","변경되지 않은 영역 표시","아래에 자세히 표시하려면 클릭하거나 끌어다 놓기","숨겨진 선 {0}개","두 번 클릭하여 펼치기","변경 사항과 함께 코드가 {0} - {1}줄로 이동됨","변경 사항과 함께 코드가 {0} - {1}줄에서 이동됨","코드가 {0} - {1}줄로 이동됨","코드가 {0} - {1}줄에서 이동됨","선택한 변경 내용 되돌리기","변경 내용 되돌리기","diff 편집기에서 이동된 텍스트의 테두리 색입니다.","diff 편집기에서 이동된 텍스트의 활성 테두리 색입니다.","변경Line truncated
|
||||
- 0을 사용하여 글꼴 크기에서 줄 높이를 자동으로 계산합니다.\r
|
||||
- 0에서 8 사이의 값은 글꼴 크기의 승수로 사용됩니다.\r
|
||||
- 8보다 크거나 같은 값이 유효 값으로 사용됩니다.`,"미니맵 표시 여부를 제어합니다.","미니맵은 항상 표시됩니다.","마우스가 미니맵 위에 있지 않으면 미니맵이 숨겨지고, 마우스가 미니맵 위에 있으면 미니맵이 표시됩니다.","미니맵은 편집기가 스크롤될 때만 표시됩니다.","미니맵을 자동으로 숨길지 여부를 제어합니다.","미니맵의 크기는 편집기 내용과 동일하며 스크롤할 수 있습니다.","편집기의 높이를 맞추기 위해 필요에 따라 미니맵이 확장되거나 축소됩니다(스크롤 없음).","미니맵을 편집기보다 작게 유지할 수 있도록 필요에 따라 미니맵이 축소됩니다(스크롤 없음).","미니맵의 크기를 제어합니다.","미니맵을 렌더링할 측면을 제어합니다.","미니맵 슬라이더가 표시되는 시기를 제어합니다.","미니맵에 그려진 콘텐츠의 배율: 1, 2 또는 3.","줄의 실제 문자(색 블록 아님)를 렌더링합니다.","최대 특정 수의 열을 렌더링하도록 미니맵의 너비를 제한합니다.","명명된 영역을 미니맵에 섹션 머리글로 표시할지 여부를 제어합니다.","MARK: 주석이 미니맵에 섹션 머리글로 표시되는지 여부를 제어합니다.","주석에서 섹션 헤더를 찾는 데 사용되는 정규식을 정의합니다. regex에는 섹션 헤더를 캡슐화하는 명명된 일치 그룹 'label'('(?<label>.+)'으로 작성됨)이 포함되어야 합니다. 그렇지 않으면 작동하지 않습니다. 필요에 따라 'separator'라는 다른 일치 그룹을 포함할 수 있습니다. 패턴에서 \\n 사용하여 여러 줄 머리글을 일치시킬 수 있습니다.","미니맵에서 섹션 머리글의 글꼴 크기를 제어합니다.","구역 머리글 문자 사이의 간격(픽셀)을 제어합니다. 이렇게 하면 작은 글꼴 크기의 머리글 가독성을 높이는 데 도움이 됩니다.","편집기의 위쪽 가장자리와 첫 번째 줄 사이의 공백을 제어합니다.","편집기의 아래쪽 가장자리와 마지막 줄 사이의 공백을 제어합니다.","입력과 동시에 매개변수 문서와 유형 정보를 표시하는 팝업을 사용하도록 설정합니다.","매개변수 힌트 메뉴의 주기 혹은 목록의 끝에 도달하였을때 종료할 것인지 여부를 결정합니다.","제안 위젯 내부에 빠른 제안이 표시됩니다.","빠른 제안이 유령 텍스트로 표시됨","빠른 제안이 사용 중지되었습니다.","문자열 내에서 빠른 제안을 사용합니다.","주석 내에서 빠른 제안을 사용합니다.","문자열 및 주석 외부에서 빠른 제안을 사용합니다.","입력하는 동안 제안을 자동으로 표시할지 여부를 제어합니다. 이것은 주석, 문자열 및 기타 코드를 입력하기 위해 제어할 수 있습니다. 빠른 제안은 고스트 텍스트 또는 제안 위젯으로 표시하도록 구성할 수 있습니다. 또한 제안이 특수 문자에 의해 실행되는지 여부를 제어하는 {0}-설정에 유의하세요.","줄 번호는 렌더링되지 않습니다.","줄 번호는 절대값으로 렌더링 됩니다.","줄 번호는 커서 위치에서 줄 간격 거리로 렌더링 됩니다.","줄 번호는 매 10 줄마다 렌더링이 이루어집니다.","줄 번호의 표시 여부를 제어합니다.","이 편집기 눈금자에서 렌더링할 고정 폭 문자 수입니다.","이 편집기 눈금자의 색입니다.","특정 수의 고정 폭 문자 뒤에 세로 눈금자를 렌더링합니다. 여러 눈금자의 경우 여러 값을 사용합니다. 배열이 비어 있는 경우 눈금자가 그려지지 않습니다.","세로 스크롤 막대는 필요한 경우에만 표시됩니다.","세로 스크롤 막대가 항상 표시됩니다.","세로 스크롤 막대를 항상 숨깁니다.","세로 스크롤 막대의 표시 유형을 제어합니다.","가로 스크롤 막대는 필요한 경우에만 표시됩니다.","가로 스크롤 막대가 항상 표시됩니다.","가로 스크롤 막대를 항상 숨깁니다.","가로 스크롤 막대의 표시 유형을 제어합니다.","세로 스크롤 막대의 너비입니다.","가로 스크롤 막대의 높이입니다.","클릭이 페이지별로 스크롤되는지 또는 클릭 위치로 이동할지 여부를 제어합니다.","설정하면 가로 스크롤 막대가 편집기 콘텐츠의 크기를 늘리지 않습니다.","기본이 아닌 모든 ASCII 문자를 강조 표시할지 여부를 제어합니다. U+0020과 U+007E 사이의 문자, 탭, 줄 바꿈 및 캐리지 리턴만 기본 ASCII로 간주됩니다.","공백만 예약하거나 너비가 전혀 없는 문자를 강조 표시할지 여부를 제어합니다.","현재 사용자 로캘에서 공통되는 문자를 제외한 기본 ASCII 문자와 혼동할 수 있
Line truncated
|
||||
\r
|
||||
예:\r
|
||||
\`\`\`c\r
|
||||
char* str="hello\\nworld"\r
|
||||
\`\`\`\r
|
||||
은(는) 다음과 같이 표시됩니다.\r
|
||||
\`\`\`c\r
|
||||
char* str="hello\\n\r
|
||||
world"\r
|
||||
\`\`\``,"색 데코레이터를 제공하는 확장이 없는 경우에만 기본 색 데코레이터를 표시합니다.","항상 기본 색 데코레이터를 표시합니다.","기본 색 데코레이터를 표시하지 않습니다.","기본 문서 색 공급자를 사용하여 인라인 색 장식을 표시할지 여부를 제어합니다.","편집기에서 탭을 받을지 또는 탐색을 위해 워크벤치로 미룰지를 제어합니다.","커서 위치의 줄 강조 표시에 대한 배경색입니다.","커서 위치의 줄 테두리에 대한 배경색입니다.","빠른 열기 및 찾기 기능 등을 통해 강조 표시된 영역의 배경색입니다. 기본 장식을 숨기지 않도록 색은 불투명하지 않아야 합니다.","강조 영역 주변의 테두리에 대한 배경색입니다","강조 표시된 기호(예: 정의로 이동 또는 다음/이전 기호로 이동)의 배경색입니다. 이 색상은 기본 장식을 숨기지 않도록 불투명하지 않아야 합니다.","강조 표시된 기호 주위의 테두리 배경색입니다.","편집기 커서 색입니다.","편집기 커서의 배경색입니다. 블록 커서와 겹치는 글자의 색상을 사용자 정의할 수 있습니다.","여러 커서가 있는 경우 기본 편집기 커서의 색입니다.","여러 커서가 있는 경우 기본 편집기 커서의 배경색입니다. 블록 커서와 겹치는 문자의 색을 사용자 지정할 수 있습니다.","여러 커서가 있는 경우 보조 편집기 커서의 색입니다.","여러 커서가 있는 경우 보조 편집기 커서의 배경색입니다. 블록 커서와 겹치는 문자의 색을 사용자 지정할 수 있습니다.","편집기의 공백 문자 색입니다.","편집기 줄 번호 색입니다.","편집기 들여쓰기 안내선 색입니다.","'editorIndentGuide.background'는 더 이상 사용되지 않습니다. 대신 'editorIndentGuide.background1'을 사용하세요.","활성 편집기 들여쓰기 안내선 색입니다.","'editorIndentGuide.activeBackground'는 더 이상 사용되지 않습니다. 대신 'editorIndentGuide.activeBackground1'을 사용하세요.","편집기 들여쓰기 안내선 색(1).","편집기 들여쓰기 안내선 색(2).","편집기 들여쓰기 안내선 색(3).","편집기 들여쓰기 안내선 색(4).","편집기 들여쓰기 안내선 색(5).","편집기 들여쓰기 안내선 색(6).","활성 편집기 들여쓰기 안내선 색(1).","활성 편집기 들여쓰기 안내선 색(2).","활성 편집기 들여쓰기 안내선 색(3).","활성 편집기 들여쓰기 안내선 색(4).","활성 편집기 들여쓰기 안내선 색(5).","활성 편집기 들여쓰기 안내선 색(6).","편집기 활성 영역 줄번호 색상","ID는 사용되지 않습니다. 대신 'editorLineNumber.activeForeground'를 사용하세요.","편집기 활성 영역 줄번호 색상","editor.renderFinalNewline이 흐리게 설정된 경우 최종 편집기 줄의 색입니다.","편집기 눈금의 색상입니다.","편집기 코드 렌즈의 전경색입니다.","일치하는 괄호 뒤의 배경색","일치하는 브래킷 박스의 색상","개요 눈금 경계의 색상입니다.","편집기 개요 눈금자의 배경색입니다.","편집기 거터의 배경색입니다. 거터에는 글리프 여백과 행 수가 있습니다.","편집기의 불필요한(사용하지 않는) 소스 코드 테두리 색입니다.",`편집기의 불필요한(사용하지 않는) 소스 코드 불투명도입니다. 예를 들어 "#000000c0"은 75% 불투명도로 코드를 렌더링합니다. 고대비 테마의 경우 페이드 아웃하지 않고 'editorUnnecessaryCode.border' 테마 색을 사용하여 불필요한 코드에 밑줄을 그으세요.`,"편집기에서 고스트 텍스트의 테두리 색입니다.","편집기에서 고스트 텍스트의 전경색입니다.","편집기에서 고스트 텍스트의 배경색입니다.","범위의 개요 눈금자 표식 색이 강조 표시됩니다. 기본 장식을 숨기지 않도록 색은 불투명하지 않아야 합니다.","오류의 개요 눈금자 마커 색입니다.","경고의 개요 눈금자 마커 색입니다.","정보의 개요 눈금자 마커 색입니다.","대괄호의 전경색(1)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","대괄호의 전경색(2)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","대괄호의 전경색(3)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","대괄호의 전경색(4)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","대괄호의 전경색(5)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","대괄호의 전경색(6)입니다. 대괄호 쌍 색 지정을 사용하도록 설정해야 합니다.","예기치 않은 대괄호의 전경색입니다.","비활성 대괄호 쌍
Line truncated
|
||||
이러한 종류의 편집이 여러 개 있는 경우 편집기에 선택기가 표시됩니다. 이러한 종류의 편집이 없으면 편집기에서 오류 메시지가 표시됩니다.`,`적용할 기본 설정 붙여넣기 편집 종류 목록입니다.\r
|
||||
기본 설정과 일치하는 첫 번째 편집이 적용됩니다.`,"다른 이름으로 붙여넣기...","텍스트로 붙여넣기","붙여넣기 위젯이 표시되는지 여부","붙여넣기 옵션 표시...","비어 있음","'{0}'에 대한 붙여넣기 편집을 찾을 수 없습니다.","'{0}' 붙여넣기 편집을 확인하는 중입니다. 취소하려면 클릭하세요.","붙여넣기 처리기를 실행하는 중. 취소하고 기본 붙여넣기를 수행하려면 클릭하세요.","기본 붙여넣기 작업 구성","붙여넣기 작업 선택","붙여넣기 처리기를 실행하는 중","일반 텍스트 삽입","URI 삽입","URI 삽입","경로 삽입","경로 삽입","상대 경로 삽입","상대 경로 삽입","HTML 삽입","드롭 위젯이 표시되는지 여부","드롭 옵션 표시...","드롭 처리기를 실행하는 중입니다. 취소하려면 클릭하세요.",`'{0}' 편집을 확인하는 동안 오류 발생:\r
|
||||
{1}`,`'{0}' 편집을 적용하는 동안 오류 발생:\r
|
||||
{1}`,"편집기에서 취소 가능한 작업(예: '참조 피킹')을 실행하는지 여부","파일이 너무 커서 모두 바꾸기 작업을 수행할 수 없습니다.","찾기(&&F)","일치하는 항목이 없습니다. 다른 내용으로 검색해 보세요.","특정 일치 항목으로 이동하려면 숫자를 입력하세요(1~{0} 사이).","1에서 {0} 사이의 숫자를 입력하세요","1에서 {0} 사이의 숫자를 입력하세요","바꾸기(&&R)","찾기","인수로 찾기","선택 영역에서 찾기","다음 찾기","이전 찾기","일치 항목으로 이동...","다음 선택 찾기","이전 선택 찾기","바꾸기","편집기 찾기 위젯이 축소되었음을 나타내는 아이콘입니다.","편집기 찾기 위젯이 확장되었음을 나타내는 아이콘입니다.","편집기 찾기 위젯에서 '선택 영역에서 찾기'의 아이콘입니다.","편집기 찾기 위젯에서 '바꾸기'의 아이콘입니다.","편집기 찾기 위젯에서 '모두 바꾸기'의 아이콘입니다.","편집기 찾기 위젯에서 '이전 찾기'의 아이콘입니다.","편집기 찾기 위젯에서 '다음 찾기'의 아이콘입니다.","찾기/바꾸기","찾기","찾기","이전 검색 결과","다음 검색 결과","선택 항목에서 찾기","닫기","바꾸기","바꾸기","바꾸기","모두 바꾸기","바꾸기 설정/해제","처음 {0}개의 결과가 강조 표시되지만 모든 찾기 작업은 전체 텍스트에 대해 수행됩니다.","{1}의 {0}","결과 없음","{0}개 찾음","'{1}'에 대한 {0}을(를) 찾음","{2}에서 '{1}'에 대한 {0}을(를) 찾음","'{1}'에 대한 {0}을(를) 찾음","펼치기","재귀적으로 펼치기","접기","접기 전환","재귀적으로 접기","재귀적으로 접기 토글","모든 블록 코멘트를 접기","모든 영역 접기","모든 영역 펼치기","선택한 항목을 제외한 모든 항목 접기","선택한 항목을 제외한 모든 항목 표시","모두 접기","모두 펼치기","부모 폴딩으로 이동","이전 접기 범위로 이동","다음 접기 범위로 이동","선택 영역에서 접기 범위 만들기","수동 폴딩 범위 제거","가져오기 접기 설정/해제","수준 {0} 접기","접힌 범위의 배경색입니다. 색은 기본 장식을 숨기지 않기 위해 불투명해서는 안 됩니다.","접힌 범위의 첫 번째 줄 뒤에 있는 축소된 텍스트의 색입니다.","편집기 여백의 접기 컨트롤 색입니다.","편집기 문자 모양 여백에서 확장된 범위의 아이콘입니다.","편집기 문자 모양 여백에서 축소된 범위의 아이콘입니다.","편집기 문자 모양 여백에서 수동으로 축소된 범위에 대한 아이콘입니다.","편집기 문자 모양 여백에서 수동으로 확장된 범위에 대한 아이콘입니다.","범위를 확장하려면 클릭합니다.","범위를 축소하려면 클릭합니다.","편집기 글꼴 크기 늘리기","편집기 글꼴 크기 줄이기","편집기 글꼴 크기 다시 설정","문서 서식","선택 영역 서식","다음 마커로 이동의 아이콘입니다.","이전 마커로 이동의 아이콘입니다.","다음 문제(&&P)","이전 문제(&&P)","다음 문제로 이동 (오류, 경고, 정보)","이전 문제로 이동 (오류, 경고, 정보)","파일의 다음 문제로 이동 (오류, 경고, 정보)","파일의 이전 문제로 이동 (오류, 경고, 정보)","오류","경고","정보","힌트","{1}의 {0}입니다. ","문제 {1}개 중 {0}개","문제 {1}개 중 {0}개","편집기 표식 탐색 위젯 오류 색입니다.","편집기 마커 탐색 위젯 오류 제목 배경.","편집기 표식 탐색 위젯 경고 색입니다.","편집기 마커 탐색 위젯 경고 제목 배경.","편집기 표식 탐색 위젯 정보 색입니다.","편집기 마커 탐색 위젯 정보 제목 배경.","편집기 표식 탐색 위젯 배경입니다.","피킹","정의","'{0}'에 대한 정의를 찾을 수 없습니다.","정의를 찾을 수 없음","정의로 이동(&&D)","선언","'{0}'에 대한 선언을 찾을 수 없음","선언을 찾을 수 없음","선언으로 이동(&&D)","'{0}'에 대한 선언을 찾을 수 없음","선언을 찾을 수 없음","형식 정의","'{0}'에 대한 형식 정의를 찾을 수 없습니다.","형식 정의를 찾을 수 없습니다.","형식 정의로 이동(&&T)","구현","'{0}'에 대한 구현을 찾을 수 없습니다.","구현을 찾을 수 없습니다.","구현으로 이동(&&I)","'{0}'에 대한 참조가 없습니다.","참조가 없습니다.","참조로 이동(&&R)","참조","참조","위치","'{0}'에 대한 검색 결과가 없음","참조","정의로 이동","측면에서 정의 열기","정의 피킹","선언으로 이동","선언 미리 보기","형식 정의로 이동","형식 정의 미리 보기","구현으로 이동","피킹 구현","참조로 이동","참조 미리 보기","임의의 기호로 이동","{0}개
Line truncated
|
||||
[{1}] {2}`,"{1}부터 {0}까지","{0}({1})","숨기기","메뉴 다시 설정","'{0}' 숨기기","키 바인딩 구성","적용하려면 {0}, 미리 보기하려면 {1}","신청하려면 {0}","{0}, 사용 안 함 이유: {1}","작업 위젯","작업 표시줄에서 토글된 작업 항목의 배경색입니다.","작업 위젯 목록 표시 여부","작업 위젯 숨기기","이전 작업 선택","다음 작업 선택","선택한 작업 수락","선택한 작업 미리 보기","기본 언어 구성 재정의","{0}에 대해 재정의할 설정을 구성합니다.","언어에 대해 재정의할 편집기 설정을 구성합니다.","이 설정은 언어별 구성을 지원하지 않습니다.","언어에 대해 재정의할 편집기 설정을 구성합니다.","이 설정은 언어별 구성을 지원하지 않습니다.","빈 속성을 등록할 수 없음","'{0}'을(를) 등록할 수 없습니다. 이는 언어별 편집기 설정을 설명하는 속성 패턴인 '\\\\[.*\\\\]$'과(와) 일치합니다. 'configurationDefaults' 기여를 사용하세요.","'{0}'을(를) 등록할 수 없습니다. 이 속성은 이미 등록되어 있습니다.","'{0}'을(를) 등록할 수 없습니다. 연결된 정책 {1}이(가) 이미 {2}에 등록되어 있습니다.","컨텍스트 키에 대한 정보를 반환하는 명령","빈 컨텍스트 키 식","식 쓰는 것을 잊으셨나요? 항상 'false' 또는 'true'를 넣어 각각 false 또는 true로 평가할 수도 있습니다.","'not' 뒤에 'in'이 있습니다.","닫는 괄호 ')'","예기치 않은 토큰","토큰 앞에 && 또는 ||를 입력하는 것을 잊으셨나요?","필요하지 않은 식의 끝","컨텍스트 키를 입력하는 것을 잊으셨나요?",`예상: {0}\r
|
||||
수신됨: '{1}'.`,"운영 체제가 macOS인지 여부","운영 체제가 Linux인지 여부","운영 체제가 Windows인지 여부","플랫폼이 웹 브라우저인지 여부","브라우저 기반이 아닌 플랫폼에서 운영 체제가 macOS인지 여부","운영 체제가 iOS인지 여부","플랫폼이 모바일 웹 브라우저인지 여부","VS 코드의 품질 유형","키보드 포커스가 입력 상자 내에 있는지 여부","{0}을(를) 사용하시겠습니까?","{0} 또는 {1}을(를) 사용하시겠습니까?","{0}, {1} 또는 {2}을(를) 사용하시겠습니까?","견적을 열거나 닫는 것을 잊으셨나요?","'/'(슬래시) 문자를 이스케이프하는 것을 잊으셨나요? 이스케이프하려면 앞에 백슬라시 두 개(예: '\\\\/')를 넣습니다.","제안이 표시되는지 여부","({0})을(를) 눌렀습니다. 둘째 키는 잠시 기다렸다가 누르십시오...","({0})을(를) 눌렀습니다. 코드의 다음 키를 기다리는 중...","키 조합({0}, {1})은 명령이 아닙니다.","키 조합({0}, {1})은 명령이 아닙니다.","워크벤치","Windows와 Linux의 'Control'을 macOS의 'Command'로 매핑합니다.","Windows와 Linux의 'Alt'를 macOS의 'Option'으로 매핑합니다.","마우스로 트리와 목록의 항목을 다중 선택에 추가할 때 사용할 한정자입니다(예를 들어 탐색기에서 편집기와 SCM 보기를 여는 경우). '옆에서 열기' 마우스 제스처(지원되는 경우)는 다중 선택 한정자와 충돌하지 않도록 조정됩니다.","트리와 목록에서 마우스를 사용하여 항목을 여는 방법을 제어합니다(지원되는 경우). 일부 트리와 목록에서는 이 설정을 적용할 수 없는 경우 무시하도록 선택할 수 있습니다.","워크벤치에서 목록 및 트리의 가로 스크롤 여부를 제어합니다. 경고: 이 설정을 켜면 성능에 영향을 미칩니다.","스크롤 막대 스크롤 페이지의 페이지별 클릭 여부를 제어합니다.","트리 들여쓰기를 픽셀 단위로 제어합니다.","트리에서 들여쓰기 가이드를 렌더링할지 여부를 제어합니다.","목록과 트리에 부드러운 화면 이동 기능이 있는지를 제어합니다.","마우스 휠 스크롤 이벤트의 `deltaX` 및 `deltaY`에서 사용할 승수입니다.","'Alt' 키를 누를 때 스크롤 속도 승수입니다.","검색할 때 요소를 강조 표시합니다. 추가 위아래 탐색은 강조 표시된 요소만 탐색합니다.","검색할 때 요소를 필터링합니다.","워크벤치에서 목록 및 트리의 기본 찾기 모드를 제어합니다.","간단한 키보드 탐색에서는 키보드 입력과 일치하는 요소에 집중합니다. 일치는 접두사에서만 수행됩니다.","키보드 탐색 강조 표시에서는 키보드 입력과 일치하는 요소를 강조 표시합니다. 이후로 탐색에서 위 및 아래로 이동하는 경우 강조 표시된 요소만 트래버스합니다.","키보드 탐색 필터링에서는 키보드 입력과 일치하지 않는 요소를 모두 필터링하여 숨깁니다.","워크벤치의 목록 및 트리 키보드 탐색 스타일을 제어합니다. 간소화하고, 강조 표시하고, 필터링할 수 있습니다.","대신 'workbench.list.defaultFindMode' 및 'workbench.list.typeNavigationMode'를 사용하세요.","검색할 때 유사 항목 일치를 사용합니다.","검색할 때 연속 일치를 사용합니다.","워크벤치에서 목록 및 트리를 검색할 때 사용하는 일치 유형을 제어합니다.","폴더 이름을 클릭할 때 트리 폴더가 확장되는 방법을 제어합니다. 일부 트리와 목록에서는 이 설정을 적용할 수 없는 경우 무시하도록 선택할 수 있습니다.","트리에서 고정 스크롤을 사용할지 여부를 제어합니다.","{0}을(를) 사용하도록 설정한 경우 트리에 표시되는 고정 요소의 수를 제어합니다.","워크벤치의 목록 및 트리에서 형식 탐색이 작동하는 방식을 제어합니다. 'trigger'로 설정 시 'list.triggerTypeNavigation' 명령이 실행되면 형식 탐색이 시작됩니다.","오류","경고","정보","오류","경고","정보",'"{0}" 때문에 문제가 일시 중지되었습니다.','"{0}" 및 기타 {1} 때문에 문제가 일시 중지되었습니다.',"최근에 사용한 항목","유사한 명령","일반적으로 사용됨","기타 명령","유사한 명령","{0}, {1}","'{0}' 명령에서 오류가 발생했습니다.","{0}, {1}","키보드 포커스가 빠른 입력 컨트롤 내에 있는지 여부","빠른 입력의 맞춤","현재 표시되는 빠른 입력 형식임","빠른 입력의 커서가 입력 상자의 끝에 있는지 여부","뒤로","입력을 확인하려면 'Enter' 키를 누르고, 취소하려면 'Esc' 키를 누르세요.","{0} / {1}","결과의 범위를 축소하려면 입력하세요.","
Line truncated
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
define("vs/nls.messages.ru",["./_commonjsHelpers-CT9FvmAN"],(function(n){"use strict";var e={};/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/var t;function i(){return t||(t=1,globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","входные данные","С учетом регистра","Слово целиком","Использовать регулярное выражение","входные данные","Сохранить регистр","Проверьте этот аспект в доступном представлении с помощью {0}.",'Проверьте этот аспект в представлении с поддержкой специальных возможностей с помощью команды "Открыть представление с поддержкой специальных возможностей", которую в настоящее время нельзя активировать с помощью настраиваемого сочетания клавиш.',"Ошибка: {0}","Предупреждение: {0}","Информация: {0}"," или {0} для журнала"," ({0} для журнала)","Очищенные входные данные","свободный","Поле выбора","Дополнительные действия...","Ввод для поиска","Закрыть","Ввод для поиска","Результаты не найдены.","Нет результатов","Результатов: {0}","Введите текст для фильтра","Ввод для поиска","Фильтр","Нечеткое совпадение","(пусто)","{0}: {1}","Произошла системная ошибка ({0})","Произошла неизвестная ошибка. Подробные сведения см. в журнале.","Произошла неизвестная ошибка. Подробные сведения см. в журнале.","{0} (всего ошибок: {1})","Произошла неизвестная ошибка. Подробные сведения см. в журнале.","CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT","Super","CTRL","SHIFT","Параметр","Команда","CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT","Super","редактор","Сейчас редактор недоступен.","{0} Чтобы включить оптимизированный режим читателя, используйте {1}",'{0} Чтобы включить оптимизированный режим читателя, откройте быстрый выбор с помощью {1} и выполните команду "Активация режима специальных возможностей для читателя", который сейчас не может быть активирован с помощью клавиатуры.','{0} Назначьте сочетание клавиш для команды "Активация режима специальных возможностей для читателя", используя редактор настраиваемых сочетаний клавиш с помощью {1} и запустите его.',"редактор","Размещать на конце даже для более длинных строк","Размещать на конце даже для более длинных строк","Дополнительные курсоры удалены.","&&Отменить","Отменить","Отменить","&&Повторить","Вернуть","Вернуть","&&Выделить все","Выбрать все","Выбрать все","Использование отрисовки на основе DOM","Удерживайте клавишу {0}чтобы навести указатель мыши","Идет загрузка...","Отложены ли в настоящее время встроенные завершения","Выберите длительность откладывания завершений кода и NES","Отложить встроенные предложения","Отменить откладывание встроенных предложений","Число курсоров ограничено {0}. Для проведения крупных изменений рекомендуется использовать [поиск и замену](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) или увеличить значение параметра ограничения нескольких курсоров в редакторе.","Увеличить значение ограничения нескольких курсоров","Переключатель свертывания неизмененных регионов","Показать или скрыть перемещенные блоки кода",'Переключатель "Использовать встроенное представление при ограниченном пLine truncated
|
||||
– Используйте 0, чтобы автоматически вычислить высоту строки на основе размера шрифта.\r
|
||||
– Значения от 0 до 8 будут использоваться в качестве множителя для размера шрифта.\r
|
||||
– Значения больше или равные 8 будут использоваться в качестве действующих значений.`,"Определяет, отображается ли мини-карта.","Мини-карта всегда отображается.","Мини-карта скрыта, когда мышь не находится над мини-картой, и отображается, когда мышь наведена на мини-карту.","Мини-карта отображается только при прокрутке редактора","Определяет, скрыта ли мини-карта автоматически.","Мини-карта имеет такой же размер, что и содержимое редактора (возможна прокрутка).","Мини-карта будет растягиваться или сжиматься по мере необходимости, чтобы заполнить редактор по высоте (без прокрутки).","Миникарта будет уменьшаться по мере необходимости, чтобы никогда не быть больше, чем редактор (без прокрутки).","Управляет размером миникарты.","Определяет, с какой стороны будет отображаться мини-карта.","Определяет, когда отображается ползунок мини-карты.","Масштаб содержимого, нарисованного на мини-карте: 1, 2 или 3.","Отображает фактические символы в строке вместо цветных блоков.","Ограничивает ширину мини-карты, чтобы количество отображаемых столбцов не превышало определенное количество.","Определяет, отображаются ли именованные области в виде заголовков разделов на мини-карте.",'Определяет, отображаются ли комментарии "MARK:" в виде заголовков разделов на мини-карте.','Определяет регулярное выражение, используемое для поиска заголовков разделов в комментариях. Регулярное выражение должно содержать именованную группу соответствия "label" (записанную как "(?<label>.+)"), которая инкапсулирует заголовок раздела, в противном случае она не будет работать. При необходимости можно включить другую группу совпадений с именем "разделитель". Используйте \\n в шаблоне для сопоставления многострокового заголовка.',"Определяет размер шрифта заголовков разделов на мини-карте.","Управляет объемом пространства (в пикселях) между символами заголовка раздела. Это улучшает удобочитаемость заголовка при небольших размерах шрифтов.","Задает пространство между верхним краем редактора и первой строкой.","Задает пространство между нижним краем редактора и последней строкой.","Включает всплывающее окно с документацией по параметру и сведениями о типе, которое отображается во время набора.","Определяет, меню подсказок остается открытым или закроется при достижении конца списка.","Экспресс-предложения отображаются в мини-приложении рекомендаций","Экспресс-предложения отображаются как едва различимый текст","Экспресс-предложения отключены","Разрешение кратких предложений в строках.","Разрешение кратких предложений в комментариях.","Разрешение кратких предложений вне строк и комментариев.","Определяет, должны ли предложения автоматически отображаться при вводе. Этот параметр можно выбрать при вводе примечаний, строк и другого кода. Быстрые предло
Line truncated
|
||||
Если существует несколько правок для этого типа, в редакторе будет отображаться средство выбора. Если правки такого типа отсутствуют, в редакторе будет отображаться сообщение об ошибке.`,`Список предпочитаемых вариантов правок вставки для применения.\r
|
||||
Будет применена первая правка соответствующая настройкам.`,"Вставить как...","Вставить как текст","Отображается ли мини-приложение вставки","Показать параметры вставки...","пусто",'Изменения вставки для "{0}" не найдены',"Разрешение правки вставки для '{0}'. Щелкните, чтобы отменить","Запуск обработчиков вставки. Щелкните, чтобы отменить и выполнить обычную вставку","Настроить действие вставки по умолчанию","Выберите действие вставки","Запуск обработчиков вставки","Вставить обычный текст","Вставить URI","Вставить URI","Вставить пути","Вставить путь","Вставить относительные пути","Вставить относительный путь","Вставить HTML","Отображается ли мини-приложение сброса","Показать параметры сброса...","Запускаются обработчики сброса. Щелкните для отмены",`Ошибка при разрешении правки "{0}":\r
|
||||
{1}`,`Ошибка при применении изменения "{0}":\r
|
||||
{1}`,'Выполняются ли в редакторе операции, допускающие отмену, например, "Показать ссылки"',"Файл слишком велик для выполнения операции замены всех файлов.","&&Найти","Нет совпадений. Попробуйте найти что-нибудь другое.","Введите число, чтобы перейти к определенному совпадению (от 1 до {0})","Введите число от 1 до {0}","Введите число от 1 до {0}","&&Заменить","Найти","Найти с аргументами","Найти в выделенном фрагменте","Найти далее","Найти ранее","Перейти к совпадению...","Найти следующее выделение","Найти предыдущее выделение","Заменить","Значок, указывающий, что мини-приложение поиска в редакторе свернуто.","Значок, указывающий, что мини-приложение поиска в редакторе развернуто.",'Значок для кнопки "Найти в выбранном" в мини-приложении поиска в редакторе.','Значок для кнопки "Заменить" в мини-приложении поиска в редакторе.','Значок для кнопки "Заменить все" в мини-приложении поиска в редакторе.','Значок для кнопки "Найти ранее" в мини-приложении поиска в редакторе.','Значок для кнопки "Найти далее" в мини-приложении поиска в редакторе.',"Поиск и замена","Найти","Найти","Предыдущее совпадение","Следующее совпадение","Найти в выделении","Закрыть","Заменить","Заменить","Заменить","Заменить все","Переключение замены","Отображаются только первые {0} результатов, но все операции поиска выполняются со всем текстом.","{0} из {1}","Результаты отсутствуют","{0} обнаружено",'{0} найден для "{1}"','{0} найден для "{1}", в {2}','{0} найден для "{1}"',"Развернуть","Развернуть рекурсивно","Свернуть","Переключить свертывание","Свернуть рекурсивно","Переключить рекурсивное свертывание","Свернуть все блоки комментариев","Свернуть все регионы","Развернуть все регионы","Свернуть все кроме выбранных","Развернуть все кроме выбранных","Свернуть все","Развернуть все","Перейти к родительскому свертыванию","Перейти к предыдущему диапазону сложенных данных","Перейти к следующему диапазону сложенных данных","Создать диапазон свертывания из выделенного фрагмента","Удалить диапазоны свертывания вручную","Переключить свернутый импорт","Уровень папки {0}","Цвет фона за свернутыми диапазонами. Этот цвет не должен быть непрозрачным, чтобы не скрывать расположенные ниже декоративные элементы.","Цвет свернутого текста после первой строки сложенного диапазона.","Цвет элемента управления свертыванием во внутреннем поле редактора.","Значок для развернутых диапазонов на поле глифов редактора.","Значок для свернутых диапазонов на поле глифов редактора.","Значок для свернутых вручную диапазонов на полях глифа редактора.","Значок для развернутых вручную диапазонов на полях глифа редактора.","Щелкните, чтобы расширить диапазон.","Щелкните, чтобы свернуть диапазон.","Увеличить размер шрифта редактора","Уменьшить размер шрифта редактора","Сбросить размер шрифта редактора","Форматировать документ","Форма
Line truncated
|
||||
\r
|
||||
Рекомендуется удалить их из файла. Удаление этих символов можно настроить с помощью параметра "editor.unusualLineTerminators".`,"&&Удалить необычные символы завершения строки","Пропустить","Цвет фона символа при доступе на чтение, например, при чтении переменной. Цвет не должен быть непрозрачным, чтобы не скрыть расположенные ниже элементы оформления.","Цвет фона для символа во время доступа на запись, например при записи в переменную. Цвет не должен быть непрозрачным, чтобы не скрыть расположенные ниже элементы оформления.","Цвет фона текстового вхождения символа. Этот цвет не должен быть непрозрачным, чтобы не скрывать расположенные ниже элементы оформления.","Цвет границы символа при доступе на чтение, например, при считывании переменной.","Цвет границы символа при доступе на запись, например, при записи переменной. ","Цвет границы текстового вхождения символа.","Цвет маркера обзорной линейки для выделения символов. Этот цвет не должен быть непрозрачным, чтобы не скрывать расположенные ниже элементы оформления.","Цвет маркера обзорной линейки для выделения символов доступа на запись. Цвет не должен быть непрозрачным, чтобы не скрыть расположенные ниже элементы оформления.","Цвет маркера обзорной линейки текстового вхождения символа. Этот цвет не должен быть непрозрачным, чтобы не скрывать расположенные ниже элементы оформления.","Перейти к следующему выделению символов","Перейти к предыдущему выделению символов","Включить или отключить выделение символов","Удалить слово","Ошибка в позиции","Ошибка","Предупреждение в позиции","Предупреждение","Ошибка в строке","Ошибка в строке","Предупреждение в строке","Предупреждение в строке","Сложенная область в строке","Свернуто","Точка останова в строке","Точка останова","Встроенная рекомендация в строке","Следующее предложение правки в строке","Следующее предложение правки","Быстрое исправление терминала","Быстрое исправление","Отладчик остановлен в точке останова","Точка останова","Отсутствие встроенных подсказок в строке","Вложенные указания отсутствуют","Задача завершена","Задача завершена","Сбой задачи","Сбой задачи","Сбой команды терминала","Сбой команды","Команда терминала выполнена","Команда выполнена","Колокольчик терминала","Звонок терминала","Ячейка записной книжки выполнена","Ячейка записной книжки выполнена","Сбой ячейки записной книжки","Сбой ячейки записной книжки","Вставлена разностная строка","Удалена разностная строка","Изменена строка различий","Изменить измененный файл чата","Файл изменен из изменений чата","Отправлен запрос на чат","Отправлен запрос на чат","Получен ответ чата","Запрос на действие кода активирован","Запрос на действие кода активирован","Действие кода применено","Ход выполнения","Ход выполнения","Очистить","Очистка","Сохранить","Сохранить","Фор
Line truncated
|
||||
[{1}] {2}`,"{1} для {0}","{0} ({1})","Скрыть","Сбросить меню",'Скрыть "{0}"',"Настройка сочетания клавиш","{0}, чтобы применить, {1} для предварительного просмотра","{0}, чтобы применить","{0}, причина отключения: {1}","Мини-приложения действий","Цвет фона для переключаемых элементов действий на панели действий.","Отображается ли список мини-приложений действий","Скрыть мини-приложение действия","Выбрать предыдущее действие","Выбрать следующее действие","Принять выбранное действие","Предварительный просмотр выбранного действия","Переопределения конфигурации языка по умолчанию","Настройка переопределяемых параметров для {0}.","Настройка параметров редактора, переопределяемых для языка.","Этот параметр не поддерживает настройку для отдельных языков.","Настройка параметров редактора, переопределяемых для языка.","Этот параметр не поддерживает настройку для отдельных языков.","Не удается зарегистрировать пустое свойство",`Невозможно зарегистрировать "{0}". Оно соответствует шаблону свойства '\\\\[.*\\\\]$' для описания параметров редактора, определяемых языком. Используйте участие configurationDefaults.`,'Невозможно зарегистрировать "{0}". Это свойство уже зарегистрировано.','Невозможно зарегистрировать "{0}". Уже имеется регистрация {2} для связанной политики {1}.',"Команда, возвращающая сведения о ключах контекста","Пустое выражение ключа контекста",'Вы забыли записать выражение? Вы также можете поместить "false" или "true", чтобы всегда оценивать по значению false или true соответственно.','"in" после "not".','закрывающая круглая скобка ")"',"Непредвиденный маркер","Возможно, вы забыли поместить && или || перед маркером?","Неожиданный конец выражения","Возможно, вы забыли поместить ключ контекста?",`Ожидается: {0}\r
|
||||
Получено: "{1}".`,"Используется ли операционная система macOS","Используется ли операционная система Linux","Используется ли операционная система Windows","Является ли платформа браузерной","Используется ли операционная система macOS на платформе, отличной от браузерной","Используется ли операционная система IOS","Является ли платформа мобильным браузером","Тип качества VS Code","Находится ли фокус клавиатуры в поле ввода","Вы имели в виду {0}?","Вы имели в виду {0} или {1}?","Вы имели в виду {0}, {1} или {2}?","Вы забыли открыть или закрыть цитату?",'Вы забыли экранировать символ "/" (косая черта)? Чтобы экранировать, поместите перед символом две обратные косые черты, например "\\\\/".',"Отображаются ли предложения","Была нажата клавиша {0}. Ожидание нажатия второй клавиши сочетания...","Была нажата клавиша ({0}). Ожидание нажатия следующей клавиши сочетания...","Сочетание клавиш ({0} и {1}) не является командой.","Сочетание клавиш ({0} и {1}) не является командой.","Рабочее место","Соответствует клавише CTRL в Windows и Linux и клавише COMMAND в macOS.","Соответствует клавише ALT в Windows и Linux и клавише OPTION в macOS.",'Модификатор, который будет использоваться для добавления элементов в деревьях и списках в элемент множественного выбора с помощью мыши (например, в проводнике, в открытых редакторах и в представлении scm). Жесты мыши "Открыть сбоку" (если они поддерживаются) будут изменены таким образом, чтобы они не конфликтовали с модификатором элемента множественного выбора.',"Управляет тем, как открывать элементы в деревьях и списках с помощью мыши (если поддерживается). Обратите внимание, что этот параметр может игнорироваться в некоторых деревьях и списках, если он не применяется к ним.","Определяет, поддерживают ли горизонтальную прокрутку списки и деревья на рабочем месте. Предупреждение! Включение этого параметра может повлиять на производительность.","Определяет, следует ли щелкать полосу прокрутки постранично.","Определяет отступ для дерева в пикселях.","Определяет, нужно ли в дереве отображать направляющие отступа.","Управляет тем, используется ли плавная прокрутка для списков и деревьев.","Множитель, используемый для параметров deltaX и deltaY событий прокрутки колесика мыши.","Коэффициент увеличения скорости прокрутки при нажатии клавиши ALT.","При поиске необходимо выделять элементы. При дальнейшей навигации вверх и вниз выполняется обход только выделенных элементов.","Фильтруйте элементы при поиске.","Управляет режимом поиска по умолчанию для списков и деревьев в Workbench.","Про простой навигации с клавиатуры выбираются элементы, соответствующие вводимым с клавиатуры данным. Сопоставление осуществляется только по префиксам.","Функция подсветки навигации с клавиатуры выделяет элементы, соответствующие вводимым с клавиатуры данным. При дальнейшей навигации вверх и вниз
Line truncated
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
define("vs/nls.messages.zh-cn",(function(){"use strict";/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","输入","区分大小写","全字匹配","使用正则表达式","输入","保留大小写","在辅助视图中用 {0} 检查此项。","通过命令“打开辅助视图”在辅助视图中检查此项,该命令当前无法通过键绑定触发。","错误: {0}","警告: {0}","信息: {0}"," 或使用 {0} 以查看历史记录"," (使用 {0} 查看历史记录)","清除的输入","未绑定","选择框","更多操作...","要搜索的类型","关闭","要搜索的类型","未找到任何结果。","无结果","{0} 个结果","要筛选的类型","要搜索的类型","筛选器","模糊匹配","(空)","{0}: {1}","发生了系统错误 ({0})","出现未知错误。有关详细信息,请参阅日志。","出现未知错误。有关详细信息,请参阅日志。","{0} 个(共 {1} 个错误)","出现未知错误。有关详细信息,请参阅日志。","Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","Option","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","Super","编辑器","现在无法访问编辑器。","{0} 若要启用屏幕阅读器优化模式,请使用 {1}","{0} 若要启用屏幕阅读器优化模式,请使用 {1} 打开快速选取,然后运行“切换屏幕阅读器辅助功能模式”命令;当前无法通过键盘触发此命令。","{0} 请通过使用 {1} 访问键绑定编辑器并运行它,为“切换屏幕阅读器辅助功能模式”命令分配键绑定。","编辑器","即使转到较长的行,也一直到末尾","即使转到较长的行,也一直到末尾","已删除辅助游标","撤消(&&U)","撤消","撤消","恢复(&&R)","恢复","恢复","全选(&&S)","选择全部","选择全部","使用基于 DOM 的呈现","按住 {0} 键将鼠标悬停","正在加载…","当前是否推迟内联补全","选择代码补全和 NES 的推迟持续时间","推迟内联建议","取消推迟内联建议","已将光标数限制为 {0}。请考虑使用 [查找和替换](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)进行较大的更改或增加编辑器多光标限制设置。","增加多光标限制","切换折叠未更改的区域","切换显示移动的代码块","在空间受限时切换使用内联视图","差异编辑器","切换侧面","退出比较移动","折叠所有未更改的区域","显示所有未更改的区域","还原","可访问的差异查看器","转至下一个差异","转至上一个差异","可访问差异查看器中“插入”的图标。","可访问差异查看器中“删除”的图标。","可访问差异查看器中“关闭”的图标。","关闭","可访问的差异查看器。使用向上和向下箭头导航。","未更改行","更改了 1 行","更改了 {0} 行","差异 {0}/ {1}: 原始行 {2},{3},修改后的行 {4},{5}","空白","{0} 未更改的行 {1}","{0}原始行{1}修改的行{2}","+ {0}修改的行{1}","- {0}原始行{1}"," 使用 {0} 打开辅助功能帮助。","复制已删除的行","复制已删除的行","复制更改的行","复制更改的行","复制已删除的行({0})","复制更改的行({0})","还原此更改","空间受限时使用内联视图","显示移动的代码块","还原块","还原所选内容","打开可访问差异查看器","折叠未更改的区域","{0} 个隐藏的行","单击或拖动可在上面显示更多内容","显示未更改的区域","单击或拖动可在下方显示更多内容","{0} 个隐藏的行","双击展开","代码已移动至行 {0}-{1},有更改","代码已从行 {0}-{1} 移动,有更改","代码已移动到行 {0} {1}","代码已从行 {0}-{1} 移动","还原所选更改","还原更改","在差异编辑器中移动的文本的边框颜色。","在差异编辑器中移动的文本的活动边框颜色。","未更改区域小组件周围的阴影颜色。","差异编辑器中插入项的线条修饰。","差异编辑器中删除项的线条修饰。","差异编辑器标题的背景色","多文件差异编辑器的背景色","多文件差异编辑器的边框颜色","正在加载...","没有已更改的文件","编辑器","一个制表符等于的空格数。当 {0} 打开时,将根据文件内容替代此设置。",'用于缩进或 `"tabSize"` 的空格数,可使用 `#editor.tabSize#` 中的值。当 `#editor.detectIndentation#` 处于打开状态时,将根据文件内容替代此设置。',"按 `Tab` 时插入空格。当 {0} 打开时,将根据文件内容替代此设置。","控制在基于文件内容打开文件时是否自动检测 {0} 和 {1}。","删除自动插入的尾随空白符号。","对大型文件进行特殊处理,禁用某些内存密集型功能。","关闭基于字词的建议。","仅建议活动文档中的字词。","建议使用同一语言的所有打开的文档中的字词。","建议所有打开的文档中的字词。","控制是否应根据文档Line truncated
|
||||
- 使用 0 根据字号自动计算行高。\r
|
||||
- 介于 0 和 8 之间的值将用作字号的乘数。\r
|
||||
- 大于或等于 8 的值将用作有效值。`,"控制是否显示缩略图。","缩略图始终显示。","鼠标不在缩略图上时隐藏缩略图,鼠标在缩略图上时显示缩略图。","仅在滚动编辑器时显示缩略图","控制是否自动隐藏缩略图。","迷你地图的大小与编辑器内容相同(并且可能滚动)。","迷你地图将根据需要拉伸或缩小以填充编辑器的高度(不滚动)。","迷你地图将根据需要缩小,永远不会大于编辑器(不滚动)。","控制迷你地图的大小。","控制在哪一侧显示缩略图。","控制何时显示迷你地图滑块。","在迷你地图中绘制的内容比例: 1、2 或 3。","渲染每行的实际字符,而不是色块。","限制缩略图的宽度,控制其最多显示的列数。","控制命名区域是否在缩略图中显示为节标题。","控制 MARK: 命令是否在缩略图中显示为节标题。","定义用于在注释中查找节标头的正则表达式。正则表达式必须包含命名匹配组“label”,(写为 “(?<label>.+)”) 封装节标头,否则它将不起作用。可以选择包括另一个名为“separator”的匹配组。使用模式中的 \\n 匹配多行标头。","控制缩略图中节标题的字号。","控制节标头字符之间的空间量(以像素为单位)。这有助于提高小字体大小的标题的可读性。","控制编辑器的顶边和第一行之间的间距量。","控制编辑器的底边和最后一行之间的间距量。","在输入时显示含有参数文档和类型信息的小面板。","控制参数提示菜单在到达列表末尾时进行循环还是关闭。","快速建议显示在建议小组件内","快速建议显示为虚影文本","已禁用快速建议","在字符串内启用快速建议。","在注释内启用快速建议。","在字符串和注释外启用快速建议。","控制是否应在键入时自动显示建议。这可以用于在注释、字符串和其他代码中键入时进行控制。可配置快速建议以显示为虚影文本或使用建议小组件显示。另请注意控制建议是否由特殊字符触发的 {0} 设置。","不显示行号。","将行号显示为绝对行数。","将行号显示为与光标相隔的行数。","每 10 行显示一次行号。","控制行号的显示。","此编辑器标尺将渲染的等宽字符数。","此编辑器标尺的颜色。","在一定数量的等宽字符后显示垂直标尺。输入多个值,显示多个标尺。若数组为空,则不绘制标尺。","垂直滚动条仅在必要时可见。","垂直滚动条将始终可见。","垂直滚动条将始终隐藏。","控制垂直滚动条的可见性。","水平滚动条仅在必要时可见。","水平滚动条将始终可见。","水平滚动条将始终隐藏。","控制水平滚动条的可见性。","垂直滚动条的宽度。","水平滚动条的高度。","控制单击按页滚动还是跳转到单击位置。","设置后,水平滚动条将不会增加编辑器内容的大小。","控制是否突出显示所有非基本 ASCII 字符。只有介于 U+0020 到 U+007E 之间的字符、制表符、换行符和回车符才被视为基本 ASCII。","控制是否突出显示仅保留空格或完全没有宽度的字符。","控制是否突出显示可能与基本 ASCII 字符混淆的字符,但当前用户区域设置中常见的字符除外。","控制注释中的字符是否也应进行 Unicode 突出显示。","控制字符串中的字符是否也应进行 Unicode 突出显示。","定义未突出显示的允许字符。","未突出显示在允许区域设置中常见的 Unicode 字符。","控制是否在编辑器中自动显示内联建议。","每当显示内联建议时,显示内联建议工具栏。","将鼠标悬停在内联建议上时显示内联建议工具栏。","从不显示内联建议工具栏。","控制何时显示内联建议工具栏。","控制是否在编辑器中显示内联建议的语法突出显示。","控制内联建议如何与建议小组件交互。如果启用,当内联建议可用时,不会自动显示建议小组件。",null,"控制键入后显示内联建议前的最小延迟(以毫秒为单位)。","抑制指定扩展 ID (以逗号分隔)的内联补全功能。",null,"控制内联建议提供程序更改时是否触发命令。","控制是否在存在建议冲突时显示内联建议。","控制内联建议的字体系列。","控制显示建议是否会移动代码,以便为内联建议留出空间。","控制是否可以并排显示较大的建议。","如果有足够的空间,较大的建议将并排显示,否则将显示在下面。","较大的建议从不并排显示,而是始终显示在下面。","控制在跳到建议之前,建议是否显示为折叠。","控制是否启用括号对着色。请使用 {0} 重写括号突出显示颜色。","控制每个方括号类型是否具有自己的独立颜色池。","启用括号对参考线。","
Line truncated
|
||||
如果有多个此类编辑,编辑器将显示一个选取器。如果没有此类编辑,编辑器将显示错误消息。`,`要尝试应用的首选粘贴编辑类型列表。\r
|
||||
将应用与首选项匹配的第一个编辑。`,"粘贴为...","粘贴为文本","是否显示粘贴小组件","显示粘贴选项...","空","找不到“{0}”的粘贴编辑","正在解析 '{0}' 的粘贴编辑。单击以取消","正在运行粘贴处理程序。单击可取消并进行基本粘贴","配置默认粘贴操作","选择粘贴操作","正在运行粘贴处理程序","插入纯文本","插入 URI","插入 URI","插入路径","插入路径","插入相对路径","插入相对路径","插入 HTML","是否显示放置小组件","显示放置选项...","正在运行放置处理程序。单击以取消",`解析编辑“{0}”时出错:\r
|
||||
{1}`,`应用编辑“{0}”时出错:\r
|
||||
{1}`,"编辑器是否运行可取消的操作,例如“预览引用”","文件太大,无法执行全部替换操作。","查找(&&F)","无匹配项。请尝试搜索其他内容。","键入数字以转到特定匹配项(介于 1 和 {0} 之间)","请键入介于 1 和 {0} 之间的数字","请键入介于 1 和 {0} 之间的数字","替换(&&R)","查找","使用参数查找","使用所选内容查找","查找下一个","查找上一个","转到“匹配”...","查找下一个选择","查找上一个选择","替换","用于指示编辑器查找小组件已折叠的图标。","用于指示编辑器查找小组件已展开的图标。","编辑器查找小组件中的“在选定内容中查找”图标。","编辑器查找小组件中的“替换”图标。","编辑器查找小组件中的“全部替换”图标。","编辑器查找小组件中的“查找上一个”图标。","编辑器查找小组件中的“查找下一个”图标。","查找/替换","查找","查找","上一个匹配项","下一个匹配项","在选定内容中查找","关闭","替换","替换","替换","全部替换","切换替换","仅高亮了前 {0} 个结果,但所有查找操作均针对全文。","第 {0} 项,共 {1} 项","无结果","找到 {0}","为“{1}”找到 {0}","在 {2} 处找到“{1}”的 {0}","为“{1}”找到 {0}","展开","以递归方式展开","折叠","切换折叠","以递归方式折叠","以递归方式切换折叠","折叠所有块注释","折叠所有区域","展开所有区域","折叠除选定项以外的所有项","展开除所选区域之外的所有区域","全部折叠","全部展开","跳转到父级折叠","转到上一个折叠范围","转到下一个折叠范围","根据所选内容创建折叠范围","删除手动折叠范围","切换导入折叠","折叠级别 {0}","折叠范围后面的背景颜色。颜色必须设为透明,以免隐藏底层装饰。","在折叠范围的第一行后的折叠文本的颜色。","编辑器装订线中折叠控件的颜色。","编辑器字形边距中已展开的范围的图标。","编辑器字形边距中已折叠的范围的图标。","编辑器字形边距中手动折叠的范围的图标。","编辑器字形边距中手动展开的范围的图标。","单击以展开范围。","单击以折叠范围。","增大编辑器字号","减小编辑器字号","重置编辑器字号","格式化文档","格式化选定内容","“转到下一个”标记的图标。","“转到上一个”标记的图标。","下一个问题(&&P)","上一个问题(&&P)","转到下一个问题 (错误、警告、信息)","转到上一个问题 (错误、警告、信息)","转到文件中的下一个问题 (错误、警告、信息)","转到文件中的上一个问题 (错误、警告、信息)","错误","警告","信息","提示","{1} 中的 {0}","{0} 个问题(共 {1} 个)","{0} 个问题(共 {1} 个)","编辑器标记导航小组件错误颜色。","编辑器标记导航小组件错误标题背景色。","编辑器标记导航小组件警告颜色。","编辑器标记导航小组件警告标题背景色。","编辑器标记导航小组件信息颜色。","编辑器标记导航小组件信息标题背景色。","编辑器标记导航小组件背景色。","快速查看","定义","未找到“{0}”的任何定义","找不到定义","转到定义(&&D)","声明","未找到“{0}”的声明","未找到声明","转到声明(&&D)","未找到“{0}”的声明","未找到声明","类型定义","未找到“{0}”的类型定义","未找到类型定义","转到类型定义(&&T)","实现","未找到“{0}”的实现","未找到实现","转到实现(&&I)",'未找到"{0}"的引用',"未找到引用","转到引用(&&R)","引用","引用","位置","无“{0}”的结果","引用","转到定义","打开侧边的定义","速览定义","转到声明","查看声明","转到类型定义","快速查看类型定义","转到实现","查看实现","转到引用","查看引用","转到任何符号","单击显示 {0} 个定义。","引用速览是否可见,例如“速览引用”或“速览定义”","正在加载...","{0} ({1})","{0} 个引用","{0} 个引用","引用","无可用预览","无结果","引用","在列 {2} 行 {1} 的 {0} 中","在列 {3} 行 {2} 的 {1} 中的 {0}","{0} 中有 1 个符号,完整路径: {1}","{1} 中有 {0} 个符号,完整路径: {2}","未找到结果","在 {0} 中找到 1 个符号","在 {1} 中找到 {0} 个符号","在 {1} 个文件中找到 {0} 个符号","是否存在只能通过键盘导航的符号位置。","{1} 的符号 {0},下一个使用 {2}","{1} 的符号 {0}","记录纹理图集统计信息","保存纹理图集","绘制字形","开发人员: 调试编辑器 GPU 呈现器","提高悬停详细程度级别","降低悬停详细程度级别","悬停不会自动获得焦点。","仅当悬停已可见时,才会获得焦点。","悬停在出现时会自动获得焦点。","显示或聚焦悬停","显示或聚焦编辑器悬停,该悬
Line truncated
|
||||
\r
|
||||
建议从文件中删除它们。可通过“editor.unusualLineTerminators”进行配置。`,"删除异常行终止符(&&R)","忽略","读取访问期间符号的背景色,例如读取变量时。颜色必须透明,以免隐藏下面的修饰效果。","写入访问过程中符号的背景色,例如写入变量时。颜色必须透明,以免隐藏下面的修饰效果。","符号在文本中出现时的背景色。颜色必须透明,以免隐藏下层的修饰。","符号在进行读取访问操作时的边框颜色,例如读取变量。","符号在进行写入访问操作时的边框颜色,例如写入变量。","符号在文本中出现时的边框颜色。","用于突出显示符号的概述标尺标记颜色。颜色必须透明,以免隐藏下面的修饰效果。","用于突出显示写权限符号的概述标尺标记颜色。颜色必须透明,以免隐藏下面的修饰效果。","符号在文本中出现时的概述标尺标记颜色。颜色必须透明,以免隐藏下层的修饰。","转到下一个突出显示的符号","转到上一个突出显示的符号","触发符号高亮","删除 Word","出错位置","错误","警告位置","警告","行上的错误","行上的错误","行上的警告","行上的警告","行上的折叠区域","已折叠","行上的断点","断点","行上的内联建议","行上的下一个编辑建议","下一个编辑建议","终端快速修复","快速修复","调试程序已在断点处停止","断点","行上无嵌入提示","无内嵌提示","任务已完成","任务已完成","任务失败","任务失败","终端命令失败","命令失败","终端命令成功","命令成功","终端钟","终端钟","笔记本单元格已完成","笔记本单元格已完成","笔记本单元格失败","笔记本单元格失败","已插入差异线","已删除差异行","差异行已修改","聊天编辑修改的文件","从聊天编辑修改的文件","已发送聊天请求","已发送聊天请求","已收到聊天响应","已触发代码操作请求","已触发代码操作请求","已应用代码操作","进度","进度","清除","清除","保存","保存","格式","格式","语音录制已启动","语音录制已停止","已保留编辑","已保留编辑","撤消编辑","已撤消编辑","需要聊天用户操作","需要聊天用户操作","查看","帮助","测试","文件","首选项","开发人员","{0} ({1})","{0} ({1})",`{0}\r
|
||||
[{1}] {2}`,"按 {1} 以 {0}","{0} ({1})","隐藏","重置菜单","隐藏“{0}”","配置键绑定","按 {0} 以应用,按 {1} 以预览","按 {0} 以应用","{0},禁用原因: {1}","操作小组件","操作栏中切换的操作项的背景色。","操作小组件列表是否可见","隐藏操作小组件","选择上一个操作","选择下一个操作","接受所选操作","预览所选操作","默认语言配置替代","配置要为 {0} 替代的设置。","针对某种语言,配置替代编辑器设置。","此设置不支持按语言配置。","针对某种语言,配置替代编辑器设置。","此设置不支持按语言配置。","无法注册空属性",'无法注册“{0}”。其符合描述特定语言编辑器设置的表达式 "\\\\[.*\\\\]$"。请使用 "configurationDefaults"。',"无法注册“{0}”。此属性已注册。",'无法注册 "{0}"。关联的策略 {1} 已向 {2} 注册。',"用于返回上下文键的相关信息的命令","上下文键表达式为空",'忘记写入表达式了吗? 还可以放置 "false" 或 "true" 以始终分别评估为 false 或 true。','"not" 后面的 "in"。','右括号 ")"',"意外的令牌","忘记在令牌之前放置 && 或 || 了吗?","意外的表达式结尾","忘记放置上下文键了吗?",`应为: {0}\r
|
||||
收到的: "{1}"。`,"操作系统是否 macOS","操作系统是否为 Linux","操作系统是否为 Windows","平台是否为 Web 浏览器","操作系统是否是非浏览器平台上的 macOS","操作系统是否为 iOS","平台是否为 Web 浏览器","VS Code 的质量类型","键盘焦点是否在输入框中","你指的是 {0} 吗?","你指的是 {0} 还是 {1}?","你指的是 {0}、{1} 还是 {2}?","忘记左引号或右引号了吗?",'忘记转义 "/"(斜杠)字符了吗? 在该字符前放置两个反斜杠以进行转义,例如 "\\\\/"。',"建议是否可见","({0})已按下。正在等待按下第二个键...","已按下({0})。正在等待第二个键...","组合键({0},{1})不是命令。","组合键({0},{1})不是命令。","工作台","映射为 `Ctrl` (Windows 和 Linux) 或 `Command` (macOS)。","映射为 `Alt` (Windows 和 Linux) 或 `Option` (macOS)。","在通过鼠标多选树和列表条目时使用的修改键 (例如“资源管理器”、“打开的编辑器”和“源代码管理”视图)。“在侧边打开”功能所需的鼠标动作 (若可用) 将会相应调整,不与多选修改键冲突。","控制如何使用鼠标打开树和列表中的项(若支持)。请注意,如果此设置不适用,某些树和列表可能会选择忽略它。","控制工作台上的列表和树是否支持水平滚动。警告: 打开此设置会影响性能。","控制在滚动条中单击时是否逐页单击。","控制树缩进(以像素为单位)。","控制树是否应呈现缩进参考线。","控制列表和树是否具有平滑滚动效果。","对鼠标滚轮滚动事件的 `deltaX` 和 `deltaY` 乘上的系数。",'按下"Alt"时滚动速度倍增。',"搜索时突出显示元素。进一步向上和向下导航将仅遍历突出显示的元素。","搜索时筛选元素。","控制工作台中列表和树的默认查找模式。","简单键盘导航聚焦与键盘输入相匹配的元素。仅对前缀进行匹配。","高亮键盘导航会突出显示与键盘输入相匹配的元素。进一步向上和向下导航将仅遍历突出显示的元素。","筛选器键盘导航将筛选出并隐藏与键盘输入不匹配的所有元素。","控制工作台中的列表和树的键盘导航样式。它可为“简单”、“突出显示”或“筛选”。",'请改用 "workbench.list.defaultFindMode" 和 "workbench.list.typeNavigationMode"。',"在搜索时使用模糊匹配。","在搜索时使用连续匹配。","控制在工作台中搜索列表和树时使用的匹配类型。","控制在单击文件夹名称时如何扩展树文件夹。请注意,如果不适用,某些树和列表可能会选择忽略此设置。","控制是否在树中启用粘性滚动。","控制启用 {0} 时树中显示的粘滞元素数。","控制类型导航在工作台的列表和树中的工作方式。如果设置为`trigger`,则在运行 `list.triggerTypeNavigation` 命令后,类型导航将开始。","错误","警告","信息","错误","警告","信息","问题已暂停,因为:“{0}”","问题已暂停,因为:“{0}”和 {1} 等","最近使用","类似命令","常用","其他命令","类似命令","{0}, {1}",'命令 "{0}" 导致错误',"{0}, {1}","键盘焦点是否在快速输入控件内","快速输入项的对齐方式","当前可见快速输入的类型","快速输入中的光标是否位于输入框的末尾","上一步",'按 "Enter" 以确认或按 "Esc" 以取消',"{0}/{1}","在此输入可缩小结果范围。","确定",'{0} (按 "Enter" 以确认或按 "Esc" 以取消)',"在任何快速输入的上下文中使用。如果为此命令更改一个键绑定,则还应更改此命令的所有其他键绑定(修饰符变体)。","在快速选取上下文中使用。如果为此命令更改一个键绑定,则还应更改此命令的所有其他键绑定(修饰符变体)。","如果我们处于快速访问模式,这将导航到下一项。如果我们未处于快速访问模式,这将导航到下一个分隔符。","如果我们处于快速访问模式,这将导航到上一项。如果我们未处于快速访问模式,这将导航到上一个分隔符。","在某些快速输入的上下文中使用。如果为此命令更改一个键绑定,则还应更改此命令的所有其他键绑定(修饰符变体)。","切换所有复选框","{0} 个结果","已选 {0} 项","确定","自定义","后退 ({0})","上一步","快速输入",'单击以执行命令 "{0}"',"快速树","整体前景色。此颜色仅在不被组件覆盖时适用。","已禁用元素的整体前景色。仅在未由组件替代时才能使用此颜色。","错误信息的整体前景色。此颜色仅在不被组件覆盖时适用。","提供其他信息的说明文本的前景色,例如标签文本。","工作台中图标的默认颜色。","焦点元素的整体边框颜色。此颜色仅在不被其他组件覆盖时适用。","在元素周围额外的一层边框,用来提高对
Line truncated
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
define("vs/nls.messages.zh-tw",(function(){"use strict";/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/globalThis._VSCODE_NLS_MESSAGES=["{0} ({1})","輸入","大小寫須相符","全字拼寫須相符","使用規則運算式","輸入","保留大小寫","使用 {0} 在可存取檢視中檢查此項目。","透過目前無法透過按鍵繫結關係觸發的開啟可存取檢視命令,在可存取檢視中檢查此項目。","錯誤: {0}","警告: {0}","資訊: {0}"," 或 {0} 以取得歷程記錄"," ({0} 以取得歷程記錄)","已清除輸入","未繫結","選取方塊","更多操作","要搜尋的類型","關閉","要搜尋的類型","找不到結果。","沒有結果","{0} 個結果","要篩選的類型","要搜尋的類型","篩選","模糊比對","(空的)","{0}: {1}","發生系統錯誤 ({0})","發生未知的錯誤。如需詳細資訊,請參閱記錄檔。","發生未知的錯誤。如需詳細資訊,請參閱記錄檔。","{0} (總計 {1} 個錯誤)","發生未知的錯誤。如需詳細資訊,請參閱記錄檔。","Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","Option","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","Super","編輯器","目前無法存取此編輯器。","{0} 若要啟用螢幕助讀程式最佳化模式,請使用 {1}","{0} 若要啟用螢幕助讀程式最佳化模式,,請使用 {1} 開啟快速挑選,然後執行 [切換螢幕助讀程式協助工具模式] 命令,該模式目前無法透過鍵盤觸發。","{0} 請使用 {1} 存取按鍵繫結關係編輯器並加以執行,以為 [切換螢幕助讀程式協助工具模式] 命令指派按鍵繫結關係。","編輯器","即使行的長度過長,仍要堅持至結尾","即使行的長度過長,仍要堅持至結尾","已移除次要資料指標","復原(&&U)","復原","復原","取消復原(&&R)","重做","重做","全選(&&S)","全選","全選","使用 DOM 型轉譯","按住 {0} 鍵將滑鼠懸停在上面","正在載入...","目前內嵌完成是否已被延遲","選取程式碼完成和 NES 的延遲持續時間","延遲內嵌建議","取消延遲的內嵌建議","游標數目已限制為 {0}。請考慮使用 [尋找和取代](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) 進行較大型的變更,或增加編輯器的多重游標限制設定。","增加多重游標限制","切換摺疊未變更的區域","切換顯示移動的程式碼區塊","當空間有限時切換使用內嵌檢視","Diff 編輯器","切換側邊","結束比較移動","摺疊所有未變更的區域","顯示所有未變更的區域","還原","可存取的 Diff 檢視器","移至下一個差異","移至上一個差異","易存取差異檢視器中的 [插入] 圖示。","易存取差異檢視器中的 [移除] 圖示。","易存取差異檢視器中的 [關閉] 圖示。","關閉","可存取的 Diff 檢視器。使用向上和向下箭頭來瀏覽。","未變更任一行","已變更 1 行","已變更 {0} 行","{1} 項差異中的第 {0} 項: 原始行 {2}、{3},修改行 {4}、{5}","空白","{0} 未變更行 {1}","{0} 原始行 {1} 修改的行 {2}","+ {0} 修改行 {1}","- {0} 原始行 {1}"," 使用 {0} 以開啟協助工具說明。","複製已刪除的行","複製已刪除的行","複製變更的行","複製變更的行","複製已刪除的行 ({0})","複製變更的行 ({0})","還原此變更","空間有限時使用內嵌檢視","顯示移動的程式碼區塊","還原區塊","還原選取範圍","開啟易存取差異檢視器","摺疊未變更的區域","{0} 條隱藏行","按一下或拖曳以在上方顯示更多內容","顯示未變更的區域","按一下或拖曳以在下方顯示更多內容","{0} 條隱藏行","按兩下以展開","行 {0}-{1} 的程式碼已移動,且有所變更","行 {0}-{1} 的程式碼已移動,且有所變更","程式碼已移至行 {0}-{1}","行 {0}-{1} 的程式碼已移動","還原選取的變更","還原變更","在 Diff 編輯器中移動的文字的框線色彩。","在 Diff 編輯器中移動的文字的作用中框線色彩。","未變更的區域小工具周圍的陰影色彩。","Diff 編輯器中用於插入的線條裝飾。","Diff 編輯器中用於移除的線條裝飾。","Diff 編輯器標頭的背景色彩","多重檔案 Diff 編輯器的背景色彩","多重檔案 Diff 編輯器的框線色彩","正在載入...","沒有變更的檔案","編輯器","與 Tab 相等的空格數量。當 {0} 已開啟時,會根據檔案內容覆寫此設定。","用於縮排或 'tabSize' 使用 `\"editor.tabSize\"` 值的空格數目。當 '#editor.detectIndentation#' 開啟時,會根據檔案內容覆寫這個設定。","在按 `Tab` 時插入空格。當 {0} 開啟時,會根據檔案內容覆寫此設定。","根據檔案內容,控制當檔案開啟時,是否自動偵測 {0} 和 {1}。","移除尾端自動插入的空白字元。","針對大型檔案停用部分高記憶體需求功能的特殊處理方式。","關閉 Word 型建議。Line truncated
|
||||
- 使用 0 從字型大小自動計算行高。\r
|
||||
- 使用介於 0 和 8 之間的值作為字型大小的乘數。\r
|
||||
- 大於或等於 8 的值將用來作為有效值。`,"控制是否會顯示縮圖","一律顯示檔案縮圖。","當滑鼠不在檔案縮圖上時,檔案縮圖會隱藏;當滑鼠在檔案縮圖上時,檔案縮圖會顯示。","只有在捲動編輯器時,才會顯示檔案縮圖","控制是否會自動隱藏縮圖。","縮圖大小與編輯器內容相同 (且可能會捲動)。","縮圖會視需要伸縮,以填滿該編輯器的高度 (無捲動)。","縮圖將視需要縮小,一律不會大於該編輯器 (無捲動)。","控制縮圖的大小。","控制要在哪端呈現縮圖。","控制何時顯示迷你地圖滑桿。","縮圖內所繪製的內容大小: 1、2 或 3。","顯示行中的實際字元,而不是色彩區塊。","限制縮圖的寬度,最多顯示某個數目的列。","控制指定的區域是否在縮圖中顯示為區段標頭。","控制是否將 MARK: 註解顯示為縮圖中的區段標頭。","定義用來在批註中尋找區段標頭的正則表達式。regex 必須包含具名的相符群組 'label' (寫成 '(?<label>.+)') 封裝區段標頭,否則將無法運作。您可以選擇性地加入另一個名為 「分隔符」的相符群組。使用模式中的 \\n 來比對多行標頭。","控制縮圖中區段標頭的字型大小。","控制區段標頭字元之間 (像素) 的空間量。這有助於小字型的標頭可讀性。","控制編輯器上邊緣與第一行之間的空格數。","控制編輯器下邊緣與最後一行之間的空格數。","啟用快顯,在您鍵入的同時顯示參數文件和類型資訊。","控制提示功能表是否在清單結尾時循環或關閉。","快速建議會顯示在建議小工具內","快速建議會顯示為浮水印文字","已停用快速建議","允許在字串內顯示即時建議。","允許在註解中顯示即時建議。","允許在字串與註解以外之處顯示即時建議。","控制輸入時是否應自動顯示建議。這可控制在註解、字串及其他程式碼中的輸入。可設定快速建議以隱形浮出文字或建議小工具顯示。另外也請注意 {0} 設定,它會控制建議是否由特殊字元所觸發。","不顯示行號。","行號以絕對值顯示。","行號以目前游標的相對值顯示。","每 10 行顯示行號。","控制行號的顯示。","這個編輯器尺規會轉譯的等寬字元數。","此編輯器尺規的色彩。","在某個數目的等寬字元之後顯示垂直尺規。如有多個尺規,就會使用多個值。若陣列空白,就不會繪製任何尺規。","垂直捲軸只有在必要時才可見。","垂直捲軸永遠可見。","垂直捲軸永遠隱藏。","控制項垂直捲軸的可見度。","水平捲軸只有在必要時才可見。","水平捲軸永遠可見。","水平捲軸永遠隱藏。","控制項水平捲軸的可見度。","垂直捲軸的寬度。","水平捲軸的高度。","控制項按一下是否按頁面滾動或跳到按一下位置。","設定時,水平捲軸不會增加編輯器內容的大小。","控制是否醒目提示所有非基本的 ASCII 字元。只有介於 U+0020和 U+007E、tab、換行和歸位字元之間的字元會視為基本 ASCII。","控制是否只保留空格或完全沒有寬度之字元的醒目提示。","控制是否醒目提示與基本 ASCII 字元混淆的字元,但目前使用者地區設定中通用的字元除外。","控制註解中的字元是否也應受到 Unicode 醒目提示。","控制字串中的字元是否也應受到 Unicode 醒目提示。","定義未醒目提示的允許字元。","不會將允許地區設置中常見的 Unicode 字元強調顯示。","控制是否要在編輯器中自動顯示內嵌建議。","每當顯示內嵌建議時,顯示內嵌建議工具列。","每當游標停留在內嵌建議上方時,顯示內嵌建議工具列。","永不顯示內嵌建議工具列。","控制何時顯示內嵌建議工具列。","控制是否要在編輯器中顯示內嵌建議的語法強調顯示。","控制內嵌建議如何與建議小工具互動。如果啟用,有可用的內嵌建議時,不會自動顯示建議小工具。",null,"控制輸入後顯示內嵌建議的最小延遲時間 (以毫秒為單位)。","抑制指定擴充功能的內嵌完成 -- 以逗號分隔。",null,"控制是否在內嵌建議提供者變更時觸發命令。","控制在建議衝突時是否顯示內嵌建議。","控制內嵌建議的字體系列。","控制顯示建議是否會移動程式碼,以便騰出空間讓建議內嵌。","控制是否可以並排顯示較大的建議。","如果空間足夠,較大的建議將會並排顯示,否則會顯示在下方。","較大的建議永遠不會並排顯示,且一定會顯示在下方。","控制在跳到建議之前,是否將建議顯示為折疊。","控制是否啟用成對方括弧著色。使用 {0} 覆寫括弧亮顯顏色。","控制每個括弧類型是否有自己的獨立色彩集區。","啟用括
Line truncated
|
||||
如果有此種類的多個編輯,編輯器會顯示選擇器。如果沒有此種類的編輯,編輯器會顯示錯誤訊息。`,`要嘗試套用的偏好貼上編輯種類清單。\r
|
||||
將套用符合喜好設定的第一個編輯。`,"貼上為...","貼上為文字","是否顯示貼上小工具","顯示貼上選項...","空白","找不到 '{0}' 的貼上編輯","正在解析 '{0}' 的貼上編輯。按兩下以取消","執行貼上處理常式。按一下以取消並執行基本貼上","設定預設貼上動作","選取貼上動作","執行貼上處理常式","插入純文字","插入 URI","插入 URI","插入路徑","插入路徑","插入相對路徑","插入相對路徑","插入 HTML","是否顯示卸除小工具","顯示卸除選項...","正在執行置放處理常式。按一下以取消",`解析編輯 '{0}' 時發生錯誤:\r
|
||||
{1}`,`套用編輯 '{0}' 時發生錯誤:\r
|
||||
{1}`,"編輯器是否執行可取消的作業,例如「預覽參考」","檔案太大,無法執行取代所有作業。","尋找(&&F)","沒有相符項目。嘗試搜尋其他項目。","輸入數字以前往特定相符項目 (介於 1 到 {0})","請輸入介於 1 和 {0} 之間的數字。","請輸入介於 1 和 {0} 之間的數字。","取代(&&R)","尋找","使用引數尋找","尋找 With 選取項目","尋找下一個","尋找上一個","移至相符項目...","尋找下一個選取項目","尋找上一個選取項目","取代","表示編輯器尋找小工具已摺疊的圖示。","表示編輯器尋找小工具已展開的圖示。","編輯器尋找小工具中 [在選取範圍中尋找] 的圖示。","編輯器尋找小工具中 [取代] 的圖示。","編輯器尋找小工具中 [全部取代] 的圖示。","編輯器尋找小工具中 [尋找上一個] 的圖示。","編輯器尋找小工具中 [尋找下一個] 的圖示。","尋找/取代","尋找","尋找","上一個相符項目","下一個相符項目","在選取範圍中尋找","關閉","取代","取代","取代","全部取代","切換取代","僅反白顯示前 {0} 筆結果,但所有尋找作業會在完整文字上執行。","{1} 的 {0}","查無結果","找到 {0}","以 '{1}' 找到 {0}","以 '{1}' 找到 {0},位於 {2}","已以 '{1}' 找到 {0}","展開","以遞迴方式展開","摺疊","切換摺疊","以遞迴方式摺疊","切換以遞迴方式摺疊","摺疊全部區塊註解","摺疊所有區域","展開所有區域","摺疊所選區域以外的所有區域","展開所選區域以外的所有區域","全部摺疊","全部展開","移至父代摺疊","移至上一個摺疊範圍","移至下一個摺疊範圍","從選取範圍建立摺疊範圍","移除手動折疊範圍","切換匯入折疊","摺疊層級 {0}","已摺疊範圍後的背景色彩。色彩不得處於不透明狀態,以免隱藏底層裝飾。","摺疊範圍第一行之後的摺疊文字色彩。","編輯器裝訂邊的摺疊控制項色彩。","編輯器字符邊界中 [展開的範圍] 的圖示。","編輯器字符邊界中 [摺疊的範圍] 的圖示。","編輯器字符邊界中手動摺疊範圍的圖示。","編輯器字符邊界中手動展開範圍的圖示。","按一下以展開範圍。","按一下以摺疊範圍。","增加編輯器字型大小","減少編輯器字型大小","重設編輯器字型大小","格式化文件","格式化選取範圍","[前往下一個標記] 的圖示。","[前往上一個標記] 的圖示。","下一個問題(&&P)","前一個問題(&&P)","移至下一個問題 (錯誤, 警告, 資訊)","移至上一個問題 (錯誤, 警告, 資訊)","移至檔案裡面的下一個問題 (錯誤, 警告, 資訊)","移至檔案裡面的上一個問題 (錯誤, 警告, 資訊)","錯誤","警告","資訊","提示","{0} 於 {1}。","{0} 個問題 (共 {1} 個)","{0} 個問題 (共 {1} 個)","編輯器標記導覽小工具錯誤的色彩。","編輯器標記導覽小工具錯誤標題背景。","編輯器標記導覽小工具警告的色彩。","編輯器標記導覽小工具警告標題背景。","編輯器標記導覽小工具資訊的色彩","編輯器標記導覽小工具資訊標題背景。","編輯器標記導覽小工具的背景。","查看","定義","找不到 '{0}' 的定義","找不到任何定義","移至定義(&&D)","宣告","找不到 '{0}' 的宣告 ","找不到任何宣告","前往宣告(&&D)","找不到 '{0}' 的宣告 ","找不到任何宣告","類型定義","找不到 '{0}' 的任何類型定義","找不到任何類型定義","前往類型定義(&&T)","實作","找不到 '{0}' 的任何實作","找不到任何實作","前往實作(&&I)",'未找到 "{0}" 的參考',"未找到參考","前往參考(&&R)","參考","參考","位置","'{0}' 沒有結果","參考","移至定義","在一側開啟定義","瞄核定義","移至宣告","預覽宣告","移至類型定義","預覽類型定義","前往實作","查看實作","前往參考","預覽參考","前往任何符號","按一下以顯示 {0} 項定義。","是否顯示參考瞄核,例如「瞄核參考」或「瞄核定義」","正在載入...","{0} ({1})","{0} 個參考","{0} 個參考","參考","無法預覽","查無結果","參考","在資料行 {2} 行 {1} 的 {0} 中","在資料行 {3} 行 {2} 的 {1} 的 {0} 中","1 個符號位於 {0}, 完整路徑 {1}","{0} 個符號位於 {1}, 完整路徑 {2}","找不到結果","在 {0} 中找到 1 個符號","在 {1} 中找到 {0} 個符號","在 {1} 個檔案中找到 {0} 個符號","是否有只能透過鍵盤瀏覽的符號位置。","{1} 的符號 {0},{2} 為下一個","{1} 的符號 {0}","記錄紋理地圖集統計資料","儲存紋理圖集","繪製字元","開發人員: 偵錯編輯器 GPU 轉譯器","提高暫留詳細程度層級","降低暫留詳細程度層級","游標暫留將不會自動聚焦。","只有在游標暫留顯示時才會聚焦。","游標暫留出現時將自動聚焦。","顯示或聚焦暫留","顯
Line truncated
|
||||
[{1}] {2}`,"{1} 到 {0}","{0} ({1})","隱藏","重設功能表","隱藏 '{0}'","設定按鍵繫結關係","{0} 套用,{1} 至預覽","{0} 以套用","{0},停用原因: {1}","動作小工具","動作列中切換動作項目的背景色彩。","是否顯示動作小工具清單","隱藏動作小工具","選取上一個動作","選取下一個動作","接受選取的動作","預覽選取的動作","預設語言組態覆寫","設定要針對 {0} 覆寫的設定。","設定要針對語言覆寫的編輯器設定。","這個設定不支援以語言為根據的組態。","設定要針對語言覆寫的編輯器設定。","這個設定不支援以語言為根據的組態。","無法註冊空白屬性","無法註冊 '{0}'。這符合用於描述語言專用編輯器設定的屬性模式 '\\\\[.*\\\\]$'。請使用 'configurationDefaults' 貢獻。","無法註冊 '{0}'。此屬性已經註冊。","無法註冊 '{0}'。已向 {2} 註冊關聯的原則 {1}。","傳回有關內容索引鍵資訊的命令","空的內容索引鍵運算式","您是否忘記撰寫運算式? 您也可以分別放置 'false' 或 'true',以一律評估為 False 或 True。","'not' 後為 'in'。","右括弧 ')'","未預期的權杖","您是否忘記在權杖之前放置 && 或 ||?","運算式未預期的結尾","您是否忘記放置內容金鑰?",`預期: {0}\r
|
||||
收到: '{1}'。`,"作業系統是否為 macOS","作業系統是否為 Linux","作業系統是否為 Windows","平台是否為網頁瀏覽器","非瀏覽器平台上的作業系統是否為 macOS","作業系統是否為 iOS","平臺是否為行動網頁瀏覽器","VS Code 的品質類型","鍵盤焦點是否位於輸入方塊內","您是指 '{0}'?","您是指 {0} 或 {1}?","您是指 {0}、{1} 或 {2}?","您是否忘記左括弧或右括弧?","您是否忘記逸出 '/' (斜線) 字元? 在反斜線前放兩個反斜線以逸出,例如 '\\\\/'。","是否顯示建議","已按下 ({0})。等待第二個套索鍵...","({0}) 已按下。正在等待下一個套索鍵...","按鍵組合 ({0}, {1}) 不是命令。","按鍵組合 ({0}, {1}) 不是命令。","工作台","對應Windows和Linux的'Control'與對應 macOS 的'Command'。","對應Windows和Linux的'Alt'與對應macOS的'Option'。","透過滑鼠多選,用於在樹狀目錄與清單中新增項目的輔助按鍵 (例如在總管中開啟編輯器 及 SCM 檢視)。'在側邊開啟' 滑鼠手勢 (若支援) 將會適應以避免和多選輔助按鍵衝突。","控制如何使用滑鼠 (如支援此用法) 開啟樹狀目錄與清單中的項目。若不適用,某些樹狀目錄與清單可能會選擇忽略此設定。","控制在工作台中,清單與樹狀結構是否支援水平捲動。警告: 開啟此設定將會影響效能。","控制按一下捲軸是否逐頁捲動。","控制樹狀結構縮排 (像素)。","控制樹系是否應轉譯縮排輔助線。","控制清單和樹狀結構是否具有平滑捲動。","要用於滑鼠滾輪捲動事件 `deltaX` 和 `deltaY` 的乘數。","按下 `Alt` 時的捲動速度乘數。","搜尋時會醒目提示元素。進一步的向上和向下瀏覽只會周遊已醒目提示的元素。","搜尋時篩選元素。","控制 Workbench 中清單和樹狀結構的預設尋找模式。","比對按鍵輸入的簡易按鍵瀏覽焦點元素。僅比對前置詞。","醒目提示鍵盤瀏覽會醒目提示符合鍵盤輸入的元素。進一步向上或向下瀏覽只會周遊醒目提示的元素。","篩選鍵盤瀏覽會篩掉並隱藏不符合鍵盤輸入的所有元素。","控制 Workbench 中清單和樹狀結構的鍵盤瀏覽樣式。可以是簡易的、醒目提示和篩選。","請改為使用 'workbench.list.defaultFindMode' 和 'workbench.list.typeNavigationMode'。","搜尋時使用模糊比對。","搜尋時使用連續比對。","控制在工作台中搜尋清單和樹狀結構時所使用的比對類型。","控制當按下資料夾名稱時,樹狀目錄資料夾的展開方式。請注意,若不適用,某些樹狀目錄和清單可能會選擇忽略此設定。","控制是否要在樹狀中啟動黏性捲動。","控制啟用 {0} 時,樹狀中顯示的黏性元素數目。","控制工作台中清單和樹狀目錄的類型瀏覽運作方式。設定為 'trigger' 時,類型瀏覽會在執行 'list.triggerTypeNavigation' 命令時隨即開始。","錯誤","警告","資訊","錯誤","警告","資訊",'問題已暫停,原因: "{0}"','問題已暫停,原因: "{0}" 和另外 {1} 個',"最近使用的","類似的命令","經常使用","其他命令","類似的命令","{0}, {1}","命令 '{0}' 造成錯誤","{0}, {1}","鍵盤焦點是否位於快速輸入控制項內","快速輸入的對齊","目前可見的快速輸入類型","快速輸入中的游標是否位於輸入方塊的尾端","上一頁","按 'Enter' 鍵確認您的輸入或按 'Esc' 鍵取消","{0}/{1}","輸入以縮小結果範圍。","確定","{0} (按 'Enter' 鍵確認或按 'Esc' 鍵取消)","用於任何類型的快速輸入內容。如果您變更此命令的一個按鍵繫結關係,則也應該變更此命令的所有其他按鍵繫結關係 (修飾元變體)。","快速挑選內容時使用。如果您變更此命令的一個按鍵繫結關係,則也應該變更此命令的所有其他按鍵繫結關係 (修飾元變體)。","如果我們在快速存取模式中,這會瀏覽到下一個項目。如果我們不在快速存取模式中,這會瀏覽到下一個分隔線。","如果我們在快速存取模式中,這會瀏覽到上一個項目。如果我們不在快速存取模式中,這會瀏覽到上一個分隔線。","用於一些快速輸入內容。如果您變更此命令的一個按鍵繫結關係,則也應該變更此命令的所有其他按鍵繫結關係 (修飾元變體)。","切換所有核取方塊","{0} 個結果","已選擇 {0}","確定","自訂","背面 ({0})","返回","快速輸入","按一下以執行命令 ‘{0}’","快速樹狀圖","整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。","已停用元素的整體前景。只有在元件未覆蓋時,才能使用這個色彩。","整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。","提供附加訊息的前景顏色,例如標籤","工作台中圖示的預
Line truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/python-B-Y2SC3b",["exports","./editor.api-i0YVFWkl"],(function(e,n){"use strict";const t={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:n.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};e.conf=t,e.language=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/razor-JzN5FpSg",["exports","./editor.api-i0YVFWkl"],(function(e,t){"use strict";const o=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${o.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${o.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[ \t\r\n]+/],[/[^<@]+/]],doctype:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleStaLine truncated
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
define("vs/swift-n-2HociN",["exports"],(function(e){"use strict";/*!---------------------------------------------------------------------------------------------
|
||||
* Copyright (C) David Owens II, owensd.io. All rights reserved.
|
||||
*--------------------------------------------------------------------------------------------*/const o={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},t={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@GKInspectable","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet","@IBSegueAction","@NSApplicationMain","@NSCopying","@NSManaged","@Sendable","@UIApplicationMain","@autoclosure","@actorIndependent","@asyncHandler","@available","@convention","@derivative","@differentiable","@discardableResult","@dynamicCallable","@dynamicMemberLookup","@escaping","@frozen","@globalActor","@inlinable","@inline","@main","@noDerivative","@nonobjc","@noreturn","@objc","@objcMembers","@preconcurrency","@propertyWrapper","@requires_stored_property_inits","@resultBuilder","@testable","@unchecked","@unknown","@usableFromInline","@warn_unqualified_access"],accessmodifiers:["open","public","internal","fileprivate","private"],keywords:["#available","#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning","Any","Protocol","Self","Type","actor","as","assignment","associatedtype","associativity","async","await","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","false","fileprivate","final","for","func","get","guard","higherThan","if","import","in","indirect","infix","init","inout","internal","is","isolated","lazy","left","let","lowerThan","mutating","nil","none","nonisolated","nonmutating","open","operator","optional","override","postfix","precedence","precedencegroup","prefix","private","protocol","public","repeat","required","rethrows","return","right","safe","self","set","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","unowned","unsafe","var","weak","where","while","willSet","__consuming","__owned"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}};e.conf=o,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
define("vs/tsMode-i88JHxDY",["exports","./editor.api-i0YVFWkl","./workers-CbP2cVmy","./language/typescript/monaco.contribution"],(function(b,i,z,J){"use strict";class P{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=z.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(i.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0,s["lib.decorators.d.ts"]=!0,s["lib.decorators.legacy.d.ts"]=!0,s["lib.dom.asynciterable.d.ts"]=!0,s["lib.dom.d.ts"]=!0,s["lib.dom.iterable.d.ts"]=!0,s["lib.es2015.collection.d.ts"]=!0,s["lib.es2015.core.d.ts"]=!0,s["lib.es2015.d.ts"]=!0,s["lib.es2015.generator.d.ts"]=!0,s["lib.es2015.iterable.d.ts"]=!0,s["lib.es2015.promise.d.ts"]=!0,s["lib.es2015.proxy.d.ts"]=!0,s["lib.es2015.reflect.d.ts"]=!0,s["lib.es2015.symbol.d.ts"]=!0,s["lib.es2015.symbol.wellknown.d.ts"]=!0,s["lib.es2016.array.include.d.ts"]=!0,s["lib.es2016.d.ts"]=!0,s["lib.es2016.full.d.ts"]=!0,s["lib.es2016.intl.d.ts"]=!0,s["lib.es2017.d.ts"]=!0,s["lib.es2017.date.d.ts"]=!0,s["lib.es2017.full.d.ts"]=!0,s["lib.es2017.intl.d.ts"]=!0,s["lib.es2017.object.d.ts"]=!0,s["lib.es2017.sharedmemory.d.ts"]=!0,s["lib.es2017.string.d.ts"]=!0,s["lib.es2017.typedarrays.d.ts"]=!0,s["lib.es2018.asyncgenerator.d.ts"]=!0,s["lib.es2018.asynciterable.d.ts"]=!0,s["lib.es2018.d.ts"]=!0,s["lib.es2018.full.d.ts"]=!0,s["lib.es2018.intl.d.ts"]=!0,s["lib.es2018.promise.d.ts"]=!0,s["lib.es2018.regexp.d.ts"]=!0,s["lib.es2019.array.d.ts"]=!0,s["lib.es2019.d.ts"]=!0,s["lib.es2019.full.d.ts"]=!0,s["lib.es2019.intl.d.ts"]=!0,s["lib.es2019.object.d.ts"]=!0,s["lib.es2019.string.d.ts"]=!0,s["lib.es2019.symbol.d.ts"]=!0,s["lib.es2020.bigint.d.ts"]=!0,s["lib.es2020.d.ts"]=!0,s["lib.es2020.date.d.ts"]=!0,s["lib.es2020.full.d.ts"]=!0,s["lib.es2020.intl.d.ts"]=!0,s["lib.es2020.number.d.ts"]=!0,s["lib.es2020.promise.d.ts"]=!0,s["lib.es2020.sharedmemory.d.ts"]=!0,s["lib.es2020.string.d.ts"]=!0,s["lib.es2020.symbol.wellknown.d.ts"]=!0,s["lib.es2021.d.ts"]=!0,s["lib.es2021.full.d.ts"]=!0,s["lib.es2021.intl.d.ts"]=!0,s["lib.es2021.promise.d.ts"]=!0,s["lib.es2021.string.d.ts"]=!0,s["lib.es2021.weakref.d.ts"]=!0,s["lib.es2022.array.d.ts"]=!0,s["lib.es2022.d.ts"]=!0,s["lib.es2022.error.d.ts"]=!0,s["lib.es2022.full.d.ts"]=!0,s["lib.es2022.intl.d.ts"]=!0,s["lib.es2022.object.d.ts"]=!0,s["lib.es2022.regexp.d.ts"]=!0,s["lib.es2022.sharedmemory.d.ts"]=!0,s["lib.es2022.string.d.ts"]=!0,s["lib.es2023.array.d.ts"]=!0,s["lib.es2023.collection.d.ts"]=!0,s["lib.es2023.d.ts"]=!0,s["lib.es2023.full.d.ts"]=!0,s["lib.es5.d.ts"]=!0,s["lib.es6.d.ts"]=!0,s["lib.esnext.collection.d.ts"]=!0,s["lib.esnext.d.ts"]=!0,s["lib.esnext.decorators.d.ts"]=!0,s["lib.esnext.disposable.d.ts"]=!0,s["lib.esnext.full.d.ts"]=!0,s["lib.esnext.intl.d.ts"]=!0,s["lib.esnext.object.d.ts"]=!0,s["lib.esnext.promise.d.ts"]=!0,s["lib.scripthost.d.ts"]=!0,s["lib.webworker.asynciterable.d.ts"]=!0,s["lib.webworker.d.ts"]=!0,s["lib.webworker.importscripts.d.ts"]=!0,s["lib.webworker.iterable.d.ts"]=!0;function x(g,e,t=0){if(typeof g=="string")return g;if(g===void 0)return"";let o="";if(t){o+=e;for(let n=0;n<t;n++)o+=" "}if(o+=g.messageText,t++,g.next)for(const n of g.next)o+=x(n,e,t);return o}function S(g){return g?g.map(e=>e.text).join(""):""}class k{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),n=e.getPositionAt(t.start+t.length),{lineNumber:l,column:f}=o,{lineNumber:a,column:r}=n;return{startLineNumber:l,startColumn:f,endLineNumber:a,endColumn:r}}}class O{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=i.Uri.parse(e),o=i.editor.getModel(t);if(o)return o;if(this.isLibFilLine truncated
|
||||
`),code:t.code.toString(),tags:c,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(n=>{let l=e;if(n.file&&(l=this._libFiles.getOrCreateModel(n.file.fileName)),!l)return;const f=n.start||0,a=n.length||1,{lineNumber:r,column:c}=l.getPositionAt(f),{lineNumber:u,column:d}=l.getPositionAt(f+a);o.push({resource:l.uri,startLineNumber:r,startColumn:c,endLineNumber:u,endColumn:d,message:x(n.messageText,`
|
||||
`)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return i.MarkerSeverity.Error;case 3:return i.MarkerSeverity.Info;case 0:return i.MarkerSeverity.Warning;case 2:return i.MarkerSeverity.Hint}return i.MarkerSeverity.Info}}class C extends k{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,n){const l=e.getWordUntilPosition(t),f=new i.Range(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),a=e.uri,r=e.getOffsetAt(t),c=await this._worker(a);if(e.isDisposed())return;const u=await c.getCompletionsAtPosition(a.toString(),r);return!u||e.isDisposed()?void 0:{suggestions:u.entries.map(m=>{let w=f;if(m.replacementSpan){const D=e.getPositionAt(m.replacementSpan.start),T=e.getPositionAt(m.replacementSpan.start+m.replacementSpan.length);w=new i.Range(D.lineNumber,D.column,T.lineNumber,T.column)}const A=[];return m.kindModifiers!==void 0&&m.kindModifiers.indexOf("deprecated")!==-1&&A.push(i.languages.CompletionItemTag.Deprecated),{uri:a,position:t,offset:r,range:w,label:m.name,insertText:m.name,sortText:m.sortText,kind:C.convertKind(m.kind),tags:A}})}}async resolveCompletionItem(e,t){const o=e,n=o.uri,l=o.position,f=o.offset,r=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),f,o.label);return r?{uri:n,position:l,label:r.name,kind:C.convertKind(r.kind),detail:S(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case h.primitiveType:case h.keyword:return i.languages.CompletionItemKind.Keyword;case h.variable:case h.localVariable:return i.languages.CompletionItemKind.Variable;case h.memberVariable:case h.memberGetAccessor:case h.memberSetAccessor:return i.languages.CompletionItemKind.Field;case h.function:case h.memberFunction:case h.constructSignature:case h.callSignature:case h.indexSignature:return i.languages.CompletionItemKind.Function;case h.enum:return i.languages.CompletionItemKind.Enum;case h.module:return i.languages.CompletionItemKind.Module;case h.class:return i.languages.CompletionItemKind.Class;case h.interface:return i.languages.CompletionItemKind.Interface;case h.warning:return i.languages.CompletionItemKind.File}return i.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=S(e.documentation);if(e.tags)for(const o of e.tags)t+=`
|
||||
|
||||
${N(o)}`;return t}}function N(g){let e=`*@${g.name}*`;if(g.name==="param"&&g.text){const[t,...o]=g.text;e+=`\`${t.text}\``,o.length>0&&(e+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(g.text)?e+=` — ${g.text.map(t=>t.text).join(" ")}`:g.text&&(e+=` — ${g.text}`);return e}class F extends k{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case i.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(e,t,o,n){const l=e.uri,f=e.getOffsetAt(t),a=await this._worker(l);if(e.isDisposed())return;const r=await a.getSignatureHelpItems(l.toString(),f,{triggerReason:F._toSignatureHelpTriggerReason(n)});if(!r||e.isDisposed())return;const c={activeSignature:r.selectedItemIndex,activeParameter:r.argumentIndex,signatures:[]};return r.items.forEach(u=>{const d={label:"",parameters:[]};d.documentation={value:S(u.documentation)},d.label+=S(u.prefixDisplayParts),u.parameters.forEach((m,w,A)=>{const D=S(m.displayParts),T={label:D,documentation:{value:S(m.documentation)}};d.label+=D,d.parameters.push(T),w<A.length-1&&(d.label+=S(u.separatorDisplayParts))}),d.label+=S(u.suffixDisplayParts),c.signatures.push(d)}),{value:c,dispose(){}}}}class R extends k{async provideHover(e,t,o){const n=e.uri,l=e.getOffsetAt(t),f=await this._worker(n);if(e.isDisposed())return;const a=await f.getQuickInfoAtPosition(n.toString(),l);if(!a||e.isDisposed())return;const r=S(a.documentation),c=a.tags?a.tags.map(d=>N(d)).join(`
|
||||
|
||||
`):"",u=S(a.displayParts);return{range:this._textSpanToRange(e,a.textSpan),contents:[{value:"```typescript\n"+u+"\n```\n"},{value:r+(c?`
|
||||
|
||||
`+c:"")}]}}}class H extends k{async provideDocumentHighlights(e,t,o){const n=e.uri,l=e.getOffsetAt(t),f=await this._worker(n);if(e.isDisposed())return;const a=await f.getDocumentHighlights(n.toString(),l,[n.toString()]);if(!(!a||e.isDisposed()))return a.flatMap(r=>r.highlightSpans.map(c=>({range:this._textSpanToRange(e,c.textSpan),kind:c.kind==="writtenReference"?i.languages.DocumentHighlightKind.Write:i.languages.DocumentHighlightKind.Text})))}}class _ extends k{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,o){const n=e.uri,l=e.getOffsetAt(t),f=await this._worker(n);if(e.isDisposed())return;const a=await f.getDefinitionAtPosition(n.toString(),l);if(!a||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(a.map(c=>i.Uri.parse(c.fileName))),e.isDisposed()))return;const r=[];for(let c of a){const u=this._libFiles.getOrCreateModel(c.fileName);u&&r.push({uri:u.uri,range:this._textSpanToRange(u,c.textSpan)})}return r}}class E extends k{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,o,n){const l=e.uri,f=e.getOffsetAt(t),a=await this._worker(l);if(e.isDisposed())return;const r=await a.getReferencesAtPosition(l.toString(),f);if(!r||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(r.map(u=>i.Uri.parse(u.fileName))),e.isDisposed()))return;const c=[];for(let u of r){const d=this._libFiles.getOrCreateModel(u.fileName);d&&c.push({uri:d.uri,range:this._textSpanToRange(d,u.textSpan)})}return c}}class W extends k{async provideDocumentSymbols(e,t){const o=e.uri,n=await this._worker(o);if(e.isDisposed())return;const l=await n.getNavigationTree(o.toString());if(!l||e.isDisposed())return;const f=(r,c)=>({name:r.text,detail:"",kind:y[r.kind]||i.languages.SymbolKind.Variable,range:this._textSpanToRange(e,r.spans[0]),selectionRange:this._textSpanToRange(e,r.spans[0]),tags:[],children:r.childItems?.map(d=>f(d,r.text)),containerName:c});return l.childItems?l.childItems.map(r=>f(r)):[]}}const p=class p{};p.unknown="",p.keyword="keyword",p.script="script",p.module="module",p.class="class",p.interface="interface",p.type="type",p.enum="enum",p.variable="var",p.localVariable="local var",p.function="function",p.localFunction="local function",p.memberFunction="method",p.memberGetAccessor="getter",p.memberSetAccessor="setter",p.memberVariable="property",p.constructorImplementation="constructor",p.callSignature="call",p.indexSignature="index",p.constructSignature="construct",p.parameter="parameter",p.typeParameter="type parameter",p.primitiveType="primitive type",p.label="label",p.alias="alias",p.const="const",p.let="let",p.warning="warning";let h=p,y=Object.create(null);y[h.module]=i.languages.SymbolKind.Module,y[h.class]=i.languages.SymbolKind.Class,y[h.enum]=i.languages.SymbolKind.Enum,y[h.interface]=i.languages.SymbolKind.Interface,y[h.memberFunction]=i.languages.SymbolKind.Method,y[h.memberVariable]=i.languages.SymbolKind.Property,y[h.memberGetAccessor]=i.languages.SymbolKind.Property,y[h.memberSetAccessor]=i.languages.SymbolKind.Property,y[h.variable]=i.languages.SymbolKind.Variable,y[h.const]=i.languages.SymbolKind.Variable,y[h.localVariable]=i.languages.SymbolKind.Variable,y[h.variable]=i.languages.SymbolKind.Variable,y[h.function]=i.languages.SymbolKind.Function,y[h.localFunction]=i.languages.SymbolKind.Function;class v extends k{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:`
|
||||
`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}}class V extends v{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,o,n){const l=e.uri,f=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(l);if(e.isDisposed())return;const c=await r.getFormattingEditsForRange(l.toString(),f,a,v._convertOptions(o));if(!(!c||e.isDisposed()))return c.map(u=>this._convertTextChanges(e,u))}}class K extends v{get autoFormatTriggerCharacters(){return[";","}",`
|
||||
`]}async provideOnTypeFormattingEdits(e,t,o,n,l){const f=e.uri,a=e.getOffsetAt(t),r=await this._worker(f);if(e.isDisposed())return;const c=await r.getFormattingEditsAfterKeystroke(f.toString(),a,o,v._convertOptions(n));if(!(!c||e.isDisposed()))return c.map(u=>this._convertTextChanges(e,u))}}class j extends v{async provideCodeActions(e,t,o,n){const l=e.uri,f=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=v._convertOptions(e.getOptions()),c=o.markers.filter(w=>w.code).map(w=>w.code).map(Number),u=await this._worker(l);if(e.isDisposed())return;const d=await u.getCodeFixesAtPosition(l.toString(),f,a,c,r);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(w=>w.changes.filter(A=>A.isNewFile).length===0).map(w=>this._tsCodeFixActionToMonacoCodeAction(e,o,w)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,o){const n=[];for(const f of o.changes)for(const a of f.textChanges)n.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,a.span),text:a.newText}});return{title:o.description,edit:{edits:n},diagnostics:t.markers,kind:"quickfix"}}}class B extends k{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,o,n){const l=e.uri,f=l.toString(),a=e.getOffsetAt(t),r=await this._worker(l);if(e.isDisposed())return;const c=await r.getRenameInfo(f,a,{allowRenameOfImportPath:!1});if(c.canRename===!1)return{edits:[],rejectReason:c.localizedErrorMessage};if(c.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const u=await r.findRenameLocations(f,a,!1,!1,!1);if(!u||e.isDisposed())return;const d=[];for(const m of u){const w=this._libFiles.getOrCreateModel(m.fileName);if(w)d.push({resource:w.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(w,m.textSpan),text:o}});else throw new Error(`Unknown file ${m.fileName}.`)}return{edits:d}}}class U extends k{async provideInlayHints(e,t,o){const n=e.uri,l=n.toString(),f=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(n);return e.isDisposed()?null:{hints:(await r.provideInlayHints(l,f,a)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return i.languages.InlayHintKind.Parameter;case"Type":return i.languages.InlayHintKind.Type;default:return i.languages.InlayHintKind.Type}}}let L,I;function G(g){I=$(g,"typescript")}function Q(g){L=$(g,"javascript")}function q(){return new Promise((g,e)=>{if(!L)return e("JavaScript not registered!");g(L)})}function X(){return new Promise((g,e)=>{if(!I)return e("TypeScript not registered!");g(I)})}function $(g,e){const t=[],o=new P(e,g),n=(...a)=>o.getLanguageServiceWorker(...a),l=new O(n);function f(){const{modeConfiguration:a}=g;Y(t),a.completionItems&&t.push(i.languages.registerCompletionItemProvider(e,new C(n))),a.signatureHelp&&t.push(i.languages.registerSignatureHelpProvider(e,new F(n))),a.hovers&&t.push(i.languages.registerHoverProvider(e,new R(n))),a.documentHighlights&&t.push(i.languages.registerDocumentHighlightProvider(e,new H(n))),a.definitions&&t.push(i.languages.registerDefinitionProvider(e,new _(l,n))),a.references&&t.push(i.languages.registerReferenceProvider(e,new E(l,n))),a.documentSymbols&&t.push(i.languages.registerDocumentSymbolProvider(e,new W(n))),a.rename&&t.push(i.languages.registerRenameProvider(e,new B(l,n))),a.documentRangeFormattingEdits&&t.push(i.languages.registerDocumentRangeFormattingEditProvider(e,new V(n))),a.onTypeFormattingEdits&&t.push(i.languages.registerOnTypeFormattingEditProvider(e,new K(n))),a.codeActions&&t.push(i.languages.registerCodeActionProvider(e,new j(n))),a.inlayHints&&t.push(i.languages.registerInlayHintsProvider(e,new U(n))),a.diagnostics&&t.push(new M(l,g,e,n))}return f(),n}function Y(g){for(;g.length;)g.pop().dispose()}b.Adapter=k,b.CodeActionAdaptor=j,b.DefinitionAdapter=_,b.DiagnosticsAdapter=M,b.DocumentHighlightAdapter=H,b.FormatAdapter=V,b.FormatHelper=v,b.FormatOnTypeAdapter=K,b.InlayHintsAdapter=U,b.Kind=h,b.LibFiles=O,b.OutlineAdapter=W,b.QuickInfoAdapter=R,b.ReferenceAdapter=E,b.RenameAdapter=B,b.SignatureHelpAdapter=F,b.SuggestAdapter=C,b.WorkerManager=P,b.flattenDiagnosticMessageText=x,b.getJavaScriptWorker=q,b.getTypeScriptWorker=X,b.setupJavaScript=Q,b.setupTypeScript=G,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/typescript-4zug7YwV",["exports","./editor.api-i0YVFWkl"],(function(n,e){"use strict";const t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};n.conf=t,n.language=o,Object.defiLine truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/workers-CbP2cVmy",["exports","./editor.api-i0YVFWkl"],(function(c,l){"use strict";function i(e,o){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,o)}catch(t){console.error(t);return}try{return globalThis.trustedTypes?.createPolicy(e,o)}catch(t){console.error(t);return}}let n;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?n=globalThis.workerttPolicy:n=i("defaultWorkerFactory",{createScriptURL:e=>e});function a(e){const o=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",o);if(typeof r.getWorkerUrl=="function"){const t=r.getWorkerUrl("workerMain.js",o);return new Worker(n?n.createScriptURL(t):t,{name:o,type:"module"})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function s(e){const o=Promise.resolve(a({label:e.label??"monaco-editor-worker",moduleId:e.moduleId})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return l.editor.createWebWorker({worker:o,host:e.host,keepIdleModels:e.keepIdleModels})}c.createWebWorker=s}));
|
||||
-1
@@ -1 +0,0 @@
|
||||
define("vs/xml-DRHZuZwg",["exports","./editor.api-i0YVFWkl"],(function(e,t){"use strict";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:t.languages.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};e.conf=n,e.language=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
define("vs/yaml-CkWIGXBM",["exports","./editor.api-i0YVFWkl"],(function(e,n){"use strict";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:n.languages.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};e.conf=t,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+37
-33
@@ -1,61 +1,65 @@
|
||||
(function(){"use strict";var lt,Ce,ne;class rh{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?It.isErrorNoTelemetry(e)?new It(e.message+`
|
||||
(function(){"use strict";var ft,Re,ie;class zh{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Wt.isErrorNoTelemetry(e)?new Wt(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const ih=new rh;function $n(t){sh(t)||ih.onUnexpectedError(t)}function Tr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:It.isErrorNoTelemetry(t),cause:r?Tr(r):void 0,code:t.code}}return t}const Or="Canceled";function sh(t){return t instanceof zs?!0:t instanceof Error&&t.name===Or&&t.message===Or}class zs extends Error{constructor(){super(Or),this.name=this.message}}class It extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof It)return e;const n=new It;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class be extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,be.prototype)}}function ah(t,e="Unreachable"){throw new Error(e)}function oh(t,e="unexpected state"){if(!t)throw typeof e=="string"?new be(`Assertion Failed: ${e}`):e}function Un(t){if(!t()){debugger;t(),$n(new be("Assertion Failed"))}}function Ps(t,e){let n=0;for(;n<t.length-1;){const r=t[n],i=t[n+1];if(!e(r,i))return!1;n++}return!0}function lh(t){return typeof t=="string"}function ch(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Bn;(function(t){function e(I){return!!I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(I){yield I}t.single=i;function s(I){return e(I)?I:i(I)}t.wrap=s;function a(I){return I||n}t.from=a;function*o(I){for(let R=I.length-1;R>=0;R--)yield I[R]}t.reverse=o;function l(I){return!I||I[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}t.first=c;function d(I,R){let z=0;for(const $ of I)if(R($,z++))return!0;return!1}t.some=d;function u(I,R){let z=0;for(const $ of I)if(!R($,z++))return!1;return!0}t.every=u;function m(I,R){for(const z of I)if(R(z))return z}t.find=m;function*f(I,R){for(const z of I)R(z)&&(yield z)}t.filter=f;function*g(I,R){let z=0;for(const $ of I)yield R($,z++)}t.map=g;function*b(I,R){let z=0;for(const $ of I)yield*R($,z++)}t.flatMap=b;function*k(...I){for(const R of I)ch(R)?yield*R:yield R}t.concat=k;function F(I,R,z){let $=z;for(const L of I)$=R($,L);return $}t.reduce=F;function N(I){let R=0;for(const z of I)R++;return R}t.length=N;function*_(I,R,z=I.length){for(R<-I.length&&(R=0),R<0&&(R+=I.length),z<0?z+=I.length:z>I.length&&(z=I.length);R<z;R++)yield I[R]}t.slice=_;function T(I,R=Number.POSITIVE_INFINITY){const z=[];if(R===0)return[z,I];const $=I[Symbol.iterator]();for(let L=0;L<R;L++){const y=$.next();if(y.done)return[z,t.empty()];z.push(y.value)}return[z,{[Symbol.iterator](){return $}}]}t.consume=T;async function O(I){const R=[];for await(const z of I)R.push(z);return R}t.asyncToArray=O;async function V(I){let R=[];for await(const z of I)R=R.concat(z);return R}t.asyncToArrayFlat=V})(Bn||(Bn={}));function Rf(t,e){}function Ts(t){if(Bn.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function hh(...t){return qn(()=>Ts(t))}class dh{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function qn(t){return new dh(t)}const Dr=class Dr{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ts(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===wt.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dr.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Dr.DISABLE_DISPOSED_WARNING=!1;let cn=Dr;const Ds=class Ds{constructor(){this._store=new cn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Ds.None=Object.freeze({dispose(){}});let wt=Ds,le=(lt=class{constructor(e){this.element=e,this.next=lt.Undefined,this.prev=lt.Undefined}},lt.Undefined=new lt(void 0),lt);class uh{constructor(){this._first=le.Undefined,this._last=le.Undefined,this._size=0}get size(){return this._size}isEmpty(){
Line truncated
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const na=new zh;function Qn(t){ra(t)||na.onUnexpectedError(t)}function Ph(t){ra(t)||na.onUnexpectedExternalError(t)}function Yr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:Wt.isErrorNoTelemetry(t),cause:r?Yr(r):void 0,code:t.code}}return t}const Qr="Canceled";function ra(t){return t instanceof ia?!0:t instanceof Error&&t.name===Qr&&t.message===Qr}class ia extends Error{constructor(){super(Qr),this.name=this.message}}class Wt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Wt)return e;const n=new Wt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class ue extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,ue.prototype)}}function Th(t,e="Unreachable"){throw new Error(e)}function Oh(t,e="unexpected state"){if(!t)throw typeof e=="string"?new ue(`Assertion Failed: ${e}`):e}function bn(t){if(!t()){debugger;t(),Qn(new ue("Assertion Failed"))}}function Kr(t,e){let n=0;for(;n<t.length-1;){const r=t[n],i=t[n+1];if(!e(r,i))return!1;n++}return!0}function Wh(t){return typeof t=="string"}function $h(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Kn;(function(t){function e(D){return!!D&&typeof D=="object"&&typeof D[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(D){yield D}t.single=i;function s(D){return e(D)?D:i(D)}t.wrap=s;function a(D){return D??n}t.from=a;function*o(D){for(let R=D.length-1;R>=0;R--)yield D[R]}t.reverse=o;function l(D){return!D||D[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(D){return D[Symbol.iterator]().next().value}t.first=c;function d(D,R){let P=0;for(const U of D)if(R(U,P++))return!0;return!1}t.some=d;function u(D,R){let P=0;for(const U of D)if(!R(U,P++))return!1;return!0}t.every=u;function m(D,R){for(const P of D)if(R(P))return P}t.find=m;function*f(D,R){for(const P of D)R(P)&&(yield P)}t.filter=f;function*g(D,R){let P=0;for(const U of D)yield R(U,P++)}t.map=g;function*b(D,R){let P=0;for(const U of D)yield*R(U,P++)}t.flatMap=b;function*k(...D){for(const R of D)$h(R)?yield*R:yield R}t.concat=k;function F(D,R,P){let U=P;for(const L of D)U=R(U,L);return U}t.reduce=F;function N(D){let R=0;for(const P of D)R++;return R}t.length=N;function*_(D,R,P=D.length){for(R<-D.length&&(R=0),R<0&&(R+=D.length),P<0?P+=D.length:P>D.length&&(P=D.length);R<P;R++)yield D[R]}t.slice=_;function T(D,R=Number.POSITIVE_INFINITY){const P=[];if(R===0)return[P,D];const U=D[Symbol.iterator]();for(let L=0;L<R;L++){const C=U.next();if(C.done)return[P,t.empty()];P.push(C.value)}return[P,{[Symbol.iterator](){return U}}]}t.consume=T;async function O(D){const R=[];for await(const P of D)R.push(P);return R}t.asyncToArray=O;async function V(D){let R=[];for await(const P of D)R=R.concat(P);return R}t.asyncToArrayFlat=V})(Kn||(Kn={}));function wg(t,e){}function sa(t){if(Kn.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Vh(...t){return wn(()=>sa(t))}class Uh{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function wn(t){return new Uh(t)}const qr=class qr{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{sa(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Et.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?qr.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};qr.DISABLE_DISPOSED_WARNING=!1;let vn=qr;const Ks=class Ks{constructor(){this._store=new vn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Ks.None=Object.freeze({dispose(){}});let Et=Ks,ce=(ft=class{constructor(e){this.element=e,this.next=ft.Undefined,this.prev=ft.Undefined}},ft.Undefined=new ft(void 0),ft);class Bh{constructor(){this._first=ce.Undefined,this._last=ce.Undefine
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class fh extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}}class gh extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}}class Br{constructor(e){this.value=e}}const bh=2;class Ue{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new $r(e?.onListenerError??$n,this._options?.leakWarningThreshold??mh):void 0,this._perfMon=this._options?._profName?new Vr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new gh(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||$n)(c),wt.None}if(this._disposed)return wt.None;n&&(e=e.bind(n));const i=new Br(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Ur.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Br?(this._deliveryQueue??=new wh,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=qn(()=>{s?.(),this._removeListener(i)});return r instanceof cn?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*bh<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||$n;if(!r){e.value(n);return}try{e.value(n)}catch(i){r(i)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Br)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class wh{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function vh(){return globalThis._VSCODE_NLS_MESSAGES}function Os(){return globalThis._VSCODE_NLS_LANGUAGE}const yh=Os()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Ws(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),yh&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function B(t,e,...n){return Ws(typeof t=="number"?xh(t,e):e,n)}function xh(t,e){const n=vh()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const Dt="en";let qr=!1,jr=!1,Hr=!1,Hn,Gr=Dt,Vs=Dt,Sh,Xe;const vt=globalThis;let ke;typeof vt.vscode<"u"&&typeof vt.vscode.process<"u"?ke=vt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ke=process);const Ch=typeof ke?.versions?.electron=="string"&&ke?.type==="renderer";if(typeof ke=="object"){qr=ke.platform==="win32",jr=ke.platform==="darwin",Hr=ke.platform==="linux",Hr&&ke.env.SNAP&&ke.env.SNAP_REVISION,ke.env.CI||ke.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ke.env.GITHUB_WORKSPACE,Hn=Dt,Gr=Dt;const t=ke.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);Hn=e.userLocale,Vs=e.osLocale,Gr=e.resolvedLanguage||Dt,Sh=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!Ch?(Xe=navigator.userAgent,qr=Xe.indexOf("Windows")>=0,jr=Xe.indexOf("Macintosh")>=0,(Xe.indexOf("Macintosh")>=0||Xe.indexOf("iPad")>=0||Xe.inde
Line truncated
|
||||
`||t===" "}class er{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class jd{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Hd(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function*Gd(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function Jd(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Xd(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Yd(t,e){for(const n of e)t.push(n)}var mi;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(mi||(mi={}));function mn(t,e){return(n,r)=>e(t(n),t(r))}const fn=(t,e)=>t-e;function Qd(t){return(e,n)=>-t(e,n)}const an=class an{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new an(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new an(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||mi.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};an.empty=new an(e=>{});let yo=an;class Y{static fromTo(e,n){return new Y(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let i=r;for(;i<n.length&&n[i].start<=e.endExclusive;)i++;if(r===i)n.splice(r,0,e);else{const s=Math.min(e.start,n[r].start),a=Math.max(e.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new Y(s,a))}}static tryCreate(e,n){if(!(e>n))return new Y(e,n)}static ofLength(e){return new Y(0,e)}static ofStartAndLength(e,n){return new Y(e,e+n)}static emptyAt(e){return new Y(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new be(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Y(this.start+e,this.endExclusive+e)}deltaStart(e){return new Y(this.start+e,this.endExclusive)}deltaEnd(e){return new Y(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new Y(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new Y(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new be(`Invalid join: ${this.toString()} and ${e.toString()}`);return new Y(this.start,e.endExclusive)}}function Tt(t,e){const n=Ot(t,e);return n===-1?void 0:t[n]}function Ot(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?i=a+1:s=a}return i-1}function Kd(t,e){const n=fi(t,e);return n===t.length?void 0:t[n]}function fi(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?s=a:i=a+1}return i}const Mr=class Mr{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Mr.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=Ot(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Mr.assertInvariants=!1;let tr=Mr;const De=class De{static ofLength(e,n){return new De(e,e+n)}static fromRange(e){return new De(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new De(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];le
Line truncated
|
||||
`?(n++,r=0):r++;return new $e(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new $e(this.lineCount,this.columnCount+e.columnCount):new $e(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new J(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new J(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new J(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new re(e.lineNumber,e.column+this.columnCount):new re(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};$e.zero=new $e(0,0);let gn=$e;class Zd{getOffsetRange(e){return new Y(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return J.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Wt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Wt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new Wt.deps.TextEdit(n)}}const Ls=class Ls{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ls._deps=void 0;let Wt=Ls;class eu extends Zd{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
|
||||
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new re(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new re(n,i+1)}if(e.column<1)return new re(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new re(e.lineNumber,r+1):e}getPosition(e){const n=Ot(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new re(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Wt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class tu{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new re(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new eu(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER))}}class nu extends tu{constructor(e,n){oh(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`))}}class rr extends Error{constructor(e,n,r,i,s){super(s?`[${s}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=i,this.details=n,this.stack=r}static is(e){return e instanceof rr||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class sd extends rr{constructor(e,n,r,i,s){super(e,n,r,i,s),this.name="ListenerRefusalError"}}class li{constructor(e){this.value=e}}const ad=2;class Ue{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new oi(e?.onListenerError??Qn,this._options?.leakWarningThreshold??id,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new ai(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=l[1]/this._size>.3?"dominated":"popular",d=new sd(c,`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||Qn)(d),Et.None}if(this._disposed)return Et.None;n&&(e=e.bind(n));const i=new li(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=nr.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof li?(this._deliveryQueue??=new od,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=wn(()=>{s?.(),this._removeListener(i)});return ci(a,r),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*ad<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||Qn;if(!r){e.value(n);return}try{e.value(n)}catch(i){r(i)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof li)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class od{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function ci(t,e){e instanceof vn?e.add(t):Array.isArray(e)&&e.push(t)}function pa(t,e){if(e instanceof vn)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function ld(t){return t}class cd{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=ld):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var Ft;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(Ft||(Ft={}));class hi{constructor(e){this.executor=e,this._state=Ft.Uninitialized}get value(){if(this._state===Ft.Uninitialized){this._state=Ft.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=Ft.Completed}}else if(this._state===Ft.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function hd(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function dd(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function ud(t){re
Line truncated
|
||||
`||t===" "}class kn{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Go{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Cu(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function*ku(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function _u(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Eu(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Fu(t,e){for(const n of e)t.push(n)}var Ii;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Ii||(Ii={}));function Ht(t,e){return(n,r)=>e(t(n),t(r))}const _n=(t,e)=>t-e;function Ru(t){return(e,n)=>-t(e,n)}const fn=class fn{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new fn(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new fn(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||Ii.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};fn.empty=new fn(e=>{});let Jo=fn;class j{static fromTo(e,n){return new j(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let i=r;for(;i<n.length&&n[i].start<=e.endExclusive;)i++;if(r===i)n.splice(r,0,e);else{const s=Math.min(e.start,n[r].start),a=Math.max(e.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new j(s,a))}}static tryCreate(e,n){if(!(e>n))return new j(e,n)}static ofLength(e){return new j(0,e)}static ofStartAndLength(e,n){return new j(e,e+n)}static emptyAt(e){return new j(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new ue(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new j(this.start+e,this.endExclusive+e)}deltaStart(e){return new j(this.start+e,this.endExclusive)}deltaEnd(e){return new j(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new j(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new j(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new ue(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new ue(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new ue(`Invalid join: ${this.toString()} and ${e.toString()}`);return new j(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new j(this.start-e,this.endExclusive+n)}}function Gt(t,e){const n=Jt(t,e);return n===-1?void 0:t[n]}function Jt(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?i=a+1:s=a}return i-1}function Nu(t,e){const n=Di(t,e);return n===t.length?void 0:t[n]}function Di(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?s=a:i=a+1}return i}const Gr=class Gr{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Gr.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=Jt(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Gr.assertInvariants=!1;let hr=Gr;const Pe=class Pe{static ofLength(e,n){return new Pe(e,e+n)}static fromRange(e){return new Pe(e
Line truncated
|
||||
`?(n++,r=0):r++;return new He(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new He(this.lineCount,this.columnCount+e.columnCount):new He(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new J(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new J(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new J(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return K.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new te(e.lineNumber,e.column+this.columnCount):new te(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};He.zero=new He(0,0);let vt=He;class Iu{getOffsetRange(e){return new j(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return J.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Nt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Nt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new Nt.deps.TextEdit(n)}}const Zs=class Zs{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Zs._deps=void 0;let Nt=Zs;function Du(t){Nt._deps=t}class Xo extends Iu{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new te(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new te(n,i+1)}if(e.column<1)return new te(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new te(e.lineNumber,r+1):e}getPosition(e){const n=Jt(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new te(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Nt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Yo{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new te(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Xo(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER))}}class Lu extends Yo{constructor(e,n){Oh(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new gn(this._lineCount-1,e.length)}}class nr extends nu{constructor(e){super(n=>e[n-1],e.length)}}class ut{static joinReplacements(e,n){if(e.length===0)throw new be;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const o=e[a];if(s+=o.text,a<e.length-1){const l=e[a+1],c=J.fromPositions(o.range.getEndPosition(),l.range.getStartPosition()),d=n.getValueOfRange(c);s+=d}}return new ut(J.fromPositions(r,i),s)}static fromStringReplacement(e,n){return new ut(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new ut(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return ut.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new vt(this._lineCount-1,e.length)}}class dr extends Lu{constructor(e){super(n=>e[n-1],e.length)}}class ur extends Yo{constructor(e){super(),this.value=e,this._t=new Xo(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}let Au=class ea{static fromStringEdit(e,n){const r=e.replacements.map(i=>qe.fromStringReplacement(i,n));return new ea(r)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort(Ht(r=>r.range,J.compareRangesUsingStarts));return new ea(n)}constructor(e){this.replacements=e,bn(()=>Kr(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,i=0;for(const s of this.replacements){const a=s.range.getStartPosition();if(e.isBeforeOrEqual(a))break;const o=s.range.getEndPosition(),l=vt.ofText(s.text);if(e.isBefore(o)){const c=new te(a.lineNumber+n,a.column+(a.lineNumber+n===r?i:0)),d=l.addToPosition(c);return pr(c,d)}a.lineNumber+n!==r&&(i=0),n+=l.lineCount-(s.range.endLineNumber-s.range.startLineNumber),l.lineCount===0?o.lineNumber!==a.lineNumber?i+=l.columnCount-(o.column-1):i+=l.columnCount-(o.column-a.column):i=l.columnCount,r=o.lineNumber+n}return new te(e.lineNumber+n,e.column+(e.lineNumber+n===r?i:0))}mapRange(e){function n(a){return a instanceof te?a:a.getStartPosition()}function r(a){return a instanceof te?a:a.getEndPosition()}const i=n(this.mapPosition(e.getStartPosition())),s=r(this.mapPosition(e.getEndPosition()));return pr(i,s)}apply(e){let n="",r=new te(1,1);for(const s of this.replacements){const a=s.range,o=a.getStartPosition(),l=a.getEndPosition(),c=pr(r,o);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=s.text,r=l}const i=pr(r,e.endPositionExclusive);return i.isEmpty()||(n+=e.getValueOfRange(i)),n}applyToString(e){const n=new ur(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,r=0,i=0;for(const s of this.replacements){const a=vt.ofText(s.text),o=te.lift({lineNumber:s.range.startLineNumber+r,column:s.range.startColumn+(s.range.startLineNumber===n?i:0)}),l=a.createRange(o);e.push(l),r=l.endLineNumber-s.range.endLineNumber,i=l.endColumn-s.range.endColumn,n=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new ue;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition();let i="";for(let s=0;s<this.replacements.length;s++){const a=this.replacements[s];if(i+=a.text,s<this.replacements.length-1){const o=this.replacements[s+1],l=J.fromPositions(a.range.getEndPosition(),o.range.getStartPosition()),c=e.getValueOfRange(l);i+=c}}return new qe(J.fromPositions(n,r),i)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new ur(e)):this.replacements.length===0?"":this.replacements.map(n=>{const i=e.getValueOfRange(n.range),s=J.fromPositions(new te(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let a=e.getValueOfRange(s);a.length>10&&(a="..."+a.substring(a.length-10));const o=J.fromPositions(n.range.getEndPosition(),new te(n.range.endLineNumber+1,1));let l=e.getValueOfRange(o);l.length>10&&(l=l.substring(0,10)+"...");let c=i;if(c.length>10){const u=Math.floor(5);c=c.substring(0,u)+"..."+c.substring(c.length-u)}let d=n.text;if(d.length>10){const u=Math.floor(5);d=d.substring(0,u)+"..."+d.substring(d.length-u)}return c.length===0?`${a}❰${d}❱${l}`:`${a}❰${c}↦${d}❱${l}`}).join(`
|
||||
`)}};class qe{static joinReplacements(e,n){if(e.length===0)throw new ue;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const o=e[a];if(s+=o.text,a<e.length-1){const l=e[a+1],c=J.fromPositions(o.range.getEndPosition(),l.range.getStartPosition()),d=n.getValueOfRange(c);s+=d}}return new qe(J.fromPositions(r,i),s)}static fromStringReplacement(e,n){return new qe(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new qe(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return qe.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=Mh(n,r),s=gn.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),a=r.substring(i),o=J.fromPositions(s,this.range.getEndPosition());return new ut(o,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`),i=di(n,r),s=vt.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),a=r.substring(i),o=J.fromPositions(s,this.range.getEndPosition());return new qe(o,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=zh(n,r),s=gn.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-i),o=J.fromPositions(this.range.getStartPosition(),s);return new ut(o,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const l of e){const c=new Le(new Z(s,l.original.startLineNumber),new Z(a,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Le(new Z(s,n+1),new Z(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ae(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new be("not a valid diff");return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ae(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(xo(this.original.endLineNumberExclusive,e)&&xo(this.modified.endLineNumberExclusive,n))return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ae(J.fromPositions(new re(this.original.startLineNumber,1),Vt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(new re(this.modified.startLineNumber,1),Vt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ae(J.fromPositions(Vt(new re(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Vt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(Vt(new re(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Vt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new be}}function Vt(t,e){if(t.lineNumber<1)return new re(1,1);if(t.lineNumber>e.length)return new re(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new re(t.lineNumber,n.length+1):t}function xo(t,e){return t>=1&&t<=e.length}class Ke extends Le{static fromRangeMappings(e){const n=Z.join(e.map(i=>Z.fromRangeInclusive(i.originalRange))),r=Z.join(e.map(i=>Z.fromRangeInclusive(i.modifiedRange)));return new Ke(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new Ke(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Ke(this.original,this.modified,[this.toRangeMapping()])}}class Ae{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ae(i.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],i=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new be("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Ae(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new ut(this.originalRange,n)}}function So(t,e,n,r=!1){const i=[];for(const s of Gd(t.map(a=>ru(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new Ke(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return Un(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:Ps(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExcl
Line truncated
|
||||
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=i}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-n/(this.totalCount+e.totalCount)}};Wn.chrKeys=new Map;let rr=Wn;class hu{compute(e,n,r=wn.instance,i){if(e.length===0||n.length===0)return Ze.trivial(e,n);const s=new wi(e.length,n.length),a=new wi(e.length,n.length),o=new wi(e.length,n.length);for(let g=0;g<e.length;g++)for(let b=0;b<n.length;b++){if(!r.isValid())return Ze.trivialTimedOut(e,n);const k=g===0?0:s.get(g-1,b),F=b===0?0:s.get(g,b-1);let N;e.getElement(g)===n.getElement(b)?(g===0||b===0?N=0:N=s.get(g-1,b-1),g>0&&b>0&&a.get(g-1,b-1)===3&&(N+=o.get(g-1,b-1)),N+=i?i(g,b):1):N=-1;const _=Math.max(k,F,N);if(_===N){const T=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,T+1),a.set(g,b,3)}else _===k?(o.set(g,b,0),a.set(g,b,1)):_===F&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,_)}const l=[];let c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new ce(new Y(g+1,c),new Y(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(u(m,f),m--,f--):a.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new Ze(l,!1)}}class Eo{compute(e,n,r=wn.instance){if(e.length===0||n.length===0)return Ze.trivial(e,n);const i=e,s=n;function a(b,k){for(;b<i.length&&k<s.length&&i.getElement(b)===s.getElement(k);)b++,k++;return b}let o=0;const l=new du;l.set(0,a(0,0));const c=new uu;c.set(0,l.get(0)===0?null:new Fo(null,0,0,l.get(0)));let d=0;e:for(;;){if(o++,!r.isValid())return Ze.trivialTimedOut(i,s);const b=-Math.min(o,s.length+o%2),k=Math.min(o,i.length+o%2);for(d=b;d<=k;d+=2){const F=d===k?-1:l.get(d+1),N=d===b?-1:l.get(d-1)+1,_=Math.min(Math.max(F,N),i.length),T=_-d;if(_>i.length||T>s.length)continue;const O=a(_,T);l.set(d,O);const V=_===F?c.get(d+1):c.get(d-1);if(c.set(d,O!==_?new Fo(V,_,T,O-_):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d);const m=[];let f=i.length,g=s.length;for(;;){const b=u?u.x+u.length:0,k=u?u.y+u.length:0;if((b!==f||k!==g)&&m.push(new ce(new Y(b,f),new Y(k,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new Ze(m,!1)}}class Fo{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class du{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class uu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class ir{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;c<l;c++)this.elements.push(s.charCodeAt(c));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new Y(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Io(e>0?this.elements[e-1]:-1),r=Io(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=No(n),i+=No(r),i}translateOffset(e,n="right"){const r=Ot(this.firstElementOffsetByLineIdx,s=>s<=e),i=e-this.firstElementOffsetByLineIdx[r];return new re(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?J.fromPositions(r,r):J.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Ut(this.elements[e]))return;let n=e;for(;n>0&&Ut(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Ut(this.elements[r]);)r++;return new Y(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Ut(this.elements[e]))retur
Line truncated
|
||||
`).length>=15&&fu(u,f=>f.length>=2)>=2}),a=vu(t,a),a}function fu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function gu(t,e,n,r){const i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new rr(l.original,e,l)),a=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new rr(l.modified,n,l))),o=new Set;for(const l of s){let c=-1,d;for(const u of a){const m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new Le(l.range,d.range)),o.add(l.source),o.add(d.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function bu(t,e,n,r,i,s){const a=[],o=new Md;for(const m of t)for(let f=m.original.startLineNumber;f<m.original.endLineNumberExclusive-2;f++){const g=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;o.add(g,{range:new Z(f,f+3)})}const l=[];t.sort(mn(m=>m.modified.startLineNumber,fn));for(const m of t){let f=[];for(let g=m.modified.startLineNumber;g<m.modified.endLineNumberExclusive-2;g++){const b=`${n[g-1]}:${n[g+1-1]}:${n[g+2-1]}`,k=new Z(g,g+3),F=[];o.forEach(b,({range:N})=>{for(const T of f)if(T.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive){T.originalLineRange=new Z(T.originalLineRange.startLineNumber,N.endLineNumberExclusive),T.modifiedLineRange=new Z(T.modifiedLineRange.startLineNumber,k.endLineNumberExclusive),F.push(T);return}const _={modifiedLineRange:k,originalLineRange:N};l.push(_),F.push(_)}),f=F}if(!s.isValid())return[]}l.sort(Qd(mn(m=>m.modifiedLineRange.length,fn)));const c=new qe,d=new qe;for(const m of l){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),k=g.getIntersection(b);for(const F of k.ranges){if(F.length<3)continue;const N=F,_=F.delta(-f);a.push(new Le(_,N)),c.addRange(N),d.addRange(_)}}a.sort(mn(m=>m.original.startLineNumber,fn));const u=new tr(t);for(let m=0;m<a.length;m++){const f=a[m],g=u.findLastMonotonous(V=>V.original.startLineNumber<=f.original.startLineNumber),b=Tt(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),k=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumber<f.original.endLineNumberExclusive),N=Tt(t,V=>V.modified.startLineNumber<f.modified.endLineNumberExclusive),_=Math.max(F.original.endLineNumberExclusive-f.original.endLineNumberExclusive,N.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let T;for(T=0;T<k;T++){const V=f.original.startLineNumber-T-1,I=f.modified.startLineNumber-T-1;if(V>r.length||I>i.length||c.contains(I)||d.contains(V)||!Do(r[V-1],i[I-1],s))break}T>0&&(d.addRange(new Z(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new Z(f.modified.startLineNumber-T,f.modified.startLineNumber)));let O;for(O=0;O<_;O++){const V=f.original.endLineNumberExclusive+O,I=f.modified.endLineNumberExclusive+O;if(V>r.length||I>i.length||c.contains(I)||d.contains(V)||!Do(r[V-1],i[I-1],s))break}O>0&&(d.addRange(new Z(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+O)),c.addRange(new Z(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+O))),(T>0||O>0)&&(a[m]=new Le(new Z(f.original.startLineNumber-T,f.original.endLineNumberExclusive+O),new Z(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+O)))}return a}function Do(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new Eo().compute(new ir([t],new J(1,1,1,t.length),!1),new ir([e],new J(1,1,1,e.length),!1),n);let s=0;const a=ce.invert(i.diffs,t.length);for(const d of a)d.seq1Range.forEach(u=>{vi(t.charCodeAt(u))||s++});function o(d){let u=0;for(let m=0;m<t.length;m++)vi(d.charCodeAt(m))||u++;return u}const l=o(t.length>e.length?t:e);return s/l>.6&&l>10}function wu(t){if(t.length===0)return t;t.sort(mn(n=>n.original.startLineNumber,fn));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],i=t[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,a=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function vu(t,e){const n=new tr(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new Le(new Z(1,1),new Z(1,1)),s=Tt(t,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),e}function Lo(t,e,n){let r=n;return r=Ao(t,e,r),r=Ao(t,e,r),r=yu(t,e,r),r}function Ao(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let s=1;s<n.length;s++){const a=r[r.length-1];let o=n[s];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const l=o.seq1Range.start-a.seq1Range.endExclusive;let c;for(c=1;c<=l&&!(t.getElement(o.seq1Range.start-c)!==t.getElement(o.seq1Range.endExclusive-c)||e.getElement(o.seq2Range
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function To(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class _u{constructor(){this.dynamicProgrammingDiffing=new hu,this.myersDiffingAlgorithm=new Eo}computeDiff(e,n,r){if(e.length<=1&&Hd(e,n,(I,R)=>I===R))return new er([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new er([new Ke(new Z(1,e.length+1),new Z(1,n.length+1),[new Ae(new J(1,1,e.length,e[e.length-1].length+1),new J(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?wn.instance:new cu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(I){let R=a.get(I);return R===void 0&&(R=a.size,a.set(I,R)),R}const l=e.map(I=>o(I.trim())),c=n.map(I=>o(I.trim())),d=new Po(l,e),u=new Po(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(I,R)=>e[I]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let f=m.diffs,g=m.hitTimeout;f=Lo(d,u,f),f=Cu(d,u,f);const b=[],k=I=>{if(s)for(let R=0;R<I;R++){const z=F+R,$=N+R;if(e[z]!==n[$]){const L=this.refineDiff(e,n,new ce(new Y(z,z+1),new Y($,$+1)),i,s,r);for(const y of L.mappings)b.push(y);L.hitTimeout&&(g=!0)}}};let F=0,N=0;for(const I of f){Un(()=>I.seq1Range.start-F===I.seq2Range.start-N);const R=I.seq1Range.start-F;k(R),F=I.seq1Range.endExclusive,N=I.seq2Range.endExclusive;const z=this.refineDiff(e,n,I,i,s,r);z.hitTimeout&&(g=!0);for(const $ of z.mappings)b.push($)}k(e.length-F);const _=new nr(e),T=new nr(n),O=So(b,_,T);let V=[];return r.computeMoves&&(V=this.computeMoves(O,e,n,l,c,i,s,r)),Un(()=>{function I(z,$){if(z.lineNumber<1||z.lineNumber>$.length)return!1;const L=$[z.lineNumber-1];return!(z.column<1||z.column>L.length+1)}function R(z,$){return!(z.startLineNumber<1||z.startLineNumber>$.length+1||z.endLineNumberExclusive<1||z.endLineNumberExclusive>$.length+1)}for(const z of O){if(!z.innerChanges)return!1;for(const $ of z.innerChanges)if(!(I($.modifiedRange.getStartPosition(),n)&&I($.modifiedRange.getEndPosition(),n)&&I($.originalRange.getStartPosition(),e)&&I($.originalRange.getEndPosition(),e)))return!1;if(!R(z.modified,n)||!R(z.original,e))return!1}return!0}),new er(O,V,g)}computeMoves(e,n,r,i,s,a,o,l){return mu(e,n,r,i,s,a).map(u=>{const m=this.refineDiff(n,r,new ce(u.original.toOffsetRange(),u.modified.toOffsetRange()),a,o,l),f=So(m.mappings,new nr(n),new nr(r),!0);return new jd(u,f)})}refineDiff(e,n,r,i,s,a){const l=Eu(r).toRangeMapping2(e,n),c=new ir(e,l.originalRange,s),d=new ir(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i);let m=u.diffs;return m=Lo(c,d,m),m=zo(c,d,m,(g,b)=>g.findWordContaining(b)),a.extendToSubwords&&(m=zo(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=xu(c,d,m),m=ku(c,d,m),{mappings:m.map(g=>new Ae(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}}function Eu(t){return new Le(new Z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const Oo={getLegacy:()=>new su,getDefault:()=>new _u};function pt(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class x{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Me{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=pt(Math.max(Math.min(1,n),0),3),this.l=pt(Math.max(Math.min(1,r),0),3),this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const d=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:l=(r-i)/u+(r<i?6:0);break;case r:l=(i-n)/u+2;break;case i:l=(n-r)/u+4;break}l*=60,l=Math.round(l)}return new Me(l,c,d,s)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Me._hue2rgb(d,c,n+1/3),o=Me._hue2rgb(d,c,n),l=Me._hue2rgb(d,c,n-1/3)}return new x(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Bt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=pt(Math.max(Math.min(1,n),0),3),this.v=pt(Math.max(Math.min(1,r),0),3),this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Bt(Math.round(c*60),l,s,e.a)}static toRGBA(
Line truncated
|
||||
`),i=ui(n,r),s=vt.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-i),o=J.fromPositions(this.range.getStartPosition(),s);return new qe(o,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function pr(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return J.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new ue("start must be before end");return new J(t.lineNumber,t.column,e.lineNumber,e.column)}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const l of e){const c=new Le(new K(s,l.original.startLineNumber),new K(a,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Le(new K(s,n+1),new K(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ae(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new ue("not a valid diff");return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ae(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Qo(this.original.endLineNumberExclusive,e)&&Qo(this.modified.endLineNumberExclusive,n))return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ae(J.fromPositions(new te(this.original.startLineNumber,1),Xt(new te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(new te(this.modified.startLineNumber,1),Xt(new te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ae(J.fromPositions(Xt(new te(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Xt(new te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(Xt(new te(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Xt(new te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new ue}}function Xt(t,e){if(t.lineNumber<1)return new te(1,1);if(t.lineNumber>e.length)return new te(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new te(t.lineNumber,n.length+1):t}function Qo(t,e){return t>=1&&t<=e.length}class st extends Le{static fromRangeMappings(e){const n=K.join(e.map(i=>K.fromRangeInclusive(i.originalRange))),r=K.join(e.map(i=>K.fromRangeInclusive(i.modifiedRange)));return new st(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new st(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new st(this.original,this.modified,[this.toRangeMapping()])}}class Ae{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ae(i.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],i=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new ue("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Ae(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new qe(this.originalRange,n)}}function Li(t,e,n,r=!1){const i=[];for(const s of ku(t.map(a=>Mu(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new st(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return bn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!
Line truncated
|
||||
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=i}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-n/(this.totalCount+e.totalCount)}};Jn.chrKeys=new Map;let mr=Jn;class Vu{compute(e,n,r=Fn.instance,i){if(e.length===0||n.length===0)return at.trivial(e,n);const s=new zi(e.length,n.length),a=new zi(e.length,n.length),o=new zi(e.length,n.length);for(let g=0;g<e.length;g++)for(let b=0;b<n.length;b++){if(!r.isValid())return at.trivialTimedOut(e,n);const k=g===0?0:s.get(g-1,b),F=b===0?0:s.get(g,b-1);let N;e.getElement(g)===n.getElement(b)?(g===0||b===0?N=0:N=s.get(g-1,b-1),g>0&&b>0&&a.get(g-1,b-1)===3&&(N+=o.get(g-1,b-1)),N+=i?i(g,b):1):N=-1;const _=Math.max(k,F,N);if(_===N){const T=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,T+1),a.set(g,b,3)}else _===k?(o.set(g,b,0),a.set(g,b,1)):_===F&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,_)}const l=[];let c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new he(new j(g+1,c),new j(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(u(m,f),m--,f--):a.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new at(l,!1)}}class tl{compute(e,n,r=Fn.instance){if(e.length===0||n.length===0)return at.trivial(e,n);const i=e,s=n;function a(b,k){for(;b<i.length&&k<s.length&&i.getElement(b)===s.getElement(k);)b++,k++;return b}let o=0;const l=new Uu;l.set(0,a(0,0));const c=new Bu;c.set(0,l.get(0)===0?null:new nl(null,0,0,l.get(0)));let d=0;e:for(;;){if(o++,!r.isValid())return at.trivialTimedOut(i,s);const b=-Math.min(o,s.length+o%2),k=Math.min(o,i.length+o%2);for(d=b;d<=k;d+=2){const F=d===k?-1:l.get(d+1),N=d===b?-1:l.get(d-1)+1,_=Math.min(Math.max(F,N),i.length),T=_-d;if(_>i.length||T>s.length)continue;const O=a(_,T);l.set(d,O);const V=_===F?c.get(d+1):c.get(d-1);if(c.set(d,O!==_?new nl(V,_,T,O-_):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d);const m=[];let f=i.length,g=s.length;for(;;){const b=u?u.x+u.length:0,k=u?u.y+u.length:0;if((b!==f||k!==g)&&m.push(new he(new j(b,f),new j(k,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new at(m,!1)}}class nl{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class Uu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Bu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class fr{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;c<l;c++)this.elements.push(s.charCodeAt(c));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new j(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=sl(e>0?this.elements[e-1]:-1),r=sl(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=il(n),i+=il(r),i}translateOffset(e,n="right"){const r=Jt(this.firstElementOffsetByLineIdx,s=>s<=e),i=e-this.firstElementOffsetByLineIdx[r];return new te(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?J.fromPositions(r,r):J.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Qt(this.elements[e]))return;let n=e;for(;n>0&&Qt(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Qt(this.elements[r]);)r++;return new j(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Qt(this.elements[e]))retur
Line truncated
|
||||
`).length>=15&&Hu(u,f=>f.length>=2)>=2}),a=Yu(t,a),a}function Hu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function Gu(t,e,n,r){const i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new mr(l.original,e,l)),a=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new mr(l.modified,n,l))),o=new Set;for(const l of s){let c=-1,d;for(const u of a){const m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new Le(l.range,d.range)),o.add(l.source),o.add(d.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function Ju(t,e,n,r,i,s){const a=[],o=new uu;for(const m of t)for(let f=m.original.startLineNumber;f<m.original.endLineNumberExclusive-2;f++){const g=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;o.add(g,{range:new K(f,f+3)})}const l=[];t.sort(Ht(m=>m.modified.startLineNumber,_n));for(const m of t){let f=[];for(let g=m.modified.startLineNumber;g<m.modified.endLineNumberExclusive-2;g++){const b=`${n[g-1]}:${n[g+1-1]}:${n[g+2-1]}`,k=new K(g,g+3),F=[];o.forEach(b,({range:N})=>{for(const T of f)if(T.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive){T.originalLineRange=new K(T.originalLineRange.startLineNumber,N.endLineNumberExclusive),T.modifiedLineRange=new K(T.modifiedLineRange.startLineNumber,k.endLineNumberExclusive),F.push(T);return}const _={modifiedLineRange:k,originalLineRange:N};l.push(_),F.push(_)}),f=F}if(!s.isValid())return[]}l.sort(Ru(Ht(m=>m.modifiedLineRange.length,_n)));const c=new Je,d=new Je;for(const m of l){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),k=g.getIntersection(b);for(const F of k.ranges){if(F.length<3)continue;const N=F,_=F.delta(-f);a.push(new Le(_,N)),c.addRange(N),d.addRange(_)}}a.sort(Ht(m=>m.original.startLineNumber,_n));const u=new hr(t);for(let m=0;m<a.length;m++){const f=a[m],g=u.findLastMonotonous(V=>V.original.startLineNumber<=f.original.startLineNumber),b=Gt(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),k=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumber<f.original.endLineNumberExclusive),N=Gt(t,V=>V.modified.startLineNumber<f.modified.endLineNumberExclusive),_=Math.max(F.original.endLineNumberExclusive-f.original.endLineNumberExclusive,N.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let T;for(T=0;T<k;T++){const V=f.original.startLineNumber-T-1,D=f.modified.startLineNumber-T-1;if(V>r.length||D>i.length||c.contains(D)||d.contains(V)||!al(r[V-1],i[D-1],s))break}T>0&&(d.addRange(new K(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new K(f.modified.startLineNumber-T,f.modified.startLineNumber)));let O;for(O=0;O<_;O++){const V=f.original.endLineNumberExclusive+O,D=f.modified.endLineNumberExclusive+O;if(V>r.length||D>i.length||c.contains(D)||d.contains(V)||!al(r[V-1],i[D-1],s))break}O>0&&(d.addRange(new K(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+O)),c.addRange(new K(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+O))),(T>0||O>0)&&(a[m]=new Le(new K(f.original.startLineNumber-T,f.original.endLineNumberExclusive+O),new K(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+O)))}return a}function al(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new tl().compute(new fr([t],new J(1,1,1,t.length),!1),new fr([e],new J(1,1,1,e.length),!1),n);let s=0;const a=he.invert(i.diffs,t.length);for(const d of a)d.seq1Range.forEach(u=>{Pi(t.charCodeAt(u))||s++});function o(d){let u=0;for(let m=0;m<t.length;m++)Pi(d.charCodeAt(m))||u++;return u}const l=o(t.length>e.length?t:e);return s/l>.6&&l>10}function Xu(t){if(t.length===0)return t;t.sort(Ht(n=>n.original.startLineNumber,_n));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],i=t[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,a=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function Yu(t,e){const n=new hr(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new Le(new K(1,1),new K(1,1)),s=Gt(t,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),e}function ol(t,e,n){let r=n;return r=ll(t,e,r),r=ll(t,e,r),r=Qu(t,e,r),r}function ll(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let s=1;s<n.length;s++){const a=r[r.length-1];let o=n[s];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const l=o.seq1Range.start-a.seq1Range.endExclusive;let c;for(c=1;c<=l&&!(t.getElement(o.seq1Range.start-c)!==t.getElement(o.seq1Range.endExclusive-c)||e.getElement(o.seq2Range
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function ul(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class np{constructor(){this.dynamicProgrammingDiffing=new Vu,this.myersDiffingAlgorithm=new tl}computeDiff(e,n,r){if(e.length<=1&&Cu(e,n,(D,R)=>D===R))return new kn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new kn([new st(new K(1,e.length+1),new K(1,n.length+1),[new Ae(new J(1,1,e.length,e[e.length-1].length+1),new J(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?Fn.instance:new $u(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(D){let R=a.get(D);return R===void 0&&(R=a.size,a.set(D,R)),R}const l=e.map(D=>o(D.trim())),c=n.map(D=>o(D.trim())),d=new dl(l,e),u=new dl(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(D,R)=>e[D]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let f=m.diffs,g=m.hitTimeout;f=ol(d,u,f),f=ep(d,u,f);const b=[],k=D=>{if(s)for(let R=0;R<D;R++){const P=F+R,U=N+R;if(e[P]!==n[U]){const L=this.refineDiff(e,n,new he(new j(P,P+1),new j(U,U+1)),i,s,r);for(const C of L.mappings)b.push(C);L.hitTimeout&&(g=!0)}}};let F=0,N=0;for(const D of f){bn(()=>D.seq1Range.start-F===D.seq2Range.start-N);const R=D.seq1Range.start-F;k(R),F=D.seq1Range.endExclusive,N=D.seq2Range.endExclusive;const P=this.refineDiff(e,n,D,i,s,r);P.hitTimeout&&(g=!0);for(const U of P.mappings)b.push(U)}k(e.length-F);const _=new dr(e),T=new dr(n),O=Li(b,_,T);let V=[];return r.computeMoves&&(V=this.computeMoves(O,e,n,l,c,i,s,r)),bn(()=>{function D(P,U){if(P.lineNumber<1||P.lineNumber>U.length)return!1;const L=U[P.lineNumber-1];return!(P.column<1||P.column>L.length+1)}function R(P,U){return!(P.startLineNumber<1||P.startLineNumber>U.length+1||P.endLineNumberExclusive<1||P.endLineNumberExclusive>U.length+1)}for(const P of O){if(!P.innerChanges)return!1;for(const U of P.innerChanges)if(!(D(U.modifiedRange.getStartPosition(),n)&&D(U.modifiedRange.getEndPosition(),n)&&D(U.originalRange.getStartPosition(),e)&&D(U.originalRange.getEndPosition(),e)))return!1;if(!R(P.modified,n)||!R(P.original,e))return!1}return!0}),new kn(O,V,g)}computeMoves(e,n,r,i,s,a,o,l){return ju(e,n,r,i,s,a).map(u=>{const m=this.refineDiff(n,r,new he(u.original.toOffsetRange(),u.modified.toOffsetRange()),a,o,l),f=Li(m.mappings,new dr(n),new dr(r),!0);return new Go(u,f)})}refineDiff(e,n,r,i,s,a){const l=rp(r).toRangeMapping2(e,n),c=new fr(e,l.originalRange,s),d=new fr(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i);let m=u.diffs;return m=ol(c,d,m),m=hl(c,d,m,(g,b)=>g.findWordContaining(b)),a.extendToSubwords&&(m=hl(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=Ku(c,d,m),m=tp(c,d,m),{mappings:m.map(g=>new Ae(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}}function rp(t){return new Le(new K(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new K(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var yt;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(yt||(yt={}));const ip="tkn";class sp{constructor(){this._hosts=Object.create(null),this._ports=Object.cre
Line truncated
|
||||
`)),s=new ur(n.join(`
|
||||
`)),a=this._computer.computeDiff(i.value,s.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),o=i.getTransformer(),l=s.getTransformer(),c=[];let d=0;for(const f of a.edits.replacements){const g=f.range.start+d,b=g+f.newText.length,k=o.getRange(new j(f.range.start,f.range.endExclusive)),F=l.getRange(new j(g,b));c.push(new Ae(k,F)),d+=f.newText.length-(f.range.endExclusive-f.range.start)}const u=Li(c,i,s),m=[];if(r.computeMoves)for(const f of a.moves){const g=o.getPosition(f.range.original.start),b=o.getPosition(f.range.original.endExclusive),k=l.getPosition(f.range.modified.start),F=l.getPosition(f.range.modified.endExclusive),N=new K(g.lineNumber,b.lineNumber),_=new K(k.lineNumber,F.lineNumber);m.push(new Go(new Le(N,_),[]))}return new kn(u,m,a.hitTimeout)}}const br={getLegacy:()=>new Pu,getDefault:()=>new np,getAdvancedExternal:()=>fl(!1),getAdvancedWasm:()=>fl(!0)};function St(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class y{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=St(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Te{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=St(Math.max(Math.min(1,n),0),3),this.l=St(Math.max(Math.min(1,r),0),3),this.a=St(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const d=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:l=(r-i)/u+(r<i?6:0);break;case r:l=(i-n)/u+2;break;case i:l=(n-r)/u+4;break}l*=60,l=Math.round(l)}return new Te(l,c,d,s)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Te._hue2rgb(d,c,n+1/3),o=Te._hue2rgb(d,c,n),l=Te._hue2rgb(d,c,n-1/3)}return new y(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Kt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=St(Math.max(Math.min(1,n),0),3),this.v=St(Math.max(Math.min(1,r),0),3),this.a=St(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Kt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,d,u]=[0,0,0];return n<60?(c=a,d=o):n<120?(c=o,d=a):n<180?(d=a,u=o):n<240?(d=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new y(c,d,u,s)}}let wr=(ie=class{static fromHex(e){return ie.Format.CSS.parseHex(e)||ie.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Te.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Kt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof y)this.rgba=e;else if(e instanceof Te)this._hsla=e,this.rgba=Te.toRGBA(e);else if(e instanceof Kt)this._hsva=e,this.rgba=Kt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&y.equals(this.rgba,e.rgba)&&Te.equals(this.hsla,e.hsla)&&Kt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=ie._relativeLuminanceForComponent(this.rgba.r),n=ie._relativeLuminanceForComponent(this.rgba.g),r=ie._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return St(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n<r}lighten(e){return new ie(new Te(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new ie(new Te(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:r,b:i,a:s}=this.rgba;return new ie(new y(n,r,i,s*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new ie(new y(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const r=Math.min(Math.max(n,0),1),i=this.rgba,s=e.rgba,a=i.r+(s.r-i.r)*r,o=i.g+(s.g-i.g)*r,l=i.b+(s.b-i.b)*r,c=i.a+(s.a-i.a)*r;return new ie(new y(a,o,l,c))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:r,b:i,a:s}=this.rgba;return new ie(new y(e.rgba.r-s*(e.rgba.r-n),e.rgba.g-s*(e.rgba.g-r),e.rgba.
Line truncated
|
||||
`);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){const u=c.substring(0,d.index),m=(u.match(/\n/g)||[]).length,f=a+m,g=d[0].split(`
|
||||
`),b=g.length,k=f+b-1,F=u.lastIndexOf(`
|
||||
`)+1,N=d.index-F+1,_=g[g.length-1],T=b===1?N+d[0].length:_.length+1,O={startLineNumber:f,startColumn:N,endLineNumber:k,endColumn:T},V=(d.groups??{}).label??"",I=((d.groups??{}).separator??"")!=="",R={range:O,text:V,hasSeparatorLine:I,shouldBeInComments:!0};(R.text||R.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<R.range.startLineNumber)&&n.push(R),s.lastIndex=d.index+d[0].length}}return n}function zu(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(Iu,""),{text:t,hasSeparatorLine:e}}class Pu{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new zs)}}var Bo;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(Bo||(Bo={}));class Tu{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new be("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new Pu;return this._unsatisfiedConsumers.push(e),e.p}}}const Fe=class Fe{constructor(e,n){this._onReturn=n,this._producerConsumer=new Tu,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new Fe(n=>{n.emitMany(e)})}static fromPromise(e){return new Fe(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new Fe(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new Fe(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new Fe(async r=>{for await(const i of e)r.emitOne(n(i))})}map(e){return Fe.map(this,e)}static coalesce(e){return Fe.filter(e,n=>!!n)}coalesce(){return Fe.coalesce(this)}static filter(e,n){return new Fe(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return Fe.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};Fe.EMPTY=Fe.fromArray([]);let qo=Fe;class Ou{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Mt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Mt(e),n=Mt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=Mt(e),n=Mt(n);const r=this.values,i=this.prefixSum;if(e>=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.suba
Line truncated
|
||||
`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===ki){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=xn&&r<=Sn||r>=ar&&r<=Ho||r>=or&&r<=Jo);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===_i||r===Ei?this.stream.advance(1):this._newline([]),!0}if(r!==jt&&r!==kn&&r!==qt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){const r=this.stream.peekChar();return r!==0&&r!==e&&r!==ki&&r!==jt&&r!==kn&&r!==qt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===tl||this.stream.peekChar()===el){const n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){const n=this.stream.peekChar();return n!==0&&n!==ki&&n!==tl&&n!==el&&n!==Qo&&n!==Ko&&n!==_i&&n!==Ei&&n!==qt&&n!==kn&&n!==jt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===_i||n===Ei||n===qt||n===kn||n===jt)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){const n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){const n=this.stream.peekChar();return n===Yo||n>=ar&&n<=Go||n>=or&&n<=Xo||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){const n=this.stream.peekChar();return n===St?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){const n=this.stream.peekChar();return n===Yo||n===St||n>=ar&&n<=Go||n>=or&&n<=Xo||n>=xn&&n<=Sn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(lp)){const e=r=>r>=xn&&r<=Sn||r>=ar&&r<=Ho||r>=or&&r<=Jo,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===op);if(n>=1&&n<=6)if(this.stream.advanceIfChar(St)){const r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}}function pe(t,e){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function il(t,e){let n=t.length-e.length;return n>0?t.lastIndexOf(e)===n:n===0?t===e:!1}function cp(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],a,o;for(a=0;a<e.length+1;++a)s.push(0);for(a=0;a<t.length+1;++a)i.push(s);for(a=1;a<t.length+1;++a)for(o=1;o<e.length+1;++o)t[a-1]===e[o-1]?i[a][o]=i[a-1][o-1]+1:i[a][o]=Math.max(i[a-1][o],i[a][o-1]);return i[t.length][e.length]-Math.sqrt(r)}function sl(t,e=!0){return t?t.length<140?t:t.slice(0,140)+(e?"…":""):""}function hp(t,e){const n=e.exec(t);return n&&n[0].length?t.substr(0,t.length-n[0].length):t}function al(t,e){let n="";for(;e>0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t
Line truncated
|
||||
`)+1,N=d.index-F+1,_=g[g.length-1],T=b===1?N+d[0].length:_.length+1,O={startLineNumber:f,startColumn:N,endLineNumber:k,endColumn:T},V=(d.groups??{}).label??"",D=((d.groups??{}).separator??"")!=="",R={range:O,text:V,hasSeparatorLine:D,shouldBeInComments:!0};(R.text||R.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<R.range.startLineNumber)&&n.push(R),s.lastIndex=d.index+d[0].length}}return n}function _p(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(yp,""),{text:t,hasSeparatorLine:e}}class yl{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new ia)}}var xl;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(xl||(xl={}));class Ep{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new ue("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new yl;return this._unsatisfiedConsumers.push(e),e.p}}}const Ee=class Ee{constructor(e,n){this._onReturn=n,this._producerConsumer=new Ep,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new Ee(n=>{n.emitMany(e)})}static fromPromise(e){return new Ee(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new Ee(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new Ee(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new Ee(async r=>{for await(const i of e)r.emitOne(n(i))})}static tee(e){let n,r;const i=new yl,s=async()=>{if(!(!n||!r))try{for await(const l of e)n.emitOne(l),r.emitOne(l)}catch(l){n.reject(l),r.reject(l)}finally{i.complete()}},a=new Ee(async l=>(n=l,s(),i.p)),o=new Ee(async l=>(r=l,s(),i.p));return[a,o]}map(e){return Ee.map(this,e)}static coalesce(e){return Ee.filter(e,n=>!!n)}coalesce(){return Ee.coalesce(this)}static filter(e,n){return new Ee(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return Ee.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};Ee.EMPTY=Ee.fromArray([]);let Sl=Ee;class Fp{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=qt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=qt(e),n=qt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=qt(e),n=qt(n);const r=this.values,i=this.prefixSum;if(e>=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length
Line truncated
|
||||
`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===ji){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=In&&r<=Dn||r>=vr&&r<=kl||r>=yr&&r<=El);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===Hi||r===Gi?this.stream.advance(1):this._newline([]),!0}if(r!==en&&r!==An&&r!==Zt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){const r=this.stream.peekChar();return r!==0&&r!==e&&r!==ji&&r!==en&&r!==An&&r!==Zt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===Al||this.stream.peekChar()===Ll){const n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){const n=this.stream.peekChar();return n!==0&&n!==ji&&n!==Al&&n!==Ll&&n!==Nl&&n!==Il&&n!==Hi&&n!==Gi&&n!==Zt&&n!==An&&n!==en?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===Hi||n===Gi||n===Zt||n===An||n===en)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){const n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){const n=this.stream.peekChar();return n===Rl||n>=vr&&n<=_l||n>=yr&&n<=Fl||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){const n=this.stream.peekChar();return n===It?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){const n=this.stream.peekChar();return n===Rl||n===It||n>=vr&&n<=_l||n>=yr&&n<=Fl||n>=In&&n<=Dn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Kp)){const e=r=>r>=In&&r<=Dn||r>=vr&&r<=kl||r>=yr&&r<=El,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===Qp);if(n>=1&&n<=6)if(this.stream.advanceIfChar(It)){const r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}}function fe(t,e){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Pl(t,e){let n=t.length-e.length;return n>0?t.lastIndexOf(e)===n:n===0?t===e:!1}function Zp(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],a,o;for(a=0;a<e.length+1;++a)s.push(0);for(a=0;a<t.length+1;++a)i.push(s);for(a=1;a<t.length+1;++a)for(o=1;o<e.length+1;++o)t[a-1]===e[o-1]?i[a][o]=i[a-1][o-1]+1:i[a][o]=Math.max(i[a-1][o],i[a][o-1]);return i[t.length][e.length]-Math.sqrt(r)}function Tl(t,e=!0){return t?t.length<140?t:t.slice(0,140)+(e?"…":""):""}function em(t,e){const n=e.exec(t);return n&&n[0].length?t.substr(0,t.length-n[0].length):t}function Ol(t,e){let n="";for(;e>0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t
Line truncated
|
||||
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
||||
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ye.create(0,e);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return ye.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var C;(function(t){const e=Object.prototype.toString;function n(f){return typeof f<"u"}t.defined=n;function r(f){return typeof f>"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function o(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=o;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(C||(C={}));class An{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(An.isIncremental(r)){const i=cc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const d=lc(r.text,!1,s);if(l-o===d.length)for(let m=0,f=d.length;m<f;m++)c[m+o+1]=d[m];else d.length<1e4?c.splice(o+1,l-o,...d):this._lineOffsets=c=c.slice(0,o+1).concat(d,c.slice(l+1));const u=r.text.length-(a-s);if(u!==0)for(let m=o+1+d.length,f=c.length;m<f;m++)c[m]=c[m]+u}else if(An.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=lc(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var ts;(function(t){function e(i,s,a,o){return new An(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof An)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let a=i.getText(),o=ns(s.map(Yp),(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0;const c=[];for(const d of o){let u=i.offsetAt(d.range.start);if(u<l)throw new Error("Overlapping edit");u>l&&c.push(a.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(ts||(ts={}));function ns(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);ns(r,e),ns(i,e);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)e(r[s],i[a])<=0?t[o++]=r[s++]:t[o++]=i[a++];for(;s<r.length;)t[o++]=r[s++];for(;a<i.length;)t[o++]=i[a++];return t}function lc(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function cc(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Yp(t){const e=cc(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var hc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[He.Markdown,He.PlainText]}},hover:{contentFormat:[He.Markdown,He.PlainText]}}}})(hc||(hc={}));var Mn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Mn||(Mn={}));const dc={E:"Edge",FF:"Firefox",
Line truncated
|
||||
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return _e.create(0,e);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return _e.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var S;(function(t){const e=Object.prototype.toString;function n(f){return typeof f<"u"}t.defined=n;function r(f){return typeof f>"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function o(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=o;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(S||(S={}));class Un{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(Un.isIncremental(r)){const i=Vc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const d=$c(r.text,!1,s);if(l-o===d.length)for(let m=0,f=d.length;m<f;m++)c[m+o+1]=d[m];else d.length<1e4?c.splice(o+1,l-o,...d):this._lineOffsets=c=c.slice(0,o+1).concat(d,c.slice(l+1));const u=r.text.length-(a-s);if(u!==0)for(let m=o+1+d.length,f=c.length;m<f;m++)c[m]=c[m]+u}else if(Un.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=$c(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Ss;(function(t){function e(i,s,a,o){return new Un(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof Un)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let a=i.getText(),o=Cs(s.map($m),(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0;const c=[];for(const d of o){let u=i.offsetAt(d.range.start);if(u<l)throw new Error("Overlapping edit");u>l&&c.push(a.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(Ss||(Ss={}));function Cs(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Cs(r,e),Cs(i,e);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)e(r[s],i[a])<=0?t[o++]=r[s++]:t[o++]=i[a++];for(;s<r.length;)t[o++]=r[s++];for(;a<i.length;)t[o++]=i[a++];return t}function $c(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Vc(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function $m(t){const e=Vc(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Uc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ye.Markdown,Ye.PlainText]}},hover:{contentFormat:[Ye.Markdown,Ye.PlainText]}}}})(Uc||(Uc={}));var Bn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Bn||(Bn={}));const Bc={E:"Edge",FF:"Firefox",
Line truncated
|
||||
|
||||
`;case"nonstandard":return`🚨️ Property is nonstandard. Avoid using it.
|
||||
|
||||
`;case"obsolete":return`🚨️️️ Property is obsolete. Avoid using it.
|
||||
|
||||
`;default:return""}}function mt(t,e,n){let r;if(e?r={kind:"markdown",value:Kp(t,n)}:r={kind:"plaintext",value:Qp(t,n)},r.value!=="")return r}function vr(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(/</g,"<").replace(/>/g,">")}function Qp(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=uc(t.status)),n+=t.description;const r=pc(t.browsers);r&&(n+=`
|
||||
`;default:return""}}function Ct(t,e,n){let r;if(e?r={kind:"markdown",value:Um(t,n)}:r={kind:"plaintext",value:Vm(t,n)},r.value!=="")return r}function Lr(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(/</g,"<").replace(/>/g,">")}function Vm(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=qc(t.status)),n+=t.description;const r=jc(t.browsers);r&&(n+=`
|
||||
(`+r+")"),"syntax"in t&&(n+=`
|
||||
|
||||
Syntax: ${t.syntax}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=`
|
||||
|
||||
`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function Kp(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=uc(t.status)),typeof t.description=="string"?n+=vr(t.description):n+=t.description.kind===He.Markdown?t.description.value:vr(t.description.value);const r=pc(t.browsers);r&&(n+=`
|
||||
`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function Um(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=qc(t.status)),typeof t.description=="string"?n+=Lr(t.description):n+=t.description.kind===Ye.Markdown?t.description.value:Lr(t.description.value);const r=jc(t.browsers);r&&(n+=`
|
||||
|
||||
(`+vr(r)+")"),"syntax"in t&&t.syntax&&(n+=`
|
||||
(`+Lr(r)+")"),"syntax"in t&&t.syntax&&(n+=`
|
||||
|
||||
Syntax: ${vr(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=`
|
||||
Syntax: ${Lr(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=`
|
||||
|
||||
`),n+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function pc(t=[]){return t.length===0?null:t.map(e=>{let n="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in dc&&(n+=dc[i]),s&&(n+=" "+s),n}).join(", ")}const Zp=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,em=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],tm=/^(rgb|rgba|hsl|hsla|hwb)$/i,yr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"
Line truncated
|
||||
\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}let hs=class Ms{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(const n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof Ms&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){const n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Kt);)e=e.parent;return e}removeChild(e){if(this.children){const n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){const n=new Ms;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r<this.children.length;r++)n.addChild(this.children[r].clone())}return n}cloneWithParent(){const e=this.clone(!1);return this.parent&&!(this.parent instanceof Kt)&&this.parent.cloneWithParent().addChild(e),e}};class Kt extends hs{}class ds extends hs{constructor(e){super(),this.addAttr("name",e)}}class zc{constructor(e){this.quote=e,this.result=[]}print(e,n){this.result=[],e instanceof Kt?e.children&&this.doPrint(e.children,0):this.doPrint([e],0);let r;return n?r=`${n.text}
|
||||
`),n+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function jc(t=[]){return t.length===0?null:t.map(e=>{let n="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Bc&&(n+=Bc[i]),s&&(n+=" "+s),n}).join(", ")}const Bm=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,qm=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],jm=/^(rgb|rgba|hsl|hsla|hwb)$/i,Ar={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"
Line truncated
|
||||
\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}let Ds=class ta{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(const n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof ta&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){const n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof ln);)e=e.parent;return e}removeChild(e){if(this.children){const n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){const n=new ta;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r<this.children.length;r++)n.addChild(this.children[r].clone())}return n}cloneWithParent(){const e=this.clone(!1);return this.parent&&!(this.parent instanceof ln)&&this.parent.cloneWithParent().addChild(e),e}};class ln extends Ds{}class Ls extends Ds{constructor(e){super(),this.addAttr("name",e)}}class ph{constructor(e){this.quote=e,this.result=[]}print(e,n){this.result=[],e instanceof ln?e.children&&this.doPrint(e.children,0):this.doPrint([e],0);let r;return n?r=`${n.text}
|
||||
… `+this.result.join(`
|
||||
`):r=this.result.join(`
|
||||
`),[{language:"html",value:r}]}doPrint(e,n){for(const r of e)this.doPrintElement(r,n),r.children&&this.doPrint(r.children,n+1)}writeLine(e,n){const r=new Array(e+1).join(" ");this.result.push(r+n)}doPrintElement(e,n){const r=e.findAttribute("name");if(e instanceof ds||r==="…"){this.writeLine(n,r);return}const i=["<"];if(r?i.push(r):i.push("element"),e.attributes){for(const s of e.attributes)if(s.name!=="name"){i.push(" "),i.push(s.name);const a=s.value;a&&(i.push("="),i.push(rt.ensure(a,this.quote)))}}i.push(">"),this.writeLine(n,i.join(""))}}var rt;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(rt||(rt={}));class us{constructor(){this.id=0,this.attr=0,this.tag=0}}function Pc(t,e){let n=new hs;for(const r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){const o=r.getText().split("&");if(o.length===1){n.addAttr("name",o[0]);break}n=e.cloneWithParent(),o[0]&&n.findRoot().prepend(o[0]);for(let l=1;l<o.length;l++){if(l>1){const c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Oe(i));break;case v.ClassSelector:n.addAttr("class",Oe(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Oe(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Oe(r.getText()),"");break;case v.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const o=s.getValue(),l=s.getOperator();let c;if(o&&l)switch(Oe(l.getText())){case"|=":c=`${rt.remove(Oe(o.getText()))}-…`;break;case"^=":c=`${rt.remove(Oe(o.getText()))}…`;break;case"$=":c=`…${rt.remove(Oe(o.getText()))}`;break;case"~=":c=` … ${rt.remove(Oe(o.getText()))} … `;break;case"*=":c=`…${rt.remove(Oe(o.getText()))}…`;break;default:c=rt.remove(Oe(o.getText()));break}n.addAttr(Oe(a.getText()),c)}break}return n}function Oe(t){const e=new _n;e.setSource(t);const n=e.scanUnquotedString();return n?n.text:t}class Fm{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){const r=Im(e);if(r){const i=new zc('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){const n=Pc(e),r=new zc('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){const n=s=>{const a=new us;let o=new us;for(const l of s)for(const c of l.getChildren()){const d=r(c);if(d.id>o.id){o=d;continue}else if(d.id<o.id)continue;if(d.attr>o.attr){o=d;continue}else if(d.attr<o.attr)continue;if(d.tag>o.tag){o=d;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},r=s=>{const a=new us;e:for(const o of s.getChildren()){switch(o.type){case v.IdentifierSelector:a.id++;break;case v.ClassSelector:case v.AttributeSelector:a.attr++;break;case v.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case v.PseudoSelector:const l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(a.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());a.id+=g.id,a.attr+=g.attr,a.tag+=g.tag;continue e}const d=new Cr,u=c[1].getText();d.scanner.setSource(u);const m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){const g=[],k=u.slice(f.offset+2).split(",");for(const N of k){const _=d.internalParse(N,d._parseSelector);_&&g.push(_)}let F=n(g);a.id+=F.id,a.attr+=F.attr,a.tag+=F.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){const l=r(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class Rm{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof Kt)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){const r=this.element.findRoot();r.parent instanceof Kt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(const r of e.getChildren()){if(r instanceof Ht){if(this.prev instanceof Ht){const a=new ds("…");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.
Line truncated
|
||||
`),[{language:"html",value:r}]}doPrint(e,n){for(const r of e)this.doPrintElement(r,n),r.children&&this.doPrint(r.children,n+1)}writeLine(e,n){const r=new Array(e+1).join(" ");this.result.push(r+n)}doPrintElement(e,n){const r=e.findAttribute("name");if(e instanceof Ls||r==="…"){this.writeLine(n,r);return}const i=["<"];if(r?i.push(r):i.push("element"),e.attributes){for(const s of e.attributes)if(s.name!=="name"){i.push(" "),i.push(s.name);const a=s.value;a&&(i.push("="),i.push(ht.ensure(a,this.quote)))}}i.push(">"),this.writeLine(n,i.join(""))}}var ht;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(ht||(ht={}));class As{constructor(){this.id=0,this.attr=0,this.tag=0}}function mh(t,e){let n=new Ds;for(const r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){const o=r.getText().split("&");if(o.length===1){n.addAttr("name",o[0]);break}n=e.cloneWithParent(),o[0]&&n.findRoot().prepend(o[0]);for(let l=1;l<o.length;l++){if(l>1){const c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Ve(i));break;case v.ClassSelector:n.addAttr("class",Ve(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Ve(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Ve(r.getText()),"");break;case v.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const o=s.getValue(),l=s.getOperator();let c;if(o&&l)switch(Ve(l.getText())){case"|=":c=`${ht.remove(Ve(o.getText()))}-…`;break;case"^=":c=`${ht.remove(Ve(o.getText()))}…`;break;case"$=":c=`…${ht.remove(Ve(o.getText()))}`;break;case"~=":c=` … ${ht.remove(Ve(o.getText()))} … `;break;case"*=":c=`…${ht.remove(Ve(o.getText()))}…`;break;default:c=ht.remove(Ve(o.getText()));break}n.addAttr(Ve(a.getText()),c)}break}return n}function Ve(t){const e=new Mn;e.setSource(t);const n=e.scanUnquotedString();return n?n.text:t}class wf{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){const r=xf(e);if(r){const i=new ph('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){const n=mh(e),r=new ph('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){const n=s=>{const a=new As;let o=new As;for(const l of s)for(const c of l.getChildren()){const d=r(c);if(d.id>o.id){o=d;continue}else if(d.id<o.id)continue;if(d.attr>o.attr){o=d;continue}else if(d.attr<o.attr)continue;if(d.tag>o.tag){o=d;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},r=s=>{const a=new As;e:for(const o of s.getChildren()){switch(o.type){case v.IdentifierSelector:a.id++;break;case v.ClassSelector:case v.AttributeSelector:a.attr++;break;case v.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case v.PseudoSelector:const l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(a.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());a.id+=g.id,a.attr+=g.attr,a.tag+=g.tag;continue e}const d=new Pr,u=c[1].getText();d.scanner.setSource(u);const m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){const g=[],k=u.slice(f.offset+2).split(",");for(const N of k){const _=d.internalParse(N,d._parseSelector);_&&g.push(_)}let F=n(g);a.id+=F.id,a.attr+=F.attr,a.tag+=F.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){const l=r(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class vf{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof ln)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){const r=this.element.findRoot();r.parent instanceof ln&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(const r of e.getChildren()){if(r instanceof tn){if(this.prev instanceof tn){const a=new Ls("…");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.
Line truncated
|
||||
$0
|
||||
}`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@for",documentation:w("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@each",documentation:w("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@while",documentation:w("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} {
|
||||
}`,insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@for",documentation:w("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@each",documentation:w("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@while",documentation:w("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} {
|
||||
$0
|
||||
}`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@mixin",documentation:w("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} {
|
||||
}`,insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@mixin",documentation:w("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} {
|
||||
$0
|
||||
}`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:q.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:q.Keyword}],ge.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:at,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:at,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword}],ge.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass’s powerful selector engine."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass’s inner workings."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Jc(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=`
|
||||
}`,insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:G.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:G.Keyword}],ve.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:pt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:ze.Snippet,kind:G.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:pt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:ze.Snippet,kind:G.Keyword}],ve.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass’s powerful selector engine."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass’s inner workings."),references:[{name:pt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Eh(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=`
|
||||
|
||||
`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}const Xc=47,Km=10,Zm=13,ef=12,_s=96,Es=46;let tf=p.CustomToken;const Fs=tf++;class Yc extends _n{scanNext(e){const n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([Es,Es,Es])?this.finishToken(e,Fs):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Xc,Xc])?(this.stream.advanceWhileChar(e=>{switch(e){case Km:case Zm:case ef:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===_s?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==_s),this.stream.advanceIfChar(_s)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}}class nf extends Cr{constructor(){super(new Yc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(Li);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const n=this.create(ul);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const n=this.create(hr),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(In);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const n=this.create(oe);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){const e=this.create(W),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;const i=this.create(Wi),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(
Line truncated
|
||||
`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}const Fh=47,Bf=10,qf=13,jf=12,Hs=96,Gs=46;let Hf=p.CustomToken;const Js=Hf++;class Rh extends Mn{scanNext(e){const n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([Gs,Gs,Gs])?this.finishToken(e,Js):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Fh,Fh])?(this.stream.advanceWhileChar(e=>{switch(e){case Bf:case qf:case jf:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===Hs?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==Hs),this.stream.advanceIfChar(Hs)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}}class Gf extends Pr{constructor(){super(new Rh)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(Zi);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,x.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,x.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected):this.finish(e,x.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const n=this.create(ql);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const n=this.create(Cr),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,x.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(Wn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,x.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const n=this.create(le);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){const e=this.create(W),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;const i=this.create(as),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(
Line truncated
|
||||
`);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function a(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}a.prototype.get_indent_size=function(l,c){var d=this.__base_string_length;return c=c||0,l<0&&(d=0),d+=l*this.__indent_size,d+=c,d},a.prototype.get_indent_string=function(l,c){var d=this.__base_string;return c=c||0,l<0&&(l=0,d=""),c+=l*this.__indent_size,this.__ensure_cache(c),d+=this.__cache[c],d},a.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var l=this.__cache.length,c=0,d="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,d=new Array(c+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function o(l,c){this.__indent_cache=new a(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},o.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
|
||||
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(`
|
||||
`);return l!==`
|
||||
@@ -68,13 +72,13 @@ You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selec
|
||||
`)break;this._ch=this._input.next()}return T},N.prototype.eatWhitespace=function(_){for(var T=g.test(this._input.peek()),O=0;g.test(this._input.peek());)this._ch=this._input.next(),_&&this._ch===`
|
||||
`&&(O===0||O<this._options.max_preserve_newlines)&&(O++,this._output.add_new_line(!0));return T},N.prototype.foundNestedPseudoClass=function(){for(var _=0,T=1,O=this._input.peek(T);O;){if(O==="{")return!0;if(O==="(")_+=1;else if(O===")"){if(_===0)return!1;_-=1}else if(O===";"||O==="}")return!1;T++,O=this._input.peek(T)}return!1},N.prototype.print_string=function(_){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(_)},N.prototype.preserveSingleSpace=function(_){_&&(this._output.space_before_token=!0)},N.prototype.indent=function(){this._indentLevel++},N.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,T=this._options.eol;T==="auto"&&(T=`
|
||||
`,_&&m.test(_||"")&&(T=_.match(m)[0])),_=_.replace(f,`
|
||||
`);var O=_.match(/^[\t ]*/)[0];this._output=new l(this._options,O),this._input=new c(_),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,I=!1,R=!1,z=!1,$=!1,L=!1,y=this._ch,E=!1,D,A,M;D=this._input.read(b),A=D!=="",M=y,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(k),H=u.get_directives(P);H&&H.ignore==="start"&&(P+=u.readIgnored(this._input)),this.print_string(P),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(A),this.print_string(this._ch);var ee=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ee.match(/[ :]$/)&&(ee=this.eatString(": ").replace(/\s+$/,""),this.print_string(ee),this._output.space_before_token=!0),V===0&&ee.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(A),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var G=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);G.match(/[ :]$/)&&(G=this.eatString(": ").replace(/\s+$/,""),this.print_string(G),this._output.space_before_token=!0),V===0&&G.indexOf(":")!==-1?(R=!0,this.indent()):G in this.NESTED_AT_RULE?(this._nestedLevel+=1,G in this.CONDITIONAL_GROUP_RULE&&(z=!0)):V===0&&!R&&($=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(A),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),$=!1,z?(z=!1,I=this._indentLevel>=this._nestedLevel):I=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&I&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),I=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var xe=0;xe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;xe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[xe])){E=!0;break}(I||z)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!$&&V===0?(this.print_string(":"),R||(R=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var on=M==='"'||M==="'";this.preserveSingleSpace(on||A),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")E=!1,V===0?(R&&(this.outdent(),R=!1),$=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),V++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),V&&(V--,this.outdent()));else{var bt=!1;this._input.lookBack("with")&&(bt=!0),this.preserveSingleSpace(A||bt),this.print_string(this._ch),R&&M==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),V++,this.indent())}else if(this._ch===")")V&&(V--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!R||L)&&V===0&&!$?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!R&&V===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhites
Line truncated
|
||||
`&&E&&this._output.add_new_line()}var ln=this._output.get_code(T);return ln},i.exports.Beautifier=N}),(function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m<u.length;m++)u[m]!=="expand"?this.brace_style="collapse":this.brace_style=u[m]}l.prototype=new o,i.exports.Options=l})],e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}var r=n(15);Kc=r})();var of=Kc;function lf(t,e,n){let r=t.getText(),i=!0,s=0,a=!1;const o=n.tabSize||4;if(e){let d=t.offsetAt(e.start),u=d;for(;u>0&&th(r,u-1);)u--;u===0||eh(r,u-1)?d=u:u<d&&(d=u+1);let m=t.offsetAt(e.end),f=m;for(;f<r.length&&th(r,f);)f++;if((f===r.length||eh(r,f))&&(m=f),e=K.create(t.positionAt(d),t.positionAt(m)),a=df(r,d),i=m===r.length,r=r.substring(d,m),d!==0){const g=t.offsetAt(ye.create(e.start.line,0));s=uf(t.getText(),g,n)}a&&(r=`{
|
||||
${Zc(r)}`)}else e=K.create(ye.create(0,0),t.positionAt(r.length));const l={indent_size:o,indent_char:n.insertSpaces?" ":" ",end_with_newline:i&&ot(n,"insertFinalNewline",!1),selector_separator_newline:ot(n,"newlineBetweenSelectors",!0),newline_between_rules:ot(n,"newlineBetweenRules",!0),space_around_selector_separator:ot(n,"spaceAroundSelectorSeparator",!1),brace_style:ot(n,"braceStyle","collapse"),indent_empty_lines:ot(n,"indentEmptyLines",!1),max_preserve_newlines:ot(n,"maxPreserveNewLines",void 0),preserve_newlines:ot(n,"preserveNewLines",!0),wrap_line_length:ot(n,"wrapLineLength",void 0),eol:`
|
||||
`};let c=of(r,l);if(a&&(c=Zc(c.substring(2))),s>0){const d=n.insertSpaces?al(" ",o*s):al(" ",s);c=c.split(`
|
||||
`);var O=_.match(/^[\t ]*/)[0];this._output=new l(this._options,O),this._input=new c(_),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,D=!1,R=!1,P=!1,U=!1,L=!1,C=this._ch,I=!1,E,z,A;E=this._input.read(b),z=E!=="",A=C,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),C=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var M=this._input.read(k),$=u.get_directives(M);$&&$.ignore==="start"&&(M+=u.readIgnored(this._input)),this.print_string(M),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(z),this.print_string(this._ch);var B=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);B.match(/[ :]$/)&&(B=this.eatString(": ").replace(/\s+$/,""),this.print_string(B),this._output.space_before_token=!0),V===0&&B.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Y.match(/[ :]$/)&&(Y=this.eatString(": ").replace(/\s+$/,""),this.print_string(Y),this._output.space_before_token=!0),V===0&&Y.indexOf(":")!==-1?(R=!0,this.indent()):Y in this.NESTED_AT_RULE?(this._nestedLevel+=1,Y in this.CONDITIONAL_GROUP_RULE&&(P=!0)):V===0&&!R&&(U=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),U=!1,P?(P=!1,D=this._indentLevel>=this._nestedLevel):D=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&D&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(A==="("?this._output.space_before_token=!1:A!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),A==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),D=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ne=0;ne<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ne++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ne])){I=!0;break}(D||P)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!U&&V===0?(this.print_string(":"),R||(R=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var ye=A==='"'||A==="'";this.preserveSingleSpace(ye||z),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")I=!1,V===0?(R&&(this.outdent(),R=!1),U=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),V++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),V&&(V--,this.outdent()));else{var ge=!1;this._input.lookBack("with")&&(ge=!0),this.preserveSingleSpace(z||ge),this.print_string(this._ch),R&&A==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),V++,this.indent())}else if(this._ch===")")V&&(V--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!R||L)&&V===0&&!U?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!R&&V===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(
Line truncated
|
||||
`&&I&&this._output.add_new_line()}var gt=this._output.get_code(T);return gt},i.exports.Beautifier=N}),(function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m<u.length;m++)u[m]!=="expand"?this.brace_style="collapse":this.brace_style=u[m]}l.prototype=new o,i.exports.Options=l})],e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}var r=n(15);Ih=r})();var Qf=Ih;function Kf(t,e,n){let r=t.getText(),i=!0,s=0,a=!1;const o=n.tabSize||4;if(e){let d=t.offsetAt(e.start),u=d;for(;u>0&&Ah(r,u-1);)u--;u===0||Lh(r,u-1)?d=u:u<d&&(d=u+1);let m=t.offsetAt(e.end),f=m;for(;f<r.length&&Ah(r,f);)f++;if((f===r.length||Lh(r,f))&&(m=f),e=ee.create(t.positionAt(d),t.positionAt(m)),a=tg(r,d),i=m===r.length,r=r.substring(d,m),d!==0){const g=t.offsetAt(_e.create(e.start.line,0));s=ng(t.getText(),g,n)}a&&(r=`{
|
||||
${Dh(r)}`)}else e=ee.create(_e.create(0,0),t.positionAt(r.length));const l={indent_size:o,indent_char:n.insertSpaces?" ":" ",end_with_newline:i&&mt(n,"insertFinalNewline",!1),selector_separator_newline:mt(n,"newlineBetweenSelectors",!0),newline_between_rules:mt(n,"newlineBetweenRules",!0),space_around_selector_separator:mt(n,"spaceAroundSelectorSeparator",!1),brace_style:mt(n,"braceStyle","collapse"),indent_empty_lines:mt(n,"indentEmptyLines",!1),max_preserve_newlines:mt(n,"maxPreserveNewLines",void 0),preserve_newlines:mt(n,"preserveNewLines",!0),wrap_line_length:mt(n,"wrapLineLength",void 0),eol:`
|
||||
`};let c=Qf(r,l);if(a&&(c=Dh(c.substring(2))),s>0){const d=n.insertSpaces?Ol(" ",o*s):Ol(" ",s);c=c.split(`
|
||||
`).join(`
|
||||
`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function Zc(t){return t.replace(/^\s+/,"")}const cf=123,hf=125;function df(t,e){for(;e>=0;){const n=t.charCodeAt(e);if(n===cf)return!0;if(n===hf)return!1;e--}return!1}function ot(t,e,n){if(t&&t.hasOwnProperty(e)){const r=t[e];if(r!==null)return r}return n}function uf(t,e,n){let r=e,i=0;const s=n.tabSize||4;for(;r<t.length;){const a=t.charAt(r);if(a===" ")i++;else if(a===" ")i+=s;else break;r++}return Math.floor(i/s)}function eh(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}function th(t,e){return" ".indexOf(t.charAt(e))!==-1}const pf={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ <integer> && <symbol> ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in
Line truncated
|
||||
`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function Dh(t){return t.replace(/^\s+/,"")}const Zf=123,eg=125;function tg(t,e){for(;e>=0;){const n=t.charCodeAt(e);if(n===Zf)return!0;if(n===eg)return!1;e--}return!1}function mt(t,e,n){if(t&&t.hasOwnProperty(e)){const r=t[e];if(r!==null)return r}return n}function ng(t,e,n){let r=e,i=0;const s=n.tabSize||4;for(;r<t.length;){const a=t.charAt(r);if(a===" ")i++;else if(a===" ")i+=s;else break;r++}return Math.floor(i/s)}function Lh(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}function Ah(t,e){return" ".indexOf(t.charAt(e))!==-1}const rg={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ <integer> && <symbol> ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in
Line truncated
|
||||
|
||||
This feature is available since Firefox 55, but is only currently supported with SVG images loaded via chrome:// or resource:// URLs. To experiment with the feature in SVG on the Web it is necessary to set the svg.context-properties.content.enabled pref to true.`},{name:"-moz-float-edge",status:"obsolete",syntax:"border-box | content-box | margin-box | padding-box",values:[{name:"border-box"},{name:"content-box"},{name:"margin-box"},{name:"padding-box"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"}],description:"The non-standard -moz-float-edge CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness."},{name:"-moz-force-broken-image-icon",status:"obsolete",syntax:"0 | 1",values:[{name:"0"},{name:"1"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"}],description:"The -moz-force-broken-image-icon extended CSS property can be used to force the broken image icon to be shown even when a broken image has an alt attribute."},{name:"-moz-image-region",status:"nonstandard",syntax:"<shape> | auto",relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"}],description:"For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance."},{name:"-moz-orient",status:"nonstandard",syntax:"inline | block | horizontal | vertical",values:[{name:"inline"},{name:"block"},{name:"horizontal"},{name:"vertical"}],relevance:0,browsers:["FF6"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-orient"}],description:"The -moz-orient CSS property specifies the orientation of the element to which it's applied."},{name:"-moz-outline-radius",status:"nonstandard",syntax:"<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",relevance:0,description:"In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."},{name:"-moz-outline-radius-bottomleft",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-bottomleft CSS property can be used to round the bottom-left corner of an element's outline."},{name:"-moz-outline-radius-bottomright",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-bottomright CSS property can be used to round the bottom-right corner of an element's outline."},{name:"-moz-outline-radius-topleft",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-topleft CSS property can be used to round the top-left corner of an element's outline."},{name:"-moz-outline-radius-topright",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-topright CSS property can be used to round the top-right corner of an element's outline."},{name:"-moz-stack-sizing",status:"nonstandard",syntax:"ignore | stretch-to-fit",values:[{name:"ignore"},{name:"stretch-to-fit"}],relevance:0,description:"-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible."},{name:"-moz-text-blink",status:"nonstandard",syntax:"none | blink",values:[{name:"none"},{name:"blink"}],relevance:0,description:"The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."},{name:"-moz-user-input",status:"obsolete",syntax:"auto | none | enabled | disabled",values:[{name:"auto"},{name:"none"},{name:"enabled"},{name:"disabled"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"}],description:"In Mozilla applications, -moz-user-input determines if an element will accept user input."},{name:"-moz-user-modify",status:"nonstandard",syntax:"read-only | read-write | write-only",values:[{name:"read-only"},{name:"read-write"},{name:"write-only"}],relevance:0,description:"The -moz-user-modify property has no effect. It was originally planned to determine whether or not the content of an element can be edited by a user."},{name:"-moz-window-dragging",status:"nonstandard",syntax:"drag | no-drag",values:[{name:"drag"},{name:"no-drag"}],relevance:0,description:"The -moz-window-dragging CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X."},{name:"-moz-window-s
Line truncated
|
||||
|
||||
@@ -90,4 +94,4 @@ Specifying any precise animations or physics used to enforce those snap points i
|
||||
|
||||
This is used to produce an effect that is known as tate-chū-yoko (縦中横) in Japanese, or as 直書橫向 in Chinese.`},{name:"text-decoration-skip",status:"experimental",syntax:"none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",relevance:52,browsers:["S12.1","C57","O44"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"}],description:"The text-decoration-skip CSS property specifies what parts of the element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors."},{name:"text-decoration-skip-ink",syntax:"auto | all | none",values:[{name:"auto"},{name:"all"},{name:"none"}],relevance:51,browsers:["E79","FF70","S15.4","C64","O50"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"}],description:"The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."},{name:"text-decoration-thickness",syntax:"auto | from-font | <length> | <percentage> ",relevance:50,browsers:["E89","FF70","S12.1","C89","O75"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"}],description:"The text-decoration-thickness CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline."},{name:"text-emphasis",syntax:"<'text-emphasis-style'> || <'text-emphasis-color'>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis"}],description:"The text-emphasis CSS property is a shorthand property for setting text-emphasis-style and text-emphasis-color in one declaration. This property will apply the specified emphasis mark to each character of the element's text, except separator characters, like spaces, and control characters."},{name:"text-emphasis-color",syntax:"<color>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"}],description:"The text-emphasis-color CSS property defines the color used to draw emphasis marks on text being rendered in the HTML document. This value can also be set and reset using the text-emphasis shorthand."},{name:"text-emphasis-position",syntax:"[ over | under ] && [ right | left ]",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"}],description:"The text-emphasis-position CSS property describes where emphasis marks are drawn at. The effect of emphasis marks on the line height is the same as for ruby text: if there isn't enough place, the line height is increased."},{name:"text-emphasis-style",syntax:"none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"}],description:"The text-emphasis-style CSS property defines the type of emphasis used. It can also be set, and reset, using the text-emphasis shorthand."},{name:"text-size-adjust",status:"experimental",syntax:"none | auto | <percentage>",relevance:57,browsers:["E79","C54","O41"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"}],description:"The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."},{name:"text-underline-offset",syntax:"auto | <length> | <percentage> ",relevance:51,browsers:["E87","FF70","S12.1","C87","O73"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"}],description:"The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position."},{name:"text-wrap",syntax:"wrap | nowrap | balance | stable | pretty",values:[{name:"wrap"},{name:"nowrap"},{name:"balance"},{name:"stable"},{name:"pretty"}],relevance:54,browsers:["E114","FF121","Spreview","C114","O100"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-wrap"}],description:"The text-wrap CSS property controls how text inside an element is wrapped."},{name:"timeline-scope",status:"experimental",syntax:"none | <dashed-ident>#",relevance:50,browsers:["E116","C116","O102"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/timeline-scope"}],description:"The timeline-scope CSS property modifies the scope of a named animation tim
Line truncated
|
||||
|
||||
In order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element.`},{name:"::grammar-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::grammar-error"}],description:"The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."},{name:"::marker",browsers:["E86","FF68","S11.1","C86","O72"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::marker"}],description:"The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."},{name:"::part",status:"experimental",browsers:["E79","FF72","S13.1","C73","O60"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::part"}],description:"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."},{name:"::placeholder",browsers:["E79","FF51","S10.1","C57","O44"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::placeholder"}],description:"The ::placeholder CSS pseudo-element represents the placeholder text of a form element."},{name:"::slotted",browsers:["E79","FF63","S10","C50","O37"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::slotted"}],description:"The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."},{name:"::spelling-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::spelling-error"}],description:"The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."},{name:"::view-transition",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition"}],description:"The ::view-transition CSS pseudo-element represents the root of the view transitions overlay, which contains all view transitions and sits over the top of all other page content."},{name:"::view-transition-group",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-group"}],description:"The ::view-transition-group CSS pseudo-element represents a single view transition group."},{name:"::view-transition-image-pair",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-image-pair"}],description:`The ::view-transition-image-pair CSS pseudo-element represents a container for a view transition's "old" and "new" view states — before and after the transition.`},{name:"::view-transition-new",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-new"}],description:'The ::view-transition-new CSS pseudo-element represents the "new" view state of a view transition — a live representation of the new view, after the transition.'},{name:"::view-transition-old",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-old"}],description:'The ::view-transition-old CSS pseudo-element represents the "old" view state of a view transition — a static screenshot of the old view, before the transition.'}]};class nh{constructor(e){this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.addData(e)}provideProperties(){return this._properties}provideAtDirectives(){return this._atDirectives}providePseudoClasses(){return this._pseudoClasses}providePseudoElements(){return this._pseudoElements}addData(e){if(Array.isArray(e.properties))for(const n of e.properties)mf(n)&&this._properties.push(n);if(Array.isArray(e.atDirectives))for(const n of e.atDirectives)ff(n)&&this._atDirectives.push(n);if(Array.isArray(e.pseudoClasses))for(const n of e.pseudoClasses)gf(n)&&this._pseudoClasses.push(n);if(Array.isArray(e.pseudoElements))for(const n of e.pseudoElements)bf(n)&&this._pseudoElements.push(n)}}function mf(t){return typeof t.name=="string"}function ff(t){return typeof t.name=="string"}function gf(t){return typeof t.name=="string"}function bf(t){return typeof t.name=="string"}class Rs{constructor(e){this.dataProviders=[],this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.setDataProviders(e?.useDefaultDataProviLine truncated
|
||||
In order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element.`},{name:"::grammar-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::grammar-error"}],description:"The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."},{name:"::marker",browsers:["E86","FF68","S11.1","C86","O72"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::marker"}],description:"The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."},{name:"::part",status:"experimental",browsers:["E79","FF72","S13.1","C73","O60"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::part"}],description:"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."},{name:"::placeholder",browsers:["E79","FF51","S10.1","C57","O44"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::placeholder"}],description:"The ::placeholder CSS pseudo-element represents the placeholder text of a form element."},{name:"::slotted",browsers:["E79","FF63","S10","C50","O37"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::slotted"}],description:"The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."},{name:"::spelling-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::spelling-error"}],description:"The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."},{name:"::view-transition",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition"}],description:"The ::view-transition CSS pseudo-element represents the root of the view transitions overlay, which contains all view transitions and sits over the top of all other page content."},{name:"::view-transition-group",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-group"}],description:"The ::view-transition-group CSS pseudo-element represents a single view transition group."},{name:"::view-transition-image-pair",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-image-pair"}],description:`The ::view-transition-image-pair CSS pseudo-element represents a container for a view transition's "old" and "new" view states — before and after the transition.`},{name:"::view-transition-new",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-new"}],description:'The ::view-transition-new CSS pseudo-element represents the "new" view state of a view transition — a live representation of the new view, after the transition.'},{name:"::view-transition-old",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-old"}],description:'The ::view-transition-old CSS pseudo-element represents the "old" view state of a view transition — a static screenshot of the old view, before the transition.'}]};class Mh{constructor(e){this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.addData(e)}provideProperties(){return this._properties}provideAtDirectives(){return this._atDirectives}providePseudoClasses(){return this._pseudoClasses}providePseudoElements(){return this._pseudoElements}addData(e){if(Array.isArray(e.properties))for(const n of e.properties)ig(n)&&this._properties.push(n);if(Array.isArray(e.atDirectives))for(const n of e.atDirectives)sg(n)&&this._atDirectives.push(n);if(Array.isArray(e.pseudoClasses))for(const n of e.pseudoClasses)ag(n)&&this._pseudoClasses.push(n);if(Array.isArray(e.pseudoElements))for(const n of e.pseudoElements)og(n)&&this._pseudoElements.push(n)}}function ig(t){return typeof t.name=="string"}function sg(t){return typeof t.name=="string"}function ag(t){return typeof t.name=="string"}function og(t){return typeof t.name=="string"}class Xs{constructor(e){this.dataProviders=[],this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.setDataProviders(e?.useDefaultDataProviLine truncated
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
(function(){"use strict";class wi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ze.isErrorNoTelemetry(e)?new ze(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Yn=new wi;function Ct(t){Zn(t)||Yn.onUnexpectedError(t)}function xi(t){Zn(t)||Yn.onUnexpectedExternalError(t)}function en(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:ze.isErrorNoTelemetry(t),cause:r?en(r):void 0,code:t.code}}return t}const tn="Canceled";function Zn(t){return t instanceof Kn?!0:t instanceof Error&&t.name===tn&&t.message===tn}class Kn extends Error{constructor(){super(tn),this.name=this.message}}class ze extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof ze)return e;const n=new ze;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Y extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Y.prototype)}}function yi(t,e="Unreachable"){throw new Error(e)}function Li(t,e="unexpected state"){if(!t)throw typeof e=="string"?new Y(`Assertion Failed: ${e}`):e}function ht(t){if(!t()){debugger;t(),Ct(new Y("Assertion Failed"))}}function nn(t,e){let n=0;for(;n<t.length-1;){const r=t[n],s=t[n+1];if(!e(r,s))return!1;n++}return!0}function _i(t){return typeof t=="string"}function vi(t){return!!t&&typeof t[Symbol.iterator]=="function"}var At;(function(t){function e(x){return!!x&&typeof x=="object"&&typeof x[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*s(x){yield x}t.single=s;function i(x){return e(x)?x:s(x)}t.wrap=i;function o(x){return x??n}t.from=o;function*l(x){for(let y=x.length-1;y>=0;y--)yield x[y]}t.reverse=l;function u(x){return!x||x[Symbol.iterator]().next().done===!0}t.isEmpty=u;function c(x){return x[Symbol.iterator]().next().value}t.first=c;function h(x,y){let S=0;for(const V of x)if(y(V,S++))return!0;return!1}t.some=h;function m(x,y){let S=0;for(const V of x)if(!y(V,S++))return!1;return!0}t.every=m;function f(x,y){for(const S of x)if(y(S))return S}t.find=f;function*p(x,y){for(const S of x)y(S)&&(yield S)}t.filter=p;function*g(x,y){let S=0;for(const V of x)yield y(V,S++)}t.map=g;function*d(x,y){let S=0;for(const V of x)yield*y(V,S++)}t.flatMap=d;function*w(...x){for(const y of x)vi(y)?yield*y:yield y}t.concat=w;function _(x,y,S){let V=S;for(const U of x)V=y(V,U);return V}t.reduce=_;function v(x){let y=0;for(const S of x)y++;return y}t.length=v;function*L(x,y,S=x.length){for(y<-x.length&&(y=0),y<0&&(y+=x.length),S<0?S+=x.length:S>x.length&&(S=x.length);y<S;y++)yield x[y]}t.slice=L;function k(x,y=Number.POSITIVE_INFINITY){const S=[];if(y===0)return[S,x];const V=x[Symbol.iterator]();for(let U=0;U<y;U++){const B=V.next();if(B.done)return[S,t.empty()];S.push(B.value)}return[S,{[Symbol.iterator](){return V}}]}t.consume=k;async function D(x){const y=[];for await(const S of x)y.push(S);return y}t.asyncToArray=D;async function W(x){let y=[];for await(const S of x)y=y.concat(S);return y}t.asyncToArrayFlat=W})(At||(At={}));function x1(t,e){}function er(t){if(At.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Ni(...t){return mt(()=>er(t))}class Si{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function mt(t){return new Si(t)}const Qt=class Qt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{er(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Ie.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Qt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Qt.DISABLE_DISPOSED_WARNING=!1;let ft=Qt;const Qn=class Qn{constructor(){this._store=new ft,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Qn.None=Object.freeze({dispose(){}});let Ie=Qn;const it=class it{constructor(e){this.element=e,this.next=it.Undefined,this.prev=it.Undefined}};it.Undefined=new it(void 0);let X=it;class Ri{constructor(){this._first=X.Undefined,this._last=X.Unde
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class Tt extends Error{constructor(e,n,r,s,i){super(i?`[${i}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=s,this.details=n,this.stack=r}static is(e){return e instanceof Tt||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class Wi extends Tt{constructor(e,n,r,s,i){super(e,n,r,s,i),this.name="ListenerRefusalError"}}class fn{constructor(e){this.value=e}}const Hi=2;class ge{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new mn(e?.onListenerError??Ct,this._options?.leakWarningThreshold??$i,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new hn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=u[1]/this._size>.3?"dominated":"popular",h=new Wi(c,`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||Ct)(h),Ie.None}if(this._disposed)return Ie.None;n&&(e=e.bind(n));const s=new fn(e);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Pt.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof fn?(this._deliveryQueue??=new zi,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const o=mt(()=>{i?.(),this._removeListener(s)});return dn(o,r),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const s=this._deliveryQueue.current===this;if(this._size*Hi<=n.length){let i=0;for(let o=0;o<n.length;o++)n[o]?n[i++]=n[o]:s&&i<this._deliveryQueue.end&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=i}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||Ct;if(!r){e.value(n);return}try{e.value(n)}catch(s){r(s)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof fn)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class zi{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function dn(t,e){e instanceof ft?e.add(t):Array.isArray(e)&&e.push(t)}function lr(t,e){if(e instanceof ft)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function Oi(t){return t}class ji{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Oi):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var Ve;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(Ve||(Ve={}));class gn{constructor(e){this.executor=e,this._state=Ve.Uninitialized}get value(){if(this._state===Ve.Uninitialized){this._state=Ve.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=Ve.Completed}}else if(this._state===Ve.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Gi(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Xi(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Qi(t){re
Line truncated
|
||||
`||t===" "}class wt{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Ws{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function ao(t,e,n=(r,s)=>r===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function*oo(t,e){let n,r;for(const s of t)r!==void 0&&e(r,s)?n.push(s):(n&&(yield n),n=[s]),r=s;n&&(yield n)}function lo(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function uo(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function co(t,e){for(const n of e)t.push(n)}var Dn;(function(t){function e(i){return i<0}t.isLessThan=e;function n(i){return i<=0}t.isLessThanOrEqual=n;function r(i){return i>0}t.isGreaterThan=r;function s(i){return i===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Dn||(Dn={}));function Ye(t,e){return(n,r)=>e(t(n),t(r))}const xt=(t,e)=>t-e;function ho(t){return(e,n)=>-t(e,n)}const ut=class ut{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new ut(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new ut(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(s=>((r||Dn.isGreaterThan(e(s,n)))&&(r=!1,n=s),!0)),n}};ut.empty=new ut(e=>{});let Hs=ut;class T{static fromTo(e,n){return new T(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let s=r;for(;s<n.length&&n[s].start<=e.endExclusive;)s++;if(r===s)n.splice(r,0,e);else{const i=Math.min(e.start,n[r].start),o=Math.max(e.endExclusive,n[s-1].endExclusive);n.splice(r,s-r,new T(i,o))}}static tryCreate(e,n){if(!(e>n))return new T(e,n)}static ofLength(e){return new T(0,e)}static ofStartAndLength(e,n){return new T(e,e+n)}static emptyAt(e){return new T(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new Y(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new T(this.start+e,this.endExclusive+e)}deltaStart(e){return new T(this.start+e,this.endExclusive)}deltaEnd(e){return new T(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new T(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new T(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new Y(`Invalid join: ${this.toString()} and ${e.toString()}`);return new T(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new T(this.start-e,this.endExclusive+n)}}function Ze(t,e){const n=Ke(t,e);return n===-1?void 0:t[n]}function Ke(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const o=Math.floor((s+i)/2);e(t[o])?s=o+1:i=o}return s-1}function mo(t,e){const n=In(t,e);return n===t.length?void 0:t[n]}function In(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const o=Math.floor((s+i)/2);e(t[o])?i=o:s=o+1}return s}const Zt=class Zt{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Zt.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=Ke(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Zt.assertInvariants=!1;let Ut=Zt;const me=class me{static ofLength(e,n){return new me(e,e+n)}static fromRange(e){return new me(e.sta
Line truncated
|
||||
`?(n++,r=0):r++;return new we(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new we(this.lineCount,this.columnCount+e.columnCount):new we(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new R(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new R(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new R(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new q(e.lineNumber,e.column+this.columnCount):new q(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};we.zero=new we(0,0);let Pe=we;class fo{getOffsetRange(e){return new T(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return R.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new qe.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new qe.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new qe.deps.TextEdit(n)}}const Jn=class Jn{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Jn._deps=void 0;let qe=Jn;function go(t){qe._deps=t}class zs extends fo{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new q(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const s=this.getLineLength(n);return new q(n,s+1)}if(e.column<1)return new q(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new q(e.lineNumber,r+1):e}getPosition(e){const n=Ke(this.lineStartOffsetByLineIdx,i=>i<=e),r=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new q(r,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new qe.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Os{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new q(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new zs(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER))}}class po extends Os{constructor(e,n){Li(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Pe(this._lineCount-1,e.length)}}class $t extends po{constructor(e){super(n=>e[n-1],e.length)}}class Wt extends Os{constructor(e){super(),this.value=e,this._t=new zs(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}class Ht{static fromStringEdit(e,n){const r=e.replacements.map(s=>be.fromStringReplacement(s,n));return new Ht(r)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort(Ye(r=>r.range,R.compareRangesUsingStarts));return new Ht(n)}constructor(e){this.replacements=e,ht(()=>nn(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,s=0;for(const i of this.replacements){const o=i.range.getStartPosition();if(e.isBeforeOrEqual(o))break;const l=i.range.getEndPosition(),u=Pe.ofText(i.text);if(e.isBefore(l)){const c=new q(o.lineNumber+n,o.column+(o.lineNumber+n===r?s:0)),h=u.addToPosition(c);return zt(c,h)}o.lineNumber+n!==r&&(s=0),n+=u.lineCount-(i.range.endLineNumber-i.range.startLineNumber),u.lineCount===0?l.lineNumber!==o.lineNumber?s+=u.columnCount-(l.column-1):s+=u.columnCount-(l.column-o.column):s=u.columnCount,r=l.lineNumber+n}return new q(e.lineNumber+n,e.column+(e.lineNumber+n===r?s:0))}mapRange(e){function n(o){return o instanceof q?o:o.getStartPosition()}function r(o){return o instanceof q?o:o.getEndPosition()}const s=n(this.mapPosition(e.getStartPosition())),i=r(this.mapPosition(e.getEndPosition()));return zt(s,i)}apply(e){let n="",r=new q(1,1);for(const i of this.replacements){const o=i.range,l=o.getStartPosition(),u=o.getEndPosition(),c=zt(r,l);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=i.text,r=u}const s=zt(r,e.endPositionExclusive);return s.isEmpty()||(n+=e.getValueOfRange(s)),n}applyToString(e){const n=new Wt(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,r=0,s=0;for(const i of this.replacements){const o=Pe.ofText(i.text),l=q.lift({lineNumber:i.range.startLineNumber+r,column:i.range.startColumn+(i.range.startLineNumber===n?s:0)}),u=o.createRange(l);e.push(u),r=u.endLineNumber-i.range.endLineNumber,s=u.endColumn-i.range.endColumn,n=i.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Y;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition();let s="";for(let i=0;i<this.replacements.length;i++){const o=this.replacements[i];if(s+=o.text,i<this.replacements.length-1){const l=this.replacements[i+1],u=R.fromPositions(o.range.getEndPosition(),l.range.getStartPosition()),c=e.getValueOfRange(u);s+=c}}return new be(R.fromPositions(n,r),s)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new Wt(e)):this.replacements.length===0?"":this.replacements.map(n=>{const s=e.getValueOfRange(n.range),i=R.fromPositions(new q(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let o=e.getValueOfRange(i);o.length>10&&(o="..."+o.substring(o.length-10));const l=R.fromPositions(n.range.getEndPosition(),new q(n.range.endLineNumber+1,1));let u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let c=s;if(c.length>10){const m=Math.floor(5);c=c.substring(0,m)+"..."+c.substring(c.length-m)}let h=n.text;if(h.length>10){const m=Math.floor(5);h=h.substring(0,m)+"..."+h.substring(h.length-m)}return c.length===0?`${o}❰${h}❱${u}`:`${o}❰${c}↦${h}❱${u}`}).join(`
|
||||
`)}}class be{static joinReplacements(e,n){if(e.length===0)throw new Y;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let i="";for(let o=0;o<e.length;o++){const l=e[o];if(i+=l.text,o<e.length-1){const u=e[o+1],c=R.fromPositions(l.range.getEndPosition(),u.range.getStartPosition()),h=n.getValueOfRange(c);i+=h}}return new be(R.fromPositions(r,s),i)}static fromStringReplacement(e,n){return new be(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new be(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return be.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=pn(n,r),i=Pe.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),o=r.substring(s),l=R.fromPositions(i,this.range.getEndPosition());return new be(l,o)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=bn(n,r),i=Pe.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),o=r.substring(0,r.length-s),l=R.fromPositions(this.range.getStartPosition(),i);return new be(l,o)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function zt(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return R.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new Y("start must be before end");return new R(t.lineNumber,t.column,e.lineNumber,e.column)}class ce{static inverse(e,n,r){const s=[];let i=1,o=1;for(const u of e){const c=new ce(new z(i,u.original.startLineNumber),new z(o,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}const l=new ce(new z(i,n+1),new z(o,r+1));return l.modified.isEmpty||s.push(l),s}static clip(e,n,r){const s=[];for(const i of e){const o=i.original.intersect(n),l=i.modified.intersect(r);o&&!o.isEmpty&&l&&!l.isEmpty&&s.push(new ce(o,l))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ce(this.modified,this.original)}join(e){return new ce(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new he(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Y("not a valid diff");return new he(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new he(new R(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new R(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(js(this.original.endLineNumberExclusive,e)&&js(this.modified.endLineNumberExclusive,n))return new he(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new he(R.fromPositions(new q(this.original.startLineNumber,1),et(new q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(new q(this.modified.startLineNumber,1),et(new q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new he(R.fromPositions(et(new q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),et(new q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(et(new q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),et(new q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Y}}function et(t,e){if(t.lineNumber<1)return new q(1,1);if(t.lineNumber>e.length)return new q(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new q(t.lineNumber,n.length+1):t}function js(t,e){return t>=1&&t<=e.length}class Ce extends ce{static fromRangeMappings(e){const n=z.join(e.map(s=>z.fromRangeInclusive(s.originalRange))),r=z.join(e.map(s=>z.fromRangeInclusive(s.modifiedRange)));return new Ce(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new Ce(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Ce(this.original,this.modified,[this.toRangeMapping()])}}class he{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((s,i)=>new he(s.range,n[i]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],s=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new Y("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new he(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new be(this.originalRange,n)}}function Vn(t,e,n,r=!1){const s=[];for(const i of oo(t.map(o=>bo(o,e,n)),(o,l)=>o.original.intersectsOrTouches(l.original)||o.modified.intersectsOrTouches(l.modified))){const o=i[0],l=i[i.length-1];s.push(new Ce(o.original.join(l.original),o.modified.join(l.modified),i.map(u=>u.innerChanges[0])))}return ht(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.line
Line truncated
|
||||
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=s}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<r;s++)n+=Math.abs((this.histogram[s]??0)-(e.histogram[s]??0));return 1-n/(this.totalCount+e.totalCount)}};Nt.chrKeys=new Map;let Ot=Nt;class No{compute(e,n,r=Lt.instance,s){if(e.length===0||n.length===0)return Ae.trivial(e,n);const i=new Un(e.length,n.length),o=new Un(e.length,n.length),l=new Un(e.length,n.length);for(let g=0;g<e.length;g++)for(let d=0;d<n.length;d++){if(!r.isValid())return Ae.trivialTimedOut(e,n);const w=g===0?0:i.get(g-1,d),_=d===0?0:i.get(g,d-1);let v;e.getElement(g)===n.getElement(d)?(g===0||d===0?v=0:v=i.get(g-1,d-1),g>0&&d>0&&o.get(g-1,d-1)===3&&(v+=l.get(g-1,d-1)),v+=s?s(g,d):1):v=-1;const L=Math.max(w,_,v);if(L===v){const k=g>0&&d>0?l.get(g-1,d-1):0;l.set(g,d,k+1),o.set(g,d,3)}else L===w?(l.set(g,d,0),o.set(g,d,1)):L===_&&(l.set(g,d,0),o.set(g,d,2));i.set(g,d,L)}const u=[];let c=e.length,h=n.length;function m(g,d){(g+1!==c||d+1!==h)&&u.push(new Q(new T(g+1,c),new T(d+1,h))),c=g,h=d}let f=e.length-1,p=n.length-1;for(;f>=0&&p>=0;)o.get(f,p)===3?(m(f,p),f--,p--):o.get(f,p)===1?f--:p--;return m(-1,-1),u.reverse(),new Ae(u,!1)}}class Js{compute(e,n,r=Lt.instance){if(e.length===0||n.length===0)return Ae.trivial(e,n);const s=e,i=n;function o(d,w){for(;d<s.length&&w<i.length&&s.getElement(d)===i.getElement(w);)d++,w++;return d}let l=0;const u=new So;u.set(0,o(0,0));const c=new Ro;c.set(0,u.get(0)===0?null:new Ys(null,0,0,u.get(0)));let h=0;e:for(;;){if(l++,!r.isValid())return Ae.trivialTimedOut(s,i);const d=-Math.min(l,i.length+l%2),w=Math.min(l,s.length+l%2);for(h=d;h<=w;h+=2){const _=h===w?-1:u.get(h+1),v=h===d?-1:u.get(h-1)+1,L=Math.min(Math.max(_,v),s.length),k=L-h;if(L>s.length||k>i.length)continue;const D=o(L,k);u.set(h,D);const W=L===_?c.get(h+1):c.get(h-1);if(c.set(h,D!==L?new Ys(W,L,k,D-L):W),u.get(h)===s.length&&u.get(h)-h===i.length)break e}}let m=c.get(h);const f=[];let p=s.length,g=i.length;for(;;){const d=m?m.x+m.length:0,w=m?m.y+m.length:0;if((d!==p||w!==g)&&f.push(new Q(new T(d,p),new T(w,g))),!m)break;p=m.x,g=m.y,m=m.prev}return f.reverse(),new Ae(f,!1)}}class Ys{constructor(e,n,r,s){this.prev=e,this.x=n,this.y=r,this.length=s}}class So{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Ro{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class jt{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=e[s-1],o=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,i=i.substring(o)),this.lineStartOffsets.push(o);let l=0;if(!r){const c=i.trimStart();l=i.length-c.length,i=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const u=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-l,i.length):i.length;for(let c=0;c<u;c++)this.elements.push(i.charCodeAt(c));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new T(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=ei(e>0?this.elements[e-1]:-1),r=ei(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let s=0;return n!==r&&(s+=10,n===0&&r===1&&(s+=1)),s+=Ks(n),s+=Ks(r),s}translateOffset(e,n="right"){const r=Ke(this.firstElementOffsetByLineIdx,i=>i<=e),s=e-this.firstElementOffsetByLineIdx[r];return new q(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?R.fromPositions(r,r):R.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!nt(this.elements[e]))return;let n=e;for(;n>0&&nt(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&nt(this.elements[r]);)r++;return new T(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!nt(this.elements[e]))return;l
Line truncated
|
||||
`).length>=15&&Eo(m,p=>p.length>=2)>=2}),o=To(t,o),o}function Eo(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function ko(t,e,n,r){const s=[],i=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Ot(u.original,e,u)),o=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Ot(u.modified,n,u))),l=new Set;for(const u of i){let c=-1,h;for(const m of o){const f=u.computeSimilarity(m);f>c&&(c=f,h=m)}if(c>.9&&h&&(o.delete(h),s.push(new ce(u.range,h.range)),l.add(u.source),l.add(h.source)),!r.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function Mo(t,e,n,r,s,i){const o=[],l=new Qa;for(const f of t)for(let p=f.original.startLineNumber;p<f.original.endLineNumberExclusive-2;p++){const g=`${e[p-1]}:${e[p+1-1]}:${e[p+2-1]}`;l.add(g,{range:new z(p,p+3)})}const u=[];t.sort(Ye(f=>f.modified.startLineNumber,xt));for(const f of t){let p=[];for(let g=f.modified.startLineNumber;g<f.modified.endLineNumberExclusive-2;g++){const d=`${n[g-1]}:${n[g+1-1]}:${n[g+2-1]}`,w=new z(g,g+3),_=[];l.forEach(d,({range:v})=>{for(const k of p)if(k.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&k.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){k.originalLineRange=new z(k.originalLineRange.startLineNumber,v.endLineNumberExclusive),k.modifiedLineRange=new z(k.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),_.push(k);return}const L={modifiedLineRange:w,originalLineRange:v};u.push(L),_.push(L)}),p=_}if(!i.isValid())return[]}u.sort(ho(Ye(f=>f.modifiedLineRange.length,xt)));const c=new ye,h=new ye;for(const f of u){const p=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,g=c.subtractFrom(f.modifiedLineRange),d=h.subtractFrom(f.originalLineRange).getWithDelta(p),w=g.getIntersection(d);for(const _ of w.ranges){if(_.length<3)continue;const v=_,L=_.delta(-p);o.push(new ce(L,v)),c.addRange(v),h.addRange(L)}}o.sort(Ye(f=>f.original.startLineNumber,xt));const m=new Ut(t);for(let f=0;f<o.length;f++){const p=o[f],g=m.findLastMonotonous(W=>W.original.startLineNumber<=p.original.startLineNumber),d=Ze(t,W=>W.modified.startLineNumber<=p.modified.startLineNumber),w=Math.max(p.original.startLineNumber-g.original.startLineNumber,p.modified.startLineNumber-d.modified.startLineNumber),_=m.findLastMonotonous(W=>W.original.startLineNumber<p.original.endLineNumberExclusive),v=Ze(t,W=>W.modified.startLineNumber<p.modified.endLineNumberExclusive),L=Math.max(_.original.endLineNumberExclusive-p.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-p.modified.endLineNumberExclusive);let k;for(k=0;k<w;k++){const W=p.original.startLineNumber-k-1,x=p.modified.startLineNumber-k-1;if(W>r.length||x>s.length||c.contains(x)||h.contains(W)||!ti(r[W-1],s[x-1],i))break}k>0&&(h.addRange(new z(p.original.startLineNumber-k,p.original.startLineNumber)),c.addRange(new z(p.modified.startLineNumber-k,p.modified.startLineNumber)));let D;for(D=0;D<L;D++){const W=p.original.endLineNumberExclusive+D,x=p.modified.endLineNumberExclusive+D;if(W>r.length||x>s.length||c.contains(x)||h.contains(W)||!ti(r[W-1],s[x-1],i))break}D>0&&(h.addRange(new z(p.original.endLineNumberExclusive,p.original.endLineNumberExclusive+D)),c.addRange(new z(p.modified.endLineNumberExclusive,p.modified.endLineNumberExclusive+D))),(k>0||D>0)&&(o[f]=new ce(new z(p.original.startLineNumber-k,p.original.endLineNumberExclusive+D),new z(p.modified.startLineNumber-k,p.modified.endLineNumberExclusive+D)))}return o}function ti(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const s=new Js().compute(new jt([t],new R(1,1,1,t.length),!1),new jt([e],new R(1,1,1,e.length),!1),n);let i=0;const o=Q.invert(s.diffs,t.length);for(const h of o)h.seq1Range.forEach(m=>{$n(t.charCodeAt(m))||i++});function l(h){let m=0;for(let f=0;f<t.length;f++)$n(h.charCodeAt(f))||m++;return m}const u=l(t.length>e.length?t:e);return i/u>.6&&u>10}function Po(t){if(t.length===0)return t;t.sort(Ye(n=>n.original.startLineNumber,xt));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],s=t[n],i=s.original.startLineNumber-r.original.endLineNumberExclusive,o=s.modified.startLineNumber-r.modified.endLineNumberExclusive;if(i>=0&&o>=0&&i+o<=2){e[e.length-1]=r.join(s);continue}e.push(s)}return e}function To(t,e){const n=new Ut(t);return e=e.filter(r=>{const s=n.findLastMonotonous(l=>l.original.startLineNumber<r.original.endLineNumberExclusive)||new ce(new z(1,1),new z(1,1)),i=Ze(t,l=>l.modified.startLineNumber<r.modified.endLineNumberExclusive);return s!==i}),e}function ni(t,e,n){let r=n;return r=ri(t,e,r),r=ri(t,e,r),r=Fo(t,e,r),r}function ri(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let i=1;i<n.length;i++){const o=r[r.length-1];let l=n[i];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const u=l.seq1Range.start-o.seq1Range.endExclusive;let c;for(c=1;c<=u&&!(t.getElement(l.seq1Range.start-c)!==t.getElement(l.seq1Range.endExclusive-c)||e.getElement(l.seq2Range.
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function oi(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class qo{constructor(){this.dynamicProgrammingDiffing=new No,this.myersDiffingAlgorithm=new Js}computeDiff(e,n,r){if(e.length<=1&&ao(e,n,(x,y)=>x===y))return new wt([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new wt([new Ce(new z(1,e.length+1),new z(1,n.length+1),[new he(new R(1,1,e.length,e[e.length-1].length+1),new R(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=r.maxComputationTimeMs===0?Lt.instance:new vo(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,o=new Map;function l(x){let y=o.get(x);return y===void 0&&(y=o.size,o.set(x,y)),y}const u=e.map(x=>l(x.trim())),c=n.map(x=>l(x.trim())),h=new ai(u,e),m=new ai(c,n),f=h.length+m.length<1700?this.dynamicProgrammingDiffing.compute(h,m,s,(x,y)=>e[x]===n[y]?n[y].length===0?.1:1+Math.log(1+n[y].length):.99):this.myersDiffingAlgorithm.compute(h,m,s);let p=f.diffs,g=f.hitTimeout;p=ni(h,m,p),p=Vo(h,m,p);const d=[],w=x=>{if(i)for(let y=0;y<x;y++){const S=_+y,V=v+y;if(e[S]!==n[V]){const U=this.refineDiff(e,n,new Q(new T(S,S+1),new T(V,V+1)),s,i,r);for(const B of U.mappings)d.push(B);U.hitTimeout&&(g=!0)}}};let _=0,v=0;for(const x of p){ht(()=>x.seq1Range.start-_===x.seq2Range.start-v);const y=x.seq1Range.start-_;w(y),_=x.seq1Range.endExclusive,v=x.seq2Range.endExclusive;const S=this.refineDiff(e,n,x,s,i,r);S.hitTimeout&&(g=!0);for(const V of S.mappings)d.push(V)}w(e.length-_);const L=new $t(e),k=new $t(n),D=Vn(d,L,k);let W=[];return r.computeMoves&&(W=this.computeMoves(D,e,n,u,c,s,i,r)),ht(()=>{function x(S,V){if(S.lineNumber<1||S.lineNumber>V.length)return!1;const U=V[S.lineNumber-1];return!(S.column<1||S.column>U.length+1)}function y(S,V){return!(S.startLineNumber<1||S.startLineNumber>V.length+1||S.endLineNumberExclusive<1||S.endLineNumberExclusive>V.length+1)}for(const S of D){if(!S.innerChanges)return!1;for(const V of S.innerChanges)if(!(x(V.modifiedRange.getStartPosition(),n)&&x(V.modifiedRange.getEndPosition(),n)&&x(V.originalRange.getStartPosition(),e)&&x(V.originalRange.getEndPosition(),e)))return!1;if(!y(S.modified,n)||!y(S.original,e))return!1}return!0}),new wt(D,W,g)}computeMoves(e,n,r,s,i,o,l,u){return Ao(e,n,r,s,i,o).map(m=>{const f=this.refineDiff(n,r,new Q(m.original.toOffsetRange(),m.modified.toOffsetRange()),o,l,u),p=Vn(f.mappings,new $t(n),new $t(r),!0);return new Ws(m,p)})}refineDiff(e,n,r,s,i,o){const u=Uo(r).toRangeMapping2(e,n),c=new jt(e,u.originalRange,i),h=new jt(n,u.modifiedRange,i),m=c.length+h.length<500?this.dynamicProgrammingDiffing.compute(c,h,s):this.myersDiffingAlgorithm.compute(c,h,s);let f=m.diffs;return f=ni(c,h,f),f=ii(c,h,f,(g,d)=>g.findWordContaining(d)),o.extendToSubwords&&(f=ii(c,h,f,(g,d)=>g.findSubWordContaining(d),!0)),f=Do(c,h,f),f=Bo(c,h,f),{mappings:f.map(g=>new he(c.translateRange(g.seq1Range),h.translateRange(g.seq2Range))),hitTimeout:m.hitTimeout}}}function Uo(t){return new ce(new z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var Te;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(Te||(Te={}));const $o="tkn";class Wo{constructor(){this._hosts=Object.create(null),this._ports=Object.creat
Line truncated
|
||||
`)),i=new Wt(n.join(`
|
||||
`)),o=this._computer.computeDiff(s.value,i.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),l=s.getTransformer(),u=i.getTransformer(),c=[];let h=0;for(const p of o.edits.replacements){const g=p.range.start+h,d=g+p.newText.length,w=l.getRange(new T(p.range.start,p.range.endExclusive)),_=u.getRange(new T(g,d));c.push(new he(w,_)),h+=p.newText.length-(p.range.endExclusive-p.range.start)}const m=Vn(c,s,i),f=[];if(r.computeMoves)for(const p of o.moves){const g=l.getPosition(p.range.original.start),d=l.getPosition(p.range.original.endExclusive),w=u.getPosition(p.range.modified.start),_=u.getPosition(p.range.modified.endExclusive),v=new z(g.lineNumber,d.lineNumber),L=new z(w.lineNumber,_.lineNumber);f.push(new Ws(new ce(v,L),[]))}return new wt(m,f,o.hitTimeout)}}const Xt={getLegacy:()=>new xo,getDefault:()=>new qo,getAdvancedExternal:()=>ci(!1),getAdvancedWasm:()=>ci(!0)};function De(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class b{constructor(e,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class fe{constructor(e,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=De(Math.max(Math.min(1,n),0),3),this.l=De(Math.max(Math.min(1,r),0),3),this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=e.a,o=Math.max(n,r,s),l=Math.min(n,r,s);let u=0,c=0;const h=(l+o)/2,m=o-l;if(m>0){switch(c=Math.min(h<=.5?m/(2*h):m/(2-2*h),1),o){case n:u=(r-s)/m+(r<s?6:0);break;case r:u=(s-n)/m+2;break;case s:u=(n-r)/m+4;break}u*=60,u=Math.round(u)}return new fe(u,c,h,i)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:s,a:i}=e;let o,l,u;if(r===0)o=l=u=s;else{const c=s<.5?s*(1+r):s+r-s*r,h=2*s-c;o=fe._hue2rgb(h,c,n+1/3),l=fe._hue2rgb(h,c,n),u=fe._hue2rgb(h,c,n-1/3)}return new b(Math.round(o*255),Math.round(l*255),Math.round(u*255),i)}}class rt{constructor(e,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=De(Math.max(Math.min(1,n),0),3),this.v=De(Math.max(Math.min(1,r),0),3),this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),l=i-o,u=i===0?0:l/i;let c;return l===0?c=0:i===n?c=((r-s)/l%6+6)%6:i===r?c=(s-n)/l+2:c=(n-r)/l+4,new rt(Math.round(c*60),u,i,e.a)}static toRGBA(e){const{h:n,s:r,v:s,a:i}=e,o=s*r,l=o*(1-Math.abs(n/60%2-1)),u=s-o;let[c,h,m]=[0,0,0];return n<60?(c=o,h=l):n<120?(c=l,h=o):n<180?(h=o,m=l):n<240?(h=l,m=o):n<300?(c=l,m=o):n<=360&&(c=o,m=l),c=Math.round((c+u)*255),h=Math.round((h+u)*255),m=Math.round((m+u)*255),new b(c,h,m,i)}}const O=class O{static fromHex(e){return O.Format.CSS.parseHex(e)||O.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:fe.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:rt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof b)this.rgba=e;else if(e instanceof fe)this._hsla=e,this.rgba=fe.toRGBA(e);else if(e instanceof rt)this._hsva=e,this.rgba=rt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&b.equals(this.rgba,e.rgba)&&fe.equals(this.hsla,e.hsla)&&rt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=O._relativeLuminanceForComponent(this.rgba.r),n=O._relativeLuminanceForComponent(this.rgba.g),r=O._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*n+.0722*r;return De(s,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n<r}lighten(e){return new O(new fe(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new O(new fe(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:r,b:s,a:i}=this.rgba;return new O(new b(n,r,s,i*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new O(new b(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const r=Math.min(Math.max(n,0),1),s=this.rgba,i=e.rgba,o=s.r+(i.r-s.r)*r,l=s.g+(i.g-s.g)*r,u=s.b+(i.b-s.b)*r,c=s.a+(i.a-s.a)*r;return new O(new b(o,l,u,c))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:r,b:s,a:i}=this.rgba;return new O(new b(e.rgba.r-i*(e.rgba.r-n),e.rgba.g-i*(e.rgba.g-r),e.rgba.b-i*(e.rgba.
Line truncated
|
||||
`);i.lastIndex=0;let h;for(;(h=i.exec(c))!==null;){const m=c.substring(0,h.index),f=(m.match(/\n/g)||[]).length,p=o+f,g=h[0].split(`
|
||||
`),d=g.length,w=p+d-1,_=m.lastIndexOf(`
|
||||
`)+1,v=h.index-_+1,L=g[g.length-1],k=d===1?v+h[0].length:L.length+1,D={startLineNumber:p,startColumn:v,endLineNumber:w,endColumn:k},W=(h.groups??{}).label??"",x=((h.groups??{}).separator??"")!=="",y={range:D,text:W,hasSeparatorLine:x,shouldBeInComments:!0};(y.text||y.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<y.range.startLineNumber)&&n.push(y),i.lastIndex=h.index+h[0].length}}return n}function l1(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(r1,""),{text:t,hasSeparatorLine:e}}class gi{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Kn)}}var pi;(function(t){async function e(r){let s;const i=await Promise.all(r.map(o=>o.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return i}t.settled=e;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(o){i(o)}})}t.withAsyncBody=n})(pi||(pi={}));class u1{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new Y("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new gi;return this._unsatisfiedConsumers.push(e),e.p}}}const re=class re{constructor(e,n){this._onReturn=n,this._producerConsumer=new u1,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(const i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(e){return new re(n=>{n.emitMany(e)})}static fromPromise(e){return new re(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new re(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new re(async n=>{await Promise.all(e.map(async r=>{for await(const s of r)n.emitOne(s)}))})}static map(e,n){return new re(async r=>{for await(const s of e)r.emitOne(n(s))})}static tee(e){let n,r;const s=new gi,i=async()=>{if(!(!n||!r))try{for await(const u of e)n.emitOne(u),r.emitOne(u)}catch(u){n.reject(u),r.reject(u)}finally{s.complete()}},o=new re(async u=>(n=u,i(),s.p)),l=new re(async u=>(r=u,i(),s.p));return[o,l]}map(e){return re.map(this,e)}static coalesce(e){return re.filter(e,n=>!!n)}coalesce(){return re.coalesce(this)}static filter(e,n){return new re(async r=>{for await(const s of e)n(s)&&r.emitOne(s)})}filter(e){return re.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};re.EMPTY=re.fromArray([]);let bi=re;class c1{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Qe(e);const r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+i),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Qe(e),n=Qe(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=Qe(e),n=Qe(n);const r=this.values,s=this.prefixSum;if(e>=r.length)return!1;const i=r.length-e;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(r.length-
Line truncated
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
(function(){"use strict";class pi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ze.isErrorNoTelemetry(e)?new ze(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Jn=new pi;function Rt(t){Yn(t)||Jn.onUnexpectedError(t)}function bi(t){Yn(t)||Jn.onUnexpectedExternalError(t)}function Kt(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:ze.isErrorNoTelemetry(t),cause:r?Kt(r):void 0,code:t.code}}return t}const en="Canceled";function Yn(t){return t instanceof Zn?!0:t instanceof Error&&t.name===en&&t.message===en}class Zn extends Error{constructor(){super(en),this.name=this.message}}class ze extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof ze)return e;const n=new ze;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Y extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Y.prototype)}}function wi(t,e="Unreachable"){throw new Error(e)}function xi(t,e="unexpected state"){if(!t)throw typeof e=="string"?new Y(`Assertion Failed: ${e}`):e}function ht(t){if(!t()){debugger;t(),Rt(new Y("Assertion Failed"))}}function tn(t,e){let n=0;for(;n<t.length-1;){const r=t[n],s=t[n+1];if(!e(r,s))return!1;n++}return!0}function yi(t){return typeof t=="string"}function Li(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Ct;(function(t){function e(x){return!!x&&typeof x=="object"&&typeof x[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*s(x){yield x}t.single=s;function i(x){return e(x)?x:s(x)}t.wrap=i;function o(x){return x??n}t.from=o;function*l(x){for(let y=x.length-1;y>=0;y--)yield x[y]}t.reverse=l;function u(x){return!x||x[Symbol.iterator]().next().done===!0}t.isEmpty=u;function c(x){return x[Symbol.iterator]().next().value}t.first=c;function m(x,y){let S=0;for(const V of x)if(y(V,S++))return!0;return!1}t.some=m;function h(x,y){let S=0;for(const V of x)if(!y(V,S++))return!1;return!0}t.every=h;function f(x,y){for(const S of x)if(y(S))return S}t.find=f;function*p(x,y){for(const S of x)y(S)&&(yield S)}t.filter=p;function*g(x,y){let S=0;for(const V of x)yield y(V,S++)}t.map=g;function*d(x,y){let S=0;for(const V of x)yield*y(V,S++)}t.flatMap=d;function*w(...x){for(const y of x)Li(y)?yield*y:yield y}t.concat=w;function _(x,y,S){let V=S;for(const U of x)V=y(V,U);return V}t.reduce=_;function v(x){let y=0;for(const S of x)y++;return y}t.length=v;function*L(x,y,S=x.length){for(y<-x.length&&(y=0),y<0&&(y+=x.length),S<0?S+=x.length:S>x.length&&(S=x.length);y<S;y++)yield x[y]}t.slice=L;function k(x,y=Number.POSITIVE_INFINITY){const S=[];if(y===0)return[S,x];const V=x[Symbol.iterator]();for(let U=0;U<y;U++){const B=V.next();if(B.done)return[S,t.empty()];S.push(B.value)}return[S,{[Symbol.iterator](){return V}}]}t.consume=k;async function D(x){const y=[];for await(const S of x)y.push(S);return y}t.asyncToArray=D;async function W(x){let y=[];for await(const S of x)y=y.concat(S);return y}t.asyncToArrayFlat=W})(Ct||(Ct={}));function b1(t,e){}function Kn(t){if(Ct.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function _i(...t){return mt(()=>Kn(t))}class vi{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function mt(t){return new vi(t)}const Xt=class Xt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Kn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Ie.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Xt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Xt.DISABLE_DISPOSED_WARNING=!1;let ft=Xt;const Xn=class Xn{constructor(){this._store=new ft,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Xn.None=Object.freeze({dispose(){}});let Ie=Xn;const it=class it{constructor(e){this.element=e,this.next=it.Undefined,this.prev=it.Undefined}};it.Undefined=new it(void 0);let X=it;class Ni{constructor(){this._first=X.Undefined,this._last=X.Unde
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class Pt extends Error{constructor(e,n,r,s,i){super(i?`[${i}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=s,this.details=n,this.stack=r}static is(e){return e instanceof Pt||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class Ui extends Pt{constructor(e,n,r,s,i){super(e,n,r,s,i),this.name="ListenerRefusalError"}}class mn{constructor(e){this.value=e}}const $i=2;class ge{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new hn(e?.onListenerError??Rt,this._options?.leakWarningThreshold??qi,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new cn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=u[1]/this._size>.3?"dominated":"popular",m=new Ui(c,`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||Rt)(m),Ie.None}if(this._disposed)return Ie.None;n&&(e=e.bind(n));const s=new mn(e);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Mt.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof mn?(this._deliveryQueue??=new Wi,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const o=mt(()=>{i?.(),this._removeListener(s)});return fn(o,r),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const s=this._deliveryQueue.current===this;if(this._size*$i<=n.length){let i=0;for(let o=0;o<n.length;o++)n[o]?n[i++]=n[o]:s&&i<this._deliveryQueue.end&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=i}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||Rt;if(!r){e.value(n);return}try{e.value(n)}catch(s){r(s)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof mn)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class Wi{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function fn(t,e){e instanceof ft?e.add(t):Array.isArray(e)&&e.push(t)}function or(t,e){if(e instanceof ft)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function Hi(t){return t}class zi{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Hi):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var Ve;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(Ve||(Ve={}));class dn{constructor(e){this.executor=e,this._state=Ve.Uninitialized}get value(){if(this._state===Ve.Uninitialized){this._state=Ve.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=Ve.Completed}}else if(this._state===Ve.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Oi(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function ji(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Gi(t){re
Line truncated
|
||||
`||t===" "}class wt{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Us{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function io(t,e,n=(r,s)=>r===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function*ao(t,e){let n,r;for(const s of t)r!==void 0&&e(r,s)?n.push(s):(n&&(yield n),n=[s]),r=s;n&&(yield n)}function oo(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function lo(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function uo(t,e){for(const n of e)t.push(n)}var Dn;(function(t){function e(i){return i<0}t.isLessThan=e;function n(i){return i<=0}t.isLessThanOrEqual=n;function r(i){return i>0}t.isGreaterThan=r;function s(i){return i===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Dn||(Dn={}));function Ye(t,e){return(n,r)=>e(t(n),t(r))}const xt=(t,e)=>t-e;function co(t){return(e,n)=>-t(e,n)}const ut=class ut{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new ut(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new ut(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(s=>((r||Dn.isGreaterThan(e(s,n)))&&(r=!1,n=s),!0)),n}};ut.empty=new ut(e=>{});let $s=ut;class T{static fromTo(e,n){return new T(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let s=r;for(;s<n.length&&n[s].start<=e.endExclusive;)s++;if(r===s)n.splice(r,0,e);else{const i=Math.min(e.start,n[r].start),o=Math.max(e.endExclusive,n[s-1].endExclusive);n.splice(r,s-r,new T(i,o))}}static tryCreate(e,n){if(!(e>n))return new T(e,n)}static ofLength(e){return new T(0,e)}static ofStartAndLength(e,n){return new T(e,e+n)}static emptyAt(e){return new T(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new Y(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new T(this.start+e,this.endExclusive+e)}deltaStart(e){return new T(this.start+e,this.endExclusive)}deltaEnd(e){return new T(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new T(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new T(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Y(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new Y(`Invalid join: ${this.toString()} and ${e.toString()}`);return new T(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new T(this.start-e,this.endExclusive+n)}}function Ze(t,e){const n=Ke(t,e);return n===-1?void 0:t[n]}function Ke(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const o=Math.floor((s+i)/2);e(t[o])?s=o+1:i=o}return s-1}function ho(t,e){const n=In(t,e);return n===t.length?void 0:t[n]}function In(t,e,n=0,r=t.length){let s=n,i=r;for(;s<i;){const o=Math.floor((s+i)/2);e(t[o])?i=o:s=o+1}return s}const Yt=class Yt{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Yt.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=Ke(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Yt.assertInvariants=!1;let qt=Yt;const me=class me{static ofLength(e,n){return new me(e,e+n)}static fromRange(e){return new me(e.sta
Line truncated
|
||||
`?(n++,r=0):r++;return new we(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new we(this.lineCount,this.columnCount+e.columnCount):new we(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new R(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new R(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new R(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new q(e.lineNumber,e.column+this.columnCount):new q(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};we.zero=new we(0,0);let Pe=we;class mo{getOffsetRange(e){return new T(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return R.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new qe.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new qe.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new qe.deps.TextEdit(n)}}const Qn=class Qn{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Qn._deps=void 0;let qe=Qn;function fo(t){qe._deps=t}class Ws extends mo{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new q(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const s=this.getLineLength(n);return new q(n,s+1)}if(e.column<1)return new q(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new q(e.lineNumber,r+1):e}getPosition(e){const n=Ke(this.lineStartOffsetByLineIdx,i=>i<=e),r=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new q(r,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new qe.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Hs{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new q(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Ws(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER))}}class go extends Hs{constructor(e,n){xi(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Pe(this._lineCount-1,e.length)}}class Ut extends go{constructor(e){super(n=>e[n-1],e.length)}}class $t extends Hs{constructor(e){super(),this.value=e,this._t=new Ws(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}class Wt{static fromStringEdit(e,n){const r=e.replacements.map(s=>be.fromStringReplacement(s,n));return new Wt(r)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort(Ye(r=>r.range,R.compareRangesUsingStarts));return new Wt(n)}constructor(e){this.replacements=e,ht(()=>tn(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,s=0;for(const i of this.replacements){const o=i.range.getStartPosition();if(e.isBeforeOrEqual(o))break;const l=i.range.getEndPosition(),u=Pe.ofText(i.text);if(e.isBefore(l)){const c=new q(o.lineNumber+n,o.column+(o.lineNumber+n===r?s:0)),m=u.addToPosition(c);return Ht(c,m)}o.lineNumber+n!==r&&(s=0),n+=u.lineCount-(i.range.endLineNumber-i.range.startLineNumber),u.lineCount===0?l.lineNumber!==o.lineNumber?s+=u.columnCount-(l.column-1):s+=u.columnCount-(l.column-o.column):s=u.columnCount,r=l.lineNumber+n}return new q(e.lineNumber+n,e.column+(e.lineNumber+n===r?s:0))}mapRange(e){function n(o){return o instanceof q?o:o.getStartPosition()}function r(o){return o instanceof q?o:o.getEndPosition()}const s=n(this.mapPosition(e.getStartPosition())),i=r(this.mapPosition(e.getEndPosition()));return Ht(s,i)}apply(e){let n="",r=new q(1,1);for(const i of this.replacements){const o=i.range,l=o.getStartPosition(),u=o.getEndPosition(),c=Ht(r,l);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=i.text,r=u}const s=Ht(r,e.endPositionExclusive);return s.isEmpty()||(n+=e.getValueOfRange(s)),n}applyToString(e){const n=new $t(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,r=0,s=0;for(const i of this.replacements){const o=Pe.ofText(i.text),l=q.lift({lineNumber:i.range.startLineNumber+r,column:i.range.startColumn+(i.range.startLineNumber===n?s:0)}),u=o.createRange(l);e.push(u),r=u.endLineNumber-i.range.endLineNumber,s=u.endColumn-i.range.endColumn,n=i.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Y;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition();let s="";for(let i=0;i<this.replacements.length;i++){const o=this.replacements[i];if(s+=o.text,i<this.replacements.length-1){const l=this.replacements[i+1],u=R.fromPositions(o.range.getEndPosition(),l.range.getStartPosition()),c=e.getValueOfRange(u);s+=c}}return new be(R.fromPositions(n,r),s)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new $t(e)):this.replacements.length===0?"":this.replacements.map(n=>{const s=e.getValueOfRange(n.range),i=R.fromPositions(new q(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let o=e.getValueOfRange(i);o.length>10&&(o="..."+o.substring(o.length-10));const l=R.fromPositions(n.range.getEndPosition(),new q(n.range.endLineNumber+1,1));let u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let c=s;if(c.length>10){const h=Math.floor(5);c=c.substring(0,h)+"..."+c.substring(c.length-h)}let m=n.text;if(m.length>10){const h=Math.floor(5);m=m.substring(0,h)+"..."+m.substring(m.length-h)}return c.length===0?`${o}❰${m}❱${u}`:`${o}❰${c}↦${m}❱${u}`}).join(`
|
||||
`)}}class be{static joinReplacements(e,n){if(e.length===0)throw new Y;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let i="";for(let o=0;o<e.length;o++){const l=e[o];if(i+=l.text,o<e.length-1){const u=e[o+1],c=R.fromPositions(l.range.getEndPosition(),u.range.getStartPosition()),m=n.getValueOfRange(c);i+=m}}return new be(R.fromPositions(r,s),i)}static fromStringReplacement(e,n){return new be(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new be(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return be.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=gn(n,r),i=Pe.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),o=r.substring(s),l=R.fromPositions(i,this.range.getEndPosition());return new be(l,o)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=pn(n,r),i=Pe.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),o=r.substring(0,r.length-s),l=R.fromPositions(this.range.getStartPosition(),i);return new be(l,o)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function Ht(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return R.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new Y("start must be before end");return new R(t.lineNumber,t.column,e.lineNumber,e.column)}class ce{static inverse(e,n,r){const s=[];let i=1,o=1;for(const u of e){const c=new ce(new z(i,u.original.startLineNumber),new z(o,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}const l=new ce(new z(i,n+1),new z(o,r+1));return l.modified.isEmpty||s.push(l),s}static clip(e,n,r){const s=[];for(const i of e){const o=i.original.intersect(n),l=i.modified.intersect(r);o&&!o.isEmpty&&l&&!l.isEmpty&&s.push(new ce(o,l))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ce(this.modified,this.original)}join(e){return new ce(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new he(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Y("not a valid diff");return new he(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new he(new R(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new R(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(zs(this.original.endLineNumberExclusive,e)&&zs(this.modified.endLineNumberExclusive,n))return new he(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new he(R.fromPositions(new q(this.original.startLineNumber,1),et(new q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(new q(this.modified.startLineNumber,1),et(new q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new he(R.fromPositions(et(new q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),et(new q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(et(new q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),et(new q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Y}}function et(t,e){if(t.lineNumber<1)return new q(1,1);if(t.lineNumber>e.length)return new q(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new q(t.lineNumber,n.length+1):t}function zs(t,e){return t>=1&&t<=e.length}class Ce extends ce{static fromRangeMappings(e){const n=z.join(e.map(s=>z.fromRangeInclusive(s.originalRange))),r=z.join(e.map(s=>z.fromRangeInclusive(s.modifiedRange)));return new Ce(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new Ce(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Ce(this.original,this.modified,[this.toRangeMapping()])}}class he{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((s,i)=>new he(s.range,n[i]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],s=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new Y("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new he(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new be(this.originalRange,n)}}function Vn(t,e,n,r=!1){const s=[];for(const i of ao(t.map(o=>po(o,e,n)),(o,l)=>o.original.intersectsOrTouches(l.original)||o.modified.intersectsOrTouches(l.modified))){const o=i[0],l=i[i.length-1];s.push(new Ce(o.original.join(l.original),o.modified.join(l.modified),i.map(u=>u.innerChanges[0])))}return ht(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.line
Line truncated
|
||||
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=s}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<r;s++)n+=Math.abs((this.histogram[s]??0)-(e.histogram[s]??0));return 1-n/(this.totalCount+e.totalCount)}};Nt.chrKeys=new Map;let zt=Nt;class vo{compute(e,n,r=Lt.instance,s){if(e.length===0||n.length===0)return Ae.trivial(e,n);const i=new Un(e.length,n.length),o=new Un(e.length,n.length),l=new Un(e.length,n.length);for(let g=0;g<e.length;g++)for(let d=0;d<n.length;d++){if(!r.isValid())return Ae.trivialTimedOut(e,n);const w=g===0?0:i.get(g-1,d),_=d===0?0:i.get(g,d-1);let v;e.getElement(g)===n.getElement(d)?(g===0||d===0?v=0:v=i.get(g-1,d-1),g>0&&d>0&&o.get(g-1,d-1)===3&&(v+=l.get(g-1,d-1)),v+=s?s(g,d):1):v=-1;const L=Math.max(w,_,v);if(L===v){const k=g>0&&d>0?l.get(g-1,d-1):0;l.set(g,d,k+1),o.set(g,d,3)}else L===w?(l.set(g,d,0),o.set(g,d,1)):L===_&&(l.set(g,d,0),o.set(g,d,2));i.set(g,d,L)}const u=[];let c=e.length,m=n.length;function h(g,d){(g+1!==c||d+1!==m)&&u.push(new Q(new T(g+1,c),new T(d+1,m))),c=g,m=d}let f=e.length-1,p=n.length-1;for(;f>=0&&p>=0;)o.get(f,p)===3?(h(f,p),f--,p--):o.get(f,p)===1?f--:p--;return h(-1,-1),u.reverse(),new Ae(u,!1)}}class Xs{compute(e,n,r=Lt.instance){if(e.length===0||n.length===0)return Ae.trivial(e,n);const s=e,i=n;function o(d,w){for(;d<s.length&&w<i.length&&s.getElement(d)===i.getElement(w);)d++,w++;return d}let l=0;const u=new No;u.set(0,o(0,0));const c=new So;c.set(0,u.get(0)===0?null:new Qs(null,0,0,u.get(0)));let m=0;e:for(;;){if(l++,!r.isValid())return Ae.trivialTimedOut(s,i);const d=-Math.min(l,i.length+l%2),w=Math.min(l,s.length+l%2);for(m=d;m<=w;m+=2){const _=m===w?-1:u.get(m+1),v=m===d?-1:u.get(m-1)+1,L=Math.min(Math.max(_,v),s.length),k=L-m;if(L>s.length||k>i.length)continue;const D=o(L,k);u.set(m,D);const W=L===_?c.get(m+1):c.get(m-1);if(c.set(m,D!==L?new Qs(W,L,k,D-L):W),u.get(m)===s.length&&u.get(m)-m===i.length)break e}}let h=c.get(m);const f=[];let p=s.length,g=i.length;for(;;){const d=h?h.x+h.length:0,w=h?h.y+h.length:0;if((d!==p||w!==g)&&f.push(new Q(new T(d,p),new T(w,g))),!h)break;p=h.x,g=h.y,h=h.prev}return f.reverse(),new Ae(f,!1)}}class Qs{constructor(e,n,r,s){this.prev=e,this.x=n,this.y=r,this.length=s}}class No{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class So{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Ot{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=e[s-1],o=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,i=i.substring(o)),this.lineStartOffsets.push(o);let l=0;if(!r){const c=i.trimStart();l=i.length-c.length,i=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const u=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-l,i.length):i.length;for(let c=0;c<u;c++)this.elements.push(i.charCodeAt(c));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new T(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Zs(e>0?this.elements[e-1]:-1),r=Zs(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let s=0;return n!==r&&(s+=10,n===0&&r===1&&(s+=1)),s+=Ys(n),s+=Ys(r),s}translateOffset(e,n="right"){const r=Ke(this.firstElementOffsetByLineIdx,i=>i<=e),s=e-this.firstElementOffsetByLineIdx[r];return new q(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?R.fromPositions(r,r):R.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!nt(this.elements[e]))return;let n=e;for(;n>0&&nt(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&nt(this.elements[r]);)r++;return new T(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!nt(this.elements[e]))return;l
Line truncated
|
||||
`).length>=15&&Ao(h,p=>p.length>=2)>=2}),o=Po(t,o),o}function Ao(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function Eo(t,e,n,r){const s=[],i=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new zt(u.original,e,u)),o=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new zt(u.modified,n,u))),l=new Set;for(const u of i){let c=-1,m;for(const h of o){const f=u.computeSimilarity(h);f>c&&(c=f,m=h)}if(c>.9&&m&&(o.delete(m),s.push(new ce(u.range,m.range)),l.add(u.source),l.add(m.source)),!r.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function ko(t,e,n,r,s,i){const o=[],l=new Xa;for(const f of t)for(let p=f.original.startLineNumber;p<f.original.endLineNumberExclusive-2;p++){const g=`${e[p-1]}:${e[p+1-1]}:${e[p+2-1]}`;l.add(g,{range:new z(p,p+3)})}const u=[];t.sort(Ye(f=>f.modified.startLineNumber,xt));for(const f of t){let p=[];for(let g=f.modified.startLineNumber;g<f.modified.endLineNumberExclusive-2;g++){const d=`${n[g-1]}:${n[g+1-1]}:${n[g+2-1]}`,w=new z(g,g+3),_=[];l.forEach(d,({range:v})=>{for(const k of p)if(k.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&k.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){k.originalLineRange=new z(k.originalLineRange.startLineNumber,v.endLineNumberExclusive),k.modifiedLineRange=new z(k.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),_.push(k);return}const L={modifiedLineRange:w,originalLineRange:v};u.push(L),_.push(L)}),p=_}if(!i.isValid())return[]}u.sort(co(Ye(f=>f.modifiedLineRange.length,xt)));const c=new ye,m=new ye;for(const f of u){const p=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,g=c.subtractFrom(f.modifiedLineRange),d=m.subtractFrom(f.originalLineRange).getWithDelta(p),w=g.getIntersection(d);for(const _ of w.ranges){if(_.length<3)continue;const v=_,L=_.delta(-p);o.push(new ce(L,v)),c.addRange(v),m.addRange(L)}}o.sort(Ye(f=>f.original.startLineNumber,xt));const h=new qt(t);for(let f=0;f<o.length;f++){const p=o[f],g=h.findLastMonotonous(W=>W.original.startLineNumber<=p.original.startLineNumber),d=Ze(t,W=>W.modified.startLineNumber<=p.modified.startLineNumber),w=Math.max(p.original.startLineNumber-g.original.startLineNumber,p.modified.startLineNumber-d.modified.startLineNumber),_=h.findLastMonotonous(W=>W.original.startLineNumber<p.original.endLineNumberExclusive),v=Ze(t,W=>W.modified.startLineNumber<p.modified.endLineNumberExclusive),L=Math.max(_.original.endLineNumberExclusive-p.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-p.modified.endLineNumberExclusive);let k;for(k=0;k<w;k++){const W=p.original.startLineNumber-k-1,x=p.modified.startLineNumber-k-1;if(W>r.length||x>s.length||c.contains(x)||m.contains(W)||!Ks(r[W-1],s[x-1],i))break}k>0&&(m.addRange(new z(p.original.startLineNumber-k,p.original.startLineNumber)),c.addRange(new z(p.modified.startLineNumber-k,p.modified.startLineNumber)));let D;for(D=0;D<L;D++){const W=p.original.endLineNumberExclusive+D,x=p.modified.endLineNumberExclusive+D;if(W>r.length||x>s.length||c.contains(x)||m.contains(W)||!Ks(r[W-1],s[x-1],i))break}D>0&&(m.addRange(new z(p.original.endLineNumberExclusive,p.original.endLineNumberExclusive+D)),c.addRange(new z(p.modified.endLineNumberExclusive,p.modified.endLineNumberExclusive+D))),(k>0||D>0)&&(o[f]=new ce(new z(p.original.startLineNumber-k,p.original.endLineNumberExclusive+D),new z(p.modified.startLineNumber-k,p.modified.endLineNumberExclusive+D)))}return o}function Ks(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const s=new Xs().compute(new Ot([t],new R(1,1,1,t.length),!1),new Ot([e],new R(1,1,1,e.length),!1),n);let i=0;const o=Q.invert(s.diffs,t.length);for(const m of o)m.seq1Range.forEach(h=>{$n(t.charCodeAt(h))||i++});function l(m){let h=0;for(let f=0;f<t.length;f++)$n(m.charCodeAt(f))||h++;return h}const u=l(t.length>e.length?t:e);return i/u>.6&&u>10}function Mo(t){if(t.length===0)return t;t.sort(Ye(n=>n.original.startLineNumber,xt));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],s=t[n],i=s.original.startLineNumber-r.original.endLineNumberExclusive,o=s.modified.startLineNumber-r.modified.endLineNumberExclusive;if(i>=0&&o>=0&&i+o<=2){e[e.length-1]=r.join(s);continue}e.push(s)}return e}function Po(t,e){const n=new qt(t);return e=e.filter(r=>{const s=n.findLastMonotonous(l=>l.original.startLineNumber<r.original.endLineNumberExclusive)||new ce(new z(1,1),new z(1,1)),i=Ze(t,l=>l.modified.startLineNumber<r.modified.endLineNumberExclusive);return s!==i}),e}function ei(t,e,n){let r=n;return r=ti(t,e,r),r=ti(t,e,r),r=To(t,e,r),r}function ti(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let i=1;i<n.length;i++){const o=r[r.length-1];let l=n[i];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const u=l.seq1Range.start-o.seq1Range.endExclusive;let c;for(c=1;c<=u&&!(t.getElement(l.seq1Range.start-c)!==t.getElement(l.seq1Range.endExclusive-c)||e.getElement(l.seq2Range.
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function ii(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class Bo{constructor(){this.dynamicProgrammingDiffing=new vo,this.myersDiffingAlgorithm=new Xs}computeDiff(e,n,r){if(e.length<=1&&io(e,n,(x,y)=>x===y))return new wt([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new wt([new Ce(new z(1,e.length+1),new z(1,n.length+1),[new he(new R(1,1,e.length,e[e.length-1].length+1),new R(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=r.maxComputationTimeMs===0?Lt.instance:new _o(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,o=new Map;function l(x){let y=o.get(x);return y===void 0&&(y=o.size,o.set(x,y)),y}const u=e.map(x=>l(x.trim())),c=n.map(x=>l(x.trim())),m=new si(u,e),h=new si(c,n),f=m.length+h.length<1700?this.dynamicProgrammingDiffing.compute(m,h,s,(x,y)=>e[x]===n[y]?n[y].length===0?.1:1+Math.log(1+n[y].length):.99):this.myersDiffingAlgorithm.compute(m,h,s);let p=f.diffs,g=f.hitTimeout;p=ei(m,h,p),p=Io(m,h,p);const d=[],w=x=>{if(i)for(let y=0;y<x;y++){const S=_+y,V=v+y;if(e[S]!==n[V]){const U=this.refineDiff(e,n,new Q(new T(S,S+1),new T(V,V+1)),s,i,r);for(const B of U.mappings)d.push(B);U.hitTimeout&&(g=!0)}}};let _=0,v=0;for(const x of p){ht(()=>x.seq1Range.start-_===x.seq2Range.start-v);const y=x.seq1Range.start-_;w(y),_=x.seq1Range.endExclusive,v=x.seq2Range.endExclusive;const S=this.refineDiff(e,n,x,s,i,r);S.hitTimeout&&(g=!0);for(const V of S.mappings)d.push(V)}w(e.length-_);const L=new Ut(e),k=new Ut(n),D=Vn(d,L,k);let W=[];return r.computeMoves&&(W=this.computeMoves(D,e,n,u,c,s,i,r)),ht(()=>{function x(S,V){if(S.lineNumber<1||S.lineNumber>V.length)return!1;const U=V[S.lineNumber-1];return!(S.column<1||S.column>U.length+1)}function y(S,V){return!(S.startLineNumber<1||S.startLineNumber>V.length+1||S.endLineNumberExclusive<1||S.endLineNumberExclusive>V.length+1)}for(const S of D){if(!S.innerChanges)return!1;for(const V of S.innerChanges)if(!(x(V.modifiedRange.getStartPosition(),n)&&x(V.modifiedRange.getEndPosition(),n)&&x(V.originalRange.getStartPosition(),e)&&x(V.originalRange.getEndPosition(),e)))return!1;if(!y(S.modified,n)||!y(S.original,e))return!1}return!0}),new wt(D,W,g)}computeMoves(e,n,r,s,i,o,l,u){return Co(e,n,r,s,i,o).map(h=>{const f=this.refineDiff(n,r,new Q(h.original.toOffsetRange(),h.modified.toOffsetRange()),o,l,u),p=Vn(f.mappings,new Ut(n),new Ut(r),!0);return new Us(h,p)})}refineDiff(e,n,r,s,i,o){const u=qo(r).toRangeMapping2(e,n),c=new Ot(e,u.originalRange,i),m=new Ot(n,u.modifiedRange,i),h=c.length+m.length<500?this.dynamicProgrammingDiffing.compute(c,m,s):this.myersDiffingAlgorithm.compute(c,m,s);let f=h.diffs;return f=ei(c,m,f),f=ri(c,m,f,(g,d)=>g.findWordContaining(d)),o.extendToSubwords&&(f=ri(c,m,f,(g,d)=>g.findSubWordContaining(d),!0)),f=Fo(c,m,f),f=Vo(c,m,f),{mappings:f.map(g=>new he(c.translateRange(g.seq1Range),m.translateRange(g.seq2Range))),hitTimeout:h.hitTimeout}}}function qo(t){return new ce(new z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var Te;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(Te||(Te={}));const Uo="tkn";class $o{constructor(){this._hosts=Object.create(null),this._ports=Object.creat
Line truncated
|
||||
`)),i=new $t(n.join(`
|
||||
`)),o=this._computer.computeDiff(s.value,i.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),l=s.getTransformer(),u=i.getTransformer(),c=[];let m=0;for(const p of o.edits.replacements){const g=p.range.start+m,d=g+p.newText.length,w=l.getRange(new T(p.range.start,p.range.endExclusive)),_=u.getRange(new T(g,d));c.push(new he(w,_)),m+=p.newText.length-(p.range.endExclusive-p.range.start)}const h=Vn(c,s,i),f=[];if(r.computeMoves)for(const p of o.moves){const g=l.getPosition(p.range.original.start),d=l.getPosition(p.range.original.endExclusive),w=u.getPosition(p.range.modified.start),_=u.getPosition(p.range.modified.endExclusive),v=new z(g.lineNumber,d.lineNumber),L=new z(w.lineNumber,_.lineNumber);f.push(new Us(new ce(v,L),[]))}return new wt(h,f,o.hitTimeout)}}const Gt={getLegacy:()=>new wo,getDefault:()=>new Bo,getAdvancedExternal:()=>li(!1),getAdvancedWasm:()=>li(!0)};function De(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class b{constructor(e,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class fe{constructor(e,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=De(Math.max(Math.min(1,n),0),3),this.l=De(Math.max(Math.min(1,r),0),3),this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=e.a,o=Math.max(n,r,s),l=Math.min(n,r,s);let u=0,c=0;const m=(l+o)/2,h=o-l;if(h>0){switch(c=Math.min(m<=.5?h/(2*m):h/(2-2*m),1),o){case n:u=(r-s)/h+(r<s?6:0);break;case r:u=(s-n)/h+2;break;case s:u=(n-r)/h+4;break}u*=60,u=Math.round(u)}return new fe(u,c,m,i)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:s,a:i}=e;let o,l,u;if(r===0)o=l=u=s;else{const c=s<.5?s*(1+r):s+r-s*r,m=2*s-c;o=fe._hue2rgb(m,c,n+1/3),l=fe._hue2rgb(m,c,n),u=fe._hue2rgb(m,c,n-1/3)}return new b(Math.round(o*255),Math.round(l*255),Math.round(u*255),i)}}class rt{constructor(e,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=De(Math.max(Math.min(1,n),0),3),this.v=De(Math.max(Math.min(1,r),0),3),this.a=De(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),l=i-o,u=i===0?0:l/i;let c;return l===0?c=0:i===n?c=((r-s)/l%6+6)%6:i===r?c=(s-n)/l+2:c=(n-r)/l+4,new rt(Math.round(c*60),u,i,e.a)}static toRGBA(e){const{h:n,s:r,v:s,a:i}=e,o=s*r,l=o*(1-Math.abs(n/60%2-1)),u=s-o;let[c,m,h]=[0,0,0];return n<60?(c=o,m=l):n<120?(c=l,m=o):n<180?(m=o,h=l):n<240?(m=l,h=o):n<300?(c=l,h=o):n<=360&&(c=o,h=l),c=Math.round((c+u)*255),m=Math.round((m+u)*255),h=Math.round((h+u)*255),new b(c,m,h,i)}}const O=class O{static fromHex(e){return O.Format.CSS.parseHex(e)||O.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:fe.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:rt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof b)this.rgba=e;else if(e instanceof fe)this._hsla=e,this.rgba=fe.toRGBA(e);else if(e instanceof rt)this._hsva=e,this.rgba=rt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&b.equals(this.rgba,e.rgba)&&fe.equals(this.hsla,e.hsla)&&rt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=O._relativeLuminanceForComponent(this.rgba.r),n=O._relativeLuminanceForComponent(this.rgba.g),r=O._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*n+.0722*r;return De(s,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n<r}lighten(e){return new O(new fe(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new O(new fe(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:r,b:s,a:i}=this.rgba;return new O(new b(n,r,s,i*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new O(new b(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const r=Math.min(Math.max(n,0),1),s=this.rgba,i=e.rgba,o=s.r+(i.r-s.r)*r,l=s.g+(i.g-s.g)*r,u=s.b+(i.b-s.b)*r,c=s.a+(i.a-s.a)*r;return new O(new b(o,l,u,c))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:r,b:s,a:i}=this.rgba;return new O(new b(e.rgba.r-i*(e.rgba.r-n),e.rgba.g-i*(e.rgba.g-r),e.rgba.b-i*(e.rgba.
Line truncated
|
||||
`);i.lastIndex=0;let m;for(;(m=i.exec(c))!==null;){const h=c.substring(0,m.index),f=(h.match(/\n/g)||[]).length,p=o+f,g=m[0].split(`
|
||||
`),d=g.length,w=p+d-1,_=h.lastIndexOf(`
|
||||
`)+1,v=m.index-_+1,L=g[g.length-1],k=d===1?v+m[0].length:L.length+1,D={startLineNumber:p,startColumn:v,endLineNumber:w,endColumn:k},W=(m.groups??{}).label??"",x=((m.groups??{}).separator??"")!=="",y={range:D,text:W,hasSeparatorLine:x,shouldBeInComments:!0};(y.text||y.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<y.range.startLineNumber)&&n.push(y),i.lastIndex=m.index+m[0].length}}return n}function o1(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(n1,""),{text:t,hasSeparatorLine:e}}class fi{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Zn)}}var di;(function(t){async function e(r){let s;const i=await Promise.all(r.map(o=>o.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return i}t.settled=e;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(o){i(o)}})}t.withAsyncBody=n})(di||(di={}));class l1{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new Y("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new fi;return this._unsatisfiedConsumers.push(e),e.p}}}const re=class re{constructor(e,n){this._onReturn=n,this._producerConsumer=new l1,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(const i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(e){return new re(n=>{n.emitMany(e)})}static fromPromise(e){return new re(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new re(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new re(async n=>{await Promise.all(e.map(async r=>{for await(const s of r)n.emitOne(s)}))})}static map(e,n){return new re(async r=>{for await(const s of e)r.emitOne(n(s))})}static tee(e){let n,r;const s=new fi,i=async()=>{if(!(!n||!r))try{for await(const u of e)n.emitOne(u),r.emitOne(u)}catch(u){n.reject(u),r.reject(u)}finally{s.complete()}},o=new re(async u=>(n=u,i(),s.p)),l=new re(async u=>(r=u,i(),s.p));return[o,l]}map(e){return re.map(this,e)}static coalesce(e){return re.filter(e,n=>!!n)}coalesce(){return re.coalesce(this)}static filter(e,n){return new re(async r=>{for await(const s of e)n(s)&&r.emitOne(s)})}filter(e){return re.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};re.EMPTY=re.fromArray([]);let gi=re;class u1{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Qe(e);const r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+i),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Qe(e),n=Qe(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=Qe(e),n=Qe(n);const r=this.values,s=this.prefixSum;if(e>=r.length)return!1;const i=r.length-e;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(r.length-
Line truncated
|
||||
+53
-49
@@ -1,73 +1,77 @@
|
||||
(function(){"use strict";var Be,ce,Y;class no{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?nt.isErrorNoTelemetry(e)?new nt(e.message+`
|
||||
(function(){"use strict";var je,me,K;class zo{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?lt.isErrorNoTelemetry(e)?new lt(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const io=new no;function qt(t){ro(t)||io.onUnexpectedError(t)}function Sn(t){if(t instanceof Error){const{name:e,message:n,cause:i}=t,r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r,noTelemetry:nt.isErrorNoTelemetry(t),cause:i?Sn(i):void 0,code:t.code}}return t}const An="Canceled";function ro(t){return t instanceof Ii?!0:t instanceof Error&&t.name===An&&t.message===An}class Ii extends Error{constructor(){super(An),this.name=this.message}}class nt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof nt)return e;const n=new nt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class le extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,le.prototype)}}function so(t,e="Unreachable"){throw new Error(e)}function ao(t,e="unexpected state"){if(!t)throw typeof e=="string"?new le(`Assertion Failed: ${e}`):e}function Ot(t){if(!t()){debugger;t(),qt(new le("Assertion Failed"))}}function zi(t,e){let n=0;for(;n<t.length-1;){const i=t[n],r=t[n+1];if(!e(i,r))return!1;n++}return!0}function oo(t){return typeof t=="string"}function lo(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Vt;(function(t){function e(b){return!!b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function i(){return n}t.empty=i;function*r(b){yield b}t.single=r;function s(b){return e(b)?b:r(b)}t.wrap=s;function a(b){return b||n}t.from=a;function*l(b){for(let g=b.length-1;g>=0;g--)yield b[g]}t.reverse=l;function o(b){return!b||b[Symbol.iterator]().next().done===!0}t.isEmpty=o;function u(b){return b[Symbol.iterator]().next().value}t.first=u;function c(b,g){let v=0;for(const N of b)if(g(N,v++))return!0;return!1}t.some=c;function d(b,g){let v=0;for(const N of b)if(!g(N,v++))return!1;return!0}t.every=d;function m(b,g){for(const v of b)if(g(v))return v}t.find=m;function*f(b,g){for(const v of b)g(v)&&(yield v)}t.filter=f;function*w(b,g){let v=0;for(const N of b)yield g(N,v++)}t.map=w;function*p(b,g){let v=0;for(const N of b)yield*g(N,v++)}t.flatMap=p;function*x(...b){for(const g of b)lo(g)?yield*g:yield g}t.concat=x;function T(b,g,v){let N=v;for(const S of b)N=g(N,S);return N}t.reduce=T;function y(b){let g=0;for(const v of b)g++;return g}t.length=y;function*A(b,g,v=b.length){for(g<-b.length&&(g=0),g<0&&(g+=b.length),v<0?v+=b.length:v>b.length&&(v=b.length);g<v;g++)yield b[g]}t.slice=A;function I(b,g=Number.POSITIVE_INFINITY){const v=[];if(g===0)return[v,b];const N=b[Symbol.iterator]();for(let S=0;S<g;S++){const _=N.next();if(_.done)return[v,t.empty()];v.push(_.value)}return[v,{[Symbol.iterator](){return N}}]}t.consume=I;async function H(b){const g=[];for await(const v of b)g.push(v);return g}t.asyncToArray=H;async function P(b){let g=[];for await(const v of b)g=g.concat(v);return g}t.asyncToArrayFlat=P})(Vt||(Vt={}));function sh(t,e){}function Hi(t){if(Vt.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function uo(...t){return jt(()=>Hi(t))}class co{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function jt(t){return new co(t)}const _n=class _n{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Hi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Xe.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?_n.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};_n.DISABLE_DISPOSED_WARNING=!1;let xt=_n;const Mi=class Mi{constructor(){this._store=new xt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Mi.None=Object.freeze({dispose(){}});let Xe=Mi,te=(Be=class{constructor(e){this.element=e,this.next=Be.Undefined,this.prev=Be.Undefined}},Be.Undefined=new Be(void 0),Be);class ho{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){
Line truncated
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const tr=new zo;function Yt(t){nr(t)||tr.onUnexpectedError(t)}function Po(t){nr(t)||tr.onUnexpectedExternalError(t)}function Un(t){if(t instanceof Error){const{name:e,message:n,cause:i}=t,r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r,noTelemetry:lt.isErrorNoTelemetry(t),cause:i?Un(i):void 0,code:t.code}}return t}const Hn="Canceled";function nr(t){return t instanceof ir?!0:t instanceof Error&&t.name===Hn&&t.message===Hn}class ir extends Error{constructor(){super(Hn),this.name=this.message}}class lt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof lt)return e;const n=new lt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class se extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,se.prototype)}}function Uo(t,e="Unreachable"){throw new Error(e)}function Ho(t,e="unexpected state"){if(!t)throw typeof e=="string"?new se(`Assertion Failed: ${e}`):e}function Rt(t){if(!t()){debugger;t(),Yt(new se("Assertion Failed"))}}function Wn(t,e){let n=0;for(;n<t.length-1;){const i=t[n],r=t[n+1];if(!e(i,r))return!1;n++}return!0}function Wo(t){return typeof t=="string"}function Fo(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Zt;(function(t){function e(b){return!!b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function i(){return n}t.empty=i;function*r(b){yield b}t.single=r;function s(b){return e(b)?b:r(b)}t.wrap=s;function a(b){return b??n}t.from=a;function*l(b){for(let g=b.length-1;g>=0;g--)yield b[g]}t.reverse=l;function o(b){return!b||b[Symbol.iterator]().next().done===!0}t.isEmpty=o;function u(b){return b[Symbol.iterator]().next().value}t.first=u;function h(b,g){let _=0;for(const M of b)if(g(M,_++))return!0;return!1}t.some=h;function d(b,g){let _=0;for(const M of b)if(!g(M,_++))return!1;return!0}t.every=d;function m(b,g){for(const _ of b)if(g(_))return _}t.find=m;function*f(b,g){for(const _ of b)g(_)&&(yield _)}t.filter=f;function*w(b,g){let _=0;for(const M of b)yield g(M,_++)}t.map=w;function*p(b,g){let _=0;for(const M of b)yield*g(M,_++)}t.flatMap=p;function*x(...b){for(const g of b)Fo(g)?yield*g:yield g}t.concat=x;function y(b,g,_){let M=_;for(const A of b)M=g(M,A);return M}t.reduce=y;function v(b){let g=0;for(const _ of b)g++;return g}t.length=v;function*S(b,g,_=b.length){for(g<-b.length&&(g=0),g<0&&(g+=b.length),_<0?_+=b.length:_>b.length&&(_=b.length);g<_;g++)yield b[g]}t.slice=S;function I(b,g=Number.POSITIVE_INFINITY){const _=[];if(g===0)return[_,b];const M=b[Symbol.iterator]();for(let A=0;A<g;A++){const T=M.next();if(T.done)return[_,t.empty()];_.push(T.value)}return[_,{[Symbol.iterator](){return M}}]}t.consume=I;async function P(b){const g=[];for await(const _ of b)g.push(_);return g}t.asyncToArray=P;async function F(b){let g=[];for await(const _ of b)g=g.concat(_);return g}t.asyncToArrayFlat=F})(Zt||(Zt={}));function Jh(t,e){}function rr(t){if(Zt.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Bo(...t){return Dt(()=>rr(t))}class qo{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function Dt(t){return new qo(t)}const Dn=class Dn{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{rr(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Ke.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dn.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Dn.DISABLE_DISPOSED_WARNING=!1;let Nt=Dn;const Zi=class Zi{constructor(){this._store=new Nt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Zi.None=Object.freeze({dispose(){}});let Ke=Zi,ne=(je=class{constructor(e){this.element=e,this.next=je.Undefined,this.prev=je.Undefined}},je.Undefined=new je(void 0),je);class Oo{constructor(){this._first=ne.Undefined,this._last=ne.Undefine
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class po extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}}class go extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}}class Dn{constructor(e){this.value=e}}const bo=2;class Ee{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new En(e?.onListenerError??qt,this._options?.leakWarningThreshold??fo):void 0,this._perfMon=this._options?._profName?new Cn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new go(`${l}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0]);return(this._options?.onListenerError||qt)(u),Xe.None}if(this._disposed)return Xe.None;n&&(e=e.bind(n));const r=new Dn(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=Rn.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Dn?(this._deliveryQueue??=new wo,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=jt(()=>{s?.(),this._removeListener(r)});return i instanceof xt?i.add(a):Array.isArray(i)&&i.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,i=n.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[i]=void 0;const r=this._deliveryQueue.current===this;if(this._size*bo<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:r&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const i=this._options?.onListenerError||qt;if(!i){e.value(n);return}try{e.value(n)}catch(r){i(r)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Dn)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class wo{constructor(){this.i=-1,this.end=0}enqueue(e,n,i){this.i=0,this.end=i,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function _o(){return globalThis._VSCODE_NLS_MESSAGES}function Ui(){return globalThis._VSCODE_NLS_LANGUAGE}const vo=Ui()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Pi(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(i,r)=>{const s=r[0],a=e[s];let l=i;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),vo&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function q(t,e,...n){return Pi(typeof t=="number"?yo(t,e):e,n)}function yo(t,e){const n=_o()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const it="en";let Mn=!1,Nn=!1,In=!1,Gt,zn=it,Wi=it,To,Ie;const Je=globalThis;let he;typeof Je.vscode<"u"&&typeof Je.vscode.process<"u"?he=Je.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(he=process);const xo=typeof he?.versions?.electron=="string"&&he?.type==="renderer";if(typeof he=="object"){Mn=he.platform==="win32",Nn=he.platform==="darwin",In=he.platform==="linux",In&&he.env.SNAP&&he.env.SNAP_REVISION,he.env.CI||he.env.BUILD_ARTIFACTSTAGINGDIRECTORY||he.env.GITHUB_WORKSPACE,Gt=it,zn=it;const t=he.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);Gt=e.userLocale,Wi=e.osLocale,zn=e.resolvedLanguage||it,To=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!xo?(Ie=navigator.userAgent,Mn=Ie.indexOf("Windows")>=0,Nn=Ie.indexOf("Macintosh")>=0,(Ie.indexOf("Macintosh")>=0||Ie.indexOf("iPad")>=0||Ie.inde
Line truncated
|
||||
`||t===" "}class tn{constructor(e,n,i){this.changes=e,this.moves=n,this.hitTimeout=i}}class jl{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function $l(t,e,n=(i,r)=>i===r){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let i=0,r=t.length;i<r;i++)if(!n(t[i],e[i]))return!1;return!0}function*Gl(t,e){let n,i;for(const r of t)i!==void 0&&e(i,r)?n.push(r):(n&&(yield n),n=[r]),i=r;n&&(yield n)}function Xl(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Jl(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Yl(t,e){for(const n of e)t.push(n)}var ni;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function i(s){return s>0}t.isGreaterThan=i;function r(s){return s===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(ni||(ni={}));function Ct(t,e){return(n,i)=>e(t(n),t(i))}const Et=(t,e)=>t-e;function Ql(t){return(e,n)=>-t(e,n)}const Tt=class Tt{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Tt(n=>this.iterate(i=>e(i)?n(i):!0))}map(e){return new Tt(n=>this.iterate(i=>n(e(i))))}findLast(e){let n;return this.iterate(i=>(e(i)&&(n=i),!0)),n}findLastMaxBy(e){let n,i=!0;return this.iterate(r=>((i||ni.isGreaterThan(e(r,n)))&&(i=!1,n=r),!0)),n}};Tt.empty=new Tt(e=>{});let ws=Tt;class G{static fromTo(e,n){return new G(e,n)}static addRange(e,n){let i=0;for(;i<n.length&&n[i].endExclusive<e.start;)i++;let r=i;for(;r<n.length&&n[r].start<=e.endExclusive;)r++;if(i===r)n.splice(i,0,e);else{const s=Math.min(e.start,n[i].start),a=Math.max(e.endExclusive,n[r-1].endExclusive);n.splice(i,r-i,new G(s,a))}}static tryCreate(e,n){if(!(e>n))return new G(e,n)}static ofLength(e){return new G(0,e)}static ofStartAndLength(e,n){return new G(e,e+n)}static emptyAt(e){return new G(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new le(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new G(this.start+e,this.endExclusive+e)}deltaStart(e){return new G(this.start+e,this.endExclusive)}deltaEnd(e){return new G(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new G(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(n<=i)return new G(n,i)}intersectionLength(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,i-n)}intersects(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<i}intersectsOrTouches(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<=i}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new le(`Invalid join: ${this.toString()} and ${e.toString()}`);return new G(this.start,e.endExclusive)}}function ut(t,e){const n=ct(t,e);return n===-1?void 0:t[n]}function ct(t,e,n=0,i=t.length){let r=n,s=i;for(;r<s;){const a=Math.floor((r+s)/2);e(t[a])?r=a+1:s=a}return r-1}function Zl(t,e){const n=ii(t,e);return n===t.length?void 0:t[n]}function ii(t,e,n=0,i=t.length){let r=n,s=i;for(;r<s;){const a=Math.floor((r+s)/2);e(t[a])?s=a:r=a+1}return r}const Tn=class Tn{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Tn.assertInvariants){if(this._prevFindLastPredicate){for(const i of this._array)if(this._prevFindLastPredicate(i)&&!e(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=ct(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Tn.assertInvariants=!1;let nn=Tn;const _e=class _e{static ofLength(e,n){return new _e(e,e+n)}static fromRange(e){return new _e(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new _e(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];le
Line truncated
|
||||
`?(n++,i=0):i++;return new Le(n,i)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Le(this.lineCount,this.columnCount+e.columnCount):new Le(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new j(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new j(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new j(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return X.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new K(e.lineNumber,e.column+this.columnCount):new K(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Le.zero=new Le(0,0);let Rt=Le;class Kl{getOffsetRange(e){return new G(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return j.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new ht.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new ht.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(i=>this.getTextReplacement(i));return new ht.deps.TextEdit(n)}}const Ni=class Ni{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ni._deps=void 0;let ht=Ni;class eu extends Kl{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
|
||||
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new K(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const r=this.getLineLength(n);return new K(n,r+1)}if(e.column<1)return new K(e.lineNumber,1);const i=this.getLineLength(e.lineNumber);return e.column-1>i?new K(e.lineNumber,i+1):e}getPosition(e){const n=ct(this.lineStartOffsetByLineIdx,s=>s<=e),i=n+1,r=e-this.lineStartOffsetByLineIdx[n]+1;return new K(i,r)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new ht.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class tu{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new K(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new eu(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER))}}class nu extends tu{constructor(e,n){ao(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)n+=`
|
||||
`))}}class rn extends Error{constructor(e,n,i,r,s){super(s?`[${s}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=r,this.details=n,this.stack=i}static is(e){return e instanceof rn||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class sl extends rn{constructor(e,n,i,r,s){super(e,n,i,r,s),this.name="ListenerRefusalError"}}class Jn{constructor(e){this.value=e}}const al=2;class Se{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new Xn(e?.onListenerError??Yt,this._options?.leakWarningThreshold??rl,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new Gn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=o[1]/this._size>.3?"dominated":"popular",h=new sl(u,`${l}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||Yt)(h),Ke.None}if(this._disposed)return Ke.None;n&&(e=e.bind(n));const r=new Jn(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=nn.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Jn?(this._deliveryQueue??=new ol,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=Dt(()=>{s?.(),this._removeListener(r)});return Qn(a,i),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,i=n.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[i]=void 0;const r=this._deliveryQueue.current===this;if(this._size*al<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:r&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const i=this._options?.onListenerError||Yt;if(!i){e.value(n);return}try{e.value(n)}catch(r){i(r)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Jn)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class ol{constructor(){this.i=-1,this.end=0}enqueue(e,n,i){this.i=0,this.end=i,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function Qn(t,e){e instanceof Nt?e.add(t):Array.isArray(e)&&e.push(t)}function dr(t,e){if(e instanceof Nt)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function ll(t){return t}class ul{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=ll):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var et;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(et||(et={}));class Yn{constructor(e){this.executor=e,this._state=et.Uninitialized}get value(){if(this._state===et.Uninitialized){this._state=et.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=et.Completed}}else if(this._state===et.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function cl(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function hl(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function dl(t){re
Line truncated
|
||||
`||t===" "}class Ut{constructor(e,n,i){this.changes=e,this.moves=n,this.hitTimeout=i}}class js{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Tu(t,e,n=(i,r)=>i===r){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let i=0,r=t.length;i<r;i++)if(!n(t[i],e[i]))return!1;return!0}function*ku(t,e){let n,i;for(const r of t)i!==void 0&&e(i,r)?n.push(r):(n&&(yield n),n=[r]),i=r;n&&(yield n)}function Su(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Au(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function Lu(t,e){for(const n of e)t.push(n)}var bi;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function i(s){return s>0}t.isGreaterThan=i;function r(s){return s===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(bi||(bi={}));function pt(t,e){return(n,i)=>e(t(n),t(i))}const Ht=(t,e)=>t-e;function Cu(t){return(e,n)=>-t(e,n)}const Ct=class Ct{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Ct(n=>this.iterate(i=>e(i)?n(i):!0))}map(e){return new Ct(n=>this.iterate(i=>n(e(i))))}findLast(e){let n;return this.iterate(i=>(e(i)&&(n=i),!0)),n}findLastMaxBy(e){let n,i=!0;return this.iterate(r=>((i||bi.isGreaterThan(e(r,n)))&&(i=!1,n=r),!0)),n}};Ct.empty=new Ct(e=>{});let $s=Ct;class O{static fromTo(e,n){return new O(e,n)}static addRange(e,n){let i=0;for(;i<n.length&&n[i].endExclusive<e.start;)i++;let r=i;for(;r<n.length&&n[r].start<=e.endExclusive;)r++;if(i===r)n.splice(i,0,e);else{const s=Math.min(e.start,n[i].start),a=Math.max(e.endExclusive,n[r-1].endExclusive);n.splice(i,r-i,new O(s,a))}}static tryCreate(e,n){if(!(e>n))return new O(e,n)}static ofLength(e){return new O(0,e)}static ofStartAndLength(e,n){return new O(e,e+n)}static emptyAt(e){return new O(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new se(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new O(this.start+e,this.endExclusive+e)}deltaStart(e){return new O(this.start+e,this.endExclusive)}deltaEnd(e){return new O(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new O(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(n<=i)return new O(n,i)}intersectionLength(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,i-n)}intersects(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<i}intersectsOrTouches(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<=i}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new se(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new se(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new se(`Invalid join: ${this.toString()} and ${e.toString()}`);return new O(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new O(this.start-e,this.endExclusive+n)}}function gt(t,e){const n=bt(t,e);return n===-1?void 0:t[n]}function bt(t,e,n=0,i=t.length){let r=n,s=i;for(;r<s;){const a=Math.floor((r+s)/2);e(t[a])?r=a+1:s=a}return r-1}function Eu(t,e){const n=wi(t,e);return n===t.length?void 0:t[n]}function wi(t,e,n=0,i=t.length){let r=n,s=i;for(;r<s;){const a=Math.floor((r+s)/2);e(t[a])?s=a:r=a+1}return r}const In=class In{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(In.assertInvariants){if(this._prevFindLastPredicate){for(const i of this._array)if(this._prevFindLastPredicate(i)&&!e(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=bt(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};In.assertInvariants=!1;let hn=In;const Te=class Te{static ofLength(e,n){return new Te(e,e+n)}static fromRange(e){return new Te(e
Line truncated
|
||||
`?(n++,i=0):i++;return new Re(n,i)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Re(this.lineCount,this.columnCount+e.columnCount):new Re(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new j(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new j(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new j(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Q.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new Y(e.lineNumber,e.column+this.columnCount):new Y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Re.zero=new Re(0,0);let Xe=Re;class Ru{getOffsetRange(e){return new O(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return j.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new nt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new nt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(i=>this.getTextReplacement(i));return new nt.deps.TextEdit(n)}}const Ki=class Ki{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ki._deps=void 0;let nt=Ki;function Du(t){nt._deps=t}class Gs extends Ru{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new Y(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const r=this.getLineLength(n);return new Y(n,r+1)}if(e.column<1)return new Y(e.lineNumber,1);const i=this.getLineLength(e.lineNumber);return e.column-1>i?new Y(e.lineNumber,i+1):e}getPosition(e){const n=bt(this.lineStartOffsetByLineIdx,s=>s<=e),i=n+1,r=e-this.lineStartOffsetByLineIdx[n]+1;return new Y(i,r)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new nt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Xs{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new Y(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Gs(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER))}}class Nu extends Xs{constructor(e,n){Ho(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)n+=`
|
||||
`+this._getLineContent(i);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Rt(this._lineCount-1,e.length)}}class rn extends nu{constructor(e){super(n=>e[n-1],e.length)}}class je{static joinReplacements(e,n){if(e.length===0)throw new le;if(e.length===1)return e[0];const i=e[0].range.getStartPosition(),r=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const l=e[a];if(s+=l.text,a<e.length-1){const o=e[a+1],u=j.fromPositions(l.range.getEndPosition(),o.range.getStartPosition()),c=n.getValueOfRange(u);s+=c}}return new je(j.fromPositions(i,r),s)}static fromStringReplacement(e,n){return new je(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new je(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return je.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Xe(this._lineCount-1,e.length)}}class dn extends Nu{constructor(e){super(n=>e[n-1],e.length)}}class mn extends Xs{constructor(e){super(),this.value=e,this._t=new Gs(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}let Mu=class er{static fromStringEdit(e,n){const i=e.replacements.map(r=>Le.fromStringReplacement(r,n));return new er(i)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort(pt(i=>i.range,j.compareRangesUsingStarts));return new er(n)}constructor(e){this.replacements=e,Rt(()=>Wn(e,(n,i)=>n.range.getEndPosition().isBeforeOrEqual(i.range.getStartPosition())))}mapPosition(e){let n=0,i=0,r=0;for(const s of this.replacements){const a=s.range.getStartPosition();if(e.isBeforeOrEqual(a))break;const l=s.range.getEndPosition(),o=Xe.ofText(s.text);if(e.isBefore(l)){const u=new Y(a.lineNumber+n,a.column+(a.lineNumber+n===i?r:0)),h=o.addToPosition(u);return fn(u,h)}a.lineNumber+n!==i&&(r=0),n+=o.lineCount-(s.range.endLineNumber-s.range.startLineNumber),o.lineCount===0?l.lineNumber!==a.lineNumber?r+=o.columnCount-(l.column-1):r+=o.columnCount-(l.column-a.column):r=o.columnCount,i=l.lineNumber+n}return new Y(e.lineNumber+n,e.column+(e.lineNumber+n===i?r:0))}mapRange(e){function n(a){return a instanceof Y?a:a.getStartPosition()}function i(a){return a instanceof Y?a:a.getEndPosition()}const r=n(this.mapPosition(e.getStartPosition())),s=i(this.mapPosition(e.getEndPosition()));return fn(r,s)}apply(e){let n="",i=new Y(1,1);for(const s of this.replacements){const a=s.range,l=a.getStartPosition(),o=a.getEndPosition(),u=fn(i,l);u.isEmpty()||(n+=e.getValueOfRange(u)),n+=s.text,i=o}const r=fn(i,e.endPositionExclusive);return r.isEmpty()||(n+=e.getValueOfRange(r)),n}applyToString(e){const n=new mn(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,i=0,r=0;for(const s of this.replacements){const a=Xe.ofText(s.text),l=Y.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===n?r:0)}),o=a.createRange(l);e.push(o),i=o.endLineNumber-s.range.endLineNumber,r=o.endColumn-s.range.endColumn,n=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new se;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition();let r="";for(let s=0;s<this.replacements.length;s++){const a=this.replacements[s];if(r+=a.text,s<this.replacements.length-1){const l=this.replacements[s+1],o=j.fromPositions(a.range.getEndPosition(),l.range.getStartPosition()),u=e.getValueOfRange(o);r+=u}}return new Le(j.fromPositions(n,i),r)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new mn(e)):this.replacements.length===0?"":this.replacements.map(n=>{const r=e.getValueOfRange(n.range),s=j.fromPositions(new Y(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let a=e.getValueOfRange(s);a.length>10&&(a="..."+a.substring(a.length-10));const l=j.fromPositions(n.range.getEndPosition(),new Y(n.range.endLineNumber+1,1));let o=e.getValueOfRange(l);o.length>10&&(o=o.substring(0,10)+"...");let u=r;if(u.length>10){const d=Math.floor(5);u=u.substring(0,d)+"..."+u.substring(u.length-d)}let h=n.text;if(h.length>10){const d=Math.floor(5);h=h.substring(0,d)+"..."+h.substring(h.length-d)}return u.length===0?`${a}❰${h}❱${o}`:`${a}❰${u}↦${h}❱${o}`}).join(`
|
||||
`)}};class Le{static joinReplacements(e,n){if(e.length===0)throw new se;if(e.length===1)return e[0];const i=e[0].range.getStartPosition(),r=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const l=e[a];if(s+=l.text,a<e.length-1){const o=e[a+1],u=j.fromPositions(l.range.getEndPosition(),o.range.getStartPosition()),h=n.getValueOfRange(u);s+=h}}return new Le(j.fromPositions(i,r),s)}static fromStringReplacement(e,n){return new Le(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new Le(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return Le.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),r=Io(n,i),s=Rt.ofText(n.substring(0,r)).addToPosition(this.range.getStartPosition()),a=i.substring(r),l=j.fromPositions(s,this.range.getEndPosition());return new je(l,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`),r=Zn(n,i),s=Xe.ofText(n.substring(0,r)).addToPosition(this.range.getStartPosition()),a=i.substring(r),l=j.fromPositions(s,this.range.getEndPosition());return new Le(l,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),r=zo(n,i),s=Rt.ofText(n.substring(0,n.length-r)).addToPosition(this.range.getStartPosition()),a=i.substring(0,i.length-r),l=j.fromPositions(this.range.getStartPosition(),s);return new je(l,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class ve{static inverse(e,n,i){const r=[];let s=1,a=1;for(const o of e){const u=new ve(new X(s,o.original.startLineNumber),new X(a,o.modified.startLineNumber));u.modified.isEmpty||r.push(u),s=o.original.endLineNumberExclusive,a=o.modified.endLineNumberExclusive}const l=new ve(new X(s,n+1),new X(a,i+1));return l.modified.isEmpty||r.push(l),r}static clip(e,n,i){const r=[];for(const s of e){const a=s.original.intersect(n),l=s.modified.intersect(i);a&&!a.isEmpty&&l&&!l.isEmpty&&r.push(new ve(a,l))}return r}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ve(this.modified,this.original)}join(e){return new ve(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new ye(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new le("not a valid diff");return new ye(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ye(new j(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new j(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(_s(this.original.endLineNumberExclusive,e)&&_s(this.modified.endLineNumberExclusive,n))return new ye(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ye(j.fromPositions(new K(this.original.startLineNumber,1),dt(new K(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(new K(this.modified.startLineNumber,1),dt(new K(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ye(j.fromPositions(dt(new K(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),dt(new K(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(dt(new K(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),dt(new K(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new le}}function dt(t,e){if(t.lineNumber<1)return new K(1,1);if(t.lineNumber>e.length)return new K(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new K(t.lineNumber,n.length+1):t}function _s(t,e){return t>=1&&t<=e.length}class Ue extends ve{static fromRangeMappings(e){const n=X.join(e.map(r=>X.fromRangeInclusive(r.originalRange))),i=X.join(e.map(r=>X.fromRangeInclusive(r.modifiedRange)));return new Ue(n,i,e)}constructor(e,n,i){super(e,n),this.innerChanges=i}flip(){return new Ue(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Ue(this.original,this.modified,[this.toRangeMapping()])}}class ye{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((r,s)=>new ye(r.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const i=e[n-1],r=e[n];if(!(i.originalRange.getEndPosition().isBeforeOrEqual(r.originalRange.getStartPosition())&&i.modifiedRange.getEndPosition().isBeforeOrEqual(r.modifiedRange.getStartPosition())))throw new le("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new ye(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new je(this.originalRange,n)}}function vs(t,e,n,i=!1){const r=[];for(const s of Gl(t.map(a=>iu(a,e,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){const a=s[0],l=s[s.length-1];r.push(new Ue(a.original.join(l.original),a.modified.join(l.modified),s.map(o=>o.innerChanges[0])))}return Ot(()=>!i&&r.length>0&&(r[0].modified.startLineNumber!==r[0].original.startLineNumber||n.length.lineCount-r[r.length-1].modified.endLineNumberExclusive!==e.length.lineCount-r[r.length-1].original.endLineNumberExclusive)?!1:zi(r,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive<a.ori
Line truncated
|
||||
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=r}computeSimilarity(e){let n=0;const i=Math.max(this.histogram.length,e.histogram.length);for(let r=0;r<i;r++)n+=Math.abs((this.histogram[r]??0)-(e.histogram[r]??0));return 1-n/(this.totalCount+e.totalCount)}};Ft.chrKeys=new Map;let sn=Ft;class cu{compute(e,n,i=Mt.instance,r){if(e.length===0||n.length===0)return Pe.trivial(e,n);const s=new ai(e.length,n.length),a=new ai(e.length,n.length),l=new ai(e.length,n.length);for(let w=0;w<e.length;w++)for(let p=0;p<n.length;p++){if(!i.isValid())return Pe.trivialTimedOut(e,n);const x=w===0?0:s.get(w-1,p),T=p===0?0:s.get(w,p-1);let y;e.getElement(w)===n.getElement(p)?(w===0||p===0?y=0:y=s.get(w-1,p-1),w>0&&p>0&&a.get(w-1,p-1)===3&&(y+=l.get(w-1,p-1)),y+=r?r(w,p):1):y=-1;const A=Math.max(x,T,y);if(A===y){const I=w>0&&p>0?l.get(w-1,p-1):0;l.set(w,p,I+1),a.set(w,p,3)}else A===x?(l.set(w,p,0),a.set(w,p,1)):A===T&&(l.set(w,p,0),a.set(w,p,2));s.set(w,p,A)}const o=[];let u=e.length,c=n.length;function d(w,p){(w+1!==u||p+1!==c)&&o.push(new ne(new G(w+1,u),new G(p+1,c))),u=w,c=p}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(d(m,f),m--,f--):a.get(m,f)===1?m--:f--;return d(-1,-1),o.reverse(),new Pe(o,!1)}}class ks{compute(e,n,i=Mt.instance){if(e.length===0||n.length===0)return Pe.trivial(e,n);const r=e,s=n;function a(p,x){for(;p<r.length&&x<s.length&&r.getElement(p)===s.getElement(x);)p++,x++;return p}let l=0;const o=new hu;o.set(0,a(0,0));const u=new du;u.set(0,o.get(0)===0?null:new Ss(null,0,0,o.get(0)));let c=0;e:for(;;){if(l++,!i.isValid())return Pe.trivialTimedOut(r,s);const p=-Math.min(l,s.length+l%2),x=Math.min(l,r.length+l%2);for(c=p;c<=x;c+=2){const T=c===x?-1:o.get(c+1),y=c===p?-1:o.get(c-1)+1,A=Math.min(Math.max(T,y),r.length),I=A-c;if(A>r.length||I>s.length)continue;const H=a(A,I);o.set(c,H);const P=A===T?u.get(c+1):u.get(c-1);if(u.set(c,H!==A?new Ss(P,A,I,H-A):P),o.get(c)===r.length&&o.get(c)-c===s.length)break e}}let d=u.get(c);const m=[];let f=r.length,w=s.length;for(;;){const p=d?d.x+d.length:0,x=d?d.y+d.length:0;if((p!==f||x!==w)&&m.push(new ne(new G(p,f),new G(x,w))),!d)break;f=d.x,w=d.y,d=d.prev}return m.reverse(),new Pe(m,!1)}}class Ss{constructor(e,n,i,r){this.prev=e,this.x=n,this.y=i,this.length=r}}class hu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=n}}}class du{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class an{constructor(e,n,i){this.lines=e,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let s=e[r-1],a=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!i){const u=s.trimStart();l=s.length-u.length,s=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const o=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,s.length):s.length;for(let u=0;u<o;u++)this.elements.push(s.charCodeAt(u));r<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new G(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Cs(e>0?this.elements[e-1]:-1),i=Cs(e<this.elements.length?this.elements[e]:-1);if(n===7&&i===8)return 0;if(n===8)return 150;let r=0;return n!==i&&(r+=10,n===0&&i===1&&(r+=1)),r+=Ls(n),r+=Ls(i),r}translateOffset(e,n="right"){const i=ct(this.firstElementOffsetByLineIdx,s=>s<=e),r=e-this.firstElementOffsetByLineIdx[i];return new K(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+r+(r===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const n=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(n)?j.fromPositions(i,i):j.fromPositions(n,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!ft(this.elements[e]))return;let n=e;for(;n>0&&ft(this.elements[n-1]);)n--;let i=e;for(;i<this.elements.length&&ft(this.elements[i]);)i++;return new G(n,i)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!ft(this.elements[e]))return
Line truncated
|
||||
`).length>=15&&pu(d,f=>f.length>=2)>=2}),a=_u(t,a),a}function pu(t,e){let n=0;for(const i of t)e(i)&&n++;return n}function gu(t,e,n,i){const r=[],s=t.filter(o=>o.modified.isEmpty&&o.original.length>=3).map(o=>new sn(o.original,e,o)),a=new Set(t.filter(o=>o.original.isEmpty&&o.modified.length>=3).map(o=>new sn(o.modified,n,o))),l=new Set;for(const o of s){let u=-1,c;for(const d of a){const m=o.computeSimilarity(d);m>u&&(u=m,c=d)}if(u>.9&&c&&(a.delete(c),r.push(new ve(o.range,c.range)),l.add(o.source),l.add(c.source)),!i.isValid())return{moves:r,excludedChanges:l}}return{moves:r,excludedChanges:l}}function bu(t,e,n,i,r,s){const a=[],l=new Il;for(const m of t)for(let f=m.original.startLineNumber;f<m.original.endLineNumberExclusive-2;f++){const w=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;l.add(w,{range:new X(f,f+3)})}const o=[];t.sort(Ct(m=>m.modified.startLineNumber,Et));for(const m of t){let f=[];for(let w=m.modified.startLineNumber;w<m.modified.endLineNumberExclusive-2;w++){const p=`${n[w-1]}:${n[w+1-1]}:${n[w+2-1]}`,x=new X(w,w+3),T=[];l.forEach(p,({range:y})=>{for(const I of f)if(I.originalLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive&&I.modifiedLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive){I.originalLineRange=new X(I.originalLineRange.startLineNumber,y.endLineNumberExclusive),I.modifiedLineRange=new X(I.modifiedLineRange.startLineNumber,x.endLineNumberExclusive),T.push(I);return}const A={modifiedLineRange:x,originalLineRange:y};o.push(A),T.push(A)}),f=T}if(!s.isValid())return[]}o.sort(Ql(Ct(m=>m.modifiedLineRange.length,Et)));const u=new De,c=new De;for(const m of o){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,w=u.subtractFrom(m.modifiedLineRange),p=c.subtractFrom(m.originalLineRange).getWithDelta(f),x=w.getIntersection(p);for(const T of x.ranges){if(T.length<3)continue;const y=T,A=T.delta(-f);a.push(new ve(A,y)),u.addRange(y),c.addRange(A)}}a.sort(Ct(m=>m.original.startLineNumber,Et));const d=new nn(t);for(let m=0;m<a.length;m++){const f=a[m],w=d.findLastMonotonous(P=>P.original.startLineNumber<=f.original.startLineNumber),p=ut(t,P=>P.modified.startLineNumber<=f.modified.startLineNumber),x=Math.max(f.original.startLineNumber-w.original.startLineNumber,f.modified.startLineNumber-p.modified.startLineNumber),T=d.findLastMonotonous(P=>P.original.startLineNumber<f.original.endLineNumberExclusive),y=ut(t,P=>P.modified.startLineNumber<f.modified.endLineNumberExclusive),A=Math.max(T.original.endLineNumberExclusive-f.original.endLineNumberExclusive,y.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let I;for(I=0;I<x;I++){const P=f.original.startLineNumber-I-1,b=f.modified.startLineNumber-I-1;if(P>i.length||b>r.length||u.contains(b)||c.contains(P)||!Es(i[P-1],r[b-1],s))break}I>0&&(c.addRange(new X(f.original.startLineNumber-I,f.original.startLineNumber)),u.addRange(new X(f.modified.startLineNumber-I,f.modified.startLineNumber)));let H;for(H=0;H<A;H++){const P=f.original.endLineNumberExclusive+H,b=f.modified.endLineNumberExclusive+H;if(P>i.length||b>r.length||u.contains(b)||c.contains(P)||!Es(i[P-1],r[b-1],s))break}H>0&&(c.addRange(new X(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+H)),u.addRange(new X(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+H))),(I>0||H>0)&&(a[m]=new ve(new X(f.original.startLineNumber-I,f.original.endLineNumberExclusive+H),new X(f.modified.startLineNumber-I,f.modified.endLineNumberExclusive+H)))}return a}function Es(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const r=new ks().compute(new an([t],new j(1,1,1,t.length),!1),new an([e],new j(1,1,1,e.length),!1),n);let s=0;const a=ne.invert(r.diffs,t.length);for(const c of a)c.seq1Range.forEach(d=>{oi(t.charCodeAt(d))||s++});function l(c){let d=0;for(let m=0;m<t.length;m++)oi(c.charCodeAt(m))||d++;return d}const o=l(t.length>e.length?t:e);return s/o>.6&&o>10}function wu(t){if(t.length===0)return t;t.sort(Ct(n=>n.original.startLineNumber,Et));const e=[t[0]];for(let n=1;n<t.length;n++){const i=e[e.length-1],r=t[n],s=r.original.startLineNumber-i.original.endLineNumberExclusive,a=r.modified.startLineNumber-i.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=i.join(r);continue}e.push(r)}return e}function _u(t,e){const n=new nn(t);return e=e.filter(i=>{const r=n.findLastMonotonous(l=>l.original.startLineNumber<i.original.endLineNumberExclusive)||new ve(new X(1,1),new X(1,1)),s=ut(t,l=>l.modified.startLineNumber<i.modified.endLineNumberExclusive);return r!==s}),e}function Rs(t,e,n){let i=n;return i=Ds(t,e,i),i=Ds(t,e,i),i=vu(t,e,i),i}function Ds(t,e,n){if(n.length===0)return n;const i=[];i.push(n[0]);for(let s=1;s<n.length;s++){const a=i[i.length-1];let l=n[s];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const o=l.seq1Range.start-a.seq1Range.endExclusive;let u;for(u=1;u<=o&&!(t.getElement(l.seq1Range.start-u)!==t.getElement(l.seq1Range.endExclusive-u)||e.getElement(l.seq2Range
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function zs(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class Su{constructor(){this.dynamicProgrammingDiffing=new cu,this.myersDiffingAlgorithm=new ks}computeDiff(e,n,i){if(e.length<=1&&$l(e,n,(b,g)=>b===g))return new tn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new tn([new Ue(new X(1,e.length+1),new X(1,n.length+1),[new ye(new j(1,1,e.length,e[e.length-1].length+1),new j(1,1,n.length,n[n.length-1].length+1))])],[],!1);const r=i.maxComputationTimeMs===0?Mt.instance:new uu(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,a=new Map;function l(b){let g=a.get(b);return g===void 0&&(g=a.size,a.set(b,g)),g}const o=e.map(b=>l(b.trim())),u=n.map(b=>l(b.trim())),c=new Is(o,e),d=new Is(u,n),m=c.length+d.length<1700?this.dynamicProgrammingDiffing.compute(c,d,r,(b,g)=>e[b]===n[g]?n[g].length===0?.1:1+Math.log(1+n[g].length):.99):this.myersDiffingAlgorithm.compute(c,d,r);let f=m.diffs,w=m.hitTimeout;f=Rs(c,d,f),f=xu(c,d,f);const p=[],x=b=>{if(s)for(let g=0;g<b;g++){const v=T+g,N=y+g;if(e[v]!==n[N]){const S=this.refineDiff(e,n,new ne(new G(v,v+1),new G(N,N+1)),r,s,i);for(const _ of S.mappings)p.push(_);S.hitTimeout&&(w=!0)}}};let T=0,y=0;for(const b of f){Ot(()=>b.seq1Range.start-T===b.seq2Range.start-y);const g=b.seq1Range.start-T;x(g),T=b.seq1Range.endExclusive,y=b.seq2Range.endExclusive;const v=this.refineDiff(e,n,b,r,s,i);v.hitTimeout&&(w=!0);for(const N of v.mappings)p.push(N)}x(e.length-T);const A=new rn(e),I=new rn(n),H=vs(p,A,I);let P=[];return i.computeMoves&&(P=this.computeMoves(H,e,n,o,u,r,s,i)),Ot(()=>{function b(v,N){if(v.lineNumber<1||v.lineNumber>N.length)return!1;const S=N[v.lineNumber-1];return!(v.column<1||v.column>S.length+1)}function g(v,N){return!(v.startLineNumber<1||v.startLineNumber>N.length+1||v.endLineNumberExclusive<1||v.endLineNumberExclusive>N.length+1)}for(const v of H){if(!v.innerChanges)return!1;for(const N of v.innerChanges)if(!(b(N.modifiedRange.getStartPosition(),n)&&b(N.modifiedRange.getEndPosition(),n)&&b(N.originalRange.getStartPosition(),e)&&b(N.originalRange.getEndPosition(),e)))return!1;if(!g(v.modified,n)||!g(v.original,e))return!1}return!0}),new tn(H,P,w)}computeMoves(e,n,i,r,s,a,l,o){return fu(e,n,i,r,s,a).map(d=>{const m=this.refineDiff(n,i,new ne(d.original.toOffsetRange(),d.modified.toOffsetRange()),a,l,o),f=vs(m.mappings,new rn(n),new rn(i),!0);return new jl(d,f)})}refineDiff(e,n,i,r,s,a){const o=Au(i).toRangeMapping2(e,n),u=new an(e,o.originalRange,s),c=new an(n,o.modifiedRange,s),d=u.length+c.length<500?this.dynamicProgrammingDiffing.compute(u,c,r):this.myersDiffingAlgorithm.compute(u,c,r);let m=d.diffs;return m=Rs(u,c,m),m=Ns(u,c,m,(w,p)=>w.findWordContaining(p)),a.extendToSubwords&&(m=Ns(u,c,m,(w,p)=>w.findSubWordContaining(p),!0)),m=yu(u,c,m),m=ku(u,c,m),{mappings:m.map(w=>new ye(u.translateRange(w.seq1Range),c.translateRange(w.seq2Range))),hitTimeout:d.hitTimeout}}}function Au(t){return new ve(new X(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new X(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const Hs={getLegacy:()=>new su,getDefault:()=>new Su};function $e(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class C{constructor(e,n,i,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=$e(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Te{constructor(e,n,i,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$e(Math.max(Math.min(1,n),0),3),this.l=$e(Math.max(Math.min(1,i),0),3),this.a=$e(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=e.a,a=Math.max(n,i,r),l=Math.min(n,i,r);let o=0,u=0;const c=(l+a)/2,d=a-l;if(d>0){switch(u=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),a){case n:o=(i-r)/d+(i<r?6:0);break;case i:o=(r-n)/d+2;break;case r:o=(n-i)/d+4;break}o*=60,o=Math.round(o)}return new Te(o,u,c,s)}static _hue2rgb(e,n,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(n-e)*6*i:i<1/2?n:i<2/3?e+(n-e)*(2/3-i)*6:e}static toRGBA(e){const n=e.h/360,{s:i,l:r,a:s}=e;let a,l,o;if(i===0)a=l=o=r;else{const u=r<.5?r*(1+i):r+i-r*i,c=2*r-u;a=Te._hue2rgb(c,u,n+1/3),l=Te._hue2rgb(c,u,n),o=Te._hue2rgb(c,u,n-1/3)}return new C(Math.round(a*255),Math.round(l*255),Math.round(o*255),s)}}class pt{constructor(e,n,i,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$e(Math.max(Math.min(1,n),0),3),this.v=$e(Math.max(Math.min(1,i),0),3),this.a=$e(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=Math.max(n,i,r),a=Math.min(n,i,r),l=s-a,o=s===0?0:l/s;let u;return l===0?u=0:s===n?u=((i-r)/l%6+6)%6:s===i?u=(r-n)/l+2:u=(n-i)/l+4,new pt(Math.round(u*60),o,s,e.a)}static toRGBA(
Line truncated
|
||||
`);s.lastIndex=0;let c;for(;(c=s.exec(u))!==null;){const d=u.substring(0,c.index),m=(d.match(/\n/g)||[]).length,f=a+m,w=c[0].split(`
|
||||
`),p=w.length,x=f+p-1,T=d.lastIndexOf(`
|
||||
`)+1,y=c.index-T+1,A=w[w.length-1],I=p===1?y+c[0].length:A.length+1,H={startLineNumber:f,startColumn:y,endLineNumber:x,endColumn:I},P=(c.groups??{}).label??"",b=((c.groups??{}).separator??"")!=="",g={range:H,text:P,hasSeparatorLine:b,shouldBeInComments:!0};(g.text||g.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<g.range.startLineNumber)&&n.push(g),s.lastIndex=c.index+c[0].length}}return n}function zu(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(Ru,""),{text:t,hasSeparatorLine:e}}class Hu{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Ii)}}var Bs;(function(t){async function e(i){let r;const s=await Promise.all(i.map(a=>a.then(l=>l,l=>{r||(r=l)})));if(typeof r<"u")throw r;return s}t.settled=e;function n(i){return new Promise(async(r,s)=>{try{await i(r,s)}catch(a){s(a)}})}t.withAsyncBody=n})(Bs||(Bs={}));class Uu{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new le("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new Hu;return this._unsatisfiedConsumers.push(e),e.p}}}const pe=class pe{constructor(e,n){this._onReturn=n,this._producerConsumer=new Uu,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async i=>(this._finishError(i),{done:!0,value:void 0})},queueMicrotask(async()=>{const i=e({emitOne:r=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:r}}),emitMany:r=>{for(const s of r)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:r=>this._finishError(r)});if(!this._producerConsumer.hasFinalValue)try{await i,this._finishOk()}catch(r){this._finishError(r)}})}static fromArray(e){return new pe(n=>{n.emitMany(e)})}static fromPromise(e){return new pe(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new pe(async n=>{await Promise.all(e.map(async i=>n.emitOne(await i)))})}static merge(e){return new pe(async n=>{await Promise.all(e.map(async i=>{for await(const r of i)n.emitOne(r)}))})}static map(e,n){return new pe(async i=>{for await(const r of e)i.emitOne(n(r))})}map(e){return pe.map(this,e)}static coalesce(e){return pe.filter(e,n=>!!n)}coalesce(){return pe.coalesce(this)}static filter(e,n){return new pe(async i=>{for await(const r of e)n(r)&&i.emitOne(r)})}filter(e){return pe.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};pe.EMPTY=pe.fromArray([]);let qs=pe;class Pu{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=at(e);const i=this.values,r=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=at(e),n=at(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=at(e),n=at(n);const i=this.values,r=this.prefixSum;if(e>=i.length)return!1;const s=i.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(i.length-n),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.suba
Line truncated
|
||||
`),r=Kn(n,i),s=Xe.ofText(n.substring(0,n.length-r)).addToPosition(this.range.getStartPosition()),a=i.substring(0,i.length-r),l=j.fromPositions(this.range.getStartPosition(),s);return new Le(l,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function fn(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return j.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new se("start must be before end");return new j(t.lineNumber,t.column,e.lineNumber,e.column)}class _e{static inverse(e,n,i){const r=[];let s=1,a=1;for(const o of e){const u=new _e(new Q(s,o.original.startLineNumber),new Q(a,o.modified.startLineNumber));u.modified.isEmpty||r.push(u),s=o.original.endLineNumberExclusive,a=o.modified.endLineNumberExclusive}const l=new _e(new Q(s,n+1),new Q(a,i+1));return l.modified.isEmpty||r.push(l),r}static clip(e,n,i){const r=[];for(const s of e){const a=s.original.intersect(n),l=s.modified.intersect(i);a&&!a.isEmpty&&l&&!l.isEmpty&&r.push(new _e(a,l))}return r}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new _e(this.modified,this.original)}join(e){return new _e(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new ve(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new se("not a valid diff");return new ve(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ve(new j(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new j(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Js(this.original.endLineNumberExclusive,e)&&Js(this.modified.endLineNumberExclusive,n))return new ve(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ve(j.fromPositions(new Y(this.original.startLineNumber,1),wt(new Y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(new Y(this.modified.startLineNumber,1),wt(new Y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ve(j.fromPositions(wt(new Y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),wt(new Y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(wt(new Y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),wt(new Y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new se}}function wt(t,e){if(t.lineNumber<1)return new Y(1,1);if(t.lineNumber>e.length)return new Y(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new Y(t.lineNumber,n.length+1):t}function Js(t,e){return t>=1&&t<=e.length}class Be extends _e{static fromRangeMappings(e){const n=Q.join(e.map(r=>Q.fromRangeInclusive(r.originalRange))),i=Q.join(e.map(r=>Q.fromRangeInclusive(r.modifiedRange)));return new Be(n,i,e)}constructor(e,n,i){super(e,n),this.innerChanges=i}flip(){return new Be(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Be(this.original,this.modified,[this.toRangeMapping()])}}class ve{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((r,s)=>new ve(r.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const i=e[n-1],r=e[n];if(!(i.originalRange.getEndPosition().isBeforeOrEqual(r.originalRange.getStartPosition())&&i.modifiedRange.getEndPosition().isBeforeOrEqual(r.modifiedRange.getStartPosition())))throw new se("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new ve(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new Le(this.originalRange,n)}}function _i(t,e,n,i=!1){const r=[];for(const s of ku(t.map(a=>Iu(a,e,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){const a=s[0],l=s[s.length-1];r.push(new Be(a.original.join(l.original),a.modified.join(l.modified),s.map(o=>o.innerChanges[0])))}return Rt(()=>!i&&r.length>0&&(r[0].modified.startLineNumber!==r[0].original.startLineNumber||n.length.lineCount-r[r.length-1].modified.endLineNumberExclusive!==e.length.
Line truncated
|
||||
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=r}computeSimilarity(e){let n=0;const i=Math.max(this.histogram.length,e.histogram.length);for(let r=0;r<i;r++)n+=Math.abs((this.histogram[r]??0)-(e.histogram[r]??0));return 1-n/(this.totalCount+e.totalCount)}};Xt.chrKeys=new Map;let pn=Xt;class Bu{compute(e,n,i=Ft.instance,r){if(e.length===0||n.length===0)return qe.trivial(e,n);const s=new xi(e.length,n.length),a=new xi(e.length,n.length),l=new xi(e.length,n.length);for(let w=0;w<e.length;w++)for(let p=0;p<n.length;p++){if(!i.isValid())return qe.trivialTimedOut(e,n);const x=w===0?0:s.get(w-1,p),y=p===0?0:s.get(w,p-1);let v;e.getElement(w)===n.getElement(p)?(w===0||p===0?v=0:v=s.get(w-1,p-1),w>0&&p>0&&a.get(w-1,p-1)===3&&(v+=l.get(w-1,p-1)),v+=r?r(w,p):1):v=-1;const S=Math.max(x,y,v);if(S===v){const I=w>0&&p>0?l.get(w-1,p-1):0;l.set(w,p,I+1),a.set(w,p,3)}else S===x?(l.set(w,p,0),a.set(w,p,1)):S===y&&(l.set(w,p,0),a.set(w,p,2));s.set(w,p,S)}const o=[];let u=e.length,h=n.length;function d(w,p){(w+1!==u||p+1!==h)&&o.push(new ie(new O(w+1,u),new O(p+1,h))),u=w,h=p}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(d(m,f),m--,f--):a.get(m,f)===1?m--:f--;return d(-1,-1),o.reverse(),new qe(o,!1)}}class Ks{compute(e,n,i=Ft.instance){if(e.length===0||n.length===0)return qe.trivial(e,n);const r=e,s=n;function a(p,x){for(;p<r.length&&x<s.length&&r.getElement(p)===s.getElement(x);)p++,x++;return p}let l=0;const o=new qu;o.set(0,a(0,0));const u=new Ou;u.set(0,o.get(0)===0?null:new ea(null,0,0,o.get(0)));let h=0;e:for(;;){if(l++,!i.isValid())return qe.trivialTimedOut(r,s);const p=-Math.min(l,s.length+l%2),x=Math.min(l,r.length+l%2);for(h=p;h<=x;h+=2){const y=h===x?-1:o.get(h+1),v=h===p?-1:o.get(h-1)+1,S=Math.min(Math.max(y,v),r.length),I=S-h;if(S>r.length||I>s.length)continue;const P=a(S,I);o.set(h,P);const F=S===y?u.get(h+1):u.get(h-1);if(u.set(h,P!==S?new ea(F,S,I,P-S):F),o.get(h)===r.length&&o.get(h)-h===s.length)break e}}let d=u.get(h);const m=[];let f=r.length,w=s.length;for(;;){const p=d?d.x+d.length:0,x=d?d.y+d.length:0;if((p!==f||x!==w)&&m.push(new ie(new O(p,f),new O(x,w))),!d)break;f=d.x,w=d.y,d=d.prev}return m.reverse(),new qe(m,!1)}}class ea{constructor(e,n,i,r){this.prev=e,this.x=n,this.y=i,this.length=r}}class qu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=n}}}class Ou{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class gn{constructor(e,n,i){this.lines=e,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let s=e[r-1],a=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!i){const u=s.trimStart();l=s.length-u.length,s=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const o=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,s.length):s.length;for(let u=0;u<o;u++)this.elements.push(s.charCodeAt(u));r<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new O(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=ia(e>0?this.elements[e-1]:-1),i=ia(e<this.elements.length?this.elements[e]:-1);if(n===7&&i===8)return 0;if(n===8)return 150;let r=0;return n!==i&&(r+=10,n===0&&i===1&&(r+=1)),r+=na(n),r+=na(i),r}translateOffset(e,n="right"){const i=bt(this.firstElementOffsetByLineIdx,s=>s<=e),r=e-this.firstElementOffsetByLineIdx[i];return new Y(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+r+(r===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const n=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(n)?j.fromPositions(i,i):j.fromPositions(n,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!vt(this.elements[e]))return;let n=e;for(;n>0&&vt(this.elements[n-1]);)n--;let i=e;for(;i<this.elements.length&&vt(this.elements[i]);)i++;return new O(n,i)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!vt(this.elements[e]))return
Line truncated
|
||||
`).length>=15&&$u(d,f=>f.length>=2)>=2}),a=Qu(t,a),a}function $u(t,e){let n=0;for(const i of t)e(i)&&n++;return n}function Gu(t,e,n,i){const r=[],s=t.filter(o=>o.modified.isEmpty&&o.original.length>=3).map(o=>new pn(o.original,e,o)),a=new Set(t.filter(o=>o.original.isEmpty&&o.modified.length>=3).map(o=>new pn(o.modified,n,o))),l=new Set;for(const o of s){let u=-1,h;for(const d of a){const m=o.computeSimilarity(d);m>u&&(u=m,h=d)}if(u>.9&&h&&(a.delete(h),r.push(new _e(o.range,h.range)),l.add(o.source),l.add(h.source)),!i.isValid())return{moves:r,excludedChanges:l}}return{moves:r,excludedChanges:l}}function Xu(t,e,n,i,r,s){const a=[],l=new du;for(const m of t)for(let f=m.original.startLineNumber;f<m.original.endLineNumberExclusive-2;f++){const w=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;l.add(w,{range:new Q(f,f+3)})}const o=[];t.sort(pt(m=>m.modified.startLineNumber,Ht));for(const m of t){let f=[];for(let w=m.modified.startLineNumber;w<m.modified.endLineNumberExclusive-2;w++){const p=`${n[w-1]}:${n[w+1-1]}:${n[w+2-1]}`,x=new Q(w,w+3),y=[];l.forEach(p,({range:v})=>{for(const I of f)if(I.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&I.modifiedLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive){I.originalLineRange=new Q(I.originalLineRange.startLineNumber,v.endLineNumberExclusive),I.modifiedLineRange=new Q(I.modifiedLineRange.startLineNumber,x.endLineNumberExclusive),y.push(I);return}const S={modifiedLineRange:x,originalLineRange:v};o.push(S),y.push(S)}),f=y}if(!s.isValid())return[]}o.sort(Cu(pt(m=>m.modifiedLineRange.length,Ht)));const u=new Ne,h=new Ne;for(const m of o){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,w=u.subtractFrom(m.modifiedLineRange),p=h.subtractFrom(m.originalLineRange).getWithDelta(f),x=w.getIntersection(p);for(const y of x.ranges){if(y.length<3)continue;const v=y,S=y.delta(-f);a.push(new _e(S,v)),u.addRange(v),h.addRange(S)}}a.sort(pt(m=>m.original.startLineNumber,Ht));const d=new hn(t);for(let m=0;m<a.length;m++){const f=a[m],w=d.findLastMonotonous(F=>F.original.startLineNumber<=f.original.startLineNumber),p=gt(t,F=>F.modified.startLineNumber<=f.modified.startLineNumber),x=Math.max(f.original.startLineNumber-w.original.startLineNumber,f.modified.startLineNumber-p.modified.startLineNumber),y=d.findLastMonotonous(F=>F.original.startLineNumber<f.original.endLineNumberExclusive),v=gt(t,F=>F.modified.startLineNumber<f.modified.endLineNumberExclusive),S=Math.max(y.original.endLineNumberExclusive-f.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive);let I;for(I=0;I<x;I++){const F=f.original.startLineNumber-I-1,b=f.modified.startLineNumber-I-1;if(F>i.length||b>r.length||u.contains(b)||h.contains(F)||!ra(i[F-1],r[b-1],s))break}I>0&&(h.addRange(new Q(f.original.startLineNumber-I,f.original.startLineNumber)),u.addRange(new Q(f.modified.startLineNumber-I,f.modified.startLineNumber)));let P;for(P=0;P<S;P++){const F=f.original.endLineNumberExclusive+P,b=f.modified.endLineNumberExclusive+P;if(F>i.length||b>r.length||u.contains(b)||h.contains(F)||!ra(i[F-1],r[b-1],s))break}P>0&&(h.addRange(new Q(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+P)),u.addRange(new Q(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+P))),(I>0||P>0)&&(a[m]=new _e(new Q(f.original.startLineNumber-I,f.original.endLineNumberExclusive+P),new Q(f.modified.startLineNumber-I,f.modified.endLineNumberExclusive+P)))}return a}function ra(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const r=new Ks().compute(new gn([t],new j(1,1,1,t.length),!1),new gn([e],new j(1,1,1,e.length),!1),n);let s=0;const a=ie.invert(r.diffs,t.length);for(const h of a)h.seq1Range.forEach(d=>{Ti(t.charCodeAt(d))||s++});function l(h){let d=0;for(let m=0;m<t.length;m++)Ti(h.charCodeAt(m))||d++;return d}const o=l(t.length>e.length?t:e);return s/o>.6&&o>10}function Ju(t){if(t.length===0)return t;t.sort(pt(n=>n.original.startLineNumber,Ht));const e=[t[0]];for(let n=1;n<t.length;n++){const i=e[e.length-1],r=t[n],s=r.original.startLineNumber-i.original.endLineNumberExclusive,a=r.modified.startLineNumber-i.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=i.join(r);continue}e.push(r)}return e}function Qu(t,e){const n=new hn(t);return e=e.filter(i=>{const r=n.findLastMonotonous(l=>l.original.startLineNumber<i.original.endLineNumberExclusive)||new _e(new Q(1,1),new Q(1,1)),s=gt(t,l=>l.modified.startLineNumber<i.modified.endLineNumberExclusive);return r!==s}),e}function sa(t,e,n){let i=n;return i=aa(t,e,i),i=aa(t,e,i),i=Yu(t,e,i),i}function aa(t,e,n){if(n.length===0)return n;const i=[];i.push(n[0]);for(let s=1;s<n.length;s++){const a=i[i.length-1];let l=n[s];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const o=l.seq1Range.start-a.seq1Range.endExclusive;let u;for(u=1;u<=o&&!(t.getElement(l.seq1Range.start-u)!==t.getElement(l.seq1Range.endExclusive-u)||e.getElement(l.seq2Range
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function ca(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class nc{constructor(){this.dynamicProgrammingDiffing=new Bu,this.myersDiffingAlgorithm=new Ks}computeDiff(e,n,i){if(e.length<=1&&Tu(e,n,(b,g)=>b===g))return new Ut([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Ut([new Be(new Q(1,e.length+1),new Q(1,n.length+1),[new ve(new j(1,1,e.length,e[e.length-1].length+1),new j(1,1,n.length,n[n.length-1].length+1))])],[],!1);const r=i.maxComputationTimeMs===0?Ft.instance:new Fu(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,a=new Map;function l(b){let g=a.get(b);return g===void 0&&(g=a.size,a.set(b,g)),g}const o=e.map(b=>l(b.trim())),u=n.map(b=>l(b.trim())),h=new ua(o,e),d=new ua(u,n),m=h.length+d.length<1700?this.dynamicProgrammingDiffing.compute(h,d,r,(b,g)=>e[b]===n[g]?n[g].length===0?.1:1+Math.log(1+n[g].length):.99):this.myersDiffingAlgorithm.compute(h,d,r);let f=m.diffs,w=m.hitTimeout;f=sa(h,d,f),f=ec(h,d,f);const p=[],x=b=>{if(s)for(let g=0;g<b;g++){const _=y+g,M=v+g;if(e[_]!==n[M]){const A=this.refineDiff(e,n,new ie(new O(_,_+1),new O(M,M+1)),r,s,i);for(const T of A.mappings)p.push(T);A.hitTimeout&&(w=!0)}}};let y=0,v=0;for(const b of f){Rt(()=>b.seq1Range.start-y===b.seq2Range.start-v);const g=b.seq1Range.start-y;x(g),y=b.seq1Range.endExclusive,v=b.seq2Range.endExclusive;const _=this.refineDiff(e,n,b,r,s,i);_.hitTimeout&&(w=!0);for(const M of _.mappings)p.push(M)}x(e.length-y);const S=new dn(e),I=new dn(n),P=_i(p,S,I);let F=[];return i.computeMoves&&(F=this.computeMoves(P,e,n,o,u,r,s,i)),Rt(()=>{function b(_,M){if(_.lineNumber<1||_.lineNumber>M.length)return!1;const A=M[_.lineNumber-1];return!(_.column<1||_.column>A.length+1)}function g(_,M){return!(_.startLineNumber<1||_.startLineNumber>M.length+1||_.endLineNumberExclusive<1||_.endLineNumberExclusive>M.length+1)}for(const _ of P){if(!_.innerChanges)return!1;for(const M of _.innerChanges)if(!(b(M.modifiedRange.getStartPosition(),n)&&b(M.modifiedRange.getEndPosition(),n)&&b(M.originalRange.getStartPosition(),e)&&b(M.originalRange.getEndPosition(),e)))return!1;if(!g(_.modified,n)||!g(_.original,e))return!1}return!0}),new Ut(P,F,w)}computeMoves(e,n,i,r,s,a,l,o){return ju(e,n,i,r,s,a).map(d=>{const m=this.refineDiff(n,i,new ie(d.original.toOffsetRange(),d.modified.toOffsetRange()),a,l,o),f=_i(m.mappings,new dn(n),new dn(i),!0);return new js(d,f)})}refineDiff(e,n,i,r,s,a){const o=ic(i).toRangeMapping2(e,n),u=new gn(e,o.originalRange,s),h=new gn(n,o.modifiedRange,s),d=u.length+h.length<500?this.dynamicProgrammingDiffing.compute(u,h,r):this.myersDiffingAlgorithm.compute(u,h,r);let m=d.diffs;return m=sa(u,h,m),m=la(u,h,m,(w,p)=>w.findWordContaining(p)),a.extendToSubwords&&(m=la(u,h,m,(w,p)=>w.findSubWordContaining(p),!0)),m=Zu(u,h,m),m=tc(u,h,m),{mappings:m.map(w=>new ve(u.translateRange(w.seq1Range),h.translateRange(w.seq2Range))),hitTimeout:d.hitTimeout}}}function ic(t){return new _e(new Q(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Q(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var Je;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(Je||(Je={}));const rc="tkn";class sc{constructor(){this._hosts=Object.create(null),this._ports=Object.cre
Line truncated
|
||||
`)),s=new mn(n.join(`
|
||||
`)),a=this._computer.computeDiff(r.value,s.value,{ignoreTrimWhitespace:!0,computeMoves:i.computeMoves,extendToSubwords:i.extendToSubwords}),l=r.getTransformer(),o=s.getTransformer(),u=[];let h=0;for(const f of a.edits.replacements){const w=f.range.start+h,p=w+f.newText.length,x=l.getRange(new O(f.range.start,f.range.endExclusive)),y=o.getRange(new O(w,p));u.push(new ve(x,y)),h+=f.newText.length-(f.range.endExclusive-f.range.start)}const d=_i(u,r,s),m=[];if(i.computeMoves)for(const f of a.moves){const w=l.getPosition(f.range.original.start),p=l.getPosition(f.range.original.endExclusive),x=o.getPosition(f.range.modified.start),y=o.getPosition(f.range.modified.endExclusive),v=new Q(w.lineNumber,p.lineNumber),S=new Q(x.lineNumber,y.lineNumber);m.push(new js(new _e(v,S),[]))}return new Ut(d,m,a.hitTimeout)}}const wn={getLegacy:()=>new Pu,getDefault:()=>new nc,getAdvancedExternal:()=>ma(!1),getAdvancedWasm:()=>ma(!0)};function Ye(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class C{constructor(e,n,i,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class ke{constructor(e,n,i,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Ye(Math.max(Math.min(1,n),0),3),this.l=Ye(Math.max(Math.min(1,i),0),3),this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=e.a,a=Math.max(n,i,r),l=Math.min(n,i,r);let o=0,u=0;const h=(l+a)/2,d=a-l;if(d>0){switch(u=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),a){case n:o=(i-r)/d+(i<r?6:0);break;case i:o=(r-n)/d+2;break;case r:o=(n-i)/d+4;break}o*=60,o=Math.round(o)}return new ke(o,u,h,s)}static _hue2rgb(e,n,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(n-e)*6*i:i<1/2?n:i<2/3?e+(n-e)*(2/3-i)*6:e}static toRGBA(e){const n=e.h/360,{s:i,l:r,a:s}=e;let a,l,o;if(i===0)a=l=o=r;else{const u=r<.5?r*(1+i):r+i-r*i,h=2*r-u;a=ke._hue2rgb(h,u,n+1/3),l=ke._hue2rgb(h,u,n),o=ke._hue2rgb(h,u,n-1/3)}return new C(Math.round(a*255),Math.round(l*255),Math.round(o*255),s)}}class yt{constructor(e,n,i,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Ye(Math.max(Math.min(1,n),0),3),this.v=Ye(Math.max(Math.min(1,i),0),3),this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=Math.max(n,i,r),a=Math.min(n,i,r),l=s-a,o=s===0?0:l/s;let u;return l===0?u=0:s===n?u=((i-r)/l%6+6)%6:s===i?u=(r-n)/l+2:u=(n-i)/l+4,new yt(Math.round(u*60),o,s,e.a)}static toRGBA(e){const{h:n,s:i,v:r,a:s}=e,a=r*i,l=a*(1-Math.abs(n/60%2-1)),o=r-a;let[u,h,d]=[0,0,0];return n<60?(u=a,h=l):n<120?(u=l,h=a):n<180?(h=a,d=l):n<240?(h=l,d=a):n<300?(u=l,d=a):n<=360&&(u=a,d=l),u=Math.round((u+o)*255),h=Math.round((h+o)*255),d=Math.round((d+o)*255),new C(u,h,d,s)}}let _n=(K=class{static fromHex(e){return K.Format.CSS.parseHex(e)||K.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:ke.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:yt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof C)this.rgba=e;else if(e instanceof ke)this._hsla=e,this.rgba=ke.toRGBA(e);else if(e instanceof yt)this._hsva=e,this.rgba=yt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&C.equals(this.rgba,e.rgba)&&ke.equals(this.hsla,e.hsla)&&yt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=K._relativeLuminanceForComponent(this.rgba.r),n=K._relativeLuminanceForComponent(this.rgba.g),i=K._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*n+.0722*i;return Ye(r,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n>i}isDarkerThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n<i}lighten(e){return new K(new ke(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new K(new ke(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:i,b:r,a:s}=this.rgba;return new K(new C(n,i,r,s*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new K(new C(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const i=Math.min(Math.max(n,0),1),r=this.rgba,s=e.rgba,a=r.r+(s.r-r.r)*i,l=r.g+(s.g-r.g)*i,o=r.b+(s.b-r.b)*i,u=r.a+(s.a-r.a)*i;return new K(new C(a,l,o,u))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:i,b:r,a:s}=this.rgba;return new K(new C(e.rgba.r-s*(e.rgba.r-n),e.rgba.g-s*(e.rgba.g-i),e.rgba.b-s*(e.rgba.
Line truncated
|
||||
`);s.lastIndex=0;let h;for(;(h=s.exec(u))!==null;){const d=u.substring(0,h.index),m=(d.match(/\n/g)||[]).length,f=a+m,w=h[0].split(`
|
||||
`),p=w.length,x=f+p-1,y=d.lastIndexOf(`
|
||||
`)+1,v=h.index-y+1,S=w[w.length-1],I=p===1?v+h[0].length:S.length+1,P={startLineNumber:f,startColumn:v,endLineNumber:x,endColumn:I},F=(h.groups??{}).label??"",b=((h.groups??{}).separator??"")!=="",g={range:P,text:F,hasSeparatorLine:b,shouldBeInComments:!0};(g.text||g.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<g.range.startLineNumber)&&n.push(g),s.lastIndex=h.index+h[0].length}}return n}function Sc(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(vc,""),{text:t,hasSeparatorLine:e}}class wa{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new ir)}}var _a;(function(t){async function e(i){let r;const s=await Promise.all(i.map(a=>a.then(l=>l,l=>{r||(r=l)})));if(typeof r<"u")throw r;return s}t.settled=e;function n(i){return new Promise(async(r,s)=>{try{await i(r,s)}catch(a){s(a)}})}t.withAsyncBody=n})(_a||(_a={}));class Ac{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new se("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new wa;return this._unsatisfiedConsumers.push(e),e.p}}}const de=class de{constructor(e,n){this._onReturn=n,this._producerConsumer=new Ac,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async i=>(this._finishError(i),{done:!0,value:void 0})},queueMicrotask(async()=>{const i=e({emitOne:r=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:r}}),emitMany:r=>{for(const s of r)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:r=>this._finishError(r)});if(!this._producerConsumer.hasFinalValue)try{await i,this._finishOk()}catch(r){this._finishError(r)}})}static fromArray(e){return new de(n=>{n.emitMany(e)})}static fromPromise(e){return new de(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new de(async n=>{await Promise.all(e.map(async i=>n.emitOne(await i)))})}static merge(e){return new de(async n=>{await Promise.all(e.map(async i=>{for await(const r of i)n.emitOne(r)}))})}static map(e,n){return new de(async i=>{for await(const r of e)i.emitOne(n(r))})}static tee(e){let n,i;const r=new wa,s=async()=>{if(!(!n||!i))try{for await(const o of e)n.emitOne(o),i.emitOne(o)}catch(o){n.reject(o),i.reject(o)}finally{r.complete()}},a=new de(async o=>(n=o,s(),r.p)),l=new de(async o=>(i=o,s(),r.p));return[a,l]}map(e){return de.map(this,e)}static coalesce(e){return de.filter(e,n=>!!n)}coalesce(){return de.coalesce(this)}static filter(e,n){return new de(async i=>{for await(const r of e)n(r)&&i.emitOne(r)})}filter(e){return de.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};de.EMPTY=de.fromArray([]);let va=de;class Lc{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=mt(e);const i=this.values,r=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=mt(e),n=mt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=mt(e),n=mt(n);const i=this.values,r=this.prefixSum;if(e>=i.length)return!1;const s=i.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(i.length
Line truncated
|
||||
`,s==="\r"&&r+1<n.length&&n.charAt(r+1)===`
|
||||
`&&r++}i&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return se.create(0,e);for(;i<r;){let a=Math.floor((i+r)/2);n[a]>e?r=a:i=a+1}let s=i-1;return se.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}};var E;(function(t){const e=Object.prototype.toString;function n(f){return typeof f<"u"}t.defined=n;function i(f){return typeof f>"u"}t.undefined=i;function r(f){return f===!0||f===!1}t.boolean=r;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function l(f,w,p){return e.call(f)==="[object Number]"&&w<=f&&f<=p}t.numberRange=l;function o(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=o;function u(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=u;function c(f){return e.call(f)==="[object Function]"}t.func=c;function d(f){return f!==null&&typeof f=="object"}t.objectLiteral=d;function m(f,w){return Array.isArray(f)&&f.every(w)}t.typedArray=m})(E||(E={}));class Ht{constructor(e,n,i,r){this._uri=e,this._languageId=n,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(n,i)}return this._content}update(e,n){for(let i of e)if(Ht.isIncremental(i)){const r=Ua(i.range),s=this.offsetAt(r.start),a=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);const l=Math.max(r.start.line,0),o=Math.max(r.end.line,0);let u=this._lineOffsets;const c=Ha(i.text,!1,s);if(o-l===c.length)for(let m=0,f=c.length;m<f;m++)u[m+l+1]=c[m];else c.length<1e4?u.splice(l+1,o-l,...c):this._lineOffsets=u=u.slice(0,l+1).concat(c,u.slice(o+1));const d=i.text.length-(a-s);if(d!==0)for(let m=l+1+c.length,f=u.length;m<f;m++)u[m]=u[m]+d}else if(Ht.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ha(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return{line:0,character:e};for(;i<r;){let a=Math.floor((i+r)/2);n[a]>e?r=a:i=a+1}let s=i-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Ai;(function(t){function e(r,s,a,l){return new Ht(r,s,a,l)}t.create=e;function n(r,s,a){if(r instanceof Ht)return r.update(s,a),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function i(r,s){let a=r.getText(),l=Li(s.map(Xu),(c,d)=>{let m=c.range.start.line-d.range.start.line;return m===0?c.range.start.character-d.range.start.character:m}),o=0;const u=[];for(const c of l){let d=r.offsetAt(c.range.start);if(d<o)throw new Error("Overlapping edit");d>o&&u.push(a.substring(o,d)),c.newText.length&&u.push(c.newText),o=r.offsetAt(c.range.end)}return u.push(a.substr(o)),u.join("")}t.applyEdits=i})(Ai||(Ai={}));function Li(t,e){if(t.length<=1)return t;const n=t.length/2|0,i=t.slice(0,n),r=t.slice(n);Li(i,e),Li(r,e);let s=0,a=0,l=0;for(;s<i.length&&a<r.length;)e(i[s],r[a])<=0?t[l++]=i[s++]:t[l++]=r[a++];for(;s<i.length;)t[l++]=i[s++];for(;a<r.length;)t[l++]=r[a++];return t}function Ha(t,e,n=0){const i=e?[n]:[];for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);(s===13||s===10)&&(s===13&&r+1<t.length&&t.charCodeAt(r+1)===10&&r++,i.push(n+r+1))}return i}function Ua(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Xu(t){const e=Ua(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var z;(function(t){t[t.StartCommentTag=0]="StartCommentTag",t[t.Comment=1]="Comment",t[t.EndCommentTag=2]="EndCommentTag",t[t.StartTagOpen=3]="StartTagOpen",t[t.StartTagClose=4]="StartTagClose",t[t.StartTagSelfClose=5]="StartTagSelfClose",t[t.StartTag=6]="StartTag",t[t.EndTagOpen=7]="EndTagOpen",t[t.EndTagClose=8]="EndTagClose",t[t.EndTag=9]="EndTag",t[t.Delimi
Line truncated
|
||||
`,"nexist;":"∄","nexists;":"∄","Nfr;":"𝔑","nfr;":"𝔫","ngE;":"≧̸","nge;":"≱","ngeq;":"≱","ngeqq;":"≧̸","ngeqslant;":"⩾̸","nges;":"⩾̸","nGg;":"⋙̸","ngsim;":"≵","nGt;":"≫⃒","ngt;":"≯","ngtr;":"≯","nGtv;":"≫̸","nhArr;":"⇎","nharr;":"↮","nhpar;":"⫲","ni;":"∋","nis;":"⋼","nisd;":"⋺","niv;":"∋","NJcy;":"Њ","njcy;":"њ","nlArr;":"⇍","nlarr;":"↚","nldr;":"‥","nlE;":"≦̸","nle;":"≰","nLeftarrow;":"⇍","nleftarrow;":"↚","nLeftrightarrow;":"⇎","nleftrightarrow;":"↮","nleq;":"≰","nleqq;":"≦̸","nleqslant;":"⩽̸","nles;":"⩽̸","nless;":"≮","nLl;":"⋘̸","nlsim;":"≴","nLt;":"≪⃒","nlt;":"≮","nltri;":"⋪","nltrie;":"⋬","nLtv;":"≪̸","nmid;":"∤","NoBreak;":"","NonBreakingSpace;":" ","Nopf;":"ℕ","nopf;":"𝕟","Not;":"⫬","not;":"¬",not:"¬","NotCongruent;":"≢","NotCupCap;":"≭","NotDoubleVerticalBar;":"∦","NotElement;":"∉","NotEqual;":"≠","NotEqualTilde;":"≂̸","NotExists;":"∄","NotGreater;":"≯","NotGreaterEqual;":"≱","NotGreaterFullEqual;":"≧̸","NotGreaterGreater;":"≫̸","NotGreaterLess;":"≹","NotGreaterSlantEqual;":"⩾̸","NotGreaterTilde;":"≵","NotHumpDownHump;":"≎̸","NotHumpEqual;":"≏̸","notin;":"∉","notindot;":"⋵̸","notinE;":"⋹̸","notinva;":"∉","notinvb;":"⋷","notinvc;":"⋶","NotLeftTriangle;":"⋪","NotLeftTriangleBar;":"⧏̸","NotLeftTriangleEqual;":"⋬","NotLess;":"≮","NotLessEqual;":"≰","NotLessGreater;":"≸","NotLessLess;":"≪̸","NotLessSlantEqual;":"⩽̸","NotLessTilde;":"≴","NotNestedGreaterGreater;":"⪢̸","NotNestedLessLess;":"⪡̸","notni;":"∌","notniva;":"∌","notnivb;":"⋾","notnivc;":"⋽","NotPrecedes;":"⊀","NotPrecedesEqual;":"⪯̸","NotPrecedesSlantEqual;":"⋠","NotReverseElement;":"∌","NotRightTriangle;":"⋫","NotRightTriangleBar;":"⧐̸","NotRightTriangleEqual;":"⋭","NotSquareSubset;":"⊏̸","NotSquareSubsetEqual;":"⋢","NotSquareSuperset;":"⊐̸","NotSquareSupersetEqual;":"⋣","NotSubset;":"⊂⃒","NotSubsetEqual;":"⊈","NotSucceeds;":"⊁","NotSucceedsEqual;":"⪰̸","NotSucceedsSlantEqual;":"⋡","NotSucceedsTilde;":"≿̸","NotSuperset;":"⊃⃒","NotSupersetEqual;":"⊉","NotTilde;":"≁","NotTildeEqual;":"≄","NotTildeFullEqual;":"≇","NotTildeTilde;":"≉","NotVerticalBar;":"∤","npar;":"∦","nparallel;":"∦","nparsl;":"⫽⃥","npart;":"∂̸","npolint;":"⨔","npr;":"⊀","nprcue;":"⋠","npre;":"⪯̸","nprec;":"⊀","npreceq;":"⪯̸","nrArr;":"⇏","nrarr;":"↛","nrarrc;":"⤳̸","nrarrw;":"↝̸","nRightarrow;":"⇏","nrightarrow;":"↛","nrtri;":"⋫","nrtrie;":"⋭","nsc;":"⊁","nsccue;":"⋡","nsce;":"⪰̸","Nscr;":"𝒩","nscr;":"𝓃","nshortmid;":"∤","nshortparallel;":"∦","nsim;":"≁","nsime;":"≄","nsimeq;":"≄","nsmid;":"∤","nspar;":"∦","nsqsube;":"⋢","nsqsupe;":"⋣","nsub;":"⊄","nsubE;":"⫅̸","nsube;":"⊈","nsubset;":"⊂⃒","nsubseteq;":"⊈","nsubseteqq;":"⫅̸","nsucc;":"⊁","nsucceq;":"⪰̸","nsup;":"⊅","nsupE;":"⫆̸","nsupe;":"⊉","nsupset;":"⊃⃒","nsupseteq;":"⊉","nsupseteqq;":"⫆̸","ntgl;":"≹","Ntilde;":"Ñ",Ntilde:"Ñ","ntilde;":"ñ",ntilde:"ñ","ntlg;":"≸","ntriangleleft;":"⋪","ntrianglelefteq;":"⋬","ntriangleright;":"⋫","ntrianglerighteq;":"⋭","Nu;":"Ν","nu;":"ν","num;":"#","numero;":"№","numsp;":" ","nvap;":"≍⃒","nVDash;":"⊯","nVdash;":"⊮","nvDash;":"⊭","nvdash;":"⊬","nvge;":"≥⃒","nvgt;":">⃒","nvHarr;":"⤄","nvinfin;":"⧞","nvlArr;":"⤂","nvle;":"≤⃒","nvlt;":"<⃒","nvltrie;":"⊴⃒","nvrArr;":"⤃","nvrtrie;":"⊵⃒","nvsim;":"∼⃒","nwarhk;":"⤣","nwArr;":"⇖","nwarr;":"↖","nwarrow;":"↖","nwnear;":"⤧","Oacute;":"Ó",Oacute:"Ó","oacute;":"ó",oacute:"ó","oast;":"⊛","ocir;":"⊚","Ocirc;":"Ô",Ocirc:"Ô","ocirc;":"ô",ocirc:"ô","Ocy;":"О","ocy;":"о","odash;":"⊝","Odblac;":"Ő","odblac;":"ő","odiv;":"⨸","odot;":"⊙","odsold;":"⦼","OElig;":"Œ","oelig;":"œ","ofcir;":"⦿","Ofr;":"𝔒","ofr;":"𝔬","ogon;":"˛","Ograve;":"Ò",Ograve:"Ò","ograve;":"ò",ograve:"ò","ogt;":"⧁","ohbar;":"⦵","ohm;":"Ω","oint;":"∮","olarr;":"↺","olcir;":"⦾","olcross;":"⦻","oline;":"‾","olt;":"⧀","Omacr;":"Ō","omacr;":"ō","Omega;":"Ω","omega;":"ω","Omicron;":"Ο","omicron;":"ο","omid;":"⦶","ominus;":"⊖","Oopf;":"𝕆","oopf;":"𝕠","opar;":"⦷","OpenCurlyDoubleQuote;":"“","OpenCurlyQuote;":"‘","operp;":"⦹","oplus;":"⊕","Or;":"⩔","or;":"∨","orarr;":"↻","ord;":"⩝","order;":"ℴ","orderof;":"ℴ","ordf;":"ª",ordf:"ª","ordm;":"º",ordm:"º","origof;":"⊶","oror;":"⩖","orslope;":"⩗","orv;":"⩛","oS;":"Ⓢ","Oscr;":"𝒪","oscr;":"ℴ","Oslash;":"Ø",Oslash:"Ø","oslash;":"ø",oslash:"ø","osol;":"⊘","Otilde;":"Õ",Otilde:"Õ","otilde;":"õ",otilde:"õ","Otimes;":"⨷","otimes;":"⊗","otimesas;":"⨶","Ouml;":"Ö",Ouml:"Ö","ouml;":"ö",ouml:"ö","ovbar;":"⌽","OverBar;":"‾","OverBrace;":"⏞","OverBracket;":"⎴","OverParenthesis;":"⏜","par;"
Line truncated
|
||||
`&&r++}i&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return oe.create(0,e);for(;i<r;){let a=Math.floor((i+r)/2);n[a]>e?r=a:i=a+1}let s=i-1;return oe.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}};var D;(function(t){const e=Object.prototype.toString;function n(f){return typeof f<"u"}t.defined=n;function i(f){return typeof f>"u"}t.undefined=i;function r(f){return f===!0||f===!1}t.boolean=r;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function l(f,w,p){return e.call(f)==="[object Number]"&&w<=f&&f<=p}t.numberRange=l;function o(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=o;function u(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=u;function h(f){return e.call(f)==="[object Function]"}t.func=h;function d(f){return f!==null&&typeof f=="object"}t.objectLiteral=d;function m(f,w){return Array.isArray(f)&&f.every(w)}t.typedArray=m})(D||(D={}));class Vt{constructor(e,n,i,r){this._uri=e,this._languageId=n,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(n,i)}return this._content}update(e,n){for(let i of e)if(Vt.isIncremental(i)){const r=go(i.range),s=this.offsetAt(r.start),a=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);const l=Math.max(r.start.line,0),o=Math.max(r.end.line,0);let u=this._lineOffsets;const h=po(i.text,!1,s);if(o-l===h.length)for(let m=0,f=h.length;m<f;m++)u[m+l+1]=h[m];else h.length<1e4?u.splice(l+1,o-l,...h):this._lineOffsets=u=u.slice(0,l+1).concat(h,u.slice(o+1));const d=i.text.length-(a-s);if(d!==0)for(let m=l+1+h.length,f=u.length;m<f;m++)u[m]=u[m]+d}else if(Vt.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=po(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return{line:0,character:e};for(;i<r;){let a=Math.floor((i+r)/2);n[a]>e?r=a:i=a+1}let s=i-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var $i;(function(t){function e(r,s,a,l){return new Vt(r,s,a,l)}t.create=e;function n(r,s,a){if(r instanceof Vt)return r.update(s,a),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function i(r,s){let a=r.getText(),l=Gi(s.map(Hc),(h,d)=>{let m=h.range.start.line-d.range.start.line;return m===0?h.range.start.character-d.range.start.character:m}),o=0;const u=[];for(const h of l){let d=r.offsetAt(h.range.start);if(d<o)throw new Error("Overlapping edit");d>o&&u.push(a.substring(o,d)),h.newText.length&&u.push(h.newText),o=r.offsetAt(h.range.end)}return u.push(a.substr(o)),u.join("")}t.applyEdits=i})($i||($i={}));function Gi(t,e){if(t.length<=1)return t;const n=t.length/2|0,i=t.slice(0,n),r=t.slice(n);Gi(i,e),Gi(r,e);let s=0,a=0,l=0;for(;s<i.length&&a<r.length;)e(i[s],r[a])<=0?t[l++]=i[s++]:t[l++]=r[a++];for(;s<i.length;)t[l++]=i[s++];for(;a<r.length;)t[l++]=r[a++];return t}function po(t,e,n=0){const i=e?[n]:[];for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);(s===13||s===10)&&(s===13&&r+1<t.length&&t.charCodeAt(r+1)===10&&r++,i.push(n+r+1))}return i}function go(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Hc(t){const e=go(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var z;(function(t){t[t.StartCommentTag=0]="StartCommentTag",t[t.Comment=1]="Comment",t[t.EndCommentTag=2]="EndCommentTag",t[t.StartTagOpen=3]="StartTagOpen",t[t.StartTagClose=4]="StartTagClose",t[t.StartTagSelfClose=5]="StartTagSelfClose",t[t.StartTag=6]="StartTag",t[t.EndTagOpen=7]="EndTagOpen",t[t.EndTagClose=8]="EndTagClose",t[t.EndTag=9]="EndTag",t[t.Delimi
Line truncated
|
||||
`,"nexist;":"∄","nexists;":"∄","Nfr;":"𝔑","nfr;":"𝔫","ngE;":"≧̸","nge;":"≱","ngeq;":"≱","ngeqq;":"≧̸","ngeqslant;":"⩾̸","nges;":"⩾̸","nGg;":"⋙̸","ngsim;":"≵","nGt;":"≫⃒","ngt;":"≯","ngtr;":"≯","nGtv;":"≫̸","nhArr;":"⇎","nharr;":"↮","nhpar;":"⫲","ni;":"∋","nis;":"⋼","nisd;":"⋺","niv;":"∋","NJcy;":"Њ","njcy;":"њ","nlArr;":"⇍","nlarr;":"↚","nldr;":"‥","nlE;":"≦̸","nle;":"≰","nLeftarrow;":"⇍","nleftarrow;":"↚","nLeftrightarrow;":"⇎","nleftrightarrow;":"↮","nleq;":"≰","nleqq;":"≦̸","nleqslant;":"⩽̸","nles;":"⩽̸","nless;":"≮","nLl;":"⋘̸","nlsim;":"≴","nLt;":"≪⃒","nlt;":"≮","nltri;":"⋪","nltrie;":"⋬","nLtv;":"≪̸","nmid;":"∤","NoBreak;":"","NonBreakingSpace;":" ","Nopf;":"ℕ","nopf;":"𝕟","Not;":"⫬","not;":"¬",not:"¬","NotCongruent;":"≢","NotCupCap;":"≭","NotDoubleVerticalBar;":"∦","NotElement;":"∉","NotEqual;":"≠","NotEqualTilde;":"≂̸","NotExists;":"∄","NotGreater;":"≯","NotGreaterEqual;":"≱","NotGreaterFullEqual;":"≧̸","NotGreaterGreater;":"≫̸","NotGreaterLess;":"≹","NotGreaterSlantEqual;":"⩾̸","NotGreaterTilde;":"≵","NotHumpDownHump;":"≎̸","NotHumpEqual;":"≏̸","notin;":"∉","notindot;":"⋵̸","notinE;":"⋹̸","notinva;":"∉","notinvb;":"⋷","notinvc;":"⋶","NotLeftTriangle;":"⋪","NotLeftTriangleBar;":"⧏̸","NotLeftTriangleEqual;":"⋬","NotLess;":"≮","NotLessEqual;":"≰","NotLessGreater;":"≸","NotLessLess;":"≪̸","NotLessSlantEqual;":"⩽̸","NotLessTilde;":"≴","NotNestedGreaterGreater;":"⪢̸","NotNestedLessLess;":"⪡̸","notni;":"∌","notniva;":"∌","notnivb;":"⋾","notnivc;":"⋽","NotPrecedes;":"⊀","NotPrecedesEqual;":"⪯̸","NotPrecedesSlantEqual;":"⋠","NotReverseElement;":"∌","NotRightTriangle;":"⋫","NotRightTriangleBar;":"⧐̸","NotRightTriangleEqual;":"⋭","NotSquareSubset;":"⊏̸","NotSquareSubsetEqual;":"⋢","NotSquareSuperset;":"⊐̸","NotSquareSupersetEqual;":"⋣","NotSubset;":"⊂⃒","NotSubsetEqual;":"⊈","NotSucceeds;":"⊁","NotSucceedsEqual;":"⪰̸","NotSucceedsSlantEqual;":"⋡","NotSucceedsTilde;":"≿̸","NotSuperset;":"⊃⃒","NotSupersetEqual;":"⊉","NotTilde;":"≁","NotTildeEqual;":"≄","NotTildeFullEqual;":"≇","NotTildeTilde;":"≉","NotVerticalBar;":"∤","npar;":"∦","nparallel;":"∦","nparsl;":"⫽⃥","npart;":"∂̸","npolint;":"⨔","npr;":"⊀","nprcue;":"⋠","npre;":"⪯̸","nprec;":"⊀","npreceq;":"⪯̸","nrArr;":"⇏","nrarr;":"↛","nrarrc;":"⤳̸","nrarrw;":"↝̸","nRightarrow;":"⇏","nrightarrow;":"↛","nrtri;":"⋫","nrtrie;":"⋭","nsc;":"⊁","nsccue;":"⋡","nsce;":"⪰̸","Nscr;":"𝒩","nscr;":"𝓃","nshortmid;":"∤","nshortparallel;":"∦","nsim;":"≁","nsime;":"≄","nsimeq;":"≄","nsmid;":"∤","nspar;":"∦","nsqsube;":"⋢","nsqsupe;":"⋣","nsub;":"⊄","nsubE;":"⫅̸","nsube;":"⊈","nsubset;":"⊂⃒","nsubseteq;":"⊈","nsubseteqq;":"⫅̸","nsucc;":"⊁","nsucceq;":"⪰̸","nsup;":"⊅","nsupE;":"⫆̸","nsupe;":"⊉","nsupset;":"⊃⃒","nsupseteq;":"⊉","nsupseteqq;":"⫆̸","ntgl;":"≹","Ntilde;":"Ñ",Ntilde:"Ñ","ntilde;":"ñ",ntilde:"ñ","ntlg;":"≸","ntriangleleft;":"⋪","ntrianglelefteq;":"⋬","ntriangleright;":"⋫","ntrianglerighteq;":"⋭","Nu;":"Ν","nu;":"ν","num;":"#","numero;":"№","numsp;":" ","nvap;":"≍⃒","nVDash;":"⊯","nVdash;":"⊮","nvDash;":"⊭","nvdash;":"⊬","nvge;":"≥⃒","nvgt;":">⃒","nvHarr;":"⤄","nvinfin;":"⧞","nvlArr;":"⤂","nvle;":"≤⃒","nvlt;":"<⃒","nvltrie;":"⊴⃒","nvrArr;":"⤃","nvrtrie;":"⊵⃒","nvsim;":"∼⃒","nwarhk;":"⤣","nwArr;":"⇖","nwarr;":"↖","nwarrow;":"↖","nwnear;":"⤧","Oacute;":"Ó",Oacute:"Ó","oacute;":"ó",oacute:"ó","oast;":"⊛","ocir;":"⊚","Ocirc;":"Ô",Ocirc:"Ô","ocirc;":"ô",ocirc:"ô","Ocy;":"О","ocy;":"о","odash;":"⊝","Odblac;":"Ő","odblac;":"ő","odiv;":"⨸","odot;":"⊙","odsold;":"⦼","OElig;":"Œ","oelig;":"œ","ofcir;":"⦿","Ofr;":"𝔒","ofr;":"𝔬","ogon;":"˛","Ograve;":"Ò",Ograve:"Ò","ograve;":"ò",ograve:"ò","ogt;":"⧁","ohbar;":"⦵","ohm;":"Ω","oint;":"∮","olarr;":"↺","olcir;":"⦾","olcross;":"⦻","oline;":"‾","olt;":"⧀","Omacr;":"Ō","omacr;":"ō","Omega;":"Ω","omega;":"ω","Omicron;":"Ο","omicron;":"ο","omid;":"⦶","ominus;":"⊖","Oopf;":"𝕆","oopf;":"𝕠","opar;":"⦷","OpenCurlyDoubleQuote;":"“","OpenCurlyQuote;":"‘","operp;":"⦹","oplus;":"⊕","Or;":"⩔","or;":"∨","orarr;":"↻","ord;":"⩝","order;":"ℴ","orderof;":"ℴ","ordf;":"ª",ordf:"ª","ordm;":"º",ordm:"º","origof;":"⊶","oror;":"⩖","orslope;":"⩗","orv;":"⩛","oS;":"Ⓢ","Oscr;":"𝒪","oscr;":"ℴ","Oslash;":"Ø",Oslash:"Ø","oslash;":"ø",oslash:"ø","osol;":"⊘","Otilde;":"Õ",Otilde:"Õ","otilde;":"õ",otilde:"õ","Otimes;":"⨷","otimes;":"⊗","otimesas;":"⨶","Ouml;":"Ö",Ouml:"Ö","ouml;":"ö",ouml:"ö","ovbar;":"⌽","OverBar;":"‾","OverBrace;":"⏞","OverBracket;":"⎴","OverParenthesis;":"⏜","par;"
Line truncated
|
||||
|
||||
`),n?i.value+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | "):i.value+=t.references.map(r=>`${r.name}: ${r.url}`).join(`
|
||||
`)),i.value!=="")return i}class pc{constructor(e,n){this.dataManager=e,this.readDirectory=n,this.atributeCompletions=[]}onHtmlAttributeValue(e){this.dataManager.isPathAttribute(e.tag,e.attribute)&&this.atributeCompletions.push(e)}async computeCompletions(e,n){const i={items:[],isIncomplete:!1};for(const r of this.atributeCompletions){const s=bc(e.getText(r.range));if(wc(s))if(s==="."||s==="..")i.isIncomplete=!0;else{const a=_c(r.value,s,r.range),l=await this.providePathSuggestions(r.value,a,e,n);for(const o of l)i.items.push(o)}}return i}async providePathSuggestions(e,n,i,r){const s=e.substring(0,e.lastIndexOf("/")+1);let a=r.resolveReference(s||".",i.uri);if(a)try{const l=[],o=await this.readDirectory(a);for(const[u,c]of o)u.charCodeAt(0)!==gc&&l.push(vc(u,c===Ci.Directory,n));return l}catch{}return[]}}const gc=46;function bc(t){return Ge(t,"'")||Ge(t,'"')?t.slice(1,-1):t}function wc(t){return!(Ge(t,"http")||Ge(t,"https")||Ge(t,"//"))}function _c(t,e,n){let i;const r=t.lastIndexOf("/");if(r===-1)i=yc(n,1,-1);else{const s=e.slice(r+1),a=Wt(n.end,-1-s.length),l=s.indexOf(" ");let o;l!==-1?o=Wt(a,l):o=Wt(n.end,-1),i=J.create(a,o)}return i}function vc(t,e,n){return e?(t=t+"/",{label:t,kind:fe.Folder,textEdit:oe.replace(n,t),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:t,kind:fe.File,textEdit:oe.replace(n,t)}}function Wt(t,e){return se.create(t.line,t.character+e)}function yc(t,e,n){const i=Wt(t.start,e),r=Wt(t.end,n);return J.create(i,r)}class Tc{constructor(e,n){this.lsOptions=e,this.dataManager=n,this.completionParticipants=[]}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,i,r,s){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,i,s);const a=new pc(this.dataManager,this.lsOptions.fileSystemProvider.readDirectory),l=this.completionParticipants;this.completionParticipants=[a].concat(l);const o=this.doComplete(e,n,i,s);try{const u=await a.computeCompletions(e,r);return{isIncomplete:o.isIncomplete||u.isIncomplete,items:u.items.concat(o.items)}}finally{this.completionParticipants=l}}doComplete(e,n,i,r){const s=this._doComplete(e,n,i,r);return this.convertCompletionList(s)}_doComplete(e,n,i,r){const s={isIncomplete:!1,items:[]},a=this.completionParticipants,l=this.dataManager.getDataProviders().filter(k=>k.isApplicable(e.languageId)&&(!r||r[k.getId()]!==!1)),o=this.dataManager.getVoidElements(l),u=this.doesSupportMarkdown(),c=e.getText(),d=e.offsetAt(n),m=i.findNodeBefore(d);if(!m)return s;const f=be(c,m.start);let w="",p;function x(k,R=d){return k>d&&(k=d),{start:e.positionAt(k),end:e.positionAt(R)}}function T(k,R){const M=x(k,R);return l.forEach(W=>{W.provideTags().forEach(F=>{s.items.push({label:F.name,kind:fe.Property,documentation:Ze(F,void 0,u),textEdit:oe.replace(M,F.name),insertTextFormat:Ae.PlainText})})}),s}function y(k){let R=k;for(;R>0;){const M=c.charAt(R-1);if(`
|
||||
\r`.indexOf(M)>=0)return c.substring(R,k);if(!wn(M))return null;R--}return c.substring(0,k)}function A(k,R,M=d){const W=x(k,M),F=Va(c,M,V.WithinEndTag,z.EndTagClose)?"":">";let U=m;for(R&&(U=U.parent);U;){const O=U.tag;if(O&&(!U.closed||U.endTagStart&&U.endTagStart>d)){const Q={label:"/"+O,kind:fe.Property,filterText:"/"+O,textEdit:oe.replace(W,"/"+O+F),insertTextFormat:Ae.PlainText},Z=y(U.start),xe=y(k-1);if(Z!==null&&xe!==null&&Z!==xe){const Ce=Z+"</"+O+F;Q.textEdit=oe.replace(x(k-1-xe.length),Ce),Q.filterText=xe+"</"+O}return s.items.push(Q),s}U=U.parent}return R||l.forEach(O=>{O.provideTags().forEach(Q=>{s.items.push({label:"/"+Q.name,kind:fe.Property,documentation:Ze(Q,void 0,u),filterText:"/"+Q.name+F,textEdit:oe.replace(W,"/"+Q.name+F),insertTextFormat:Ae.PlainText})})}),s}const I=(k,R)=>{if(r&&r.hideAutoCompleteProposals)return s;if(!this.dataManager.isVoidElement(R,o)){const M=e.positionAt(k);s.items.push({label:"</"+R+">",kind:fe.Property,filterText:"</"+R+">",textEdit:oe.insert(M,"$0</"+R+">"),insertTextFormat:Ae.Snippet})}return s};function H(k,R){return T(k,R),A(k,!0,R),s}function P(){const k=Object.create(null);return m.attributeNames.forEach(R=>{k[R]=!0}),k}function b(k,R=d){let M=d;for(;M<R&&c[M]!=="<";)M++;const W=c.substring(k,R),F=x(k,M);let U="";if(!Va(c,R,V.AfterAttributeName,z.DelimiterAssign)){const Q=r?.attributeDefaultValue??"doublequotes";Q==="empty"?U="=$1":Q==="singlequotes"?U="='$1'":U='="$1"'}const O=P();return O[W]=!1,l.forEach(Q=>{Q.provideAttributes(w).forEach(Z=>{if(O[Z.name])return;O[Z.name]=!0;let xe=Z.name,Ce;Z.valueSet!=="v"&&U.length&&(xe=xe+U,(Z.valueSet||Z.name==="style")&&(Ce={title:"Suggest",command:"editor.action.triggerSuggest"})),s.items.push({label:Z.name,kind:Z.valueSet==="handler"?fe.Function:fe.Value,documentation:Ze(Z,void 0,u),textEdit:oe.replace(F,xe),insertTextFormat:Ae.Snippet,command:Ce})})}),g(F,O),s}function g(k,R){const M="data-",W={};W[M]=`${M}$1="$2"`;function F(U){U.attributeNames.forEach(O=>{Ge(O,M)&&!W[O]&&!R[O]&&(W[O]=O+'="$1"')}),U.children.forEach(O=>F(O))}i&&i.roots.forEach(U=>F(U)),Object.keys(W).forEach(U=>s.items.push({label:U,kind:fe.Value,textEdit:oe.replace(k,W[U]),insertTextFormat:Ae.Snippet}))}function v(k,R=d){let M,W,F;if(d>k&&d<=R&&xc(c[k])){const U=k+1;let O=R;R>k&&c[R-1]===c[k]&&O--;const Q=kc(c,d,U),Z=Sc(c,d,O);M=x(Q,Z),F=d>=U&&d<=O?c.substring(U,d):"",W=!1}else M=x(k,R),F=c.substring(k,d),W=!0;if(a.length>0){const U=w.toLowerCase(),O=p.toLowerCase(),Q=x(k,R);for(const Z of a)Z.onHtmlAttributeValue&&Z.onHtmlAttributeValue({document:e,position:n,tag:U,attribute:O,value:F,range:Q})}return l.forEach(U=>{U.provideValues(w,p).forEach(O=>{const Q=W?'"'+O.name+'"':O.name;s.items.push({label:O.name,filterText:Q,kind:fe.Unit,documentation:Ze(O,void 0,u),textEdit:oe.replace(M,Q),insertTextFormat:Ae.PlainText})})}),_(),s}function N(k){return d===f.getTokenEnd()&&(D=f.scan(),D===k&&f.getTokenOffset()===d)?f.getTokenEnd():d}function S(){for(const k of a)k.onHtmlContent&&k.onHtmlContent({document:e,position:n});return _()}function _(){let k=d-1,R=n.character;for(;k>=0&&Pt(c,k);)k--,R--;if(k>=0&&c[k]==="&"){const M=J.create(se.create(n.line,R-1),n);for(const W in Ut)if(oc(W,";")){const F="&"+W;s.items.push({label:F,kind:fe.Keyword,documentation:Se("Character entity representing '{0}'",Ut[W]),textEdit:oe.replace(M,F),insertTextFormat:Ae.PlainText})}}return s}function L(k,R){const M=x(k,R);s.items.push({label:"!DOCTYPE",kind:fe.Property,documentation:"A preamble for an HTML document.",textEdit:oe.replace(M,"!DOCTYPE html>"),insertTextFormat:Ae.PlainText})}let D=f.scan();for(;D!==z.EOS&&f.getTokenOffset()<=d;){switch(D){case z.StartTagOpen:if(f.getTokenEnd()===d){const k=N(z.StartTag);return n.line===0&&L(d,k),H(d,k)}break;case z.StartTag:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return T(f.getTokenOffset(),f.getTokenEnd());w=f.getTokenText();break;case z.AttributeName:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return b(f.getTokenOffset(),f.getTokenEnd());p=f.getTokenText();break;case z.DelimiterAssign:if(f.getTokenEnd()===d){const k=N(z.AttributeValue);return v(d,k)}break;case z.AttributeValue:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return v(f.getTokenOffset(),f.getTokenEnd());break;case z.Whitespace:if(d<=f.getTokenEnd())switch(f.getScannerState()){case V.AfterOpeningStartTag:const k=f.getTokenOffset(),R=N(z.StartTag);return H(k,R);case V.WithinTag:case V.AfterAttributeName:return b(f.getTokenEnd());case V.BeforeAttributeValue:return v(f.getTokenEnd());case V.AfterOpeningEndTag:return A(f.getTokenOffset()-1,!1);case V.WithinContent:return S()}break;case z.EndTagOpen:if(d<=f.getTokenEnd()){const k=f.getTokenOffset()+1,R=N(z.EndTag);return A(k,!1,R)}break;case z.EndTag:if(d<=f.getTokenEnd()){let k=f.getTokenOffset()-1;for(;k>=0;){const R=c.charAt(k);if(R==="/")return A(k,!1,f.getTokenEnd());if(!wn(R))break;k--}}break;case z.StartTagClose:if(d<=f.getTokenEnd()&&w)return I(f.getTokenEnd(),w);break;case z.Content:if(d<=f.getTokenEnd())r
Line truncated
|
||||
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var c=this.__base_string_length;return u=u||0,o<0&&(c=0),c+=o*this.__indent_size,c+=u,c},a.prototype.get_indent_string=function(o,u){var c=this.__base_string;return u=u||0,o<0&&(o=0,c=""),u+=o*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,c="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),o&&(c+=new Array(o+1).join(" ")),this.__cache.push(c)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
||||
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
||||
`)),i.value!=="")return i}class sh{constructor(e,n){this.dataManager=e,this.readDirectory=n,this.atributeCompletions=[]}onHtmlAttributeValue(e){this.dataManager.isPathAttribute(e.tag,e.attribute)&&this.atributeCompletions.push(e)}async computeCompletions(e,n){const i={items:[],isIncomplete:!1};for(const r of this.atributeCompletions){const s=oh(e.getText(r.range));if(lh(s))if(s==="."||s==="..")i.isIncomplete=!0;else{const a=uh(r.value,s,r.range),l=await this.providePathSuggestions(r.value,a,e,n);for(const o of l)i.items.push(o)}}return i}async providePathSuggestions(e,n,i,r){const s=e.substring(0,e.lastIndexOf("/")+1);let a=r.resolveReference(s||".",i.uri);if(a)try{const l=[],o=await this.readDirectory(a);for(const[u,h]of o)u.charCodeAt(0)!==ah&&l.push(ch(u,h===Xi.Directory,n));return l}catch{}return[]}}const ah=46;function oh(t){return Ze(t,"'")||Ze(t,'"')?t.slice(1,-1):t}function lh(t){return!(Ze(t,"http")||Ze(t,"https")||Ze(t,"//"))}function uh(t,e,n){let i;const r=t.lastIndexOf("/");if(r===-1)i=hh(n,1,-1);else{const s=e.slice(r+1),a=Gt(n.end,-1-s.length),l=s.indexOf(" ");let o;l!==-1?o=Gt(a,l):o=Gt(n.end,-1),i=Z.create(a,o)}return i}function ch(t,e,n){return e?(t=t+"/",{label:t,kind:ge.Folder,textEdit:ue.replace(n,t),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:t,kind:ge.File,textEdit:ue.replace(n,t)}}function Gt(t,e){return oe.create(t.line,t.character+e)}function hh(t,e,n){const i=Gt(t.start,e),r=Gt(t.end,n);return Z.create(i,r)}class dh{constructor(e,n){this.lsOptions=e,this.dataManager=n,this.completionParticipants=[]}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,i,r,s){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,i,s);const a=new sh(this.dataManager,this.lsOptions.fileSystemProvider.readDirectory),l=this.completionParticipants;this.completionParticipants=[a].concat(l);const o=this.doComplete(e,n,i,s);try{const u=await a.computeCompletions(e,r);return{isIncomplete:o.isIncomplete||u.isIncomplete,items:u.items.concat(o.items)}}finally{this.completionParticipants=l}}doComplete(e,n,i,r){const s=this._doComplete(e,n,i,r);return this.convertCompletionList(s)}_doComplete(e,n,i,r){const s={isIncomplete:!1,items:[]},a=this.completionParticipants,l=this.dataManager.getDataProviders().filter(k=>k.isApplicable(e.languageId)&&(!r||r[k.getId()]!==!1)),o=this.dataManager.getVoidElements(l),u=this.doesSupportMarkdown(),h=e.getText(),d=e.offsetAt(n),m=i.findNodeBefore(d);if(!m)return s;const f=ye(h,m.start);let w="",p;function x(k,E=d){return k>d&&(k=d),{start:e.positionAt(k),end:e.positionAt(E)}}function y(k,E){const N=x(k,E);return l.forEach(U=>{U.provideTags().forEach(H=>{s.items.push({label:H.name,kind:ge.Property,documentation:it(H,void 0,u),textEdit:ue.replace(N,H.name),insertTextFormat:Ee.PlainText})})}),s}function v(k){let E=k;for(;E>0;){const N=h.charAt(E-1);if(`
|
||||
\r`.indexOf(N)>=0)return h.substring(E,k);if(!Rn(N))return null;E--}return h.substring(0,k)}function S(k,E,N=d){const U=x(k,N),H=To(h,N,$.WithinEndTag,z.EndTagClose)?"":">";let W=m;for(E&&(W=W.parent);W;){const B=W.tag;if(B&&(!W.closed||W.endTagStart&&W.endTagStart>d)){const X={label:"/"+B,kind:ge.Property,filterText:"/"+B,textEdit:ue.replace(U,"/"+B+H),insertTextFormat:Ee.PlainText},J=v(W.start),te=v(k-1);if(J!==null&&te!==null&&J!==te){const be=J+"</"+B+H;X.textEdit=ue.replace(x(k-1-te.length),be),X.filterText=te+"</"+B}return s.items.push(X),s}W=W.parent}return E||l.forEach(B=>{B.provideTags().forEach(X=>{s.items.push({label:"/"+X.name,kind:ge.Property,documentation:it(X,void 0,u),filterText:"/"+X.name+H,textEdit:ue.replace(U,"/"+X.name+H),insertTextFormat:Ee.PlainText})})}),s}const I=(k,E)=>{if(r&&r.hideAutoCompleteProposals)return s;if(!this.dataManager.isVoidElement(E,o)){const N=e.positionAt(k);s.items.push({label:"</"+E+">",kind:ge.Property,filterText:"</"+E+">",textEdit:ue.insert(N,"$0</"+E+">"),insertTextFormat:Ee.Snippet})}return s};function P(k,E){return y(k,E),S(k,!0,E),s}function F(){const k=Object.create(null);return m.attributeNames.forEach(E=>{k[E]=!0}),k}function b(k,E=d){let N=d;for(;N<E&&h[N]!=="<";)N++;const U=h.substring(k,E),H=x(k,N);let W="";if(!To(h,E,$.AfterAttributeName,z.DelimiterAssign)){const X=r?.attributeDefaultValue??"doublequotes";X==="empty"?W="=$1":X==="singlequotes"?W="='$1'":W='="$1"'}const B=F();return B[U]=!1,l.forEach(X=>{X.provideAttributes(w).forEach(J=>{if(B[J.name])return;B[J.name]=!0;let te=J.name,be;J.valueSet!=="v"&&W.length&&(te=te+W,(J.valueSet||J.name==="style")&&(be={title:"Suggest",command:"editor.action.triggerSuggest"})),s.items.push({label:J.name,kind:J.valueSet==="handler"?ge.Function:ge.Value,documentation:it(J,void 0,u),textEdit:ue.replace(H,te),insertTextFormat:Ee.Snippet,command:be})})}),g(H,B),s}function g(k,E){const N="data-",U={};U[N]=`${N}$1="$2"`;function H(W){W.attributeNames.forEach(B=>{Ze(B,N)&&!U[B]&&!E[B]&&(U[B]=B+'="$1"')}),W.children.forEach(B=>H(B))}i&&i.roots.forEach(W=>H(W)),Object.keys(U).forEach(W=>s.items.push({label:W,kind:ge.Value,textEdit:ue.replace(k,U[W]),insertTextFormat:Ee.Snippet}))}function _(k,E=d){let N,U,H;if(d>k&&d<=E&&mh(h[k])){const W=k+1;let B=E;E>k&&h[E-1]===h[k]&&B--;const X=fh(h,d,W),J=ph(h,d,B);N=x(X,J),H=d>=W&&d<=B?h.substring(W,d):"",U=!1}else N=x(k,E),H=h.substring(k,d),U=!0;if(a.length>0){const W=w.toLowerCase(),B=p.toLowerCase(),X=x(k,E);for(const J of a)J.onHtmlAttributeValue&&J.onHtmlAttributeValue({document:e,position:n,tag:W,attribute:B,value:H,range:X})}return l.forEach(W=>{W.provideValues(w,p).forEach(B=>{const X=U?'"'+B.name+'"':B.name;s.items.push({label:B.name,filterText:X,kind:ge.Unit,documentation:it(B,void 0,u),textEdit:ue.replace(N,X),insertTextFormat:Ee.PlainText})})}),T(),s}function M(k){return d===f.getTokenEnd()&&(L=f.scan(),L===k&&f.getTokenOffset()===d)?f.getTokenEnd():d}function A(){for(const k of a)k.onHtmlContent&&k.onHtmlContent({document:e,position:n});return T()}function T(){let k=d-1,E=n.character;for(;k>=0&&$t(h,k);)k--,E--;if(k>=0&&h[k]==="&"){const N=Z.create(oe.create(n.line,E-1),n);for(const U in jt)if(Yc(U,";")){const H="&"+U;s.items.push({label:H,kind:ge.Keyword,documentation:Ce("Character entity representing '{0}'",jt[U]),textEdit:ue.replace(N,H),insertTextFormat:Ee.PlainText})}}return s}function R(k,E){const N=x(k,E);s.items.push({label:"!DOCTYPE",kind:ge.Property,documentation:"A preamble for an HTML document.",textEdit:ue.replace(N,"!DOCTYPE html>"),insertTextFormat:Ee.PlainText})}let L=f.scan();for(;L!==z.EOS&&f.getTokenOffset()<=d;){switch(L){case z.StartTagOpen:if(f.getTokenEnd()===d){const k=M(z.StartTag);return n.line===0&&R(d,k),P(d,k)}break;case z.StartTag:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return y(f.getTokenOffset(),f.getTokenEnd());w=f.getTokenText();break;case z.AttributeName:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return b(f.getTokenOffset(),f.getTokenEnd());p=f.getTokenText();break;case z.DelimiterAssign:if(f.getTokenEnd()===d){const k=M(z.AttributeValue);return _(d,k)}break;case z.AttributeValue:if(f.getTokenOffset()<=d&&d<=f.getTokenEnd())return _(f.getTokenOffset(),f.getTokenEnd());break;case z.Whitespace:if(d<=f.getTokenEnd())switch(f.getScannerState()){case $.AfterOpeningStartTag:const k=f.getTokenOffset(),E=M(z.StartTag);return P(k,E);case $.WithinTag:case $.AfterAttributeName:return b(f.getTokenEnd());case $.BeforeAttributeValue:return _(f.getTokenEnd());case $.AfterOpeningEndTag:return S(f.getTokenOffset()-1,!1);case $.WithinContent:return A()}break;case z.EndTagOpen:if(d<=f.getTokenEnd()){const k=f.getTokenOffset()+1,E=M(z.EndTag);return S(k,!1,E)}break;case z.EndTag:if(d<=f.getTokenEnd()){let k=f.getTokenOffset()-1;for(;k>=0;){const E=h.charAt(k);if(E==="/")return S(k,!1,f.getTokenEnd());if(!Rn(E))break;k--}}break;case z.StartTagClose:if(d<=f.getTokenEnd()&&w)return I(f.getTokenEnd(),w);break;case z.Content:if(d<=f.getTokenEnd())r
Line truncated
|
||||
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var h=this.__base_string_length;return u=u||0,o<0&&(h=0),h+=o*this.__indent_size,h+=u,h},a.prototype.get_indent_string=function(o,u){var h=this.__base_string;return u=u||0,o<0&&(o=0,h=""),u+=o*this.__indent_size,this.__ensure_cache(u),h+=this.__cache[u],h},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,h="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,h=new Array(u+1).join(this.__indent_string)),o&&(h+=new Array(o+1).join(" ")),this.__cache.push(h)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
||||
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
|
||||
`);return o!==`
|
||||
`&&(c=c.replace(/[\n]/g,o)),c},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(c+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},r.exports.Output=l}),,,,(function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var c=this.raw_options[o],d=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var c=this.raw_options[o],d=c===void 0?!!u:!!c;return d},s.prototype._get_characters=function(o,u){var c=this.raw_options[o],d=u||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,`
|
||||
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var c=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(c,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,c){var d=this._get_selection_list(o,u,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
||||
`&&(h=h.replace(/[\n]/g,o)),h},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var h=this.__lines.length-2;h>=0;){var d=this.__lines[h];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(h+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},r.exports.Output=l}),,,,(function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var h=this.raw_options[o],d=u||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(d=h.concat()):typeof h=="string"&&(d=h.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var h=this.raw_options[o],d=h===void 0?!!u:!!h;return d},s.prototype._get_characters=function(o,u){var h=this.raw_options[o],d=u||"";return typeof h=="string"&&(d=h.replace(/\\r/,"\r").replace(/\\n/,`
|
||||
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var h=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(h,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,h){var d=this._get_selection_list(o,u,h);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
||||
`+u+`
|
||||
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,c);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
||||
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,h){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[u[0]],!this._is_valid_selection(h,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,h);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
||||
`+u+`
|
||||
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(c){return u.indexOf(c)===-1})};function a(o,u){var c={};o=l(o);var d;for(d in o)d!==u&&(c[d]=o[d]);if(u&&o[u])for(d in o[u])c[d]=o[u][d];return c}function l(o){var u={},c;for(c in o){var d=c.replace(/-/g,"_");u[d]=o[c]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a}),,(function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var c="",d;return l&&(d=this.match(l),d&&(c+=d[0])),o&&(d||!l)&&(c+=this.readUntil(o,u)),c},a.prototype.readUntil=function(l,o){var u="",c=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(c=d.index,o&&(c+=d[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,c="g";return o&&s&&(c="y"),typeof l=="string"&&l!==""?u=new RegExp(l,c):l&&(u=new RegExp(l.source,c)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a}),,,,,(function(r){function s(a,l){a=typeof a=="string"?a:a.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+l,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)l[o[1]]=o[2],o=this.__directive_pattern.exec(a);return l},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=s}),,(function(r,s,a){var l=a(16).Beautifier,o=a(17).Options;function u(c,d){var m=new l(c,d);return m.beautify()}r.exports=u,r.exports.defaultOptions=function(){return new o}}),(function(r,s,a){var l=a(17).Options,o=a(2).Output,u=a(8).InputScanner,c=a(13).Directives,d=new c(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,w=/\s/,p=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,T=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(A,I){this._source_text=A||"",this._options=new l(I),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}y.prototype.eatString=function(A){var I="";for(this._ch=this._input.next();this._ch;){if(I+=this._ch,this._ch==="\\")I+=this._input.next();else if(A.indexOf(this._ch)!==-1||this._ch===`
|
||||
`)break;this._ch=this._input.next()}return I},y.prototype.eatWhitespace=function(A){for(var I=w.test(this._input.peek()),H=0;w.test(this._input.peek());)this._ch=this._input.next(),A&&this._ch===`
|
||||
`&&(H===0||H<this._options.max_preserve_newlines)&&(H++,this._output.add_new_line(!0));return I},y.prototype.foundNestedPseudoClass=function(){for(var A=0,I=1,H=this._input.peek(I);H;){if(H==="{")return!0;if(H==="(")A+=1;else if(H===")"){if(A===0)return!1;A-=1}else if(H===";"||H==="}")return!1;I++,H=this._input.peek(I)}return!1},y.prototype.print_string=function(A){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(A)},y.prototype.preserveSingleSpace=function(A){A&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A=this._source_text,I=this._options.eol;I==="auto"&&(I=`
|
||||
`,A&&m.test(A||"")&&(I=A.match(m)[0])),A=A.replace(f,`
|
||||
`);var H=A.match(/^[\t ]*/)[0];this._output=new o(this._options,H),this._input=new u(A),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var P=0,b=!1,g=!1,v=!1,N=!1,S=!1,_=this._ch,L=!1,D,k,R;D=this._input.read(p),k=D!=="",R=_,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),_=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var M=this._input.read(x),W=d.get_directives(M);W&&W.ignore==="start"&&(M+=d.readIgnored(this._input)),this.print_string(M),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(T)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(k),this.print_string(this._ch);var F=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);F.match(/[ :]$/)&&(F=this.eatString(": ").replace(/\s+$/,""),this.print_string(F),this._output.space_before_token=!0),P===0&&F.indexOf(":")!==-1&&(g=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(k),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var U=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);U.match(/[ :]$/)&&(U=this.eatString(": ").replace(/\s+$/,""),this.print_string(U),this._output.space_before_token=!0),P===0&&U.indexOf(":")!==-1?(g=!0,this.indent()):U in this.NESTED_AT_RULE?(this._nestedLevel+=1,U in this.CONDITIONAL_GROUP_RULE&&(v=!0)):P===0&&!g&&(N=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(k),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")g&&(g=!1,this.outdent()),N=!1,v?(v=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(R==="("?this._output.space_before_token=!1:R!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),R==="{"&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var O=0;O<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;O++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[O])){L=!0;break}(b||v)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&P===0?(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Q=R==='"'||R==="'";this.preserveSingleSpace(Q||k),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")L=!1,P===0?(g&&(this.outdent(),g=!1),N=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),P++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),P&&(P--,this.outdent()));else{var Z=!1;this._input.lookBack("with")&&(Z=!0),this.preserveSingleSpace(k||Z),this.print_string(this._ch),g&&R==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),S=!0):(this.eatWhitespace(),P++,this.indent())}else if(this._ch===")")P&&(P--,this.outdent()),S&&this._input.peek()===";"&&this._options.selector_separator_newline&&(S=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!g||S)&&P===0&&!N?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!g&&P===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._c
Line truncated
|
||||
`&&L&&this._output.add_new_line()}var Ce=this._output.get_code(I);return Ce},r.exports.Beautifier=y}),(function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m<d.length;m++)d[m]!=="expand"?this.brace_style="collapse":this.brace_style=d[m]}o.prototype=new l,r.exports.Options=o})],e={};function n(r){var s=e[r];if(s!==void 0)return s.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}var i=n(15);ja=i})();var Ec=ja,$a;(function(){var t=[,,(function(r){function s(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var o=new s(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},s.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},s.prototype.has_match=function(o){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(o))return!0;return!1},s.prototype.set_indent=function(o,u){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(o){this.__items.push(o);var u=o.lastIndexOf(`
|
||||
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var c=this.__base_string_length;return u=u||0,o<0&&(c=0),c+=o*this.__indent_size,c+=u,c},a.prototype.get_indent_string=function(o,u){var c=this.__base_string;return u=u||0,o<0&&(o=0,c=""),u+=o*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,c="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),o&&(c+=new Array(o+1).join(" ")),this.__cache.push(c)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
||||
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
||||
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(h){return u.indexOf(h)===-1})};function a(o,u){var h={};o=l(o);var d;for(d in o)d!==u&&(h[d]=o[d]);if(u&&o[u])for(d in o[u])h[d]=o[u][d];return h}function l(o){var u={},h;for(h in o){var d=h.replace(/-/g,"_");u[d]=o[h]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a}),,(function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var h="",d;return l&&(d=this.match(l),d&&(h+=d[0])),o&&(d||!l)&&(h+=this.readUntil(o,u)),h},a.prototype.readUntil=function(l,o){var u="",h=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(h=d.index,o&&(h+=d[0].length)):h=this.__input_length,u=this.__input.substring(this.__position,h),this.__position=h,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,h="g";return o&&s&&(h="y"),typeof l=="string"&&l!==""?u=new RegExp(l,h):l&&(u=new RegExp(l.source,h)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a}),,,,,(function(r){function s(a,l){a=typeof a=="string"?a:a.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+l,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)l[o[1]]=o[2],o=this.__directive_pattern.exec(a);return l},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=s}),,(function(r,s,a){var l=a(16).Beautifier,o=a(17).Options;function u(h,d){var m=new l(h,d);return m.beautify()}r.exports=u,r.exports.defaultOptions=function(){return new o}}),(function(r,s,a){var l=a(17).Options,o=a(2).Output,u=a(8).InputScanner,h=a(13).Directives,d=new h(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,w=/\s/,p=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function v(S,I){this._source_text=S||"",this._options=new l(I),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}v.prototype.eatString=function(S){var I="";for(this._ch=this._input.next();this._ch;){if(I+=this._ch,this._ch==="\\")I+=this._input.next();else if(S.indexOf(this._ch)!==-1||this._ch===`
|
||||
`)break;this._ch=this._input.next()}return I},v.prototype.eatWhitespace=function(S){for(var I=w.test(this._input.peek()),P=0;w.test(this._input.peek());)this._ch=this._input.next(),S&&this._ch===`
|
||||
`&&(P===0||P<this._options.max_preserve_newlines)&&(P++,this._output.add_new_line(!0));return I},v.prototype.foundNestedPseudoClass=function(){for(var S=0,I=1,P=this._input.peek(I);P;){if(P==="{")return!0;if(P==="(")S+=1;else if(P===")"){if(S===0)return!1;S-=1}else if(P===";"||P==="}")return!1;I++,P=this._input.peek(I)}return!1},v.prototype.print_string=function(S){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(S)},v.prototype.preserveSingleSpace=function(S){S&&(this._output.space_before_token=!0)},v.prototype.indent=function(){this._indentLevel++},v.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S=this._source_text,I=this._options.eol;I==="auto"&&(I=`
|
||||
`,S&&m.test(S||"")&&(I=S.match(m)[0])),S=S.replace(f,`
|
||||
`);var P=S.match(/^[\t ]*/)[0];this._output=new o(this._options,P),this._input=new u(S),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var F=0,b=!1,g=!1,_=!1,M=!1,A=!1,T=this._ch,R=!1,L,k,E;L=this._input.read(p),k=L!=="",E=T,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),T=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var N=this._input.read(x),U=d.get_directives(N);U&&U.ignore==="start"&&(N+=d.readIgnored(this._input)),this.print_string(N),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(y)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(k),this.print_string(this._ch);var H=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);H.match(/[ :]$/)&&(H=this.eatString(": ").replace(/\s+$/,""),this.print_string(H),this._output.space_before_token=!0),F===0&&H.indexOf(":")!==-1&&(g=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(k),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var W=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);W.match(/[ :]$/)&&(W=this.eatString(": ").replace(/\s+$/,""),this.print_string(W),this._output.space_before_token=!0),F===0&&W.indexOf(":")!==-1?(g=!0,this.indent()):W in this.NESTED_AT_RULE?(this._nestedLevel+=1,W in this.CONDITIONAL_GROUP_RULE&&(_=!0)):F===0&&!g&&(M=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(k),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")g&&(g=!1,this.outdent()),M=!1,_?(_=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(E==="("?this._output.space_before_token=!1:E!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),E==="{"&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var B=0;B<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;B++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[B])){R=!0;break}(b||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!M&&F===0?(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var X=E==='"'||E==="'";this.preserveSingleSpace(X||k),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")R=!1,F===0?(g&&(this.outdent(),g=!1),M=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),F++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),F&&(F--,this.outdent()));else{var J=!1;this._input.lookBack("with")&&(J=!0),this.preserveSingleSpace(k||J),this.print_string(this._ch),g&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),A=!0):(this.eatWhitespace(),F++,this.indent())}else if(this._ch===")")F&&(F--,this.outdent()),A&&this._input.peek()===";"&&this._options.selector_separator_newline&&(A=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!g||A)&&F===0&&!M?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!g&&F===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._c
Line truncated
|
||||
`&&R&&this._output.add_new_line()}var be=this._output.get_code(I);return be},r.exports.Beautifier=v}),(function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m<d.length;m++)d[m]!=="expand"?this.brace_style="collapse":this.brace_style=d[m]}o.prototype=new l,r.exports.Options=o})],e={};function n(r){var s=e[r];if(s!==void 0)return s.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}var i=n(15);ko=i})();var _h=ko,So;(function(){var t=[,,(function(r){function s(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var o=new s(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},s.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},s.prototype.has_match=function(o){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(o))return!0;return!1},s.prototype.set_indent=function(o,u){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(o){this.__items.push(o);var u=o.lastIndexOf(`
|
||||
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var h=this.__base_string_length;return u=u||0,o<0&&(h=0),h+=o*this.__indent_size,h+=u,h},a.prototype.get_indent_string=function(o,u){var h=this.__base_string;return u=u||0,o<0&&(o=0,h=""),u+=o*this.__indent_size,this.__ensure_cache(u),h+=this.__cache[u],h},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,h="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,h=new Array(u+1).join(this.__indent_string)),o&&(h+=new Array(o+1).join(" ")),this.__cache.push(h)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
||||
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
|
||||
`);return o!==`
|
||||
`&&(c=c.replace(/[\n]/g,o)),c},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(c+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},r.exports.Output=l}),(function(r){function s(a,l,o,u){this.type=a,this.text=l,this.comments_before=null,this.newlines=o||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=s}),,,(function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var c=this.raw_options[o],d=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var c=this.raw_options[o],d=c===void 0?!!u:!!c;return d},s.prototype._get_characters=function(o,u){var c=this.raw_options[o],d=u||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,`
|
||||
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var c=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(c,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,c){var d=this._get_selection_list(o,u,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
||||
`&&(h=h.replace(/[\n]/g,o)),h},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var h=this.__lines.length-2;h>=0;){var d=this.__lines[h];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(h+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},r.exports.Output=l}),(function(r){function s(a,l,o,u){this.type=a,this.text=l,this.comments_before=null,this.newlines=o||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=s}),,,(function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var h=this.raw_options[o],d=u||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(d=h.concat()):typeof h=="string"&&(d=h.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var h=this.raw_options[o],d=h===void 0?!!u:!!h;return d},s.prototype._get_characters=function(o,u){var h=this.raw_options[o],d=u||"";return typeof h=="string"&&(d=h.replace(/\\r/,"\r").replace(/\\n/,`
|
||||
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var h=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(h,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,h){var d=this._get_selection_list(o,u,h);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
||||
`+u+`
|
||||
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,c);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
||||
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,h){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[u[0]],!this._is_valid_selection(h,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,h);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
||||
`+u+`
|
||||
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(c){return u.indexOf(c)===-1})};function a(o,u){var c={};o=l(o);var d;for(d in o)d!==u&&(c[d]=o[d]);if(u&&o[u])for(d in o[u])c[d]=o[u][d];return c}function l(o){var u={},c;for(c in o){var d=c.replace(/-/g,"_");u[d]=o[c]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a}),,(function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var c="",d;return l&&(d=this.match(l),d&&(c+=d[0])),o&&(d||!l)&&(c+=this.readUntil(o,u)),c},a.prototype.readUntil=function(l,o){var u="",c=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(c=d.index,o&&(c+=d[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,c="g";return o&&s&&(c="y"),typeof l=="string"&&l!==""?u=new RegExp(l,c):l&&(u=new RegExp(l.source,c)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a}),(function(r,s,a){var l=a(8).InputScanner,o=a(3).Token,u=a(10).TokenStream,c=a(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},m=function(f,w){this._input=new l(f),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};m.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var f,w=new o(d.START,""),p=null,x=[],T=new u;w.type!==d.EOF;){for(f=this._get_next_token(w,p);this._is_comment(f);)T.add(f),f=this._get_next_token(w,p);T.isEmpty()||(f.comments_before=T,T=new u),f.parent=p,this._is_opening(f)?(x.push(p),p=f):p&&this._is_closing(f,p)&&(f.opened=p,p.closed=f,p=x.pop(),f.parent=p),f.previous=w,w.next=f,this.__tokens.add(f),w=f}return this.__tokens},m.prototype._is_first_token=function(){return this.__tokens.isEmpty()},m.prototype._reset=function(){},m.prototype._get_next_token=function(f,w){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(d.RAW,p):this._create_token(d.EOF,"")},m.prototype._is_comment=function(f){return!1},m.prototype._is_opening=function(f){return!1},m.prototype._is_closing=function(f,w){return!1},m.prototype._create_token=function(f,w){var p=new o(f,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},m.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=m,r.exports.TOKEN=d}),(function(r){function s(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}s.prototype.restart=function(){this.__position=0},s.prototype.isEmpty=function(){return this.__tokens_length===0},s.prototype.hasNext=function(){return this.__position<this.__tokens_length},s.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},s.prototype.peek=function(a){var l=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(l=this.__tokens[a]),l},s.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},r.exports.TokenStream=s}),(function(r,s,a){var l=a(12).Pattern;function o(u,c){l.call(this,u,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new l,o.prototype.__set_whitespace_patterns=function(u,c){u+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+c+"]+",!0)Line truncated
|
||||
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(h){return u.indexOf(h)===-1})};function a(o,u){var h={};o=l(o);var d;for(d in o)d!==u&&(h[d]=o[d]);if(u&&o[u])for(d in o[u])h[d]=o[u][d];return h}function l(o){var u={},h;for(h in o){var d=h.replace(/-/g,"_");u[d]=o[h]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a}),,(function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var h="",d;return l&&(d=this.match(l),d&&(h+=d[0])),o&&(d||!l)&&(h+=this.readUntil(o,u)),h},a.prototype.readUntil=function(l,o){var u="",h=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(h=d.index,o&&(h+=d[0].length)):h=this.__input_length,u=this.__input.substring(this.__position,h),this.__position=h,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,h="g";return o&&s&&(h="y"),typeof l=="string"&&l!==""?u=new RegExp(l,h):l&&(u=new RegExp(l.source,h)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a}),(function(r,s,a){var l=a(8).InputScanner,o=a(3).Token,u=a(10).TokenStream,h=a(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},m=function(f,w){this._input=new l(f),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};m.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var f,w=new o(d.START,""),p=null,x=[],y=new u;w.type!==d.EOF;){for(f=this._get_next_token(w,p);this._is_comment(f);)y.add(f),f=this._get_next_token(w,p);y.isEmpty()||(f.comments_before=y,y=new u),f.parent=p,this._is_opening(f)?(x.push(p),p=f):p&&this._is_closing(f,p)&&(f.opened=p,p.closed=f,p=x.pop(),f.parent=p),f.previous=w,w.next=f,this.__tokens.add(f),w=f}return this.__tokens},m.prototype._is_first_token=function(){return this.__tokens.isEmpty()},m.prototype._reset=function(){},m.prototype._get_next_token=function(f,w){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(d.RAW,p):this._create_token(d.EOF,"")},m.prototype._is_comment=function(f){return!1},m.prototype._is_opening=function(f){return!1},m.prototype._is_closing=function(f,w){return!1},m.prototype._create_token=function(f,w){var p=new o(f,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},m.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=m,r.exports.TOKEN=d}),(function(r){function s(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}s.prototype.restart=function(){this.__position=0},s.prototype.isEmpty=function(){return this.__tokens_length===0},s.prototype.hasNext=function(){return this.__position<this.__tokens_length},s.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},s.prototype.peek=function(a){var l=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(l=this.__tokens[a]),l},s.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},r.exports.TokenStream=s}),(function(r,s,a){var l=a(12).Pattern;function o(u,h){l.call(this,u,h),h?this._line_regexp=this._input.get_regexp(h._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new l,o.prototype.__set_whitespace_patterns=function(u,h){u+="\\t ",h+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+h+"]+",!0)Line truncated
|
||||
`,b&&d.test(b)&&(g=b.match(d)[0])),b=b.replace(m,`
|
||||
`);var v=b.match(/^[\t ]*/)[0],N={text:"",type:""},S=new I,_=new f(this._options,v),L=new u(b,this._options).tokenize();this._tag_stack=new y(_);for(var D=null,k=L.next();k.type!==c.EOF;)k.type===c.TAG_OPEN||k.type===c.COMMENT?(D=this._handle_tag_open(_,k,S,N,L),S=D):k.type===c.ATTRIBUTE||k.type===c.EQUALS||k.type===c.VALUE||k.type===c.TEXT&&!S.tag_complete?D=this._handle_inside_tag(_,k,S,N):k.type===c.TAG_CLOSE?D=this._handle_tag_close(_,k,S):k.type===c.TEXT?D=this._handle_text(_,k,S):k.type===c.CONTROL_FLOW_OPEN?D=this._handle_control_flow_open(_,k):k.type===c.CONTROL_FLOW_CLOSE?D=this._handle_control_flow_close(_,k):_.add_raw_token(k),N=D,k=L.next();var R=_._output.get_code(g);return R},A.prototype._handle_control_flow_open=function(b,g){var v={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),b.indent(),v},A.prototype._handle_control_flow_close=function(b,g){var v={text:g.text,type:g.type};return b.deindent(),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),v},A.prototype._handle_tag_close=function(b,g,v){var N={text:g.text,type:g.type};return b.alignment_size=0,v.tag_complete=!0,b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),v.is_unformatted?b.add_raw_token(g):(v.tag_start_char==="<"&&(b.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(g)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(b.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&b.set_wrap_point(),N},A.prototype._handle_inside_tag=function(b,g,v,N){var S=v.has_wrapped_attrs,_={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),v.is_unformatted?b.add_raw_token(g):v.tag_start_char==="{"&&g.type===c.TEXT?b.print_preserved_newlines(g)?(g.newlines=0,b.add_raw_token(g)):b.print_token(g):(g.type===c.ATTRIBUTE?b.set_space_before_token(!0):(g.type===c.EQUALS||g.type===c.VALUE&&g.previous.type===c.EQUALS)&&b.set_space_before_token(!1),g.type===c.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(g),S=S||g.newlines!==0),this._is_wrap_attributes_force&&v.attr_count>=this._options.wrap_attributes_min_attrs&&(N.type!==c.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(b.print_newline(!1),S=!0)),b.print_token(g),S=S||b.previous_token_wrapped(),v.has_wrapped_attrs=S),_},A.prototype._handle_text=function(b,g,v){var N={text:g.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(b,g,v):v.is_unformatted||v.is_content_unformatted?b.add_raw_token(g):(b.traverse_whitespace(g),b.print_token(g)),N},A.prototype._print_custom_beatifier_text=function(b,g,v){var N=this;if(g.text!==""){var S=g.text,_,L=1,D="",k="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?_=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?_=this._css_beautify:v.custom_beautifier_name==="html"&&(_=function(O,Q){var Z=new A(O,Q,N._js_beautify,N._css_beautify);return Z.beautify()}),this._options.indent_scripts==="keep"?L=0:this._options.indent_scripts==="separate"&&(L=-b.indent_level);var R=b.get_full_indent(L);if(S=S.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&S[0]==="<"&&S.match(/^(<!--|<!\[CDATA\[)/)){var M=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(S);if(!M){b.add_raw_token(g);return}D=R+M[1]+`
|
||||
`,S=M[4],M[5]&&(k=R+M[5]),S=S.replace(/\n[ \t]*$/,""),(M[2]||M[3].indexOf(`
|
||||
`)!==-1)&&(M=M[3].match(/[ \t]+$/),M&&(g.whitespace_before=M[0]))}if(S)if(_){var W=function(){this.eol=`
|
||||
`};W.prototype=this._options.raw_options;var F=new W;S=_(R+S,F)}else{var U=g.whitespace_before;U&&(S=S.replace(new RegExp(`
|
||||
(`+U+")?","g"),`
|
||||
`)),S=R+S.replace(/\n/g,`
|
||||
`+R)}D&&(S?S=D+S+`
|
||||
`+k:S=D+k),b.print_newline(!1),S&&(g.text=S,g.whitespace_before="",g.newlines=0,b.add_raw_token(g),b.print_newline(!0))}},A.prototype._handle_tag_open=function(b,g,v,N,S){var _=this._get_tag_open_token(g);if((v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&g.type===c.TAG_OPEN&&!_.is_start_tag?(b.add_raw_token(g),_.start_tag_token=this._tag_stack.try_pop(_.tag_name)):(b.traverse_whitespace(g),this._set_tag_position(b,g,_,v,N),_.is_inline_element||b.set_wrap_point(),b.print_token(g)),_.is_start_tag&&this._is_wrap_attributes_force){var L=0,D;do D=S.peek(L),D.type===c.ATTRIBUTE&&(_.attr_count+=1),L+=1;while(D.type!==c.EOF&&D.type!==c.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(_.alignment_size=g.text.length+1),!_.tag_complete&&!_.is_unformatted&&(b.alignment_size=_.alignment_size),_};var I=function(b,g){if(this.parent=b||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var v;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(v=g.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var N=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(N=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(N)))}};A.prototype._get_tag_open_token=function(b){var g=new I(this._tag_stack.get_parser_token(),b);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||x(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&x(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&x(g.tag_check,this._options.content_unformatted),g.is_inline_element=x(g.tag_name,this._options.inline)||this._options.inline_custom_elements&&g.tag_name.includes("-")||g.tag_start_char==="{",g},A.prototype._set_tag_position=function(b,g,v,N,S){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=p(v.tag_check,g)))),x(v.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var _=b.current_line_has_match(/{{#if/);_||b.print_newline(!1)}v.tag_name==="!--"&&S.type===c.TAG_CLOSE&&N.is_end_tag&&v.text.indexOf(`
|
||||
`)===-1||(v.is_inline_element||v.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,v))}else if(v.is_end_tag){var L=!1;L=v.start_tag_token&&v.start_tag_token.multiline_content,L=L||!v.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(S.type===c.TAG_CLOSE&&v.start_tag_token===N)&&S.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(L=!1),L&&b.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(S.type!=="TK_CONTENT"||v.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,v)},A.prototype._calcluate_parent_multiline=function(b,g){g.parent&&b._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var H=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],P=["a","audio","del","ins","map","noscript","video"];A.prototype._do_optional_end_element=function(b){var g=null;if(!(b.is_empty_element||!b.is_start_tag||!b.parent)){if(b.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(b.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(b.tag_name==="dd"||b.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&H.indexOf(b.tag_name)!==-1){var v=b.parent.parent;(!v||P.indexOf(v.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),g}},r.exports.Beautifier=A}),(function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separat
Line truncated
|
||||
`,indent_scripts:we(n,"indentScripts","normal"),templating:Nc(n,"all"),unformatted_content_delimiter:we(n,"unformattedContentDelimiter","")};let o=Rc(Mc(i),l);if(s>0){const u=n.insertSpaces?qa(" ",a*s):qa(" ",s);o=o.split(`
|
||||
`);var _=b.match(/^[\t ]*/)[0],M={text:"",type:""},A=new I,T=new f(this._options,_),R=new u(b,this._options).tokenize();this._tag_stack=new v(T);for(var L=null,k=R.next();k.type!==h.EOF;)k.type===h.TAG_OPEN||k.type===h.COMMENT?(L=this._handle_tag_open(T,k,A,M,R),A=L):k.type===h.ATTRIBUTE||k.type===h.EQUALS||k.type===h.VALUE||k.type===h.TEXT&&!A.tag_complete?L=this._handle_inside_tag(T,k,A,M):k.type===h.TAG_CLOSE?L=this._handle_tag_close(T,k,A):k.type===h.TEXT?L=this._handle_text(T,k,A):k.type===h.CONTROL_FLOW_OPEN?L=this._handle_control_flow_open(T,k):k.type===h.CONTROL_FLOW_CLOSE?L=this._handle_control_flow_close(T,k):T.add_raw_token(k),M=L,k=R.next();var E=T._output.get_code(g);return E},S.prototype._handle_control_flow_open=function(b,g){var _={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),b.indent(),_},S.prototype._handle_control_flow_close=function(b,g){var _={text:g.text,type:g.type};return b.deindent(),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),_},S.prototype._handle_tag_close=function(b,g,_){var M={text:g.text,type:g.type};return b.alignment_size=0,_.tag_complete=!0,b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),_.is_unformatted?b.add_raw_token(g):(_.tag_start_char==="<"&&(b.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&_.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(g)),_.indent_content&&!(_.is_unformatted||_.is_content_unformatted)&&(b.indent(),_.indent_content=!1),!_.is_inline_element&&!(_.is_unformatted||_.is_content_unformatted)&&b.set_wrap_point(),M},S.prototype._handle_inside_tag=function(b,g,_,M){var A=_.has_wrapped_attrs,T={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),_.is_unformatted?b.add_raw_token(g):_.tag_start_char==="{"&&g.type===h.TEXT?b.print_preserved_newlines(g)?(g.newlines=0,b.add_raw_token(g)):b.print_token(g):(g.type===h.ATTRIBUTE?b.set_space_before_token(!0):(g.type===h.EQUALS||g.type===h.VALUE&&g.previous.type===h.EQUALS)&&b.set_space_before_token(!1),g.type===h.ATTRIBUTE&&_.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(g),A=A||g.newlines!==0),this._is_wrap_attributes_force&&_.attr_count>=this._options.wrap_attributes_min_attrs&&(M.type!==h.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(b.print_newline(!1),A=!0)),b.print_token(g),A=A||b.previous_token_wrapped(),_.has_wrapped_attrs=A),T},S.prototype._handle_text=function(b,g,_){var M={text:g.text,type:"TK_CONTENT"};return _.custom_beautifier_name?this._print_custom_beatifier_text(b,g,_):_.is_unformatted||_.is_content_unformatted?b.add_raw_token(g):(b.traverse_whitespace(g),b.print_token(g)),M},S.prototype._print_custom_beatifier_text=function(b,g,_){var M=this;if(g.text!==""){var A=g.text,T,R=1,L="",k="";_.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:_.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:_.custom_beautifier_name==="html"&&(T=function(B,X){var J=new S(B,X,M._js_beautify,M._css_beautify);return J.beautify()}),this._options.indent_scripts==="keep"?R=0:this._options.indent_scripts==="separate"&&(R=-b.indent_level);var E=b.get_full_indent(R);if(A=A.replace(/\n[ \t]*$/,""),_.custom_beautifier_name!=="html"&&A[0]==="<"&&A.match(/^(<!--|<!\[CDATA\[)/)){var N=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(A);if(!N){b.add_raw_token(g);return}L=E+N[1]+`
|
||||
`,A=N[4],N[5]&&(k=E+N[5]),A=A.replace(/\n[ \t]*$/,""),(N[2]||N[3].indexOf(`
|
||||
`)!==-1)&&(N=N[3].match(/[ \t]+$/),N&&(g.whitespace_before=N[0]))}if(A)if(T){var U=function(){this.eol=`
|
||||
`};U.prototype=this._options.raw_options;var H=new U;A=T(E+A,H)}else{var W=g.whitespace_before;W&&(A=A.replace(new RegExp(`
|
||||
(`+W+")?","g"),`
|
||||
`)),A=E+A.replace(/\n/g,`
|
||||
`+E)}L&&(A?A=L+A+`
|
||||
`+k:A=L+k),b.print_newline(!1),A&&(g.text=A,g.whitespace_before="",g.newlines=0,b.add_raw_token(g),b.print_newline(!0))}},S.prototype._handle_tag_open=function(b,g,_,M,A){var T=this._get_tag_open_token(g);if((_.is_unformatted||_.is_content_unformatted)&&!_.is_empty_element&&g.type===h.TAG_OPEN&&!T.is_start_tag?(b.add_raw_token(g),T.start_tag_token=this._tag_stack.try_pop(T.tag_name)):(b.traverse_whitespace(g),this._set_tag_position(b,g,T,_,M),T.is_inline_element||b.set_wrap_point(),b.print_token(g)),T.is_start_tag&&this._is_wrap_attributes_force){var R=0,L;do L=A.peek(R),L.type===h.ATTRIBUTE&&(T.attr_count+=1),R+=1;while(L.type!==h.EOF&&L.type!==h.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(T.alignment_size=g.text.length+1),!T.tag_complete&&!T.is_unformatted&&(b.alignment_size=T.alignment_size),T};var I=function(b,g){if(this.parent=b||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var _;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(_=g.text.match(/^<([^\s>]*)/),this.tag_check=_?_[1]:""):(_=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=_?_[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===h.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var M=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(M=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(M)))}};S.prototype._get_tag_open_token=function(b){var g=new I(this._tag_stack.get_parser_token(),b);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||x(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&x(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&x(g.tag_check,this._options.content_unformatted),g.is_inline_element=x(g.tag_name,this._options.inline)||this._options.inline_custom_elements&&g.tag_name.includes("-")||g.tag_start_char==="{",g},S.prototype._set_tag_position=function(b,g,_,M,A){if(_.is_empty_element||(_.is_end_tag?_.start_tag_token=this._tag_stack.try_pop(_.tag_name):(this._do_optional_end_element(_)&&(_.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(_),(_.tag_name==="script"||_.tag_name==="style")&&!(_.is_unformatted||_.is_content_unformatted)&&(_.custom_beautifier_name=p(_.tag_check,g)))),x(_.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),_.is_empty_element){if(_.tag_start_char==="{"&&_.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),_.indent_content=!0;var T=b.current_line_has_match(/{{#if/);T||b.print_newline(!1)}_.tag_name==="!--"&&A.type===h.TAG_CLOSE&&M.is_end_tag&&_.text.indexOf(`
|
||||
`)===-1||(_.is_inline_element||_.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,_))}else if(_.is_end_tag){var R=!1;R=_.start_tag_token&&_.start_tag_token.multiline_content,R=R||!_.is_inline_element&&!(M.is_inline_element||M.is_unformatted)&&!(A.type===h.TAG_CLOSE&&_.start_tag_token===M)&&A.type!=="TK_CONTENT",(_.is_content_unformatted||_.is_unformatted)&&(R=!1),R&&b.print_newline(!1)}else _.indent_content=!_.custom_beautifier_name,_.tag_start_char==="<"&&(_.tag_name==="html"?_.indent_content=this._options.indent_inner_html:_.tag_name==="head"?_.indent_content=this._options.indent_head_inner_html:_.tag_name==="body"&&(_.indent_content=this._options.indent_body_inner_html)),!(_.is_inline_element||_.is_unformatted)&&(A.type!=="TK_CONTENT"||_.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,_)},S.prototype._calcluate_parent_multiline=function(b,g){g.parent&&b._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var P=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],F=["a","audio","del","ins","map","noscript","video"];S.prototype._do_optional_end_element=function(b){var g=null;if(!(b.is_empty_element||!b.is_start_tag||!b.parent)){if(b.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(b.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(b.tag_name==="dd"||b.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&P.indexOf(b.tag_name)!==-1){var _=b.parent.parent;(!_||F.indexOf(_.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),g}},r.exports.Beautifier=S}),(function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separat
Line truncated
|
||||
`,indent_scripts:xe(n,"indentScripts","normal"),templating:Th(n,"all"),unformatted_content_delimiter:xe(n,"unformattedContentDelimiter","")};let o=vh(xh(i),l);if(s>0){const u=n.insertSpaces?yo(" ",a*s):yo(" ",s);o=o.split(`
|
||||
`).join(`
|
||||
`+u),e.start.character===0&&(o=u+o)}return[{range:e,newText:o}]}function Mc(t){return t.replace(/^\s+/,"")}function we(t,e,n){if(t&&t.hasOwnProperty(e)){const i=t[e];if(i!==null)return i}return n}function Ri(t,e,n){const i=we(t,e,null);return typeof i=="string"?i.length>0?i.split(",").map(r=>r.trim().toLowerCase()):[]:n}function Nc(t,e){const n=we(t,"templating",e);return n===!0?["auto"]:n===!1||n===e||Array.isArray(n)===!1?["none"]:n}function Ic(t,e,n){let i=e,r=0;const s=n.tabSize||4;for(;i<t.length;){const a=t.charAt(i);if(a===" ")r++;else if(a===" ")r+=s;else break;i++}return Math.floor(r/s)}function Ga(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}function Xa(t,e){return" ".indexOf(t.charAt(e))!==-1}var Ja;(()=>{var t={470:r=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,u){for(var c,d="",m=0,f=-1,w=0,p=0;p<=o.length;++p){if(p<o.length)c=o.charCodeAt(p);else{if(c===47)break;c=47}if(c===47){if(!(f===p-1||w===1))if(f!==p-1&&w===2){if(d.length<2||m!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var x=d.lastIndexOf("/");if(x!==d.length-1){x===-1?(d="",m=0):m=(d=d.slice(0,x)).length-1-d.lastIndexOf("/"),f=p,w=0;continue}}else if(d.length===2||d.length===1){d="",m=0,f=p,w=0;continue}}u&&(d.length>0?d+="/..":d="..",m=2)}else d.length>0?d+="/"+o.slice(f+1,p):d=o.slice(f+1,p),m=p-f-1;f=p,w=0}else c===46&&w!==-1?++w:w=-1}return d}var l={resolve:function(){for(var o,u="",c=!1,d=arguments.length-1;d>=-1&&!c;d--){var m;d>=0?m=arguments[d]:(o===void 0&&(o=process.cwd()),m=o),s(m),m.length!==0&&(u=m+"/"+u,c=m.charCodeAt(0)===47)}return u=a(u,!c),c?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(s(o),o.length===0)return".";var u=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return(o=a(o,!u)).length!==0||u||(o="."),o.length>0&&c&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var c=arguments[u];s(c),c.length>0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":l.normalize(o)},relative:function(o,u){if(s(o),s(u),o===u||(o=l.resolve(o))===(u=l.resolve(u)))return"";for(var c=1;c<o.length&&o.charCodeAt(c)===47;++c);for(var d=o.length,m=d-c,f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var w=u.length-f,p=m<w?m:w,x=-1,T=0;T<=p;++T){if(T===p){if(w>p){if(u.charCodeAt(f+T)===47)return u.slice(f+T+1);if(T===0)return u.slice(f+T)}else m>p&&(o.charCodeAt(c+T)===47?x=T:T===0&&(x=0));break}var y=o.charCodeAt(c+T);if(y!==u.charCodeAt(f+T))break;y===47&&(x=T)}var A="";for(T=c+x+1;T<=d;++T)T!==d&&o.charCodeAt(T)!==47||(A.length===0?A+="..":A+="/..");return A.length>0?A+u.slice(f+x):(f+=x,u.charCodeAt(f)===47&&++f,u.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var u=o.charCodeAt(0),c=u===47,d=-1,m=!0,f=o.length-1;f>=1;--f)if((u=o.charCodeAt(f))===47){if(!m){d=f;break}}else m=!1;return d===-1?c?"/":".":c&&d===1?"//":o.slice(0,d)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(o);var c,d=0,m=-1,f=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var w=u.length-1,p=-1;for(c=o.length-1;c>=0;--c){var x=o.charCodeAt(c);if(x===47){if(!f){d=c+1;break}}else p===-1&&(f=!1,p=c+1),w>=0&&(x===u.charCodeAt(w)?--w==-1&&(m=c):(w=-1,m=p))}return d===m?m=p:m===-1&&(m=o.length),o.slice(d,m)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!f){d=c+1;break}}else m===-1&&(f=!1,m=c+1);return m===-1?"":o.slice(d,m)},extname:function(o){s(o);for(var u=-1,c=0,d=-1,m=!0,f=0,w=o.length-1;w>=0;--w){var p=o.charCodeAt(w);if(p!==47)d===-1&&(m=!1,d=w+1),p===46?u===-1?u=w:f!==1&&(f=1):u!==-1&&(f=-1);else if(!m){c=w+1;break}}return u===-1||d===-1||f===0||f===1&&u===d-1&&u===c+1?"":o.slice(u,d)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return(function(u,c){var d=c.dir||c.root,m=c.base||(c.name||"")+(c.ext||"");return d?d===c.root?d+m:d+"/"+m:m})(0,o)},parse:function(o){s(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var c,d=o.charCodeAt(0),m=d===47;m?(u.root="/",c=1):c=0;for(var f=-1,w=0,p=-1,x=!0,T=o.length-1,y=0;T>=c;--T)if((d=o.charCodeAt(T))!==47)p===-1&&(x=!1,p=T+1),d===46?f===-1?f=T:y!==1&&(y=1):f!==-1&&(y=-1);else if(!x){w=T+1;break}return f===-1||p===-1||y===0||y===1&&f===p-1&&f===w+1?p!==-1&&(u.base=u.name=w===0&&m?o.slice(1,p):o.slice(w,p)):(w===0&&m?(u.name=o.slice(1,f),u.base=o.slice(1,p)):(u.name=o.slice(w,f),u.base=o.slice(w,p)),u.ext=o.slice(f,p)),w>0?u.dir=o.slice(0,w-1):m&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,r.exports=l}},e={};function n(r){var s=e[r];if(s!==void 0)return s.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.d=(r,s)=>{for(var a in s)n.o(s,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:s[a]})},n.o=(r,s)=>Object.prototype.hasOwnProperty.call(r,s),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i={};(()=>{let r;n.r(i),n.d(i,{URI:()=>m,Utils:()=>N}),typeof process=="object"?r=process.platform==="win32":typeof navigator=="object"&&(r=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(S,_){if(!S.scheme&&_)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${S.authoriLine truncated
|
||||
`+u),e.start.character===0&&(o=u+o)}return[{range:e,newText:o}]}function xh(t){return t.replace(/^\s+/,"")}function xe(t,e,n){if(t&&t.hasOwnProperty(e)){const i=t[e];if(i!==null)return i}return n}function Qi(t,e,n){const i=xe(t,e,null);return typeof i=="string"?i.length>0?i.split(",").map(r=>r.trim().toLowerCase()):[]:n}function Th(t,e){const n=xe(t,"templating",e);return n===!0?["auto"]:n===!1||n===e||Array.isArray(n)===!1?["none"]:n}function kh(t,e,n){let i=e,r=0;const s=n.tabSize||4;for(;i<t.length;){const a=t.charAt(i);if(a===" ")r++;else if(a===" ")r+=s;else break;i++}return Math.floor(r/s)}function Ao(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}function Lo(t,e){return" ".indexOf(t.charAt(e))!==-1}var Co;(()=>{var t={470:r=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,u){for(var h,d="",m=0,f=-1,w=0,p=0;p<=o.length;++p){if(p<o.length)h=o.charCodeAt(p);else{if(h===47)break;h=47}if(h===47){if(!(f===p-1||w===1))if(f!==p-1&&w===2){if(d.length<2||m!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var x=d.lastIndexOf("/");if(x!==d.length-1){x===-1?(d="",m=0):m=(d=d.slice(0,x)).length-1-d.lastIndexOf("/"),f=p,w=0;continue}}else if(d.length===2||d.length===1){d="",m=0,f=p,w=0;continue}}u&&(d.length>0?d+="/..":d="..",m=2)}else d.length>0?d+="/"+o.slice(f+1,p):d=o.slice(f+1,p),m=p-f-1;f=p,w=0}else h===46&&w!==-1?++w:w=-1}return d}var l={resolve:function(){for(var o,u="",h=!1,d=arguments.length-1;d>=-1&&!h;d--){var m;d>=0?m=arguments[d]:(o===void 0&&(o=process.cwd()),m=o),s(m),m.length!==0&&(u=m+"/"+u,h=m.charCodeAt(0)===47)}return u=a(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(s(o),o.length===0)return".";var u=o.charCodeAt(0)===47,h=o.charCodeAt(o.length-1)===47;return(o=a(o,!u)).length!==0||u||(o="."),o.length>0&&h&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var h=arguments[u];s(h),h.length>0&&(o===void 0?o=h:o+="/"+h)}return o===void 0?".":l.normalize(o)},relative:function(o,u){if(s(o),s(u),o===u||(o=l.resolve(o))===(u=l.resolve(u)))return"";for(var h=1;h<o.length&&o.charCodeAt(h)===47;++h);for(var d=o.length,m=d-h,f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var w=u.length-f,p=m<w?m:w,x=-1,y=0;y<=p;++y){if(y===p){if(w>p){if(u.charCodeAt(f+y)===47)return u.slice(f+y+1);if(y===0)return u.slice(f+y)}else m>p&&(o.charCodeAt(h+y)===47?x=y:y===0&&(x=0));break}var v=o.charCodeAt(h+y);if(v!==u.charCodeAt(f+y))break;v===47&&(x=y)}var S="";for(y=h+x+1;y<=d;++y)y!==d&&o.charCodeAt(y)!==47||(S.length===0?S+="..":S+="/..");return S.length>0?S+u.slice(f+x):(f+=x,u.charCodeAt(f)===47&&++f,u.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var u=o.charCodeAt(0),h=u===47,d=-1,m=!0,f=o.length-1;f>=1;--f)if((u=o.charCodeAt(f))===47){if(!m){d=f;break}}else m=!1;return d===-1?h?"/":".":h&&d===1?"//":o.slice(0,d)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(o);var h,d=0,m=-1,f=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var w=u.length-1,p=-1;for(h=o.length-1;h>=0;--h){var x=o.charCodeAt(h);if(x===47){if(!f){d=h+1;break}}else p===-1&&(f=!1,p=h+1),w>=0&&(x===u.charCodeAt(w)?--w==-1&&(m=h):(w=-1,m=p))}return d===m?m=p:m===-1&&(m=o.length),o.slice(d,m)}for(h=o.length-1;h>=0;--h)if(o.charCodeAt(h)===47){if(!f){d=h+1;break}}else m===-1&&(f=!1,m=h+1);return m===-1?"":o.slice(d,m)},extname:function(o){s(o);for(var u=-1,h=0,d=-1,m=!0,f=0,w=o.length-1;w>=0;--w){var p=o.charCodeAt(w);if(p!==47)d===-1&&(m=!1,d=w+1),p===46?u===-1?u=w:f!==1&&(f=1):u!==-1&&(f=-1);else if(!m){h=w+1;break}}return u===-1||d===-1||f===0||f===1&&u===d-1&&u===h+1?"":o.slice(u,d)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return(function(u,h){var d=h.dir||h.root,m=h.base||(h.name||"")+(h.ext||"");return d?d===h.root?d+m:d+"/"+m:m})(0,o)},parse:function(o){s(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var h,d=o.charCodeAt(0),m=d===47;m?(u.root="/",h=1):h=0;for(var f=-1,w=0,p=-1,x=!0,y=o.length-1,v=0;y>=h;--y)if((d=o.charCodeAt(y))!==47)p===-1&&(x=!1,p=y+1),d===46?f===-1?f=y:v!==1&&(v=1):f!==-1&&(v=-1);else if(!x){w=y+1;break}return f===-1||p===-1||v===0||v===1&&f===p-1&&f===w+1?p!==-1&&(u.base=u.name=w===0&&m?o.slice(1,p):o.slice(w,p)):(w===0&&m?(u.name=o.slice(1,f),u.base=o.slice(1,p)):(u.name=o.slice(w,f),u.base=o.slice(w,p)),u.ext=o.slice(f,p)),w>0?u.dir=o.slice(0,w-1):m&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,r.exports=l}},e={};function n(r){var s=e[r];if(s!==void 0)return s.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.d=(r,s)=>{for(var a in s)n.o(s,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:s[a]})},n.o=(r,s)=>Object.prototype.hasOwnProperty.call(r,s),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i={};(()=>{let r;n.r(i),n.d(i,{URI:()=>m,Utils:()=>M}),typeof process=="object"?r=process.platform==="win32":typeof navigator=="object"&&(r=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(A,T){if(!A.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${A.authoriLine truncated
|
||||
|
||||
This metadata name is associated with the value contained by the [\`content\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:
|
||||
|
||||
@@ -467,4 +471,4 @@ See [Browser compatibility](#Browser_compatibility) for notes on browser support
|
||||
|
||||
* a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;
|
||||
* \`0\` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;
|
||||
* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document.`},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"}]},{name:"title",description:{kind:"markdown",value:"Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"}]},{name:"translate",description:{kind:"markdown",value:"An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](https://developer.mozilla.org/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."},valueSet:"y",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"}]},{name:"onabort",description:{kind:"markdown",value:"The loading of a resource has been aborted."}},{name:"onblur",description:{kind:"markdown",value:"An element has lost focus (does not bubble)."}},{name:"oncanplay",description:{kind:"markdown",value:"The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."}},{name:"oncanplaythrough",description:{kind:"markdown",value:"The user agent can play the media up to its end without having to stop for further buffering of content."}},{name:"onchange",description:{kind:"markdown",value:"The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."}},{name:"onclick",description:{kind:"markdown",value:"A pointing device button has been pressed and released on an element."}},{name:"oncontextmenu",description:{kind:"markdown",value:"The right button of the mouse is clicked (before the context menu is displayed)."}},{name:"ondblclick",description:{kind:"markdown",value:"A pointing device button is clicked twice on an element."}},{name:"ondrag",description:{kind:"markdown",value:"An element or text selection is being dragged (every 350ms)."}},{name:"ondragend",description:{kind:"markdown",value:"A drag operation is being ended (by releasing a mouse button or hitting the escape key)."}},{name:"ondragenter",description:{kind:"markdown",value:"A dragged element or text selection enters a valid drop target."}},{name:"ondragleave",description:{kind:"markdown",value:"A dragged element or text selection leaves a valid drop target."}},{name:"ondragover",description:{kind:"markdown",value:"An element or text selection is being dragged over a valid drop target (every 350ms)."}},{name:"ondragstart",description:{kind:"markdown",value:"The user starts dragging an element or text selection."}},{name:"ondrop",description:{kind:"markdown",value:"An element is dropped on a valid drop target."}},{name:"ondurationchange",description:{kind:"markdown",value:"The duration attribute has been updated."}},{name:"onemptied",description:{kind:"markdown",value:"The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."}},{name:"onended",description:{kind:"markdown",value:"Playback has stopped because the end of the media was reached."}},{name:"onerror",description:{kind:"markdown",value:"A resource failed to load."}},{name:"onfocus",description:{kind:"markdown",value:"An element has received focus (does not bubble)."}},{name:"onformchange"},{name:"onforminput"},{name:"oninput",description:{kind:"markdown",value:"The value of an element changes or the content of an element with the attribute contenteditable is modified."}},{name:"oninvalid",description:{kind:"markdown",value:"A submittable element has been checked and doesn't satisfy its constraints."}},{name:"onkeydown",description:{kind:"markdown",value:"A key is pressed down."}},{name:"onkeypress",description:{kind:"markdown",value:"A key is pressed down and that key normally produces a character value (use input instead)."}},{name:"onkeyup
Line truncated
|
||||
* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document.`},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"}]},{name:"title",description:{kind:"markdown",value:"Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"}]},{name:"translate",description:{kind:"markdown",value:"An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](https://developer.mozilla.org/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."},valueSet:"y",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"}]},{name:"onabort",description:{kind:"markdown",value:"The loading of a resource has been aborted."}},{name:"onblur",description:{kind:"markdown",value:"An element has lost focus (does not bubble)."}},{name:"oncanplay",description:{kind:"markdown",value:"The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."}},{name:"oncanplaythrough",description:{kind:"markdown",value:"The user agent can play the media up to its end without having to stop for further buffering of content."}},{name:"onchange",description:{kind:"markdown",value:"The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."}},{name:"onclick",description:{kind:"markdown",value:"A pointing device button has been pressed and released on an element."}},{name:"oncontextmenu",description:{kind:"markdown",value:"The right button of the mouse is clicked (before the context menu is displayed)."}},{name:"ondblclick",description:{kind:"markdown",value:"A pointing device button is clicked twice on an element."}},{name:"ondrag",description:{kind:"markdown",value:"An element or text selection is being dragged (every 350ms)."}},{name:"ondragend",description:{kind:"markdown",value:"A drag operation is being ended (by releasing a mouse button or hitting the escape key)."}},{name:"ondragenter",description:{kind:"markdown",value:"A dragged element or text selection enters a valid drop target."}},{name:"ondragleave",description:{kind:"markdown",value:"A dragged element or text selection leaves a valid drop target."}},{name:"ondragover",description:{kind:"markdown",value:"An element or text selection is being dragged over a valid drop target (every 350ms)."}},{name:"ondragstart",description:{kind:"markdown",value:"The user starts dragging an element or text selection."}},{name:"ondrop",description:{kind:"markdown",value:"An element is dropped on a valid drop target."}},{name:"ondurationchange",description:{kind:"markdown",value:"The duration attribute has been updated."}},{name:"onemptied",description:{kind:"markdown",value:"The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."}},{name:"onended",description:{kind:"markdown",value:"Playback has stopped because the end of the media was reached."}},{name:"onerror",description:{kind:"markdown",value:"A resource failed to load."}},{name:"onfocus",description:{kind:"markdown",value:"An element has received focus (does not bubble)."}},{name:"onformchange"},{name:"onforminput"},{name:"oninput",description:{kind:"markdown",value:"The value of an element changes or the content of an element with the attribute contenteditable is modified."}},{name:"oninvalid",description:{kind:"markdown",value:"A submittable element has been checked and doesn't satisfy its constraints."}},{name:"onkeydown",description:{kind:"markdown",value:"A key is pressed down."}},{name:"onkeypress",description:{kind:"markdown",value:"A key is pressed down and that key normally produces a character value (use input instead)."}},{name:"onkeyup
Line truncated
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
(function(){"use strict";var be,Q;class yl{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?vt.isErrorNoTelemetry(e)?new vt(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const ki=new yl;function xn(t){Ri(t)||ki.onUnexpectedError(t)}function wl(t){Ri(t)||ki.onUnexpectedExternalError(t)}function rr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:vt.isErrorNoTelemetry(t),cause:r?rr(r):void 0,code:t.code}}return t}const ir="Canceled";function Ri(t){return t instanceof Ei?!0:t instanceof Error&&t.name===ir&&t.message===ir}class Ei extends Error{constructor(){super(ir),this.name=this.message}}class vt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof vt)return e;const n=new vt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class re extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,re.prototype)}}function xl(t,e="Unreachable"){throw new Error(e)}function vl(t,e="unexpected state"){if(!t)throw typeof e=="string"?new re(`Assertion Failed: ${e}`):e}function Xt(t){if(!t()){debugger;t(),xn(new re("Assertion Failed"))}}function sr(t,e){let n=0;for(;n<t.length-1;){const r=t[n],i=t[n+1];if(!e(r,i))return!1;n++}return!0}function Ll(t){return typeof t=="string"}function Nl(t){return!!t&&typeof t[Symbol.iterator]=="function"}var vn;(function(t){function e(v){return!!v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(v){yield v}t.single=i;function s(v){return e(v)?v:i(v)}t.wrap=s;function a(v){return v??n}t.from=a;function*o(v){for(let S=v.length-1;S>=0;S--)yield v[S]}t.reverse=o;function u(v){return!v||v[Symbol.iterator]().next().done===!0}t.isEmpty=u;function c(v){return v[Symbol.iterator]().next().value}t.first=c;function h(v,S){let C=0;for(const D of v)if(S(D,C++))return!0;return!1}t.some=h;function f(v,S){let C=0;for(const D of v)if(!S(D,C++))return!1;return!0}t.every=f;function m(v,S){for(const C of v)if(S(C))return C}t.find=m;function*g(v,S){for(const C of v)S(C)&&(yield C)}t.filter=g;function*d(v,S){let C=0;for(const D of v)yield S(D,C++)}t.map=d;function*p(v,S){let C=0;for(const D of v)yield*S(D,C++)}t.flatMap=p;function*y(...v){for(const S of v)Nl(S)?yield*S:yield S}t.concat=y;function w(v,S,C){let D=C;for(const P of v)D=S(D,P);return D}t.reduce=w;function x(v){let S=0;for(const C of v)S++;return S}t.length=x;function*b(v,S,C=v.length){for(S<-v.length&&(S=0),S<0&&(S+=v.length),C<0?C+=v.length:C>v.length&&(C=v.length);S<C;S++)yield v[S]}t.slice=b;function N(v,S=Number.POSITIVE_INFINITY){const C=[];if(S===0)return[C,v];const D=v[Symbol.iterator]();for(let P=0;P<S;P++){const _=D.next();if(_.done)return[C,t.empty()];C.push(_.value)}return[C,{[Symbol.iterator](){return D}}]}t.consume=N;async function L(v){const S=[];for await(const C of v)S.push(C);return S}t.asyncToArray=L;async function R(v){let S=[];for await(const C of v)S=S.concat(C);return S}t.asyncToArrayFlat=R})(vn||(vn={}));function Ef(t,e){}function Ti(t){if(vn.is(t)){const e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function _l(...t){return Qt(()=>Ti(t))}class Sl{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function Qt(t){return new Sl(t)}const Yn=class Yn{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ti(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===lt.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Yn.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Yn.DISABLE_DISPOSED_WARNING=!1;let Yt=Yn;const _i=class _i{constructor(){this._store=new Yt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};_i.None=Object.freeze({dispose(){}});let lt=_i;const jt=class jt{constructor(e){this.element=e,this.next=jt.Undefined,this.prev=jt.Undefined}};jt.Undefined=new jt(void 0);let K=jt;class Al{constructor(){this._first=K.Undefined,this._last=K.
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class An extends Error{constructor(e,n,r,i,s){super(s?`[${s}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=i,this.details=n,this.stack=r}static is(e){return e instanceof An||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class ql extends An{constructor(e,n,r,i,s){super(e,n,r,i,s),this.name="ListenerRefusalError"}}class gr{constructor(e){this.value=e}}const jl=2;class Te{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new dr(e?.onListenerError??xn,this._options?.leakWarningThreshold??Ul,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new mr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=u[1]/this._size>.3?"dominated":"popular",h=new ql(c,`${o}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||xn)(h),lt.None}if(this._disposed)return lt.None;n&&(e=e.bind(n));const i=new gr(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Sn.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof gr?(this._deliveryQueue??=new Wl,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=Qt(()=>{s?.(),this._removeListener(i)});return pr(a,r),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*jl<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;const r=this._options?.onListenerError||xn;if(!r){e.value(n);return}try{e.value(n)}catch(i){r(i)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof gr)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}class Wl{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function pr(t,e){e instanceof Yt?e.add(t):Array.isArray(e)&&e.push(t)}function Oi(t,e){if(e instanceof Yt)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function Hl(t){return t}class zl{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Hl):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var ut;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(ut||(ut={}));class br{constructor(e){this.executor=e,this._state=ut.Uninitialized}get value(){if(this._state===ut.Uninitialized){this._state=ut.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=ut.Completed}}else if(this._state===ut.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Gl(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Jl(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Xl(t){re
Line truncated
|
||||
`||t===" "}class nn{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class ba{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function ac(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function*oc(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function lc(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function uc(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function cc(t,e){for(const n of e)t.push(n)}var Dr;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Dr||(Dr={}));function Rt(t,e){return(n,r)=>e(t(n),t(r))}const rn=(t,e)=>t-e;function fc(t){return(e,n)=>-t(e,n)}const Gt=class Gt{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Gt(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new Gt(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||Dr.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};Gt.empty=new Gt(e=>{});let ya=Gt;class B{static fromTo(e,n){return new B(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let i=r;for(;i<n.length&&n[i].start<=e.endExclusive;)i++;if(r===i)n.splice(r,0,e);else{const s=Math.min(e.start,n[r].start),a=Math.max(e.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new B(s,a))}}static tryCreate(e,n){if(!(e>n))return new B(e,n)}static ofLength(e){return new B(0,e)}static ofStartAndLength(e,n){return new B(e,e+n)}static emptyAt(e){return new B(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new re(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new B(this.start+e,this.endExclusive+e)}deltaStart(e){return new B(this.start+e,this.endExclusive)}deltaEnd(e){return new B(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new B(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new B(n,r)}intersectionLength(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){const n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new re(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new re(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new re(`Invalid join: ${this.toString()} and ${e.toString()}`);return new B(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new B(this.start-e,this.endExclusive+n)}}function Et(t,e){const n=Tt(t,e);return n===-1?void 0:t[n]}function Tt(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?i=a+1:s=a}return i-1}function hc(t,e){const n=Or(t,e);return n===t.length?void 0:t[n]}function Or(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){const a=Math.floor((i+s)/2);e(t[a])?s=a:i=a+1}return i}const er=class er{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(er.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=Tt(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};er.assertInvariants=!1;let Cn=er;const ke=class ke{static ofLength(e,n){return new ke(e,e+n)}static fromRange(e){return new ke(e
Line truncated
|
||||
`?(n++,r=0):r++;return new Ve(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Ve(this.lineCount,this.columnCount+e.columnCount):new Ve(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new j(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new j(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new j(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new J(e.lineNumber,e.column+this.columnCount):new J(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Ve.zero=new Ve(0,0);let tt=Ve;class mc{getOffsetRange(e){return new B(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return j.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new ft.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new ft.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new ft.deps.TextEdit(n)}}const Si=class Si{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Si._deps=void 0;let ft=Si;function dc(t){ft._deps=t}class wa extends mc{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new J(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new J(n,i+1)}if(e.column<1)return new J(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new J(e.lineNumber,r+1):e}getPosition(e){const n=Tt(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new J(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new ft.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class xa{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new J(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new wa(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new j(e,1,e,Number.MAX_SAFE_INTEGER))}}class gc extends xa{constructor(e,n){vl(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r<e.endLineNumber;r++)n+=`
|
||||
`+this._getLineContent(r);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new tt(this._lineCount-1,e.length)}}class In extends gc{constructor(e){super(n=>e[n-1],e.length)}}class Fn extends xa{constructor(e){super(),this.value=e,this._t=new wa(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}let pc=class Ai{static fromStringEdit(e,n){const r=e.replacements.map(i=>Pe.fromStringReplacement(i,n));return new Ai(r)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort(Rt(r=>r.range,j.compareRangesUsingStarts));return new Ai(n)}constructor(e){this.replacements=e,Xt(()=>sr(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,i=0;for(const s of this.replacements){const a=s.range.getStartPosition();if(e.isBeforeOrEqual(a))break;const o=s.range.getEndPosition(),u=tt.ofText(s.text);if(e.isBefore(o)){const c=new J(a.lineNumber+n,a.column+(a.lineNumber+n===r?i:0)),h=u.addToPosition(c);return Vn(c,h)}a.lineNumber+n!==r&&(i=0),n+=u.lineCount-(s.range.endLineNumber-s.range.startLineNumber),u.lineCount===0?o.lineNumber!==a.lineNumber?i+=u.columnCount-(o.column-1):i+=u.columnCount-(o.column-a.column):i=u.columnCount,r=o.lineNumber+n}return new J(e.lineNumber+n,e.column+(e.lineNumber+n===r?i:0))}mapRange(e){function n(a){return a instanceof J?a:a.getStartPosition()}function r(a){return a instanceof J?a:a.getEndPosition()}const i=n(this.mapPosition(e.getStartPosition())),s=r(this.mapPosition(e.getEndPosition()));return Vn(i,s)}apply(e){let n="",r=new J(1,1);for(const s of this.replacements){const a=s.range,o=a.getStartPosition(),u=a.getEndPosition(),c=Vn(r,o);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=s.text,r=u}const i=Vn(r,e.endPositionExclusive);return i.isEmpty()||(n+=e.getValueOfRange(i)),n}applyToString(e){const n=new Fn(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,r=0,i=0;for(const s of this.replacements){const a=tt.ofText(s.text),o=J.lift({lineNumber:s.range.startLineNumber+r,column:s.range.startColumn+(s.range.startLineNumber===n?i:0)}),u=a.createRange(o);e.push(u),r=u.endLineNumber-s.range.endLineNumber,i=u.endColumn-s.range.endColumn,n=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new re;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition();let i="";for(let s=0;s<this.replacements.length;s++){const a=this.replacements[s];if(i+=a.text,s<this.replacements.length-1){const o=this.replacements[s+1],u=j.fromPositions(a.range.getEndPosition(),o.range.getStartPosition()),c=e.getValueOfRange(u);i+=c}}return new Pe(j.fromPositions(n,r),i)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new Fn(e)):this.replacements.length===0?"":this.replacements.map(n=>{const i=e.getValueOfRange(n.range),s=j.fromPositions(new J(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let a=e.getValueOfRange(s);a.length>10&&(a="..."+a.substring(a.length-10));const o=j.fromPositions(n.range.getEndPosition(),new J(n.range.endLineNumber+1,1));let u=e.getValueOfRange(o);u.length>10&&(u=u.substring(0,10)+"...");let c=i;if(c.length>10){const f=Math.floor(5);c=c.substring(0,f)+"..."+c.substring(c.length-f)}let h=n.text;if(h.length>10){const f=Math.floor(5);h=h.substring(0,f)+"..."+h.substring(h.length-f)}return c.length===0?`${a}❰${h}❱${u}`:`${a}❰${c}↦${h}❱${u}`}).join(`
|
||||
`)}};class Pe{static joinReplacements(e,n){if(e.length===0)throw new re;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a<e.length;a++){const o=e[a];if(s+=o.text,a<e.length-1){const u=e[a+1],c=j.fromPositions(o.range.getEndPosition(),u.range.getStartPosition()),h=n.getValueOfRange(c);s+=h}}return new Pe(j.fromPositions(r,i),s)}static fromStringReplacement(e,n){return new Pe(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new Pe(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return Pe.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=yr(n,r),s=tt.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),a=r.substring(i),o=j.fromPositions(s,this.range.getEndPosition());return new Pe(o,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),r=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),i=wr(n,r),s=tt.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-i),o=j.fromPositions(this.range.getStartPosition(),s);return new Pe(o,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function Vn(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return j.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new re("start must be before end");return new j(t.lineNumber,t.column,e.lineNumber,e.column)}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const u of e){const c=new Le(new z(s,u.original.startLineNumber),new z(a,u.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}const o=new Le(new z(s,n+1),new z(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ne(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new re("not a valid diff");return new Ne(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ne(new j(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new j(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(va(this.original.endLineNumberExclusive,e)&&va(this.modified.endLineNumberExclusive,n))return new Ne(new j(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new j(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ne(j.fromPositions(new J(this.original.startLineNumber,1),Mt(new J(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(new J(this.modified.startLineNumber,1),Mt(new J(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ne(j.fromPositions(Mt(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Mt(new J(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),j.fromPositions(Mt(new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Mt(new J(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new re}}function Mt(t,e){if(t.lineNumber<1)return new J(1,1);if(t.lineNumber>e.length)return new J(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new J(t.lineNumber,n.length+1):t}function va(t,e){return t>=1&&t<=e.length}class Xe extends Le{static fromRangeMappings(e){const n=z.join(e.map(i=>z.fromRangeInclusive(i.originalRange))),r=z.join(e.map(i=>z.fromRangeInclusive(i.modifiedRange)));return new Xe(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new Xe(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Xe(this.original,this.modified,[this.toRangeMapping()])}}class Ne{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ne(i.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){const r=e[n-1],i=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new re("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Ne(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new Pe(this.originalRange,n)}}function $r(t,e,n,r=!1){const i=[];for(const s of oc(t.map(a=>bc(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new Xe(a.original.join(o.original),a.modified.join(o.modified),s.map(u=>u.innerChanges[0])))}return Xt(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.
Line truncated
|
||||
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=i}computeSimilarity(e){let n=0;const r=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-n/(this.totalCount+e.totalCount)}};bn.chrKeys=new Map;let Dn=bn;class _c{compute(e,n,r=an.instance,i){if(e.length===0||n.length===0)return Qe.trivial(e,n);const s=new qr(e.length,n.length),a=new qr(e.length,n.length),o=new qr(e.length,n.length);for(let d=0;d<e.length;d++)for(let p=0;p<n.length;p++){if(!r.isValid())return Qe.trivialTimedOut(e,n);const y=d===0?0:s.get(d-1,p),w=p===0?0:s.get(d,p-1);let x;e.getElement(d)===n.getElement(p)?(d===0||p===0?x=0:x=s.get(d-1,p-1),d>0&&p>0&&a.get(d-1,p-1)===3&&(x+=o.get(d-1,p-1)),x+=i?i(d,p):1):x=-1;const b=Math.max(y,w,x);if(b===x){const N=d>0&&p>0?o.get(d-1,p-1):0;o.set(d,p,N+1),a.set(d,p,3)}else b===y?(o.set(d,p,0),a.set(d,p,1)):b===w&&(o.set(d,p,0),a.set(d,p,2));s.set(d,p,b)}const u=[];let c=e.length,h=n.length;function f(d,p){(d+1!==c||p+1!==h)&&u.push(new ee(new B(d+1,c),new B(p+1,h))),c=d,h=p}let m=e.length-1,g=n.length-1;for(;m>=0&&g>=0;)a.get(m,g)===3?(f(m,g),m--,g--):a.get(m,g)===1?m--:g--;return f(-1,-1),u.reverse(),new Qe(u,!1)}}class Sa{compute(e,n,r=an.instance){if(e.length===0||n.length===0)return Qe.trivial(e,n);const i=e,s=n;function a(p,y){for(;p<i.length&&y<s.length&&i.getElement(p)===s.getElement(y);)p++,y++;return p}let o=0;const u=new Sc;u.set(0,a(0,0));const c=new Ac;c.set(0,u.get(0)===0?null:new Aa(null,0,0,u.get(0)));let h=0;e:for(;;){if(o++,!r.isValid())return Qe.trivialTimedOut(i,s);const p=-Math.min(o,s.length+o%2),y=Math.min(o,i.length+o%2);for(h=p;h<=y;h+=2){const w=h===y?-1:u.get(h+1),x=h===p?-1:u.get(h-1)+1,b=Math.min(Math.max(w,x),i.length),N=b-h;if(b>i.length||N>s.length)continue;const L=a(b,N);u.set(h,L);const R=b===w?c.get(h+1):c.get(h-1);if(c.set(h,L!==b?new Aa(R,b,N,L-b):R),u.get(h)===i.length&&u.get(h)-h===s.length)break e}}let f=c.get(h);const m=[];let g=i.length,d=s.length;for(;;){const p=f?f.x+f.length:0,y=f?f.y+f.length:0;if((p!==g||y!==d)&&m.push(new ee(new B(p,g),new B(y,d))),!f)break;g=f.x,d=f.y,f=f.prev}return m.reverse(),new Qe(m,!1)}}class Aa{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class Sc{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Ac{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class On{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;c<u;c++)this.elements.push(s.charCodeAt(c));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new B(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Ea(e>0?this.elements[e-1]:-1),r=Ea(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=Ra(n),i+=Ra(r),i}translateOffset(e,n="right"){const r=Tt(this.firstElementOffsetByLineIdx,s=>s<=e),i=e-this.firstElementOffsetByLineIdx[r];return new J(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?j.fromPositions(r,r):j.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Ct(this.elements[e]))return;let n=e;for(;n>0&&Ct(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Ct(this.elements[r]);)r++;return new B(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Ct(this.elements[e]))return
Line truncated
|
||||
`).length>=15&&Ec(f,g=>g.length>=2)>=2}),a=Cc(t,a),a}function Ec(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function Tc(t,e,n,r){const i=[],s=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Dn(u.original,e,u)),a=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Dn(u.modified,n,u))),o=new Set;for(const u of s){let c=-1,h;for(const f of a){const m=u.computeSimilarity(f);m>c&&(c=m,h=f)}if(c>.9&&h&&(a.delete(h),i.push(new Le(u.range,h.range)),o.add(u.source),o.add(h.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function Mc(t,e,n,r,i,s){const a=[],o=new Xu;for(const m of t)for(let g=m.original.startLineNumber;g<m.original.endLineNumberExclusive-2;g++){const d=`${e[g-1]}:${e[g+1-1]}:${e[g+2-1]}`;o.add(d,{range:new z(g,g+3)})}const u=[];t.sort(Rt(m=>m.modified.startLineNumber,rn));for(const m of t){let g=[];for(let d=m.modified.startLineNumber;d<m.modified.endLineNumberExclusive-2;d++){const p=`${n[d-1]}:${n[d+1-1]}:${n[d+2-1]}`,y=new z(d,d+3),w=[];o.forEach(p,({range:x})=>{for(const N of g)if(N.originalLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive&&N.modifiedLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive){N.originalLineRange=new z(N.originalLineRange.startLineNumber,x.endLineNumberExclusive),N.modifiedLineRange=new z(N.modifiedLineRange.startLineNumber,y.endLineNumberExclusive),w.push(N);return}const b={modifiedLineRange:y,originalLineRange:x};u.push(b),w.push(b)}),g=w}if(!s.isValid())return[]}u.sort(fc(Rt(m=>m.modifiedLineRange.length,rn)));const c=new Oe,h=new Oe;for(const m of u){const g=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,d=c.subtractFrom(m.modifiedLineRange),p=h.subtractFrom(m.originalLineRange).getWithDelta(g),y=d.getIntersection(p);for(const w of y.ranges){if(w.length<3)continue;const x=w,b=w.delta(-g);a.push(new Le(b,x)),c.addRange(x),h.addRange(b)}}a.sort(Rt(m=>m.original.startLineNumber,rn));const f=new Cn(t);for(let m=0;m<a.length;m++){const g=a[m],d=f.findLastMonotonous(R=>R.original.startLineNumber<=g.original.startLineNumber),p=Et(t,R=>R.modified.startLineNumber<=g.modified.startLineNumber),y=Math.max(g.original.startLineNumber-d.original.startLineNumber,g.modified.startLineNumber-p.modified.startLineNumber),w=f.findLastMonotonous(R=>R.original.startLineNumber<g.original.endLineNumberExclusive),x=Et(t,R=>R.modified.startLineNumber<g.modified.endLineNumberExclusive),b=Math.max(w.original.endLineNumberExclusive-g.original.endLineNumberExclusive,x.modified.endLineNumberExclusive-g.modified.endLineNumberExclusive);let N;for(N=0;N<y;N++){const R=g.original.startLineNumber-N-1,v=g.modified.startLineNumber-N-1;if(R>r.length||v>i.length||c.contains(v)||h.contains(R)||!Ta(r[R-1],i[v-1],s))break}N>0&&(h.addRange(new z(g.original.startLineNumber-N,g.original.startLineNumber)),c.addRange(new z(g.modified.startLineNumber-N,g.modified.startLineNumber)));let L;for(L=0;L<b;L++){const R=g.original.endLineNumberExclusive+L,v=g.modified.endLineNumberExclusive+L;if(R>r.length||v>i.length||c.contains(v)||h.contains(R)||!Ta(r[R-1],i[v-1],s))break}L>0&&(h.addRange(new z(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+L)),c.addRange(new z(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+L))),(N>0||L>0)&&(a[m]=new Le(new z(g.original.startLineNumber-N,g.original.endLineNumberExclusive+L),new z(g.modified.startLineNumber-N,g.modified.endLineNumberExclusive+L)))}return a}function Ta(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new Sa().compute(new On([t],new j(1,1,1,t.length),!1),new On([e],new j(1,1,1,e.length),!1),n);let s=0;const a=ee.invert(i.diffs,t.length);for(const h of a)h.seq1Range.forEach(f=>{jr(t.charCodeAt(f))||s++});function o(h){let f=0;for(let m=0;m<t.length;m++)jr(h.charCodeAt(m))||f++;return f}const u=o(t.length>e.length?t:e);return s/u>.6&&u>10}function Pc(t){if(t.length===0)return t;t.sort(Rt(n=>n.original.startLineNumber,rn));const e=[t[0]];for(let n=1;n<t.length;n++){const r=e[e.length-1],i=t[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,a=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function Cc(t,e){const n=new Cn(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new Le(new z(1,1),new z(1,1)),s=Et(t,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),e}function Ma(t,e,n){let r=n;return r=Pa(t,e,r),r=Pa(t,e,r),r=Ic(t,e,r),r}function Pa(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let s=1;s<n.length;s++){const a=r[r.length-1];let o=n[s];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const u=o.seq1Range.start-a.seq1Range.endExclusive;let c;for(c=1;c<=u&&!(t.getElement(o.seq1Range.start-c)!==t.getElement(o.seq1Range.endExclusive-c)||e.getElement(o.seq2Range
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function Va(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class $c{constructor(){this.dynamicProgrammingDiffing=new _c,this.myersDiffingAlgorithm=new Sa}computeDiff(e,n,r){if(e.length<=1&&ac(e,n,(v,S)=>v===S))return new nn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new nn([new Xe(new z(1,e.length+1),new z(1,n.length+1),[new Ne(new j(1,1,e.length,e[e.length-1].length+1),new j(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?an.instance:new Nc(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(v){let S=a.get(v);return S===void 0&&(S=a.size,a.set(v,S)),S}const u=e.map(v=>o(v.trim())),c=n.map(v=>o(v.trim())),h=new Fa(u,e),f=new Fa(c,n),m=h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,i,(v,S)=>e[v]===n[S]?n[S].length===0?.1:1+Math.log(1+n[S].length):.99):this.myersDiffingAlgorithm.compute(h,f,i);let g=m.diffs,d=m.hitTimeout;g=Ma(h,f,g),g=Dc(h,f,g);const p=[],y=v=>{if(s)for(let S=0;S<v;S++){const C=w+S,D=x+S;if(e[C]!==n[D]){const P=this.refineDiff(e,n,new ee(new B(C,C+1),new B(D,D+1)),i,s,r);for(const _ of P.mappings)p.push(_);P.hitTimeout&&(d=!0)}}};let w=0,x=0;for(const v of g){Xt(()=>v.seq1Range.start-w===v.seq2Range.start-x);const S=v.seq1Range.start-w;y(S),w=v.seq1Range.endExclusive,x=v.seq2Range.endExclusive;const C=this.refineDiff(e,n,v,i,s,r);C.hitTimeout&&(d=!0);for(const D of C.mappings)p.push(D)}y(e.length-w);const b=new In(e),N=new In(n),L=$r(p,b,N);let R=[];return r.computeMoves&&(R=this.computeMoves(L,e,n,u,c,i,s,r)),Xt(()=>{function v(C,D){if(C.lineNumber<1||C.lineNumber>D.length)return!1;const P=D[C.lineNumber-1];return!(C.column<1||C.column>P.length+1)}function S(C,D){return!(C.startLineNumber<1||C.startLineNumber>D.length+1||C.endLineNumberExclusive<1||C.endLineNumberExclusive>D.length+1)}for(const C of L){if(!C.innerChanges)return!1;for(const D of C.innerChanges)if(!(v(D.modifiedRange.getStartPosition(),n)&&v(D.modifiedRange.getEndPosition(),n)&&v(D.originalRange.getStartPosition(),e)&&v(D.originalRange.getEndPosition(),e)))return!1;if(!S(C.modified,n)||!S(C.original,e))return!1}return!0}),new nn(L,R,d)}computeMoves(e,n,r,i,s,a,o,u){return Rc(e,n,r,i,s,a).map(f=>{const m=this.refineDiff(n,r,new ee(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,o,u),g=$r(m.mappings,new In(n),new In(r),!0);return new ba(f,g)})}refineDiff(e,n,r,i,s,a){const u=Bc(r).toRangeMapping2(e,n),c=new On(e,u.originalRange,s),h=new On(n,u.modifiedRange,s),f=c.length+h.length<500?this.dynamicProgrammingDiffing.compute(c,h,i):this.myersDiffingAlgorithm.compute(c,h,i);let m=f.diffs;return m=Ma(c,h,m),m=Ia(c,h,m,(d,p)=>d.findWordContaining(p)),a.extendToSubwords&&(m=Ia(c,h,m,(d,p)=>d.findSubWordContaining(p),!0)),m=Fc(c,h,m),m=Oc(c,h,m),{mappings:m.map(d=>new Ne(c.translateRange(d.seq1Range),h.translateRange(d.seq2Range))),hitTimeout:f.hitTimeout}}}function Bc(t){return new Le(new z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var nt;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(nt||(nt={}));const Uc="tkn";class qc{constructor(){this._hosts=Object.create(null),this._ports=Object.cre
Line truncated
|
||||
`)),s=new Fn(n.join(`
|
||||
`)),a=this._computer.computeDiff(i.value,s.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),o=i.getTransformer(),u=s.getTransformer(),c=[];let h=0;for(const g of a.edits.replacements){const d=g.range.start+h,p=d+g.newText.length,y=o.getRange(new B(g.range.start,g.range.endExclusive)),w=u.getRange(new B(d,p));c.push(new Ne(y,w)),h+=g.newText.length-(g.range.endExclusive-g.range.start)}const f=$r(c,i,s),m=[];if(r.computeMoves)for(const g of a.moves){const d=o.getPosition(g.range.original.start),p=o.getPosition(g.range.original.endExclusive),y=u.getPosition(g.range.modified.start),w=u.getPosition(g.range.modified.endExclusive),x=new z(d.lineNumber,p.lineNumber),b=new z(y.lineNumber,w.lineNumber);m.push(new ba(new Le(x,b),[]))}return new nn(f,m,a.hitTimeout)}}const Bn={getLegacy:()=>new wc,getDefault:()=>new $c,getAdvancedExternal:()=>$a(!1),getAdvancedWasm:()=>$a(!0)};function it(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class A{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=it(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Re{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=it(Math.max(Math.min(1,n),0),3),this.l=it(Math.max(Math.min(1,r),0),3),this.a=it(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let u=0,c=0;const h=(o+a)/2,f=a-o;if(f>0){switch(c=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),a){case n:u=(r-i)/f+(r<i?6:0);break;case r:u=(i-n)/f+2;break;case i:u=(n-r)/f+4;break}u*=60,u=Math.round(u)}return new Re(u,c,h,s)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,u;if(r===0)a=o=u=i;else{const c=i<.5?i*(1+r):i+r-i*r,h=2*i-c;a=Re._hue2rgb(h,c,n+1/3),o=Re._hue2rgb(h,c,n),u=Re._hue2rgb(h,c,n-1/3)}return new A(Math.round(a*255),Math.round(o*255),Math.round(u*255),s)}}class It{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=it(Math.max(Math.min(1,n),0),3),this.v=it(Math.max(Math.min(1,r),0),3),this.a=it(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,u=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new It(Math.round(c*60),u,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),u=i-a;let[c,h,f]=[0,0,0];return n<60?(c=a,h=o):n<120?(c=o,h=a):n<180?(h=a,f=o):n<240?(h=o,f=a):n<300?(c=o,f=a):n<=360&&(c=a,f=o),c=Math.round((c+u)*255),h=Math.round((h+u)*255),f=Math.round((f+u)*255),new A(c,h,f,s)}}let Un=(Q=class{static fromHex(e){return Q.Format.CSS.parseHex(e)||Q.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Re.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:It.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof A)this.rgba=e;else if(e instanceof Re)this._hsla=e,this.rgba=Re.toRGBA(e);else if(e instanceof It)this._hsva=e,this.rgba=It.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&A.equals(this.rgba,e.rgba)&&Re.equals(this.hsla,e.hsla)&&It.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Q._relativeLuminanceForComponent(this.rgba.r),n=Q._relativeLuminanceForComponent(this.rgba.g),r=Q._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return it(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n<r}lighten(e){return new Q(new Re(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new Q(new Re(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:r,b:i,a:s}=this.rgba;return new Q(new A(n,r,i,s*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new Q(new A(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const r=Math.min(Math.max(n,0),1),i=this.rgba,s=e.rgba,a=i.r+(s.r-i.r)*r,o=i.g+(s.g-i.g)*r,u=i.b+(s.b-i.b)*r,c=i.a+(s.a-i.a)*r;return new Q(new A(a,o,u,c))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:r,b:i,a:s}=this.rgba;return new Q(new A(e.rgba.r-s*(e.rgba.r-n),e.rgba.g-s*(e.rgba.g-r),e.rgba.b-s*(e.rgba.
Line truncated
|
||||
`);s.lastIndex=0;let h;for(;(h=s.exec(c))!==null;){const f=c.substring(0,h.index),m=(f.match(/\n/g)||[]).length,g=a+m,d=h[0].split(`
|
||||
`),p=d.length,y=g+p-1,w=f.lastIndexOf(`
|
||||
`)+1,x=h.index-w+1,b=d[d.length-1],N=p===1?x+h[0].length:b.length+1,L={startLineNumber:g,startColumn:x,endLineNumber:y,endColumn:N},R=(h.groups??{}).label??"",v=((h.groups??{}).separator??"")!=="",S={range:L,text:R,hasSeparatorLine:v,shouldBeInComments:!0};(S.text||S.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<S.range.startLineNumber)&&n.push(S),s.lastIndex=h.index+h[0].length}}return n}function l1(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(r1,""),{text:t,hasSeparatorLine:e}}class Wa{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Ei)}}var Ha;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(Ha||(Ha={}));class u1{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new re("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new Wa;return this._unsatisfiedConsumers.push(e),e.p}}}const ge=class ge{constructor(e,n){this._onReturn=n,this._producerConsumer=new u1,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new ge(n=>{n.emitMany(e)})}static fromPromise(e){return new ge(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new ge(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new ge(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new ge(async r=>{for await(const i of e)r.emitOne(n(i))})}static tee(e){let n,r;const i=new Wa,s=async()=>{if(!(!n||!r))try{for await(const u of e)n.emitOne(u),r.emitOne(u)}catch(u){n.reject(u),r.reject(u)}finally{i.complete()}},a=new ge(async u=>(n=u,s(),i.p)),o=new ge(async u=>(r=u,s(),i.p));return[a,o]}map(e){return ge.map(this,e)}static coalesce(e){return ge.filter(e,n=>!!n)}coalesce(){return ge.coalesce(this)}static filter(e,n){return new ge(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return ge.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};ge.EMPTY=ge.fromArray([]);let za=ge;class c1{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=At(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=At(e),n=At(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=At(e),n=At(n);const r=this.values,i=this.prefixSum;if(e>=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length
Line truncated
|
||||
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const v=m(4);v>=0?b+=String.fromCharCode(v):f=4;break;default:f=5}N=r;continue}if(L>=0&&L<=31)if(un(L)){b+=t.substring(N,r),f=2;break}else f=6;r++}return b}function y(){if(i="",f=0,s=r,u=o,h=c,r>=n)return s=n,a=17;let b=t.charCodeAt(r);if(Zr(b)){do r++,i+=String.fromCharCode(b),b=t.charCodeAt(r);while(Zr(b));return a=15}if(un(b))return r++,i+=String.fromCharCode(b),b===13&&t.charCodeAt(r)===10&&(r++,i+=`
|
||||
`),o++,c=r,a=14;switch(b){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=p(),a=10;case 47:const N=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!un(t.charCodeAt(r));)r++;return i=t.substring(N,r),a=12}if(t.charCodeAt(r+1)===42){r+=2;const L=n-1;let R=!1;for(;r<L;){const v=t.charCodeAt(r);if(v===42&&t.charCodeAt(r+1)===47){r+=2,R=!0;break}r++,un(v)&&(v===13&&t.charCodeAt(r)===10&&r++,o++,c=r)}return R||(r++,f=1),i=t.substring(N,r),a=13}return i+=String.fromCharCode(b),r++,a=16;case 45:if(i+=String.fromCharCode(b),r++,r===n||!Ft(t.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=d(),a=11;default:for(;r<n&&w(b);)r++,b=t.charCodeAt(r);if(s!==r){switch(i=t.substring(s,r),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(b),r++,a=16}}function w(b){if(Zr(b)||un(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let b;do b=y();while(b>=12&&b<=15);return b}return{setPosition:g,getPosition:()=>r,scan:e?x:y,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function Zr(t){return t===32||t===9}function un(t){return t===10||t===13}function Ft(t){return t>=48&&t<=57}var Ga;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Ga||(Ga={}));const Ee=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),Vt=200,Ja={" ":{"\n":new Array(Vt).fill(0).map((t,e)=>`
|
||||
`+" ".repeat(e)),"\r":new Array(Vt).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(Vt).fill(0).map((t,e)=>`\r
|
||||
`+" ".repeat(e))}," ":{"\n":new Array(Vt).fill(0).map((t,e)=>`
|
||||
`+" ".repeat(e)),"\r":new Array(Vt).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(Vt).fill(0).map((t,e)=>`\r
|
||||
`+" ".repeat(e))}},y1=[`
|
||||
`,"\r",`\r
|
||||
`];function w1(t,e,n){let r,i,s,a,o;if(e){for(a=e.offset,o=a+e.length,s=a;s>0&&!Xa(t,s-1);)s--;let L=o;for(;L<t.length&&!Xa(t,L);)L++;i=t.substring(s,L),r=x1(i,n)}else i=t,r=0,s=0,a=0,o=t.length;const u=v1(n,t),c=y1.includes(u);let h=0,f=0,m;n.insertSpaces?m=Ee[n.tabSize||4]??Dt(Ee[1],n.tabSize||4):m=" ";const g=m===" "?" ":" ";let d=Yr(i,!1),p=!1;function y(){if(h>1)return Dt(u,h)+Dt(m,r+f);const L=m.length*(r+f);return!c||L>Ja[g][u].length?u+Dt(m,r+f):L<=0?u:Ja[g][u][L]}function w(){let L=d.scan();for(h=0;L===15||L===14;)L===14&&n.keepLines?h+=1:L===14&&(h=1),L=d.scan();return p=L===16||d.getTokenError()!==0,L}const x=[];function b(L,R,v){!p&&(!e||R<o&&v>a)&&t.substring(R,v)!==L&&x.push({offset:R,length:v-R,content:L})}let N=w();if(n.keepLines&&h>0&&b(Dt(u,h),0,0),N!==17){let L=d.getTokenOffset()+s,R=m.length*r<20&&n.insertSpaces?Ee[m.length*r]:Dt(m,r);b(R,s,L)}for(;N!==17;){let L=d.getTokenOffset()+d.getTokenLength()+s,R=w(),v="",S=!1;for(;h===0&&(R===12||R===13);){let D=d.getTokenOffset()+s;b(Ee[1],L,D),L=d.getTokenOffset()+d.getTokenLength()+s,S=R===12,v=S?y():"",R=w()}if(R===2)N!==1&&f--,n.keepLines&&h>0||!n.keepLines&&N!==1?v=y():n.keepLines&&(v=Ee[1]);else if(R===4)N!==3&&f--,n.keepLines&&h>0||!n.keepLines&&N!==3?v=y():n.keepLines&&(v=Ee[1]);else{switch(N){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?v=y():v=Ee[1];break;case 5:n.keepLines&&h>0||!n.keepLines?v=y():v=Ee[1];break;case 12:v=y();break;case 13:h>0?v=y():S||(v=Ee[1]);break;case 6:n.keepLines&&h>0?v=y():S||(v=Ee[1]);break;case 10:n.keepLines&&h>0?v=y():R===6&&!S&&(v="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?v=y():(R===12||R===13)&&!S?v=Ee[1]:R!==5&&R!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(R===12||R===13)&&(v=y())}R===17&&(n.keepLines&&h>0?v=y():v=n.insertFinalNewline?u:"");const C=d.getTokenOffset()+s;b(v,L,C),N=R}return x}function Dt(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}function x1(t,e){let n=0,r=0;const i=e.tabSize||4;for(;n<t.length;){let s=t.charAt(n);if(s===Ee[1])r++;else if(s===" ")r+=i;else break;n++}return Math.floor(r/i)}function v1(t,e){for(let n=0;n<e.length;n++){const r=e.charAt(n);if(r==="\r")return n+1<e.length&&e.charAt(n+1)===`
|
||||
`?`\r
|
||||
`:"\r";if(r===`
|
||||
`)return`
|
||||
`}return t&&t.eol||`
|
||||
`}function Xa(t,e){return`\r
|
||||
`.indexOf(t.charAt(e))!==-1}var qn;(function(t){t.DEFAULT={allowTrailingComma:!1}})(qn||(qn={}));function L1(t,e=[],n=qn.DEFAULT){let r=null,i=[];const s=[];function a(u){Array.isArray(i)?i.push(u):r!==null&&(i[r]=u)}return _1(t,{onObjectBegin:()=>{const u={};a(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const u=[];a(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(u,c,h)=>{e.push({error:u,offset:c,length:h})}},n),i[0]}function Qa(t){if(!t.parent||!t.parent.children)return[];const e=Qa(t.parent);if(t.parent.type==="property"){const n=t.parent.children[0].value;e.push(n)}else if(t.parent.type==="array"){const n=t.parent.children.indexOf(t);n!==-1&&e.push(n)}return e}function Kr(t){switch(t.type){case"array":return t.children.map(Kr);case"object":const e=Object.create(null);for(let n of t.children){const r=n.children[1];r&&(e[n.children[0].value]=Kr(r))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function N1(t,e,n=!1){return e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}function Ya(t,e,n=!1){if(N1(t,e,n)){const r=t.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=e;i++){const s=Ya(r[i],e,n);if(s)return s}return t}}function _1(t,e,n=qn.DEFAULT){const r=Yr(t,!1),i=[];function s(_){return _?()=>_(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(_){return _?()=>_(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function o(_){return _?E=>_(E,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(_){return _?E=>_(E,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const c=a(e.onObjectBegin),h=u(e.onObjectProperty),f=s(e.onObjectEnd),m=a(e.onArrayBegin),g=s(e.onArrayEnd),d=u(e.onLiteralValue),p=o(e.onSeparator),y=s(e.onComment),w=o(e.onError),x=n&&n.disallowComments,b=n&&n.allowTrailingComma;function N(){for(;;){const _=r.scan();switch(r.getTokenError()){case 4:L(14);break;case 5:L(15);break;case 3:L(13);break;case 1:x||L(11);break;case 2:L(12);break;case 6:L(16);break}switch(_){case 12:case 13:x?L(10):y();break;case 16:L(1);break;case 15:case 14:break;default:return _}}}function L(_,E=[],T=[]){if(w(_),E.length+T.length>0){let F=r.getToken();for(;F!==17;){if(E.indexOf(F)!==-1){N();break}else if(T.indexOf(F)!==-1)break;F=N()}}}function R(_){const E=r.getTokenValue();return _?d(E):(h(E),i.push(E)),N(),!0}function v(){switch(r.getToken()){case 11:const _=r.getTokenValue();let E=Number(_);isNaN(E)&&(L(2),E=0),d(E);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return N(),!0}function S(){return r.getToken()!==10?(L(3,[],[2,5]),!1):(R(!1),r.getToken()===6?(p(":"),N(),P()||L(4,[],[2,5])):L(5,[],[2,5]),i.pop(),!0)}function C(){c(),N();let _=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(_||L(4,[],[]),p(","),N(),r.getToken()===2&&b)break}else _&&L(6,[],[]);S()||L(4,[],[2,5]),_=!0}return f(),r.getToken()!==2?L(7,[2],[]):N(),!0}function D(){m(),N();let _=!0,E=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(E||L(4,[],[]),p(","),N(),r.getToken()===4&&b)break}else E&&L(6,[],[]);_?(i.push(0),_=!1):i[i.length-1]++,P()||L(4,[],[4,5]),E=!0}return g(),_||i.pop(),r.getToken()!==4?L(8,[4],[]):N(),!0}function P(){switch(r.getToken()){case 3:return D();case 1:return C();case 10:return R(!0);default:return v()}}return N(),r.getToken()===17?n.allowEmptyContent?!0:(L(4,[],[]),!1):P()?(r.getToken()!==17&&L(9,[],[]),!0):(L(4,[],[]),!1)}const ht=Yr;var Za;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Za||(Za={}));var Ka;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(Ka||(Ka={}));const S1=L1,A1=Ya,k1=Qa,R1=Kr;var eo;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t
Line truncated
|
||||
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
||||
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return te.create(0,e);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return te.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var k;(function(t){const e=Object.prototype.toString;function n(g){return typeof g<"u"}t.defined=n;function r(g){return typeof g>"u"}t.undefined=r;function i(g){return g===!0||g===!1}t.boolean=i;function s(g){return e.call(g)==="[object String]"}t.string=s;function a(g){return e.call(g)==="[object Number]"}t.number=a;function o(g,d,p){return e.call(g)==="[object Number]"&&d<=g&&g<=p}t.numberRange=o;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}t.integer=u;function c(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}t.uinteger=c;function h(g){return e.call(g)==="[object Function]"}t.func=h;function f(g){return g!==null&&typeof g=="object"}t.objectLiteral=f;function m(g,d){return Array.isArray(g)&&g.every(d)}t.typedArray=m})(k||(k={}));class mn{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(mn.isIncremental(r)){const i=Ko(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),u=Math.max(i.end.line,0);let c=this._lineOffsets;const h=Zo(r.text,!1,s);if(u-o===h.length)for(let m=0,g=h.length;m<g;m++)c[m+o+1]=h[m];else h.length<1e4?c.splice(o+1,u-o,...h):this._lineOffsets=c=c.slice(0,o+1).concat(h,c.slice(u+1));const f=r.text.length-(a-s);if(f!==0)for(let m=o+1+h.length,g=c.length;m<g;m++)c[m]=c[m]+f}else if(mn.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zo(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Ie;(function(t){function e(i,s,a,o){return new mn(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof mn)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let a=i.getText(),o=mi(s.map(P1),(h,f)=>{let m=h.range.start.line-f.range.start.line;return m===0?h.range.start.character-f.range.start.character:m}),u=0;const c=[];for(const h of o){let f=i.offsetAt(h.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&c.push(a.substring(u,f)),h.newText.length&&c.push(h.newText),u=i.offsetAt(h.range.end)}return c.push(a.substr(u)),c.join("")}t.applyEdits=r})(Ie||(Ie={}));function mi(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);mi(r,e),mi(i,e);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)e(r[s],i[a])<=0?t[o++]=r[s++]:t[o++]=i[a++];for(;s<r.length;)t[o++]=r[s++];for(;a<i.length;)t[o++]=i[a++];return t}function Zo(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Ko(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function P1(t){const e=Ko(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var X;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]
Line truncated
|
||||
`;for(let s=0;s<t.length;s++)i+=r+yi(t[s],r,n),s<t.length-1&&(i+=","),i+=`
|
||||
`;return i+=e+"]",i}else{const i=Object.keys(t);if(i.length===0)return"{}";let s=`{
|
||||
`;for(let a=0;a<i.length;a++){const o=i[a];s+=r+JSON.stringify(o)+": "+yi(t[o],r,n),a<i.length-1&&(s+=","),s+=`
|
||||
`}return s+=e+"}",s}}return n(t)}class W1{constructor(e,n=[],r=Promise,i={}){this.schemaService=e,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(e){for(let n=this.contributions.length-1;n>=0;n--){const r=this.contributions[n].resolveCompletion;if(r){const i=r(e);if(i)return i}}return this.promiseConstructor.resolve(e)}doComplete(e,n,r){const i={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(n);let o=r.getNodeFromOffset(a,!0);if(this.isInComment(e,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){const m=s[a-1];(o.type==="object"&&m==="}"||o.type==="array"&&m==="]")&&(o=o.parent)}const u=this.getCurrentWord(e,a);let c;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))c=H.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let m=a-u.length;m>0&&s[m-1]==='"'&&m--,c=H.create(e.positionAt(m),n)}const h=new Map,f={add:m=>{let g=m.label;const d=h.get(g);if(d)d.documentation||(d.documentation=m.documentation),d.detail||(d.detail=m.detail),d.labelDetails||(d.labelDetails=m.labelDetails);else{if(g=g.replace(/[\n]/g,"↵"),g.length>60){const p=g.substr(0,57).trim()+"...";h.has(p)||(g=p)}m.textEdit=Be.replace(c,m.insertText),m.label=g,h.set(g,m),i.items.push(m)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:m=>{console.error(m)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(e.uri,r).then(m=>{const g=[];let d=!0,p="",y;if(o&&o.type==="string"){const x=o.parent;x&&x.type==="property"&&x.keyNode===o&&(d=!x.valueNode,y=x,p=s.substr(o.offset+1,o.length-2),x&&(o=x.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(L=>{(!y||y!==L)&&h.set(L.keyNode.value,ci.create("__"))});let b="";d&&(b=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),m?this.getPropertyCompletions(m,r,o,d,b,f):this.getSchemaLessPropertyCompletions(r,o,p,f);const N=bi(o);this.contributions.forEach(L=>{const R=L.collectPropertyCompletions(e.uri,N,u,d,b==="",f);R&&g.push(R)}),!m&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(f.add({kind:Se.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,b),insertTextFormat:ae.Snippet,documentation:""}),f.setAsIncomplete())}const w={};return m?this.getValueCompletions(m,r,o,a,e,f,w):this.getSchemaLessValueCompletions(r,o,a,e,f),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,e,f,g),this.promiseConstructor.all(g).then(()=>{if(f.getNumberOfProposals()===0){let x=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(x=o.offset+o.length);const b=this.evaluateSeparatorAfter(e,x);this.addFillerValueCompletions(w,b,f)}return i})})}getPropertyCompletions(e,n,r,i,s,a){n.getMatchingSchemas(e.schema,r.offset).forEach(u=>{if(u.node===r&&!u.inverted){const c=u.schema.properties;c&&Object.keys(c).forEach(f=>{const m=c[f];if(typeof m=="object"&&!m.deprecationMessage&&!m.doNotSuggest){const g={kind:Se.Property,label:f,insertText:this.getInsertTextForProperty(f,m,i,s),insertTextFormat:ae.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(m.markdownDescription)||m.description||""};m.suggestSortText!==void 0&&(g.sortText=m.suggestSortText),g.insertText&&cn(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});const h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){const f=(m,g=void 0)=>{const d={kind:Se.Property,label:m,insertText:this.getInsertTextForProperty(m,void 0,i,s),insertTextFormat:ae.Snippet,filterText:this.getFilterTextForValue(m),documentation:g||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(d.sortText=h.suggestSortText),d.insertText&&cn(d.insertText,`$1${s}`)&&(d.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(d)};if(h.enum)for(let m=0;m<h.enum.length;m++){let g;h.markdownEnumDescriptions&&m<h.markdownEnumDescriptions.length?g=this.fromMarkup(h.markdownEnumDescriptions[m]):h.enumDescriptions&&m<h.enumDescriptions.length&&(g=h.enumDescriptions[m]),f(h.enum[m],g)}h.const&&f(h.const)}}})}getSchemaLessPropertyCompletions(e,n,r,i){const s=a=>{a.properties.forEach(o=>{const u=o.keyNode.value;i.add({kind:Se.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:ae.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(n.parent)if(n.parent.type==="property"){const a=n.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:Se.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:ae.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueC
Line truncated
|
||||
`,g=g+`
|
||||
`+d+"]",d+=" ",o="array";h=m+d+a.bodyText.split(`
|
||||
`).join(`
|
||||
`+d)+g+n,c=c||h,f=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:c,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:ae.Snippet,filterText:f}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&i<5&&this.addDefaultValueCompletions(e.items,n,r,i+1)}addEnumValueCompletions(e,n,r){if(Ce(e.const)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n),insertTextFormat:ae.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,s=e.enum.length;i<s;i++){const a=e.enum[i];let o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(o=e.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:ae.Snippet,documentation:o})}}collectTypes(e,n){if(Array.isArray(e.enum)||Ce(e.const))return;const r=e.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(e,n,r){e.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:ae.Snippet,detail:M("New object"),documentation:""}),e.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:ae.Snippet,detail:M("New array"),documentation:""})}addBooleanValueCompletion(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n),insertTextFormat:ae.Snippet,documentation:""})}addNullValueCompletion(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:ae.Snippet,documentation:""})}addDollarSchemaCompletions(e,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:Se.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,e),insertTextFormat:ae.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,n){const r=JSON.stringify(e,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(e,n){return yi(e,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(e,n){switch(typeof e){case"object":return e===null?"${1:null}"+n:this.getInsertTextForValue(e,n);case"string":let r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+n}return this.getInsertTextForValue(e,n)}getSuggestionKind(e){if(Array.isArray(e)){const n=e;e=n.length>0?n[0]:void 0}if(!e)return Se.Value;switch(e){case"string":return Se.Value;case"object":return Se.Module;case"property":return Se.Property;default:return Se.Value}}getLabelTextForMatchingNode(e,n){switch(e.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,n,r){switch(e.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:const i=n.getText().substr(e.offset,e.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(e,n,r,i){const s=this.getInsertTextForValue(e,"");if(!r)return s;const a=s+": ";let o,u=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){const c=n.defaultSnippets[0].body;Ce(c)&&(o=this.getInsertTextForSnippetValue(c,""))}u+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),u+=n.enum.length),Ce(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),u++),Ce(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),u++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),u+=n.examples.length),u===0){let c=Array.isArray(n.type)?n.type[0]:n.type;switch(c||(n.properties?c="object":n.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}ret
Line truncated
|
||||
\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(e,n){const r=ht(e.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,n,r){const i=ht(n.getText(),!0),s=e.items;for(let a=s.length-1;a>=0;a--){const o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(e,n,r){const i=ht(e.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<r;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=r}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:mt.Markdown,value:e}}doesSupportMarkdown(){if(!Ce(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(mt.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return Ce(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return Ce(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class H1{constructor(e,n=[],r){this.schemaService=e,this.contributions=n,this.promise=r||Promise}doHover(e,n,r){const i=e.offsetAt(n);let s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);const a=s;if(s.type==="string"){const h=s.parent;if(h&&h.type==="property"&&h.keyNode===s&&(s=h.valueNode,!s))return this.promise.resolve(null)}const o=H.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),u=h=>({contents:h,range:o}),c=bi(s);for(let h=this.contributions.length-1;h>=0;h--){const m=this.contributions[h].getInfoContribution(e.uri,c);if(m)return m.then(g=>u(g))}return this.schemaService.getSchemaForResource(e.uri,r).then(h=>{if(h&&s){const f=r.getMatchingSchemas(h.schema,s.offset);let m,g,d,p;f.every(w=>{if(w.node===s&&!w.inverted&&w.schema&&(m=m||w.schema.title,g=g||w.schema.markdownDescription||wi(w.schema.description),w.schema.enum)){const x=w.schema.enum.indexOf(gt(s));w.schema.markdownEnumDescriptions?d=w.schema.markdownEnumDescriptions[x]:w.schema.enumDescriptions&&(d=wi(w.schema.enumDescriptions[x])),d&&(p=w.schema.enum[x],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});let y="";return m&&(y=wi(m)),g&&(y.length>0&&(y+=`
|
||||
|
||||
`),y+=g),d&&(y.length>0&&(y+=`
|
||||
|
||||
`),y+=`\`${z1(p)}\`: ${d}`),u([y])}return null})}}function wi(t){if(t)return t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
||||
|
||||
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function z1(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}class G1{constructor(e,n){this.jsonSchemaService=e,this.promise=n,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:_e.Error)}doValidation(e,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);const s=[],a={},o=c=>{const h=c.range.start.line+" "+c.range.start.character+" "+c.message;a[h]||(a[h]=!0,s.push(c))},u=c=>{let h=r?.trailingCommas?Jn(r.trailingCommas):_e.Error,f=r?.comments?Jn(r.comments):this.commentSeverity,m=r?.schemaValidation?Jn(r.schemaValidation):_e.Warning,g=r?.schemaRequest?Jn(r.schemaRequest):_e.Warning;if(c){const d=(p,y)=>{if(n.root&&g){const w=n.root,x=w.type==="object"?w.properties[0]:void 0;if(x&&x.keyNode.value==="$schema"){const b=x.valueNode||x,N=H.create(e.positionAt(b.offset),e.positionAt(b.offset+b.length));o(Ze.create(N,p,g,y))}else{const b=H.create(e.positionAt(w.offset),e.positionAt(w.offset+1));o(Ze.create(b,p,g,y))}}};if(c.errors.length)d(c.errors[0],X.SchemaResolveError);else if(m){for(const y of c.warnings)d(y,X.SchemaUnsupportedFeature);const p=n.validate(e,c.schema,m,r?.schemaDraft);p&&p.forEach(o)}al(c.schema)&&(f=void 0),ol(c.schema)&&(h=void 0)}for(const d of n.syntaxErrors){if(d.code===X.TrailingComma){if(typeof h!="number")continue;d.severity=h}o(d)}if(typeof f=="number"){const d=M("Comments are not permitted in JSON.");n.comments.forEach(p=>{o(Ze.create(p,d,f,X.CommentNotPermitted))})}return s};if(i){const c=i.id||"schemaservice://untitled/"+J1++;return this.jsonSchemaService.registerExternalSchema({uri:c,schema:i}).getResolvedSchema().then(f=>u(f))}return this.jsonSchemaService.getSchemaForResource(e.uri,n).then(c=>u(c))}getLanguageStatus(e,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,n)}}}let J1=0;function al(t){if(t&&typeof t=="object"){if($e(t.allowComments))return t.allowComments;if(t.allOf)for(const e of t.allOf){const n=al(e);if($e(n))return n}}}function ol(t){if(t&&typeof t=="object"){if($e(t.allowTrailingCommas))return t.allowTrailingCommas;const e=t;if($e(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(const n of t.allOf){const r=ol(n);if($e(r))return r}}}function Jn(t){switch(t){case"error":return _e.Error;case"warning":return _e.Warning;case"ignore":return}}const ll=48,X1=57,Q1=65,Xn=97,Y1=102;function ie(t){return t<ll?0:t<=X1?t-ll:(t<Xn&&(t+=Xn-Q1),t>=Xn&&t<=Y1?t-Xn+10:0)}function Z1(t){if(t[0]==="#")switch(t.length){case 4:return{red:ie(t.charCodeAt(1))*17/255,green:ie(t.charCodeAt(2))*17/255,blue:ie(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ie(t.charCodeAt(1))*17/255,green:ie(t.charCodeAt(2))*17/255,blue:ie(t.charCodeAt(3))*17/255,alpha:ie(t.charCodeAt(4))*17/255};case 7:return{red:(ie(t.charCodeAt(1))*16+ie(t.charCodeAt(2)))/255,green:(ie(t.charCodeAt(3))*16+ie(t.charCodeAt(4)))/255,blue:(ie(t.charCodeAt(5))*16+ie(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ie(t.charCodeAt(1))*16+ie(t.charCodeAt(2)))/255,green:(ie(t.charCodeAt(3))*16+ie(t.charCodeAt(4)))/255,blue:(ie(t.charCodeAt(5))*16+ie(t.charCodeAt(6)))/255,alpha:(ie(t.charCodeAt(7))*16+ie(t.charCodeAt(8)))/255}}}class K1{constructor(e){this.schemaService=e}findDocumentSymbols(e,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||cn(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const m=[];for(const g of i.items)if(g.type==="object"){for(const d of g.properties)if(d.keyNode.value==="key"&&d.valueNode){const p=$t.create(e.uri,at(e,g));if(m.push({name:ul(d.valueNode),kind:Ue.Function,location:p}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),m}}return m}const o=[{node:i,containerName:""}];let u=0,c=!1;const h=[],f=(m,g)=>{m.type==="array"?m.items.forEach(d=>{d&&o.push({node:d,containerName:g})}):m.type==="object"&&m.properties.forEach(d=>{const p=d.valueNode;if(p)if(s>0){s--;const y=$t.create(e.uri,at(e,d)),w=g?g+"."+d.keyNode.value:d.keyNode.value;h.push({name:this.getKeyLabel(d),kind:this.getSymbolKind(p.type),location:y,containerName:g}),o.push({node:p,containerName:w})}else c=!0})};for(;u<o.length;){const m=o[u++];f(m.node,m.containerName)}return c&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),h}findDocumentSymbols2(e,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||cn(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const m=[];for(const g of i.items)if(g.type==="object"){for(const d of g.properties)if(d.keyNode.value==="key"&&d.valueNode){const p=at(e,g),y=at(e,d.keyNode);if(m.push({name:ul(d.valueNode),kind:Ue.Function,range:p,selectionRange:y}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),m}}return m}const o=[],uLine truncated
|
||||
`,keepLines:e?.keepLines===!0};return E1(t.getText(),r,i).map(s=>Be.replace(H.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),s.content))}var oe;(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(oe||(oe={}));class Qn{constructor(e,n){this.propertyName=e??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let n=0;e.noKeyName?n=this.childrenProperties.length:n=hf(this.childrenProperties,e,ff),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,e)}else this.childrenProperties.push(e);return e}}function ff(t,e){const n=t.propertyName.toLowerCase(),r=e.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function hf(t,e,n){const r=e.propertyName.toLowerCase(),i=t[0].propertyName.toLowerCase(),s=t[t.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return t.length;let a=0,o=t.length-1;for(;a<=o;){let u=o+a>>1,c=n(e,t[u]);if(c>0)a=u+1;else if(c<0)o=u-1;else return u}return-a-1}function mf(t,e){const n={...e,keepLines:!1},r=Ie.applyEdits(t,vi(t,n,void 0)),i=Ie.create("test://test.json","json",0,r),s=df(i),a=gf(i,s),o=vi(a,n,void 0),u=Ie.applyEdits(a,o);return[Be.replace(H.create(te.create(0,0),t.positionAt(t.getText().length)),u)]}function df(t){const e=t.getText(),n=ht(e,!1);let r=new Qn,i=r,s=r,a=r,o,u=0,c=0,h,f,m=-1,g=-1,d=0,p=0,y=[],w=!1,x=!1;for(;(o=n.scan())!==17;){if(w===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?a.endLineNumber=b-1:s.endLineNumber=b-1,d=b,w=!1}if(x===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(d=n.getTokenStartLine(),x=!1),n.getTokenStartLine()!==u){for(let b=u;b<n.getTokenStartLine();b++){const N=t.getText(H.create(te.create(b,0),te.create(b+1,0))).length;c=c+N}u=n.getTokenStartLine()}switch(o){case 10:{if(h===void 0||h===1||h===5&&y[y.length-1]===oe.Object){const b=new Qn(n.getTokenValue(),d);a=s,s=i.addChildProperty(b)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),y[y.length-1]===oe.Object)i=s;else if(y[y.length-1]===oe.Array){const b=new Qn(n.getTokenValue(),d);b.noKeyName=!0,a=s,s=i.addChildProperty(b),i=s}y.push(oe.Array),s.type=oe.Array,d=n.getTokenStartLine(),d++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===oe.Array){const b=new Qn(n.getTokenValue(),d);b.noKeyName=!0,a=s,s=i.addChildProperty(b)}s.type=oe.Object,y.push(oe.Object),i=s,d=n.getTokenStartLine(),d++;break}case 4:{p=n.getTokenStartLine(),y.pop(),s.endLineNumber===void 0&&(h===2||h===4)&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=m,s.indexWhereToAddComa=g,a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=p,d=p+1;break}case 2:{p=n.getTokenStartLine(),y.pop(),h!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=m,s.indexWhereToAddComa=g),a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),d=p+1;break}case 5:{p=n.getTokenStartLine(),s.endLineNumber===void 0&&(y[y.length-1]===oe.Object||y[y.length-1]===oe.Array&&(h===2||h===4))&&(s.endLineNumber=p,s.commaIndex=n.getTokenOffset()-c,s.commaLine=p),(h===2||h===4)&&(a=s,s=s?s.parent:void 0,i=s),d=p+1;break}case 13:{h===5&&m===n.getTokenStartLine()&&(y[y.length-1]===oe.Array&&(f===2||f===4)||y[y.length-1]===oe.Object)&&(y[y.length-1]===oe.Array&&(f===2||f===4)||y[y.length-1]===oe.Object)&&(s.endLineNumber=void 0,w=!0),(h===1||h===3)&&m===n.getTokenStartLine()&&(x=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(f=h,h=o,m=n.getTokenStartLine(),g=n.getTokenOffset()+n.getTokenLength()-c)}return r}function gf(t,e){if(e.childrenProperties.length===0)return t;const n=Ie.create("test://test.json","json",0,t.getText()),r=[];for(ml(r,e,e.beginningLineNumber);r.length>0;){const i=r.shift(),s=i.propertyTreeArray;let a=i.beginningLineNumber;for(let o=0;o<s.length;o++){const u=s[o],c=H.create(te.create(u.beginningLineNumber,0),te.create(u.endLineNumber+1,0)),h=t.getText(c),f=Ie.create("test://test.json","json",0,h);if(u.lastProperty===!0&&o!==s.length-1){const d=u.lineWhereToAddComma-u.beginningLineNumber,p=u.indexWhereToAddComa,y={range:H.create(te.create(d,p),te.create(d,p)),text:","};Ie.update(f,[y],1)}else if(u.lastProperty===!1&&o===s.length-1){const d=u.commaIndex,y=u.commaLine-u.beginningLineNumber,w={range:H.create(te.create(y,d),te.create(y,d+1)),text:""};Ie.update(f,[w],1)}const m=u.endLineNumber-u.beginningLineNumber+1,g={range:H.create(te.create(a,0),te.create(a+m,0)),text:f.getText()};Ie.update(n,[g],1),ml(r,u,a),a=a+m}}return n}function ml(t,e,n){if(e.childrenProperties.length!==0)if(e.type===oe.Object){let r=1/0;for(const s of e.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);const i=r-e.beginningLineNumber;n=n+i,t.push(new gl(n,e.childrenProperties))}else e.type===oe.Array&&dl(t,e,n)}function dl(t,e,n){for(const r of e.childrenProperties){if(r.type===oe.Object){let i=1/0;for(const
Line truncated
|
||||
+67722
File diff suppressed because it is too large.
Load diff
File renamed without changes.
+1
@@ -0,0 +1 @@
|
||||
define("vs/basic-languages/monaco.contribution",["require","../editor-KLE6jdfb"],(function(a,t){"use strict";const d={},n={};class r{static getOrCreate(s){return n[s]||(n[s]=new r(s)),n[s]}constructor(s){this._languageId=s,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((o,l)=>{this._lazyLoadPromiseResolve=o,this._lazyLoadPromiseReject=l})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,d[this._languageId].loader().then(s=>this._lazyLoadPromiseResolve(s),s=>this._lazyLoadPromiseReject(s))),this._lazyLoadPromise}}function i(e){const s=e.id;d[s]=e,t.languages.register(e);const o=r.getOrCreate(s);t.languages.registerTokensProviderFactory(s,{create:async()=>(await o.load()).language}),t.languages.onLanguageEncountered(s,async()=>{const l=await o.load();t.languages.setLanguageConfiguration(s,l.conf)})}i({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,s)=>a(["../abap-D-t0cyap"],e,s))}),i({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,s)=>a(["../apex-CcIm7xu6"],e,s))}),i({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,s)=>a(["../azcli-BA0tQDCg"],e,s))}),i({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,s)=>a(["../bat-C397hTD6"],e,s))}),i({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,s)=>a(["../bicep-DF5aW17k"],e,s))}),i({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,s)=>a(["../cameligo-plsz8qhj"],e,s))}),i({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,s)=>a(["../clojure-Y2auQMzK"],e,s))}),i({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,s)=>a(["../coffee-Bu45yuWE"],e,s))}),i({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,s)=>a(["../cpp-CkKPQIni"],e,s))}),i({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,s)=>a(["../cpp-CkKPQIni"],e,s))}),i({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,s)=>a(["../csharp-CX28MZyh"],e,s))}),i({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>new Promise((e,s)=>a(["../csp-D8uWnyxW"],e,s))}),i({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,s)=>a(["../css-CaeNmE3S"],e,s))}),i({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>new Promise((e,s)=>a(["../cypher-DVThT8BS"],e,s))}),i({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,s)=>a(["../dart-CmGfCvrO"],e,s))}),i({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,s)=>a(["../dockerfile-CZqqYdch"],e,s))}),i({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,s)=>a(["../ecl-30fUercY"],e,s))}),i({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,s)=>a(["../elixir-xjPaIfzF"],e,s))}),i({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,s)=>a(["../flow9-DqtmStfK"],e,s))}),i({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,s)=>a(["../fsharp-BOMdg4U1"],e,s))}),i({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7v7"],e,s)).then(e=>e.TagAutoInterpolationDollar)}),i({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7v7"],e,s)).then(e=>e.TagAngleInterpolationDollar)}),i({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7v7"],e,s)).then(e=>e.TagBracketInterpolationDollar)}),i({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7v7"],e,s)).then(e=>e.TagAngleInterpolationBracket)}),i({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7v7"],e,s)).then(e=>e.TagBracketInterpolationBracket)}),i({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,s)=>a(["../freemarker2-FWreY7vLine truncated
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Vendored
+1
@@ -0,0 +1 @@
|
||||
define("vs/css.worker-CyhWkhHo", ["require", "exports"], (function(require, r){"use strict";const e=""+new URL(require.toUrl("./assets/css.worker-URu8fCFR.js"),document.baseURI).href;r.__worker_url_0__=e}));
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
define("vs/cssMode-CV6Ay48H",["exports","./css.worker-CyhWkhHo","./workers-BBttULjf","./lspLanguageFeatures-BIkJOWLw","./editor-KLE6jdfb"],(function(i,g,_,e,d){"use strict";class l{constructor(s){this._defaults=s,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=_.createWebWorker({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(g.__worker_url_0__,{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...s){let t;return this._getClient().then(h=>{t=h}).then(h=>{if(this._worker)return this._worker.withSyncedResources(s)}).then(h=>t)}}function f(c){const s=[],t=[],h=new l(c);s.push(h);const r=(...n)=>h.getLanguageServiceWorker(...n);function A(){const{languageId:n,modeConfiguration:o}=c;a(t),o.completionItems&&t.push(d.languages.registerCompletionItemProvider(n,new e.CompletionAdapter(r,["/","-",":"]))),o.hovers&&t.push(d.languages.registerHoverProvider(n,new e.HoverAdapter(r))),o.documentHighlights&&t.push(d.languages.registerDocumentHighlightProvider(n,new e.DocumentHighlightAdapter(r))),o.definitions&&t.push(d.languages.registerDefinitionProvider(n,new e.DefinitionAdapter(r))),o.references&&t.push(d.languages.registerReferenceProvider(n,new e.ReferenceAdapter(r))),o.documentSymbols&&t.push(d.languages.registerDocumentSymbolProvider(n,new e.DocumentSymbolAdapter(r))),o.rename&&t.push(d.languages.registerRenameProvider(n,new e.RenameAdapter(r))),o.colors&&t.push(d.languages.registerColorProvider(n,new e.DocumentColorAdapter(r))),o.foldingRanges&&t.push(d.languages.registerFoldingRangeProvider(n,new e.FoldingRangeAdapter(r))),o.diagnostics&&t.push(new e.DiagnosticsAdapter(n,r,c.onDidChange)),o.selectionRanges&&t.push(d.languages.registerSelectionRangeProvider(n,new e.SelectionRangeAdapter(r))),o.documentFormattingEdits&&t.push(d.languages.registerDocumentFormattingEditProvider(n,new e.DocumentFormattingEditProvider(r))),o.documentRangeFormattingEdits&&t.push(d.languages.registerDocumentRangeFormattingEditProvider(n,new e.DocumentRangeFormattingEditProvider(r)))}return A(),s.push(m(t)),m(s)}function m(c){return{dispose:()=>a(c)}}function a(c){for(;c.length;)c.pop().dispose()}i.CompletionAdapter=e.CompletionAdapter,i.DefinitionAdapter=e.DefinitionAdapter,i.DiagnosticsAdapter=e.DiagnosticsAdapter,i.DocumentColorAdapter=e.DocumentColorAdapter,i.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,i.DocumentHighlightAdapter=e.DocumentHighlightAdapter,i.DocumentLinkAdapter=e.DocumentLinkAdapter,i.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,i.DocumentSymbolAdapter=e.DocumentSymbolAdapter,i.FoldingRangeAdapter=e.FoldingRangeAdapter,i.HoverAdapter=e.HoverAdapter,i.ReferenceAdapter=e.ReferenceAdapter,i.RenameAdapter=e.RenameAdapter,i.SelectionRangeAdapter=e.SelectionRangeAdapter,i.fromPosition=e.fromPosition,i.fromRange=e.fromRange,i.toRange=e.toRange,i.toTextEdit=e.toTextEdit,i.WorkerManager=l,i.setupMode=f,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Vendored
+831
@@ -0,0 +1,831 @@
|
||||
define("vs/editor-KLE6jdfb", ["require", "exports","./editorWorkerHost-fVE1cjcC"], (function(require, _,l){"use strict";var Qs,vl,Nh,yl,Ll,Or,os,Pr,Dl,xl,El,Il,Tl,Nl,Rl,Ml,kh,Al,$o,Br,Ol;const eo=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new l.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(o){o=Math.min(Math.max(-5,o),20),this._zoomLevel!==o&&(this._zoomLevel=o,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},DP=l.isMacintosh?1.5:1.35,zb=8;class Ur{static _create(e,t,i,n,s,r,a,c,h){r===0?r=DP*i:r<zb&&(r=r*i),r=Math.round(r),r<zb&&(r=zb);const d=1+(h?0:eo.getZoomLevel()*.1);return i*=d,r*=d,s===TD&&(t==="normal"||t==="bold"?s=ID:(s=`'wght' ${parseInt(t,10)}`,t="normal")),new Ur({pixelRatio:c,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:s,lineHeight:r,letterSpacing:a})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=Zi.fontFamily,t=Ur._wrapInQuotes(this.fontFamily);return this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const xP=2;class Af extends Ur{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=xP,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}const ID="normal",TD="translate",Zi={fontFamily:l.isMacintosh?"Menlo, Monaco, 'Courier New', monospace":l.isWindows?"Consolas, 'Courier New', monospace":"'Droid Sans Mono', monospace",fontWeight:"normal",fontSize:l.isMacintosh?12:14,lineHeight:0,letterSpacing:0},zt={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},ls=8;class ND{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class RD{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Ye{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Of(e,t)}compute(e,t,i){return i}}class Kh{constructor(e,t){this.newValue=e,this.didChange=t}}function Of(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new Kh(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&l.equals(o,e);return new Kh(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=Of(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new Kh(o,t)}class Go{constructor(e,t){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=t}applyUpdate(e,t){return Of(e,t)}validate(e){return this.defaultValue}}class Fl{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Of(e,t)}compute(e,t,i){return i}}function $(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class se extends Fl{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return $(e,this.defaultValue)}}function to(o,e,t,i){if(typeof o=="string"&&(o=parseInt(o,10)),typeof o!="number"||isNaN(o))return e;let n=o;return n=Math.max(t,n),n=Math.min(i,n),n|0}class Ie extends Fl{static clampedInt(e,t,i,n){return to(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return Ie.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function EP(o,e,t,i){if(typeof o>"u")return e;const n=xi.float(o,e)Line truncated
|
||||
- Use 0 to automatically compute the line height from the font size.
|
||||
- Values between 0 and 8 will be used as a multiplier with the font size.
|
||||
- Values greater than or equal to 8 will be used as effective values.`)},0,150)}compute(e,t,i){return e.fontInfo.lineHeight}}class ZP extends Ye{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:"none",renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,markSectionHeaderRegex:"\\bMARK:\\s*(?<separator>-?)\\s*(?<label>.*)$",sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(81,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.localize(300,"Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"string",enum:["none","mouseover","scroll"],enumDescriptions:[l.localize(301,"The minimap is always shown."),l.localize(302,"The minimap is hidden when mouse is not over the minimap and shown when mouse is over the minimap."),l.localize(303,"The minimap is only shown when the editor is scrolled")],default:e.autohide,description:l.localize(304,"Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.localize(305,"The minimap has the same size as the editor contents (and might scroll)."),l.localize(306,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.localize(307,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.localize(308,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.localize(309,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.localize(310,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.localize(311,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.localize(312,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.localize(313,"Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:l.localize(314,"Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:l.localize(315,"Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.markSectionHeaderRegex":{type:"string",default:e.markSectionHeaderRegex,description:l.localize(316,"Defines the regular expression used to find section headers in comments. The regex must contain a named match group `label` (written as `(?<label>.+)`) that encapsulates the section header, otherwise it will not work. Optionally you can include another match group named `separator`. Use \\n in the pattern to match multi-line headers.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:l.localize(317,"Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:l.localize(318,"Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;let i=this.defaultValue.markSectionHeaderRegex;const n=t.markSectionHeaderRegex;if(typeof n=="string")try{new RegExp(n,"d"),i=n}catch{}return{enabled:$(t.enabled,this.defaultValue.enabled),autohide:Fe(t.autohide,this.defaultValue.autohide,["none","mouseover","scroll"]),size:Fe(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Fe(t.side,this.defaultValue.side,["right","left"]),showSlider:Fe(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:$(t.renderCharacters,this.defaultValue.renderCharacters),scale:Ie.clampedInt(t.scale,1,1,3),maxColumn:Ie.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:$(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:$(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),markSectionHeaderRegex:i,sectionHeaderFontSize:xi.clamp(xi.float(t.sectionHeaderFontSize,this.defaultValue.sectionHeaderFontSize),4,32),sectionHeaderLetterSpacing:xi.clamp(xi.float(t.sectionHeaderLetterSpacing,this.defaultValue.sectionHeaderLetterSpacing),0,5)}}}function QP(o){return o==="ctrlCmd"?l.isMacintosh?"metaKey":"ctrlKey":"altKey"}class XP extends Ye{constructor(){super(96,"padding",{top:0,bottom:0
Line truncated
|
||||
`),n=Fk(i[t+1]);if(n)return new Xb(n.fileName,n.line,n.column,n.id)}constructor(e,t,i,n){this.fileName=e,this.line=t,this.column=i,this.id=n}}function Fk(o){const e=o.match(/\((.*):(\d+):(\d+)\)/);if(e)return{fileName:e[1],line:parseInt(e[2]),column:parseInt(e[3]),id:o};const t=o.match(/at ([^\(\)]*):(\d+):(\d+)/);if(t)return{fileName:t[1],line:parseInt(t[2]),column:parseInt(t[3]),id:o}}let Jb;function Bk(o){Jb=o}let jD;function zk(o){jD=o}class qD{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t,i=_.DebugLocation.ofCaller()){const n=t===void 0?void 0:e,s=t===void 0?e:t;return Jb({owner:n,debugName:()=>{const r=Zb(s);if(r!==void 0)return r;const c=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(c)return`${this.debugName}.${c[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:s},r=>s(this.read(r),r),i)}flatten(){return Jb({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,t){return e.add(jD(this,t)),this}}class Kl extends qD{constructor(e){super(),this._observers=new Set,Wt()?.handleObservableCreated(this,e)}addObserver(e){const t=this._observers.size;this._observers.add(e),t===0&&this.onFirstObserverAdded(),t!==this._observers.size&&Wt()?.handleOnListenerCountChanged(this,this._observers.size)}removeObserver(e){const t=this._observers.delete(e);t&&this._observers.size===0&&this.onLastObserverRemoved(),t&&Wt()?.handleOnListenerCountChanged(this,this._observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}debugGetObservers(){return this._observers}}function W(o,e,t=_.DebugLocation.ofCaller()){let i;return typeof o=="string"?i=new Vt(void 0,o,void 0):i=new Vt(o,void 0,void 0),new Jh(i,e,Ei,t)}class Jh extends Kl{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,Wt()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let n;t||(t=n=new $l(()=>{},()=>`Setting ${this.debugName}`));try{const s=this._value;this._setValue(e),Wt()?.handleObservableUpdated(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const r of this._observers)t.updateObserver(r,this),r.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function Wb(o,e,t=_.DebugLocation.ofCaller()){let i;return typeof o=="string"?i=new Vt(void 0,o,void 0):i=new Vt(o,void 0,void 0),new Vk(i,e,Ei,t)}class Vk extends Jh{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class Uk extends Kl{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this._deltas){Wt()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const t of this._observers)t.handleChange(this,e)}this._deltas.length=0}else{Wt()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const e of this._observers)e.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(const e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();const e=[...this._observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let n;t||(t=n=new $l(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),i!==void 0&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(s,r)=>{},handlePossibleChange:s=>{}},this),this._updateCounter>1)for(const s of this._observers)s.handlePossibleChange(this)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function Wh(o,e,t=_.DebugLocation.ofCaller()){return o.lazy?new Uk(new Vt(o.owner,o.debugName,void 0),e,o.equalsFn??Ei,t):new Jh(new Vt(o.owner,o.debugName,void 0),e,o.equalsFn??Ei,t)}function $k(o){switch(o){case 1:return
Line truncated
|
||||
| KEY '=~' REGEX
|
||||
| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=l.localize(1745,`Expected: {0}
|
||||
Received: '{1}'.`,e,Wr.getLexeme(t)),s=t.offset,r=Wr.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:r,additionalInfo:i}),Qs._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},Qs._parseError=new Error,Qs);const hD=class hD{static false(){return ui.INSTANCE}static true(){return Ni.INSTANCE}static has(e){return Hr.create(e)}static equals(e,t){return Yl.create(e,t)}static notEquals(e,t){return ig.create(e,t)}static regex(e,t){return dd.create(e,t)}static in(e,t){return eg.create(e,t)}static notIn(e,t){return tg.create(e,t)}static not(e){return ea.create(e)}static and(...e){return ta.create(e,null,!0)}static or(...e){return ro.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};hD._parser=new iB({regexParsingWithErrorRecovery:!1});let de=hD;function hd(o,e){return o.cmp(e)}const G_=class G_{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Ni.INSTANCE}};G_.INSTANCE=new G_;let ui=G_;const j_=class j_{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return ui.INSTANCE}};j_.INSTANCE=new j_;let Ni=j_;class Hr{static create(e,t=null){const i=Ht.get(e);return typeof i=="boolean"?i?Ni.INSTANCE:ui.INSTANCE:new Hr(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:yx(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Ht.get(this.key);return typeof e=="boolean"?e?Ni.INSTANCE:ui.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ea.create(this.key,this)),this.negated}}class Yl{static create(e,t,i=null){if(typeof t=="boolean")return t?Hr.create(e,i):ea.create(e,i);const n=Ht.get(e);return typeof n=="boolean"?t===(n?"true":"false")?Ni.INSTANCE:ui.INSTANCE:new Yl(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:ia(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ht.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Ni.INSTANCE:ui.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ig.create(this.key,this.value,this)),this.negated}}class eg{static create(e,t){return new eg(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:ia(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);if(Array.isArray(t)){if(t.includes(i))return!0;if(l.isWindows&&typeof i=="string"&&i.startsWith("file:///")){const n=i.toLowerCase();return t.some(s=>typeof s=="string"&&s.toLowerCase()===n)}return!1}if(typeof i=="string"&&typeof t=="object"&&t!==null){if(YF.call(t,i))return!0;if(l.isWindows&&i.startsWith("file:///")){const n=i.toLowerCase();return Object.keys(t).some(s=>s.toLowerCase()===n)}return!1}return!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=tg.create(this.key,this.valueKey)),this.negated}}class tg{static create(e,t){return new tg(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=eg.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class ig{static create(e,t,i=null){if(typeof t=="boolean")return t?ea.create(e,i):Hr.create(e,i);const n=Ht.get(e);return typeof n=="boolean"?t===(n?"true":"false")?ui.INSTANCE:Ni.INSTANCE:new ig(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:ia(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ht.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?ui.INSTANCE:Ni.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){ret
Line truncated
|
||||
`,Th.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])>
|
||||
`;let CC=Th;function oa(o,e){const t=o.getCount(),i=o.findTokenIndexAtOffset(e),n=o.getLanguageId(i);let s=i;for(;s+1<t&&o.getLanguageId(s+1)===n;)s++;let r=i;for(;r>0&&o.getLanguageId(r-1)===n;)r--;return new OB(o,n,r,s+1,o.getStartOffset(r),o.getEndOffset(s))}class OB{constructor(e,t,i,n,s,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=r,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function fs(o){return(o&3)!==0}let vC;function Kx(){return vC||(vC=new TextDecoder("UTF-16LE")),vC}let wC;function PB(){return wC||(wC=new TextDecoder("UTF-16BE")),wC}let SC;function Gx(){return SC||(SC=l.isLittleEndian()?Kx():PB()),SC}function kB(o,e,t){const i=new Uint16Array(o.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?FB(o,e,t):Kx().decode(i)}function FB(o,e,t){const i=[];let n=0;for(let s=0;s<t;s++){const r=l.readUInt16LE(o,e);e+=2,i[n++]=String.fromCharCode(r)}return i.join("")}class ra{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return Gx().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||l.isHighSurrogate(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class pg{constructor(e,t,i,n,s,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=r,this._openSet=pg._toSet(this.open),this._closeSet=pg._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function BB(o){const e=o.length;o=o.map(r=>[r[0].toLowerCase(),r[1].toLowerCase()]);const t=[];for(let r=0;r<e;r++)t[r]=r;const i=(r,a)=>{const[c,h]=r,[d,u]=a;return c===d||c===u||h===d||h===u},n=(r,a)=>{const c=Math.min(r,a),h=Math.max(r,a);for(let d=0;d<e;d++)t[d]===h&&(t[d]=c)};for(let r=0;r<e;r++){const a=o[r];for(let c=r+1;c<e;c++){const h=o[c];i(a,h)&&n(t[r],t[c])}}const s=[];for(let r=0;r<e;r++){const a=[],c=[];for(let h=0;h<e;h++)if(t[h]===r){const[d,u]=o[h];a.push(d),c.push(u)}a.length>0&&s.push({open:a,close:c})}return s}class zB{constructor(e,t){this._richEditBracketsBrand=void 0;const i=BB(t);this.brackets=i.map((n,s)=>new pg(e,s,n.open,n.close,VB(n.open,n.close,i,s),UB(n.open,n.close,i,s))),this.forwardRegex=$B(this.brackets),this.reversedRegex=KB(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function jx(o,e,t,i){for(let n=0,s=e.length;n<s;n++){if(n===t)continue;const r=e[n];for(const a of r.open)a.indexOf(o)>=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function qx(o,e){return o.length-e.length}function _g(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function VB(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s<r;s++)jx(n[s],t,i,n);return n=_g(n),n.sort(qx),n.reverse(),md(n)}function UB(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s<r;s++)jx(n[s],t,i,n);return n=_g(n),n.sort(qx),n.reverse(),md(n.map(yC))}function $B(o){let e=[];for(c
Line truncated
|
||||
`},"[yaml]":{"editor.insertSpaces":!0,"editor.tabSize":2}}}]);class oz{constructor(e,t){this.languageId=e;const i=t.brackets?tE(t.brackets):[],n=new l.CachedFunction(a=>{const c=new Set;return{info:new rz(this,a,c),closing:c}}),s=new l.CachedFunction(a=>{const c=new Set,h=new Set;return{info:new az(this,a,c,h),opening:c,openingColorized:h}});for(const[a,c]of i){const h=n.get(a),d=s.get(c);h.closing.add(d.info),d.opening.add(h.info)}const r=t.colorizedBracketPairs?tE(t.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,c]of r){const h=n.get(a),d=s.get(c);h.closing.add(d.info),d.openingColorized.add(h.info),d.opening.add(h.info)}this._openingBrackets=new Map([...n.cachedValues].map(([a,c])=>[a,c.info])),this._closingBrackets=new Map([...s.cachedValues].map(([a,c])=>[a,c.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return md(t,e)}}function tE(o){return o.filter(([e,t])=>e!==""&&t!=="")}class iE{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class rz extends iE{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class az extends iE{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var lz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nE=function(o,e){return function(t,i){e(t,i,o)}};class xC{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const ms=le("languageConfigurationService");let EC=class extends l.Disposable{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new uz),this.onDidChangeEmitter=this._register(new l.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(IC));this._register(this.configurationService.onDidChangeConfiguration(n=>{const s=n.change.keys.some(a=>i.has(a)),r=n.change.overrides.filter(([a,c])=>c.some(h=>i.has(h))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new xC(void 0));else for(const a of r)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new xC(a)))})),this._register(this._registry.onDidChange(n=>{this.configurations.delete(n.languageId),this.onDidChangeEmitter.fire(new xC(n.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=cz(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};EC=lz([nE(0,Ge),nE(1,yt)],EC);function cz(o,e,t,i){let n=e.getLanguageConfiguration(o);if(!n){if(!i.isRegisteredLanguageId(o))return new Wl(o,{});n=new Wl(o,{})}const s=hz(n.languageId,t),r=rE([n.underlyingConfig,s]);return new Wl(n.languageId,r)}const IC={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function hz(o,e){const t=e.getValue(IC.brackets,{overrideIdentifier:o}),i=e.getValue(IC.colorizedBracketPairs,{overrideIdentifier:o});return{brackets:sE(t),colorizedBracketPairs:sE(i)}}function sE(o){if(Array.isArray(o))return o.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function oE(o,e,t){const i=o.getLineContent(e);let n=l.getLeadingWhitespace(i);return n.length>t-1&&(n=n.substring(0,t-1)),n}class dz{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new aE(e,t,++this._order);return this._entries.push(i),this._resolved=null,l.markAsSingleton(l.toDisposable(()=>{for(let n=0;n<this._entries.length;n++)if(this._entries[n]===i){this._entries.splice(n,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new Wl(this.languageId,e))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(aE.cmp),rE(this._entries.map(e=>e.configuration)))}}function rE(o){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void
Line truncated
|
||||
</span></span>`):e.appendString("<span><span></span></span>"),new xg(new _s(0,0),0)}return Rz(Lz(o),e)}class Sz{constructor(e,t,i){this.characterMapping=e,this.html=t,this.containsForeignElements=i}}function Eg(o){const e=new ra(1e4),t=bd(o,e);return new Sz(t.characterMapping,e.build(),t.containsForeignElements)}class yz{constructor(e,t,i,n,s,r,a,c,h,d,u,f,g,m,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=r,this.parts=a,this.containsForeignElements=c,this.fauxIndentLength=h,this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=f,this.renderSpaceCharCode=g,this.renderWhitespace=m,this.renderControlCharacters=p}}function Lz(o){const e=o.lineContent;let t,i,n;o.stopRenderingLineAfter!==-1&&o.stopRenderingLineAfter<e.length?(t=!0,i=e.length-o.stopRenderingLineAfter,n=o.stopRenderingLineAfter):(t=!1,i=0,n=e.length);let s=Dz(e,o.containsRTL,o.lineTokens,o.fauxIndentLength,n);o.renderControlCharacters&&!o.isBasicASCII&&(s=Iz(e,s)),(o.renderWhitespace===4||o.renderWhitespace===1||o.renderWhitespace===2&&o.selectionsOnLine||o.renderWhitespace===3&&!o.continuesWithWrappedLine)&&(s=Tz(o,e,n,s));let r=0;if(o.lineDecorations.length>0){for(let a=0,c=o.lineDecorations.length;a<c;a++){const h=o.lineDecorations[a];h.type===3||h.type===1?r|=1:h.type===2&&(r|=2)}s=Nz(e,n,s,o.lineDecorations)}return o.containsRTL?s=Ez(e,s):s=xz(e,s,!o.isBasicASCII||o.fontLigatures),new yz(o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,e,n,t,i,s,r,o.fauxIndentLength,o.tabSize,o.startVisibleColumn,o.spaceWidth,o.renderSpaceCharCode,o.renderWhitespace,o.renderControlCharacters)}function Dz(o,e,t,i,n){const s=[];let r=0;i>0&&(s[r++]=new bt(i,"",0,!1));let a=i;for(let c=0,h=t.getCount();c<h;c++){const d=t.getEndOffset(c);if(d<=i)continue;const u=t.getClassName(c);if(d>=n){const g=e?l.containsRTL(o.substring(a,n)):!1;s[r++]=new bt(n,u,0,g);break}const f=e?l.containsRTL(o.substring(a,d)):!1;s[r++]=new bt(d,u,0,f),a=d}return s}function xz(o,e,t){let i=0;const n=[];let s=0;if(t)for(let r=0,a=e.length;r<a;r++){const c=e[r],h=c.endIndex;if(i+50<h){const d=c.type,u=c.metadata,f=c.containsRTL;let g=-1,m=i;for(let p=i;p<h;p++)o.charCodeAt(p)===32&&(g=p),g!==-1&&p-m>=50&&(n[s++]=new bt(g+1,d,u,f),m=g+1,g=-1);m!==h&&(n[s++]=new bt(h,d,u,f))}else n[s++]=c;i=h}else for(let r=0,a=e.length;r<a;r++){const c=e[r],h=c.endIndex,d=h-i;if(d>50){const u=c.type,f=c.metadata,g=c.containsRTL,m=Math.ceil(d/50);for(let p=1;p<m;p++){const b=i+p*50;n[s++]=new bt(b,u,f,g)}n[s++]=new bt(h,u,f,g)}else n[s++]=c;i=h}return n}function Ez(o,e){if(e.length===0)return e;const t=e[0];if(!t.containsRTL)return e;const i=t.endIndex;let n=0;for(let r=0;r<i;r++){const a=o.charCodeAt(r);if(a!==32&&a!==9){n=r;break}}if(n===0)return e;const s=[];s.push(new bt(n,t.type,t.metadata,!1)),s.push(new bt(i,t.type,t.metadata,t.containsRTL));for(let r=1;r<e.length;r++)s.push(e[r]);return s}function gE(o){return o<32?o!==9:o===127||o>=8234&&o<=8238||o>=8294&&o<=8297||o>=8206&&o<=8207||o===1564}function Iz(o,e){const t=[];let i=new bt(0,"",0,!1),n=0;for(const s of e){const r=s.endIndex;for(;n<r;n++){const a=o.charCodeAt(n);gE(a)&&(n>i.endIndex&&(i=new bt(n,s.type,s.metadata,s.containsRTL),t.push(i)),i=new bt(n+1,"mtkcontrol",s.metadata,!1),t.push(i))}n>i.endIndex&&(i=new bt(r,s.type,s.metadata,s.containsRTL),t.push(i))}return t}function Tz(o,e,t,i){const n=o.continuesWithWrappedLine,s=o.fauxIndentLength,r=o.tabSize,a=o.startVisibleColumn,c=o.useMonospaceOptimizations,h=o.selectionsOnLine,d=o.renderWhitespace===1,u=o.renderWhitespace===3,f=o.renderSpaceWidth!==o.spaceWidth,g=[];let m=0,p=0,b=i[p].type,v=i[p].containsRTL,C=i[p].endIndex;const w=i.length;let S=!1,L=l.firstNonWhitespaceIndex(e),D;L===-1?(S=!0,L=t,D=t):D=l.lastNonWhitespaceIndex(e);let x=!1,I=0,T=h&&h[I],M=a%r;for(let P=s;P<t;P++){const k=e.charCodeAt(P);T&&T.endExclusive<=P&&(I++,T=h&&h[I]);let U;if(P<L||P>D)U=!0;else if(k===9)U=!0;else if(k===32)if(d)if(x)U=!0;else{const B=P+1<t?e.charCodeAt(P+1):0;U=B===32||B===9}else U=!0;else U=!1;if(U&&h&&(U=!!T&&T.start<=P&&P<T.endExclusive),U&&u&&(U=S||P>D),U&&v&&P>=L&&P<=D&&(U=!1),x){if(!U||!c&&M>=r){if(f){const B=m>0?g[m-1].endIndex:s;for(let G=B+1;G<=P;G++)g[m++]=new bt(G,"mtkw",1,!1)}else g[m++]=new bt(P,"mtkw",1,!1);M=M%r}}else(P===C||U&&P>s)&&(g[m++]=new bt(P,b,0,v),M=M%r);for(k===9?M=r:l.isFullWidthCharacter(k)?M+=2:M++,x=U;P===C&&(p++,p<w);)b=i[p].type,v=i[p].containsRTL,C=i[p].endIndex}let O=!1;if(x)if(n&&d){const P=t>0?e.charCodeAt(t-1):0,k=t>1?e.charCodeAt(t-2):0;P===32&&k!==32&&k!==9||(O=!0)}else O=!0;if(O)if(f){const P=m>0?g[m-1].endIndex:s;for(let k=P+1;k<=t;k++)g[m++]=new bt(k,"mtkw",1,!1)}else g[m++]=new bt(t,"mtkw",1,!1);else g[m++]=new bt(t,b,0,v);return g}function Nz(o,e,t,i){i.sort(Ji.compare);const n=wz.normalize(o,i),s=n.length;let r=0;const a=[];let c=0,h=0;for(let u=0,f=t.length;u<f;u++){const g=t[u],m=g.endIndex,p=g.type,b=g.metadata,v=g.containsRTL;for(;r<s&&n[r].stLine truncated
|
||||
`:e,c=a.length;let h=i.embeddedLanguageData,d=i.stack,u=0,f=null,g=!0;for(;g||u<c;){const m=u,p=d.depth,b=f?f.groups.length:0,v=d.state;let C=null,w=null,S=null,L=null,D=null;if(f){C=f.matches;const T=f.groups.shift();w=T.matched,S=T.action,L=f.rule,f.groups.length===0&&(f=null)}else{if(!g&&u>=c)break;g=!1;let T=this._lexer.tokenizer[v];if(!T&&(T=Ig(this._lexer,v),!T))throw je(this._lexer,"tokenizer state is not defined: "+v);const M=a.substr(u);for(const O of T)if((u===0||!O.matchOnlyAtLineStart)&&(C=M.match(O.resolveRegex(v)),C)){w=C[0],S=O.action;break}}if(C||(C=[""],w=""),S||(u<c&&(C=[a.charAt(u)],w=C[0]),S=this._lexer.defaultToken),w===null)break;for(u+=w.length;kz(S)&&_E(S)&&S.test;)S=S.test(w,C,v,u===c);let x=null;if(typeof S=="string"||Array.isArray(S))x=S;else if(S.group)x=S.group;else if(S.token!==null&&S.token!==void 0){if(S.tokenSubst?x=Ho(this._lexer,S.token,w,C,v):x=S.token,S.nextEmbedded)if(S.nextEmbedded==="@pop"){if(!h)throw je(this._lexer,"cannot pop embedded language if not inside one");h=null}else{if(h)throw je(this._lexer,"cannot enter embedded language from within an embedded language");D=Ho(this._lexer,S.nextEmbedded,w,C,v)}if(S.goBack&&(u=Math.max(0,u-S.goBack)),S.switchTo&&typeof S.switchTo=="string"){let T=Ho(this._lexer,S.switchTo,w,C,v);if(T[0]==="@"&&(T=T.substr(1)),Ig(this._lexer,T))d=d.switchTo(T);else throw je(this._lexer,"trying to switch to a state '"+T+"' that is undefined in rule: "+this._safeRuleName(L))}else{if(S.transform&&typeof S.transform=="function")throw je(this._lexer,"action.transform not supported");if(S.next)if(S.next==="@push"){if(d.depth>=this._lexer.maxStack)throw je(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(v)}else if(S.next==="@pop"){if(d.depth<=1)throw je(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(L));d=d.pop()}else if(S.next==="@popall")d=d.popall();else{let T=Ho(this._lexer,S.next,w,C,v);if(T[0]==="@"&&(T=T.substr(1)),Ig(this._lexer,T))d=d.push(T);else throw je(this._lexer,"trying to set a next state '"+T+"' that is undefined in rule: "+this._safeRuleName(L))}}S.log&&typeof S.log=="string"&&Fz(this._lexer,this._lexer.languageId+": "+Ho(this._lexer,S.log,w,C,v))}if(x===null)throw je(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(L));const I=T=>{const M=this._languageService.getLanguageIdByLanguageName(T)||this._languageService.getLanguageIdByMimeType(T)||T,O=this._getNestedEmbeddedLanguageData(M);if(u<c){const P=e.substr(u);return this._nestedTokenize(P,t,er.create(d,O),n+u,s)}else return er.create(d,O)};if(Array.isArray(x)){if(f&&f.groups.length>0)throw je(this._lexer,"groups cannot be nested: "+this._safeRuleName(L));if(C.length!==x.length+1)throw je(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(L));let T=0;for(let M=1;M<C.length;M++)T+=C[M].length;if(T!==w.length)throw je(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(L));f={rule:L,matches:C,groups:[]};for(let M=0;M<x.length;M++)f.groups[M]={action:x[M],matched:C[M+1]};u-=w.length;continue}else{if(x==="@rematch"&&(u-=w.length,w="",C=null,x="",D!==null))return I(D);if(w.length===0){if(c===0||p!==d.depth||v!==d.state||(f?f.groups.length:0)!==b)continue;throw je(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(L))}let T=null;if(pE(x)&&x.indexOf("@brackets")===0){const M=x.substr(9),O=Kz(this._lexer,w);if(!O)throw je(this._lexer,"@brackets token returned but no bracket defined as: "+w);T=bE(O.token+M)}else{const M=x===""?"":x+this._lexer.tokenPostfix;T=bE(M)}m<r&&s.emit(m+n,T)}if(D!==null)return I(D)}return er.create(d,h)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new ic(e,Hl);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),l.TokenizationRegistry.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=l.TokenizationRegistry.get(e);return t?new ic(e,t.getInitialState()):new ic(e,Hl)}};Sd=BC=Vz([Uz(4,Ge)],Sd);function Kz(o,e){if(!e)return null;e=co(o,e);const t=o.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}const Gz=lo("standaloneColorizer",{createHTML:o=>o});class zC{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(s);const c=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const h=d=>{const u=Gz?.createHTML(d)??d;i.innerHTML=u};return this.colorize(t,c||"",a,n).then(h,d=>console.error(d))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let r=4;n&&typeof n.tabSize=="number"&&(r=n.tabSize),l.startsWithUTF8BOM(t)&&(t=t.substr(1));const a=l.splitLines(t);if(!e.isRegister
Line truncated
|
||||
`)}}const kg=new gV;St.add(IE.ColorContribution,kg);function E(o,e,t,i,n){return kg.registerColor(o,e,t,i,n)}function mV(o,e){switch(o.op){case 0:return Cn(o.value,e)?.darken(o.factor);case 1:return Cn(o.value,e)?.lighten(o.factor);case 2:return Cn(o.value,e)?.transparent(o.factor);case 7:{const t=Cn(o.color,e)||l.Color.transparent,i=Cn(o.with,e)||l.Color.transparent;return t.mix(i,o.ratio)}case 3:{const t=Cn(o.background,e);return t?Cn(o.value,e)?.makeOpaque(t):Cn(o.value,e)}case 4:for(const t of o.values){const i=Cn(t,e);if(i)return i}return;case 6:return Cn(e.defines(o.if)?o.then:o.else,e);case 5:{const t=Cn(o.value,e);if(!t)return;const i=Cn(o.background,e);return i?t.isDarkerThan(i)?l.Color.getLighterColor(t,i,o.factor).transparent(o.transparency):l.Color.getDarkerColor(t,i,o.factor).transparent(o.transparency):t.transparent(o.factor*o.transparency)}default:throw l.assertNever()}}function da(o,e){return{op:0,value:o,factor:e}}function kn(o,e){return{op:1,value:o,factor:e}}function ce(o,e){return{op:2,value:o,factor:e}}function YC(...o){return{op:4,values:o}}function pV(o,e,t){return{op:6,if:o,then:e,else:t}}function TE(o,e,t,i){return{op:5,value:o,background:e,factor:t,transparency:i}}function Cn(o,e){if(o!==null){if(typeof o=="string")return o[0]==="#"?l.Color.fromHex(o):e.getColor(o);if(o instanceof l.Color)return o;if(typeof o=="object")return mV(o,e)}}const NE="vscode://schemas/workbench-colors",RE=St.as(Cg.JSONContribution);RE.registerSchema(NE,kg.getColorSchema());const ME=new l.RunOnceScheduler(()=>RE.notifySchemaChanged(NE),200);kg.onDidChangeSchema(()=>{ME.isScheduled()||ME.schedule()});const De=E("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},l.localize(1838,"Overall foreground color. This color is only used if not overridden by a component."));E("strongForeground",{dark:"#FFFFFF",light:"#000000",hcDark:"#FFFFFF",hcLight:"#000000"},l.localize(1839,"Highest-contrast foreground color, intended for text or icons that need maximum legibility across various backgrounds. This color is only used if not overridden by a component.")),E("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},l.localize(1840,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),E("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},l.localize(1841,"Overall foreground color for error messages. This color is only used if not overridden by a component."));const _V=E("descriptionForeground",{light:"#717171",dark:ce(De,.7),hcDark:ce(De,.7),hcLight:ce(De,.7)},l.localize(1842,"Foreground color for description text providing additional information, for example for a label.")),Fg=E("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},l.localize(1843,"The default color for icons in the workbench.")),bs=E("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},l.localize(1844,"Overall border color for focused elements. This color is only used if not overridden by a component.")),pe=E("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},l.localize(1845,"An extra border around elements to separate them from others for greater contrast.")),ot=E("contrastActiveBorder",{light:null,dark:null,hcDark:bs,hcLight:bs},l.localize(1846,"An extra border around active elements to separate them from others for greater contrast."));E("selection.background",null,l.localize(1847,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));const bV=E("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},l.localize(1848,"Foreground color for links in text."));E("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},l.localize(1849,"Foreground color for links in text when clicked on and on mouse hover.")),E("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:l.Color.black,hcLight:"#292929"},l.localize(1850,"Color for text separators.")),E("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#FFFFFF",hcLight:"#FFFFFF"},l.localize(1851,"Foreground color for preformatted text segments.")),E("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:null,hcLight:"#09345f"},l.localize(1852,"Background color for preformatted text segments.")),E("textPreformat.border",{light:null,dark:null,hcDark:pe,hcLight:null},l.localize(1853,"Border color for preformatted text segments.")),E("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},l.localize(1854,"Background color for block quotes in text.")),E("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:l.Color.white,hcLight:"#292929"},l.localize(1855,"Border color for block quotes in text.")),E("textCodeBlock.backg
Line truncated
|
||||
${a}: ${r};`}return i+=`
|
||||
}`,i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function l3(o){return o.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class ma extends l.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class gi extends ma{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onBeforeRender(e){}}class Jn{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const s=new Uint8Array(n);for(let r=0;r<n;r++)s[r]=i[n-r-1];return s}}class c3{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._viewLayout.getLineHeightForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class h3 extends c3{constructor(e,t,i,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i,this._viewLinesGpu=n}linesVisibleRangesForRange(e,t){const i=this._viewLines.linesVisibleRangesForRange(e,t);if(!this._viewLinesGpu)return i;const n=this._viewLinesGpu.linesVisibleRangesForRange(e,t);return i?n?i.concat(n).sort((s,r)=>s.lineNumber-r.lineNumber):i:n}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)??this._viewLinesGpu?.visibleRangeForPosition(e)??null}}class nI{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class Pd{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new Pd(s.left,s.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class or{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class sI{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class pv{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class qg{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e
Line truncated
|
||||
target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?Xe.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return $t.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return $t.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return $t.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return $t.createViewZone(e,this.target,this._getMouseColumn(),t,i)}fulfillContentText(e,t,i){return $t.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return $t.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return $t.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return $t.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return $t.createOverlayWidget(this.target,this._getMouseColumn(),e)}}const lI={isAfterLines:!0};function ba(o){return{isAfterLines:!1,horizontalDistanceToText:o}}class ai{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Jn.collect(t,this._viewHelper.viewDomNode);return!!(mi.isChildOfContentWidgets(i)||mi.isChildOfOverflowingContentWidgets(i)||mi.isChildOfOverlayWidgets(i)||mi.isChildOfOverflowingOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){const r=new uc(this._context,this._viewHelper,e),a=new _3(r,t,i,n,s);try{const c=ai._createMouseTarget(r,a);if(c.type===6&&r.stickyTabStops&&c.position!==null){const h=ai._snapToSoftTabBoundary(c.position,r.viewModel),d=l.Range.fromPositions(h,h).plusRange(c.range);return a.fulfillContentText(h,d,c.detail)}return c}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,t){if(t.target===null)return t.fulfillUnknown();const i=t;let n=null;return!mi.isChildOfOverflowGuard(t.targetPath)&&!mi.isChildOfOverflowingContentWidgets(t.targetPath)&&!mi.isChildOfOverflowingOverlayWidgets(t.targetPath)&&(n=n||t.fulfillUnknown()),n=n||ai._hitTestContentWidget(e,i),n=n||ai._hitTestOverlayWidget(e,i),n=n||ai._hitTestMinimap(e,i),n=n||ai._hitTestScrollbarSlider(e,i),n=n||ai._hitTestViewZone(e,i),n=n||ai._hitTestMargin(e,i),n=n||ai._hitTestViewCursor(e,i),n=n||ai._hitTestTextArea(e,i),n=n||ai._hitTestViewLines(e,i),n=n||ai._hitTestScrollbar(e,i),n||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(mi.isChildOfContentWidgets(t.targetPath)||mi.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(mi.isChildOfOverlayWidgets(t.targetPath)||mi.isChildOfOverflowingOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfillContentText(n.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft||n>r.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return mi.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if(s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth){const a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),c=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return r.glyphMarginLane=c[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,r)}return s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layo
Line truncated
|
||||
`),split:o=>o.split(`\r
|
||||
`),parse:o=>yv.split(o).filter(e=>!e.startsWith("#"))}),bI={EDITORS:"CodeEditors",FILES:"CodeFiles"};class z3{}const V3={DragAndDropContribution:"workbench.contributions.dragAndDrop"};St.add(V3.DragAndDropContribution,new z3);const _f=class _f{constructor(){}static getInstance(){return _f.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};_f.INSTANCE=new _f;let Lv=_f;function CI(o){if(l.isNative&&typeof globalThis.vscode?.webUtils?.getPathForFile=="function")return globalThis.vscode?.webUtils?.getPathForFile(o)}function U3(o){const e=new pI;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,Sv(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,$3(n))}}return e}function $3(o){const e=CI(o),t=e?l.URI.parse(e):void 0;return F3(o.name,t,async()=>new Uint8Array(await o.arrayBuffer()))}const K3=Object.freeze([bI.EDITORS,bI.FILES,pc.RESOURCES,pc.INTERNAL_URI_LIST]);function vI(o,e=!1){const t=U3(o),i=t.get(pc.INTERNAL_URI_LIST);if(i)t.replace(mn.uriList,i);else if(e||!t.has(mn.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=CI(r);try{a?n.push(l.URI.file(a).toString()):n.push(l.URI.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(mn.uriList,Sv(yv.create(n)))}for(const n of K3)t.delete(n);return t}function G3(o,e,t){const{dataToCopy:i,metadata:n}=SI(o);return wI(i.text,n,t),{dataToCopy:i,metadata:n}}function wI(o,e,t){_c.INSTANCE.set(t?o.replace(/\r\n/g,`
|
||||
`):o,e)}function SI(o){const e=o.getEditorOption(45),t=o.getEditorOption(31),i=o.getCursorStates().map(r=>r.modelState.selection),n=j3(o,i,e,t),s={version:1,id:Wg(),isFromEmptySelection:n.isFromEmptySelection,multicursorText:n.multicursorText,mode:n.mode};return{dataToCopy:n,metadata:s}}function j3(o,e,t,i){const{sourceRanges:n,sourceText:s}=o.getPlainTextToCopy(e,t,l.isWindows),r=o.model.getEOL(),a=t&&e.length===1&&e[0].isEmpty(),c=Array.isArray(s)?s:null,h=Array.isArray(s)?s.join(r):s;let d,u=null;if(em.forceCopyWithSyntaxHighlighting||i&&s.length<65536){const g=o.getRichTextToCopy(e,t);g&&(d=g.html,u=g.mode)}return{isFromEmptySelection:a,sourceRanges:n,multicursorText:c,text:h,html:d,mode:u}}const H_=class H_{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}};H_.INSTANCE=new H_;let _c=H_;const em={forceCopyWithSyntaxHighlighting:!1,electronBugWorkaroundCopyEventHasFired:!1},yI={getTextData(o){const e=o.getData(mn.text);let t=null;const i=o.getData("vscode-editor-data");if(typeof i=="string")try{t=JSON.parse(i),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&o.files.length>0?[Array.prototype.slice.call(o.files,0).map(s=>s.name).join(`
|
||||
`),null]:[e,t]},setTextData(o,e,t,i){o.setData(mn.text,e),typeof t=="string"&&o.setData("text/html",t),o.setData("vscode-editor-data",JSON.stringify(i))}};function tm(o,e,t,i,n){const{dataToCopy:s,metadata:r}=SI(t.viewModel);let a=!1;return{isCut:e,clipboardData:{setData:(c,h)=>{o.clipboardData?.setData(c,h)}},dataToCopy:s,ensureClipboardGetsEditorData:()=>{o.preventDefault(),o.clipboardData&&yI.setTextData(o.clipboardData,s.text,s.html,r),wI(s.text,r,n),i.trace("ensureClipboardGetsEditorSelection with id : ",r.id," with text.length: ",s.text.length)},setHandled:()=>{a=!0,o.preventDefault(),o.stopImmediatePropagation()},get isHandled(){return a}}}function LI(o){let e=!1,[t,i]=o.clipboardData?yI.getTextData(o.clipboardData):["",null];return i=i||_c.INSTANCE.get(t),{clipboardData:q3(o.clipboardData),metadata:i,text:t,toExternalVSDataTransfer:()=>o.clipboardData?vI(o.clipboardData):void 0,browserEvent:o,setHandled:()=>{e=!0,o.preventDefault(),o.stopImmediatePropagation()},get isHandled(){return e}}}function q3(o){return{types:Array.from(o?.types??[]),files:Array.prototype.slice.call(o?.files??[],0),getData:e=>o?.getData(e)??""}}const Sl=class Sl{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let r;if(t){const a=i.substring(0,n),c=t.value.substring(0,t.selectionStart);a===c&&(r=t.newlineCountBeforeSelection)}return new Sl(i,n,s,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new Sl(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){const i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,n,-1)}if(e>=this.selectionEnd){const n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,n,1)}const t=this.value.substring(this.selectionStart,e);if(t.indexOf("…")===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(`
|
||||
`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(l.commonPrefixLength(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(l.commonSuffixLength(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,c=e.selectionEnd-n,h=t.selectionStart-n,d=t.selectionEnd-n;if(h===d){const f=e.selectionStart-n;return{text:r,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}const u=c-a;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(l.commonPrefixLength(e.value,t.value),e.selectionEnd),n=Math.min(l.commonSuffixLength(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const c=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:c-r.length}}static fromScreenReaderContentState(e){let t,i;switch(e.selection.getDirection()){case 0:t=e.selectionStart,i=e.selectionEnd;break;case 1:t=e.selectionEnd,i=e.selectionStart;break}return new Sl(e.value,t,i,e.selection,e.newlineCountBeforeSelection)}};Sl.EMPTY=new Sl("",0,0,null,void 0);let ci=Sl;var Y3=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},DI=function(o,e){return function(t,i){e(t,i,o)}},im;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(im||(im={}));class Z3{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let Dv=class extends l.Disposable{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,r){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=r,this._onFocus=this._register(new l.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new l.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new l.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new l.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new l.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new l.Emitter),this.onPaste=this._onPaste.event,this._onWillCopy=this._register(new l.Emitter),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new l.Emitter),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new l.Emitter),this.onWillPaste=this._onWillPaste.event,this._onType=this._register(new l.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new l.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new l.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new l.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new l.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new l.MutableDisposable),this._asyncTriggerCut=this._register(new l.RunOnceScheduler(()=>this._onCut.fire(),0)),this._textAreaState=ci.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(l.Event.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=new l.RunOnceScheduler(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(c=>{const h=new Be(c);(h.keyCode===114||this._currentComposition&&h.keyCode===1)&&h.stopPropagation(),h.equals(9)&&h.preventDefault(),a=h,this._onKeyDown.fire(h)})),this._register(this._textArea.onKeyUp(c=>{const h=new Be(c);this._onKeyUp.fire(h)})),this._register(this._textArea.onCompositionStart(c=>{const h=new Z3;if(this._currentComposition){this._currentComposition=h
Line truncated
|
||||
* 'to': A mandatory logical position value providing where to move the cursor.
|
||||
\`\`\`
|
||||
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
||||
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
||||
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
||||
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
||||
\`\`\`
|
||||
* 'by': Unit to move. Default is computed based on 'to' value.
|
||||
\`\`\`
|
||||
'line', 'wrappedLine', 'character', 'halfLine', 'foldedLine'
|
||||
\`\`\`
|
||||
Use 'foldedLine' with 'up'/'down' to move by logical lines while treating each
|
||||
folded region as a single step.
|
||||
* 'value': Number of units to move. Default is '1'.
|
||||
* 'select': If 'true' makes the selection. Default is 'false'.
|
||||
* 'noHistory': If 'true' does not add the movement to navigation history. Default is 'false'.
|
||||
`,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine","foldedLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1},noHistory:{type:"boolean",default:!1}}}}]},o.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},o.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine",FoldedLine:"foldedLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case o.RawDirection.Left:n=0;break;case o.RawDirection.Right:n=1;break;case o.RawDirection.Up:n=2;break;case o.RawDirection.Down:n=3;break;case o.RawDirection.PrevBlankLine:n=4;break;case o.RawDirection.NextBlankLine:n=5;break;case o.RawDirection.WrappedLineStart:n=6;break;case o.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case o.RawDirection.WrappedLineColumnCenter:n=8;break;case o.RawDirection.WrappedLineEnd:n=9;break;case o.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case o.RawDirection.ViewPortTop:n=11;break;case o.RawDirection.ViewPortBottom:n=13;break;case o.RawDirection.ViewPortCenter:n=12;break;case o.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case o.RawUnit.Line:s=1;break;case o.RawUnit.WrappedLine:s=2;break;case o.RawUnit.Character:s=3;break;case o.RawUnit.HalfLine:s=4;break;case o.RawUnit.FoldedLine:s=5;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1,noHistory:!!i.noHistory}}o.parse=t})(rm||(rm={}));class Tv{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new II(e,i)}shouldIncrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class Nv{constructor(e,t){this.model=e,this.indentationLineProcessor=new II(e,t)}getProcessedTokenContextAroundRange(e){const t=this._getProcessedTokensBeforeRange(e),i=this._getProcessedTokensAfterRange(e),n=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:i,previousLineProcessedTokens:n}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=oa(t,e.startColumn-1);let n;if(Rv(this.model,e.getStartPosition())){const r=e.startColumn-1-i.firstCharOffset,a=i.firstCharOffset,c=a+r;n=t.sliceAndInflate(a,c,0)}else{const r=e.startColumn-1;n=t.sliceAndInflate(0,r,0)}return this.indentationLineProcessor.getProcessedTokens(n)}_getProcessedTokensAfterRange(e){const t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);const i=this.model.tokenization.getLineTokens(t.lineNumber),n=oa(i,t.column-1),s=t.column-1-n.firstCharOffset,r=n.firstCharOffset+s,a=n.firstCharOffset+n.getLineLength(),c=i.sliceAndInflate(r,a,0);return this.indentationLineProcessor.getProcessedTokens(c)}_getProcessedPreviousLineTokens(e){const t=g=>{this.model.tokenization.forceTokenization(g);const m=this.model.tokenization.getLineTokens(g),p=this.model.getLineMaxColumn(g)-1;return oa(m,p)};this.model.tokenization.forceTokenization(e.startLineNumber);const i=this.model.tokenization.getLineTokens(e.startLineNumber),n=oa(i,e.startColumn-1),s=_t.createEmpty("",n.languageIdCodec),r=e.startLineNumber-1;if(r===0||!(n.firstCharOffset===0))return s;const h=t(r);if(!(n.languageId===h.languageId))return s;const u=h.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(u)}}class II{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){const i=(r,a)=>{const c=l.getLeadingWhitespace(r);return a+r.substring(c.length)};this.model.tokenization.forceTokenization?.(e);const n=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(n).getL
Line truncated
|
||||
`){const r=[];for(let a=0,c=i.length;a<c;a++)r[a]=this._enter(e,t,!1,i[a]);return new pi(4,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,t,i,n){if(e.autoIndent===0)return Sa(n,`
|
||||
`,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const c=t.getLineContent(n.startLineNumber),h=l.getLeadingWhitespace(c).substring(0,n.startColumn-1);return Sa(n,`
|
||||
`+e.normalizeIndentation(h),i)}const s=am(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===_.IndentAction.None)return Sa(n,`
|
||||
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===_.IndentAction.Indent)return Sa(n,`
|
||||
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===_.IndentAction.IndentOutdent){const c=e.normalizeIndentation(s.indentation),h=e.normalizeIndentation(s.indentation+s.appendText),d=`
|
||||
`+h+`
|
||||
`+c;return i?new nm(n,d,!0):new sm(n,d,-1,h.length-c.length,!0)}else if(s.indentAction===_.IndentAction.Outdent){const c=hm(e,s.indentation);return Sa(n,`
|
||||
`+e.normalizeIndentation(c+s.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=l.getLeadingWhitespace(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const c=gU(e.autoIndent,t,n,{unshiftIndent:h=>hm(e,h),shiftIndent:h=>Fv(e,h),normalizeIndentation:h=>e.normalizeIndentation(h)},e.languageConfigurationService);if(c){let h=e.visibleColumnFromColumn(t,n.getEndPosition());const d=n.endColumn,u=t.getLineContent(n.endLineNumber),f=l.firstNonWhitespaceIndex(u);if(f>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,f+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new nm(n,`
|
||||
`+e.normalizeIndentation(c.afterEnter),!0);{let g=0;return d<=f+1&&(e.insertSpaces||(h=Math.ceil(h/e.indentSize)),g=Math.min(h+1-e.normalizeIndentation(c.afterEnter).length-1,0)),new sm(n,`
|
||||
`+e.normalizeIndentation(c.afterEnter),0,g,!0)}}}return Sa(n,`
|
||||
`+e.normalizeIndentation(a),i)}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new nm(new l.Range(1,1,1,1),`
|
||||
`);else{a--;const c=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new l.Range(a,c,a,c))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s].positionLineNumber,c=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new l.Range(a,c,a,c))}return n}static lineBreakInsert(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class LU{static getEdits(e,t,i,n,s,r){const a=this._distributePasteToCursors(e,i,n,s,r);return a?(i=i.sort(l.Range.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _distributePasteToCursors(e,t,i,n,s){if(t.length===1)return null;if(s&&s.length===t.length)return s;if(n)return null;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substring(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substring(0,i.length-1));const r=l.splitLines(i);if(r.length===t.length)return r}return null}static _distributedPaste(e,t,i,n){const s=[];for(let r=0,a=i.length;r<a;r++){const h=e.overtypeOnPaste&&e.inputMode==="overtype"?Ev:Ri;s[r]=new h(i[r],n[r])}return new pi(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){const r=[];for(let a=0,c=i.length;a<c;a++){const h=i[a],d=h.getPosition();if(s&&!h.isEmpty()&&(s=!1),s&&n.indexOf(`
|
||||
`)!==n.length-1&&(s=!1),s){const u=new l.Range(d.lineNumber,1,d.lineNumber,1);r[a]=new xI(u,n,h,!0)}else{const f=e.overtypeOnPaste&&e.inputMode==="overtype"?Ev:Ri;r[a]=new f(h,n)}}return new pi(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class DU{static getEdits(e,t,i,n,s,r,a,c){const h=n.map(d=>this._compositionType(i,d,s,r,a,c));return new pi(4,h,{shouldPushStackElementBefore:cm(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),c=Math.max(1,a.column-n),h=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),d=new l.Range(a.lineNumber,c,a.lineNumber,h);return new sm(d,i,0,r)}}class xU{static getEdits(e,t,i){const n=[];for(let r=0,a=t.length;r<a;r++)n[r]=new Ri(t[r],i);const s=kv(i,e);return new pi(s,n,{shouldPushStackElementBefore:cm(e,s),shouldPushStackElementAfter:!1})}}class EU{static getCommands(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s];if(a.isEmpty()){const c=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(c)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let h=this._goodIndentForLine(e,t,a.startLineNumber);h=h||" ";const d=e.normalizeIndentation(h);if(!c.startsWith(d)){n[s]=new Ri(new l.Range(a.startLineNumber,1,a.startLineNumber,c.length+1),d,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const c=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==c){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new _.ShiftCommand(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static _goodIndentForLine(e,t,i){let n=null,s="";const r=Bd(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,s=r.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(l.lastNonWhitespaceIndex(d)>=0)break}if(a<1)return null;const c=t.getLineMaxColumn(a),h=am(e.autoIndent,t,new l.Range(a,c,a,c),e.languageConfigurationService);h&&(s=h.indentation+h.appendText)}return n&&(n===_.IndentAction.Indent&&(s=Fv(e,s)),n===_.IndentAction.Outdent&&(s=hm(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,r),c=e.indentSize,h=c-a%c;for(let d=0;d<h;d++)s+=" "}else s=" ";return new Ri(i,s,n)}}class Pv extends sm{constructor(e,t,i,n,s,r){super(e,t,i,n),this._openCharacter=s,this._closeCharacter=r,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,t,i){return this.closeCharacterRange=new l.Range(t.startLineNumber,t.endColumn-this._closeCharacter.length,t.endLineNumber,t.endColumn),this.enclosingRange=new l.Range(t.startLineNumber,t.endColumn-this._openCharacter.length-this._closeCharacter.length,t.endLineNumber,t.endColumn),super.computeCursorState(e,i)}}class IU extends Pv{constructor(e,t,i,n){const s=(i?t:"")+n,r=0,a=-n.length;super(e,s,r,a,t,n)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,n,t)}}class TU extends Pv{constructor(e,t,i,n){const s=i+n,r=0,a=i.length;super(t,s,r,a,i,n),this._autoIndentationEdit=e,this._autoClosingEdit={range:t,text:s}}getEditOperations(e,t){t.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),t.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length!==2)throw new Error("There should be two inverse edit operations!");const n=i[0].range,s=i[1].range,r=n.plusRange(s);return this._computeCursorStateWithRange(e,r,t)}}function kv(o,e){return o===" "?e===5||e===6?6:5:4}function cm(o,e){return RI(o)&&!RI(e)?!0:o===5?!1:NI(o)!==NI(e)}function NI(o){return o===6||o===5?"space":o}function RI(o){return o===4||o===5||o===6}function MI(o,e,t,i,n){if(o.autoClosingOvertype==="never"||!o.autoClosingPairs.autoClosingPairsCloseSingleChar.has(n))return!1;for(let s=0,r=t.length;s<r;s++){const a=t[s];if(!a.isEmpty())return!1;const c=a.getPosition(),h=e.getLineContent(c.lineNumber);if(h.charAt(c.column-1)!==n)return!1;const u=lr(n);if((c.column>2?h.charCodeAt(c.column-2):0)===92&&u)return!1;if(o.autoClosingOvertype==="auto"){let g=!1;for(let m=0,p=i.length;m<p;m++){const b=i[m];if(c.lineNumber===b.startLineNumber&&c.column===b.startColumn){g=!0;break}}if(!g)return!1}}return!0}function Sa(o,e,t){return t?new nm(o,e,!0):new Ri(o,e,!0)}function Fv(o,e,t){return t=t||1,_.ShiftCommand.shiftIndent(e,e.length+t,o.tabSize,o.indentSize,o.insertSpaces)}function hm(o,e,t){return t=t||1,_.ShiftCommand.unshiftIndent(e,e.length+t,o.tabSize,o.indentSize,o.insertSpaces)}function AI(o,e){return lr(e)?o.autoSurround==="quotes"||o.autoSurround==="languageDefined":o.autoSurround==="brackets"||o.autoSurround==="language
Line truncated
|
||||
`)}}class S4{constructor(e,t,i){this._canvas=e,this._textureIndex=t,this._slabs=[],this._activeSlabsByDims=new l.NKeyMap,this._unusedRects=[],this._openRegionsByHeight=new Map,this._openRegionsByWidth=new Map,this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Ia(this._canvas.getContext("2d",{willReadFrequently:!0})),this._slabW=Math.min(i?.slabW??64<<Math.max(Math.floor(Le().devicePixelRatio)-1,0),this._canvas.width),this._slabH=Math.min(i?.slabH??this._slabW,this._canvas.height),this._slabsPerRow=Math.floor(this._canvas.width/this._slabW),this._slabsPerColumn=Math.floor(this._canvas.height/this._slabH)}allocate(e){const t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new l.BugIndicatingError("Glyph is too large for the atlas page");if(t>this._slabW||i>this._slabH){if(this._allocatedGlyphs.size>0)return;let h=this._canvas.width;for(;t<h/2&&i<h/2;)h/=2;this._slabW=h,this._slabH=h,this._slabsPerRow=Math.floor(this._canvas.width/this._slabW),this._slabsPerColumn=Math.floor(this._canvas.height/this._slabH)}const n={w:t,h:i};let s=this._activeSlabsByDims.get(n.w,n.h);if(s){const h=Math.floor(this._slabW/s.entryW)*Math.floor(this._slabH/s.entryH);s.count>=h&&(s=void 0)}let r,a;if(!s)if(t<i){const h=this._openRegionsByWidth.get(t);if(h?.length)for(let d=h.length-1;d>=0;d--){const u=h[d];if(u.w>=t&&u.h>=i){r=u.x,a=u.y,t<u.w&&this._unusedRects.push({x:u.x+t,y:u.y,w:u.w-t,h:i}),u.y+=i,u.h-=i,u.h===0&&(d===h.length-1?h.pop():this._unusedRects.splice(d,1));break}}}else{const h=this._openRegionsByHeight.get(i);if(h?.length)for(let d=h.length-1;d>=0;d--){const u=h[d];if(u.w>=t&&u.h>=i){r=u.x,a=u.y,i<u.h&&this._unusedRects.push({x:u.x,y:u.y+i,w:t,h:u.h-i}),u.x+=t,u.w-=t,u.h===0&&(d===h.length-1?h.pop():this._unusedRects.splice(d,1));break}}}if(r===void 0||a===void 0){if(!s){if(this._slabs.length>=this._slabsPerRow*this._slabsPerColumn)return;s={x:Math.floor(this._slabs.length%this._slabsPerRow)*this._slabW,y:Math.floor(this._slabs.length/this._slabsPerRow)*this._slabH,entryW:n.w,entryH:n.h,count:0};const d=this._slabW%s.entryW,u=this._slabH%s.entryH;d&&bT(this._openRegionsByWidth,d,{x:s.x+this._slabW-d,w:d,y:s.y,h:this._slabH-(u??0)}),u&&bT(this._openRegionsByHeight,u,{x:s.x,w:this._slabW,y:s.y+this._slabH-u,h:u}),this._slabs.push(s),this._activeSlabsByDims.set(s,n.w,n.h)}const h=Math.floor(this._slabW/s.entryW);r=s.x+Math.floor(s.count%h)*s.entryW,a=s.y+Math.floor(s.count/h)*s.entryH,s.count++}this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,r,a,t,i);const c={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:r,y:a,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._allocatedGlyphs.add(c),c}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Ia(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=0,r=0,a=0;const c=64<<Math.floor(Le().devicePixelRatio)-1,h=c;for(const u of this._slabs){let f=0,g=0;for(let b=0;b<u.count;b++)f+u.entryW>c&&(f=0,g+=u.entryH),n.fillStyle="#FF0000",n.fillRect(u.x+f,u.y+g,u.entryW,u.entryH),s+=u.entryW*u.entryH,f+=u.entryW;const m=Math.floor(c/u.entryW),p=Math.floor(h/u.entryH);u.entryW*m*u.entryH*p}for(const u of this._allocatedGlyphs)r+=u.w*u.h,n.fillStyle="#4040FF",n.fillRect(u.x,u.y,u.w,u.h);const d=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const u of d)n.fillStyle="#FF000088",n.fillRect(u.x,u.y,u.w,u.h),a+=u.w*u.h;return n.globalAlpha=.5,n.drawImage(this._canvas,0,0),n.globalAlpha=1,i.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let i=0,n=0,s=0,r=0,a=0;const c=e*t,h=64<<Math.floor(Le().devicePixelRatio)-1,d=h;for(const m of this._slabs){let p=0,b=0;for(let S=0;S<m.count;S++)p+m.entryW>h&&(p=0,b+=m.entryH),i+=m.entryW*m.entryH,p+=m.entryW;const v=Math.floor(h/m.entryW),C=Math.floor(d/m.entryH),w=m.entryW*v*m.entryH*C;s+=h*d-w}for(const m of this._allocatedGlyphs)n+=m.w*m.h;const u=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const m of u)a+=m.w*m.h;const f=s-a;r=i-(n-f);const g=n/(n+r+a);return[`page[${this._textureIndex}]:`,` Total: ${c}px (${e}x${t})`,` Used: ${n}px (${(n/c*100).toFixed(2)}%)`,` Wasted: ${r}px (${(r/c*100).toFixed(2)}%)`,`Restricted: ${a}px (${(a/c*100).toFixed(2)}%) (hard to allocate)`,`Efficiency: ${g===1?"100":(g*100).toFixed(2)}%`,` Slabs: ${this._slabs.length} of ${Math.floor(this._canvas.width/h)*Math.floor(this._canvas.height/d)}`].join(`
|
||||
`)}}function bT(o,e,t){let i=o.get(e);i||(i=[],o.set(e,i)),i.push(t)}var y4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CT=function(o,e){return function(t,i){e(t,i,o)}},Wv;let Hn=(yl=class extends l.Disposable{get version(){return this._version}get usedArea(){return this._usedArea}get source(){return this._canvas}get glyphs(){return this._glyphInOrderSet.values()}constructor(e,t,i,n,s){switch(super(),this._logService=n,this._version=0,this._usedArea={left:0,top:0,right:0,bottom:0},this._glyphMap=new l.NKeyMap,this._glyphInOrderSet=new Set,this._canvas=new OffscreenCanvas(t,t),this._colorMap=s.getColorTheme().tokenColorMap,i){case"shelf":this._allocator=new w4(this._canvas,e);break;case"slab":this._allocator=new S4(this._canvas,e);break;default:this._allocator=i(this._canvas,e);break}this._register(l.toDisposable(()=>{this._canvas.width=1,this._canvas.height=1}))}getGlyph(e,t,i,n){return this._glyphMap.get(t,i,n,e.cacheKey)??this._createGlyph(e,t,i,n)}_createGlyph(e,t,i,n){if(this._glyphInOrderSet.size>=Wv.maximumGlyphCount)return;const s=e.rasterizeGlyph(t,i,n,this._colorMap),r=this._allocator.allocate(s);if(r!==void 0)return this._glyphMap.set(r,t,i,n,e.cacheKey),this._glyphInOrderSet.add(r),this._version++,this._usedArea.right=Math.max(this._usedArea.right,r.x+r.w-1),this._usedArea.bottom=Math.max(this._usedArea.bottom,r.y+r.h-1),this._logService.getLevel()===_.LogLevel.Trace&&this._logService.trace("New glyph",{chars:t,tokenMetadata:i,decorationStyleSetId:n,rasterizedGlyph:s,glyph:r}),r}getUsagePreview(){return this._allocator.getUsagePreview()}getStats(){return this._allocator.getStats()}},Wv=yl,yl.maximumGlyphCount=5e3,yl);Hn=Wv=y4([CT(3,ei),CT(4,_i)],Hn);var L4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vT=function(o,e){return function(t,i){e(t,i,o)}},wm;let dr=(Ll=class extends l.Disposable{get pages(){return this._pages}constructor(e,t,i,n,s){super(),this._maxTextureSize=e,this._decorationStyleCache=i,this._themeService=n,this._instantiationService=s,this._warmUpTask=this._register(new l.MutableDisposable),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new l.NKeyMap,this._onDidDeleteGlyphs=this._register(new l.Emitter),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=t?.allocatorType??"slab",this._register(l.Event.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));const r=Math.max(1,Math.floor(Le().devicePixelRatio));this.pageSize=Math.min(1024*r,this._maxTextureSize),this._initFirstPage(),this._register(l.toDisposable(()=>l.dispose(this._pages)))}_initFirstPage(){const e=this._instantiationService.createInstance(Hn,0,this.pageSize,this._allocatorType);this._pages.push(e);const t=new Zd(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(const e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,i,n,s){return i&=-2048,i|=Math.floor(s%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,i,n,e.cacheKey)??0,e,t,i,n)}_tryGetGlyph(e,t,i,n,s){return this._glyphPageIndex.set(e,i,n,s,t.cacheKey),this._pages[e].getGlyph(t,i,n,s)??(e+1<this._pages.length?this._tryGetGlyph(e+1,t,i,n,s):void 0)??this._getGlyphFromNewPage(t,i,n,s)}_getGlyphFromNewPage(e,t,i,n){if(this._pages.length>=wm.maximumPageCount)throw new Error(`Attempt to create a texture atlas page past the limit ${wm.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(Hn,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,i,n,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,i,n)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){const t=this._colorMap;if(!t)throw new l.BugIndicatingError("Cannot warm atlas without color map");this._warmUpTask.value?.clear();const i=this._warmUpTask.value=this._instantiationService.createInstance(v4);for(let n=65;n<=90;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=97;n<=122;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e
Line truncated
|
||||
|
||||
struct Vertex {
|
||||
@location(0) position: vec2f,
|
||||
};
|
||||
|
||||
struct LayoutInfo {
|
||||
canvasDims: vec2f,
|
||||
viewportOffset: vec2f,
|
||||
viewportDims: vec2f,
|
||||
}
|
||||
|
||||
struct ScrollOffset {
|
||||
offset: vec2f,
|
||||
}
|
||||
|
||||
struct Shape {
|
||||
position: vec2f,
|
||||
size: vec2f,
|
||||
color: vec4f,
|
||||
};
|
||||
|
||||
struct VSOutput {
|
||||
@builtin(position) position: vec4f,
|
||||
@location(1) color: vec4f,
|
||||
};
|
||||
|
||||
// Uniforms
|
||||
@group(0) @binding(1) var<uniform> layoutInfo: LayoutInfo;
|
||||
|
||||
// Storage buffers
|
||||
@group(0) @binding(0) var<storage, read> shapes: array<Shape>;
|
||||
@group(0) @binding(2) var<uniform> scrollOffset: ScrollOffset;
|
||||
|
||||
@vertex fn vs(
|
||||
vert: Vertex,
|
||||
@builtin(instance_index) instanceIndex: u32,
|
||||
@builtin(vertex_index) vertexIndex : u32
|
||||
) -> VSOutput {
|
||||
let shape = shapes[instanceIndex];
|
||||
|
||||
var vsOut: VSOutput;
|
||||
vsOut.position = vec4f(
|
||||
(
|
||||
// Top left corner
|
||||
vec2f(-1, 1) +
|
||||
// Convert pixel position to clipspace
|
||||
vec2f( 2, -2) / layoutInfo.canvasDims *
|
||||
// Shape position and size
|
||||
(layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size)
|
||||
),
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
vsOut.color = shape.color;
|
||||
return vsOut;
|
||||
}
|
||||
|
||||
@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f {
|
||||
return vsOut.color;
|
||||
}
|
||||
`;class R4 extends ma{constructor(e,t,i,n,s,r){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new l.MutableDisposable),this._initialized=!1,this._shapeCollection=this._register(E4([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(r)}async _initWebgpu(e){if(this._device=await e,this._store.isDisposed)return;const t=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{const a=new Float32Array(6),c=(h=this._canvas.width,d=this._canvas.height)=>(a[0]=h,a[1]=d,a[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*Le().devicePixelRatio),a[3]=0,a[4]=a[0]-a[2],a[5]=a[1]-a[3],a);i=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>c())).object,this._register(_T(this._canvas,Le(),(h,d)=>{this._device.queue.writeBuffer(i,0,c(h,d))}))}const n=2;this._scrollOffsetBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:n*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(n);const s=()=>Mi.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=s(),this._register(l.Event.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=s(),this._pipeline&&this._updateBindGroup(this._pipeline,i)})),this._vertexBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:Ea.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Ea)).object;const r=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:N4});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:r,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:r,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,i),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,r,a,c){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:r,blue:a,alpha:c})}onScrollChanged(e){if(this._device){const t=Le().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*t,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;const e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();const t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();const i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);const n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(Ea.length/2,this._shapeCollection.entryCount),i.end();const s=t.finish();this._device.queue.submit([s])}}class M4 extends l.Disposable{constructor(){super(),this._ruleCache=new Map,this._cssVariableCache=new Map,this._container=Q("div.monaco-decoration-css-rule-extractor"),this._dummyElement=Q("span"),this._container.appendChild(this._dummyElement),this._register(l.toDisposable(()=>this._container.remove()))}getStyleRules(e,t){const i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);const n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container)
Line truncated
|
||||
struct GlyphInfo {
|
||||
position: vec2f,
|
||||
size: vec2f,
|
||||
origin: vec2f,
|
||||
};
|
||||
|
||||
struct Vertex {
|
||||
@location(0) position: vec2f,
|
||||
};
|
||||
|
||||
struct Cell {
|
||||
position: vec2f,
|
||||
unused1: vec2f,
|
||||
glyphIndex: f32,
|
||||
textureIndex: f32
|
||||
};
|
||||
|
||||
struct LayoutInfo {
|
||||
canvasDims: vec2f,
|
||||
viewportOffset: vec2f,
|
||||
viewportDims: vec2f,
|
||||
}
|
||||
|
||||
struct ScrollOffset {
|
||||
offset: vec2f
|
||||
}
|
||||
|
||||
struct VSOutput {
|
||||
@builtin(position) position: vec4f,
|
||||
@location(1) layerIndex: f32,
|
||||
@location(0) texcoord: vec2f,
|
||||
};
|
||||
|
||||
// Uniforms
|
||||
@group(0) @binding(4) var<uniform> layoutInfo: LayoutInfo;
|
||||
@group(0) @binding(5) var<uniform> atlasDims: vec2f;
|
||||
@group(0) @binding(6) var<uniform> scrollOffset: ScrollOffset;
|
||||
|
||||
// Storage buffers
|
||||
@group(0) @binding(0) var<storage, read> glyphInfo: array<array<GlyphInfo, ${Hn.maximumGlyphCount}>, ${dr.maximumPageCount}>;
|
||||
@group(0) @binding(1) var<storage, read> cells: array<Cell>;
|
||||
|
||||
@vertex fn vs(
|
||||
vert: Vertex,
|
||||
@builtin(instance_index) instanceIndex: u32,
|
||||
@builtin(vertex_index) vertexIndex : u32
|
||||
) -> VSOutput {
|
||||
let cell = cells[instanceIndex];
|
||||
var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)];
|
||||
|
||||
var vsOut: VSOutput;
|
||||
// Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1
|
||||
vsOut.position = vec4f(
|
||||
// Make everything relative to top left instead of center
|
||||
vec2f(-1, 1) +
|
||||
((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size +
|
||||
((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) +
|
||||
((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) +
|
||||
(((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims),
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
|
||||
vsOut.layerIndex = cell.textureIndex;
|
||||
// Textures are flipped from natural direction on the y-axis, so flip it back
|
||||
vsOut.texcoord = vert.position;
|
||||
vsOut.texcoord = (
|
||||
// Glyph offset (0-1)
|
||||
(glyph.position / atlasDims) +
|
||||
// Glyph coordinate (0-1)
|
||||
(vsOut.texcoord * (glyph.size / atlasDims))
|
||||
);
|
||||
|
||||
return vsOut;
|
||||
}
|
||||
|
||||
@group(0) @binding(2) var ourSampler: sampler;
|
||||
@group(0) @binding(3) var ourTexture: texture_2d_array<f32>;
|
||||
|
||||
@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f {
|
||||
return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex));
|
||||
}
|
||||
`,Xs=class Xs extends ST{get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="viewport",this.wgsl=yT,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._lastViewportLineCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new l.Emitter),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity);const s=2;this._scrollOffsetBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:s*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(s)}_rebuildCellBuffer(e){this._cellBindBuffer?.destroy();const t=(Math.floor(e/32)+1)*32,i=t*Xs.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco full file cell buffer",size:i,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(i),new ArrayBuffer(i)],this._cellBindBufferLineCapacity=t,this._lastViewportLineCount=0,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){if(this._store.isDisposed)return!1;const t=Le().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._lastViewportLineCount=0}update(e,t){let i="",n,s=0,r=0,a=0,c=0,h=0,d=0,u,f=0,g=0,m=0,p=0,b,v,C,w,S,L,D,x,I=0,T=0,M;const O=Le().devicePixelRatio;let P;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacity<e.endLineNumber-e.startLineNumber+1&&this._rebuildCellBuffer(e.endLineNumber-e.startLineNumber+1);const k=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]);k.fill(0);const U=Xs.maxSupportedColumns*6;for(r=e.startLineNumber;r<=e.endLineNumber;r++)if(this._viewGpuContext.canRender(t,e,r)){D=e.getViewLineRenderingData(r),d=0,P=Xd(D,t),s=t.spaceWidth*O,c=(D.minColumn-1)*s,M=D.tokens,g=D.minColumn-1,m=0;for(let X=0,re=M.getCount();X<re;X++)if(m=M.getEndOffset(X),!(m<=g)){for(p=M.getMetadata(X),a=g;a<m&&!(a>Xs.maxSupportedColumns);a++){if(n=P.getSegmentAtIndex(a),n===void 0)continue;i=n,D.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),v=void 0,b=void 0,C=void 0,w=void 0,S=void 0,L=void 0;for(x of D.inlineDecorations){if(r<x.range.startLineNumber||r>x.range.endLineNumber||r===x.range.startLineNumber&&a<x.range.startColumn-1||r===x.range.endLineNumber&&a>=x.range.endColumn-1)continue;const ee=_.ViewGpuContext.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,x.inlineClassName);for(const Ee of ee)for(const Rt of Ee.style){const We=Ee.styleMap.get(Rt)?.toString()??"";switch(Rt){case"color":{const Ke=l.Color.Format.CSS.parse(We);if(!Ke)throw new l.BugIndicatingError("Invalid color format "+We);v=Ke.toNumber32Bit();break}case"font-weight":{B4(We)>=400?b=!0:b=!1;break}case"opacity":{C=z4(We);break}case"text-decoration":case"text-decoration-line":{We==="line-through"&&(w=!0);break}case"text-decoration-thickness":{const Ke=We.match(/^(\d+(?:\.\d+)?)px$/);Ke&&(S=parseFloat(Ke[1]));break}case"text-decoration-color":{let Ke=We;const Mt=We.match(/^var\((--[^,]+),\s*(?:initial|inherit)\)$/);Mt&&(Ke=_.ViewGpuContext.decorationCssRuleExtractor.resolveCssVariable(this._viewGpuContext.canvas.domNode,Mt[1]));const Ce=l.Color.Format.CSS.parse(Ke);Ce&&(L=Ce.toNumber32Bit());break}case"text-decoration-style":break;default:throw new l.BugIndicatingError("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(f=((r-1)*Xs.maxSupportedColumns+a)*6,k.fill(0,f,f+6),i===" "){const ee=a+d;d=Xe.nextRenderTabStop(a+d,D.tabSize),c+=s*(d-ee),d-=a+1}else c+=s;continue}const Y=_.ViewGpuContext.decorationStyleCache.getOrCreateEntry(v,b,C,w,S,L);u=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,p,Y,c),h=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*O+Math.floor((e.lineHeight*O-(u.fontBoundingBoxAscent+u.fontBoundingBoxDescent))/2)+u.fontBoundingBoxAscent),f=((r-e.startLineNumber)*Xs.maxSupportedColumns+a)*6,k[f+0]=Math.floor(c),k[f+1]=
Line truncated
|
||||
`,t+1),t===-1)break;e++}while(!0);return e}class G4{constructor(){this._textAreaEditContextMapping=new Map}register(e,t){return this._textAreaEditContextMapping.set(e,t),{dispose:()=>{this._textAreaEditContextMapping.delete(e)}}}}const j4=new G4;var q4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IT=function(o,e){return function(t,i){e(t,i,o)}};class Y4{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new l.Position(this.modelLineNumber,this.distanceToModelLineStart+1),i=new l.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const sw=di;let ow=class extends DT{constructor(e,t,i,n,s,r,a){super(t),this._keybindingService=r,this._instantiationService=a,this._primaryCursorPosition=new l.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._visibleRangeProvider=s,this._scrollLeft=0,this._scrollTop=0;const c=this._context.configuration.options,h=c.get(165);this._setAccessibilityOptions(c),this._contentLeft=h.contentLeft,this._contentWidth=h.contentWidth,this._contentHeight=h.height,this._fontInfo=c.get(59),this._emptySelectionClipboard=c.get(45),this._visibleTextArea=null,this._selections=[new l.Selection(1,1,1,1)],this._modelSelections=[new l.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=we(document.createElement("textarea")),Jn.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Sc}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:d}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${d*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",nw(c,this._keybindingService)),this.textArea.setAttribute("aria-required",c.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(c.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l.localize(69,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",c.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=we(document.createElement("div")),this.textAreaCover.setPosition("absolute"),i.appendChild(this.textArea),i.appendChild(this.textAreaCover);const u=new xT,f={context:this._context,getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const p=this._selections[0];if(l.isMacintosh&&p.isEmpty()){const v=p.getStartPosition();let C=this._getWordBeforePosition(v);if(C.length===0&&(C=this._getCharacterBeforePosition(v)),C.length>0)return new ci(C,C.length,C.length,l.Range.fromPositions(v),0)}if(l.isMacintosh&&!p.isEmpty()&&this._context.viewModel.getValueLengthInRange(p,0)<500){const v=this._context.viewModel.getValueInRange(p,0);return new ci(v,0,v.length,p,0)}if($r&&!p.isEmpty()){const v="vscode-placeholder";return new ci(v,0,v.length,null,void 0)}return ci.EMPTY}if(kD){const p=this._selections[0];if(p.isEmpty()){const b=p.getStartPosition(),[v,C]=this._getAndroidWordAtPosition(b);if(v.length>0)return new ci(v,C,C,l.Range.fromPositions(b),0)}return ci.EMPTY}const m=u.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0);return ci.fromScreenReaderContentState(m)},deduceModelPosition:(m,p,b)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(m,p,b)},g=this._register(new Q3(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(Dv,f,g,l.
Line truncated
|
||||
`),D=S.substring(L+1),x=D.lastIndexOf(" "),I=D.length-x-1,T=b.getStartPosition(),M=Math.min(T.column-1,I),O=T.column-1-M,P=D.substring(0,D.length-M),{tabSize:k}=this._context.viewModel.model.getOptions(),U=Z4(this.textArea.domNode.ownerDocument,P,this._fontInfo,k);return{distanceToModelLineStart:O,widthOfHiddenTextBefore:U}})(),{distanceToModelLineEnd:w}=(()=>{const S=p.value.substring(Math.max(p.selectionStart,p.selectionEnd)),L=S.indexOf(`
|
||||
`),D=L===-1?S:S.substring(0,L),x=D.indexOf(" "),I=x===-1?D.length:D.length-x-1,T=b.getEndPosition(),M=Math.min(this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column,I);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column-M}})();this._context.viewModel.revealRange("keyboard",!0,l.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Y4(this._context,b.startLineNumber,v,C,w),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Sc} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(m=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Sc}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Ss.onDidChange(()=>{this._ensureReadOnlyAttribute()})),this._register(j4.register(e,this))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=l.getMapForWordSeparators(t,[]);let s=!0,r=e.column,a=!0,c=e.column,h=0;for(;h<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const d=i.charCodeAt(r-2);n.get(d)!==0?s=!1:r--}if(a&&c>i.length&&(a=!1),a){const d=i.charCodeAt(c-1);n.get(d)!==0?a=!1:c++}h++}return[i.substring(r-1,c-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=l.getMapForWordSeparators(this._context.configuration.options.get(148),[]);let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!l.isHighSurrogate(i.charCodeAt(0)))return i}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Fi.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(165).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=sw?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",nw(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.remoLine truncated
|
||||
`;this.value=i}equals(e){return this.value===e.value}static get NULL(){const e={getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(t,i)=>t};return new Wd(e,[])}}class i5{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,i){const n=t*i,s=n+1,r=Math.min(n+i,e.getLineCount());return new t5(s,r)}fromEditorSelection(e,t,i){const n=this._getPageOfLine(t.startLineNumber,i),s=this._getRangeForPage(e,n,i),r=this._getPageOfLine(t.endLineNumber,i),a=this._getRangeForPage(e,r,i),c=[{startLine:s.startLine,endLine:s.endLine}];return n+1<r&&c.push({startLine:a.startLine,endLine:a.endLine}),new Wd(e,c)}}var n5=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s5=function(o,e){return function(t,i){e(t,i,o)}};let cw=class extends l.Disposable{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new l.MutableDisposable),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new xT,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=this._domNode.domNode,i=Le().document.activeElement;if(!i||i!==t)return;if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);const s=Le().document.getSelection();if(!s)return;const r=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!r)return;this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;const t=this._context.viewModel.viewLayout,i=this._state.startPositionWithinEditor.lineNumber,n=t.getVerticalOffsetForLineNumber(i),s=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=s-n}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return R(this._domNode.domNode.ownerDocument,"selectionchange",()=>{const t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!Ss.enabled||!(Le().document.activeElement===this._domNode.domNode))return;const s=Le().document.getSelection();if(!s||s.rangeCount===0)return;const a=s.getRangeAt(0),c=Date.now(),h=c-e;if(e=c,h<5)return;const d=c-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,!(d<100)&&this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,s.direction,a))})}_getScreenReaderContentState(e){const t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,this._accessibilityService.getAccessibilitySupport()===0),i=this._context.viewModel.model.getPositionAt(1/0);let n=t.value;return i.column===1&&e.getEndPosition().equals(i)&&(n+=`
|
||||
`),t.value=n,t}_getScreenReaderRange(e,t){const i=this._domNode.domNode.firstChild;if(!i)return;const n=new globalThis.Range;return n.setStart(i,e),n.setEnd(i,t),{anchorNode:i,anchorOffset:e,focusNode:i,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,i,n){const s=e.viewModel,r=s.model,c=s.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),h=r.getOffsetAt(c);let d=n.startOffset+h,u=n.endOffset+h;if(r.getEndOfLineSequence()===1){const v=t.value,C=new l.PositionOffsetTransformer(v),w=C.getPosition(n.startOffset),S=C.getPosition(n.endOffset);d+=w.lineNumber-1,u+=S.lineNumber-1}const g=r.getPositionAt(d),m=r.getPositionAt(u),p=i==="forward"?g:m,b=i==="forward"?m:g;return l.Selection.fromPositions(p,b)}};cw=n5([s5(3,Ui)],cw);var o5=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},TT=function(o,e){return function(t,i){e(t,i,o)}};let hw=class extends l.Disposable{constructor(e,t,i,n,s){super(),this._domNode=e,this._context=t,this._viewController=i,this._keybindingService=n,this._accessibilityService=s,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new l.Selection(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new l.MutableDisposable),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){this._state.value?.onWillPaste()}onWillCut(){this._state.value?.onWillCut()}handleFocusChange(e){this._state.value?.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){const e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new lw(this._domNode,this._context,this._viewController,this._accessibilityService):new cw(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){const e=this._context.configuration.options,t=e.get(165),i=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(i*this._fontInfo.typicalHalfwidthCharacterWidth),this._state.value?.onConfigurationChanged(e)}_updateDomAttributes(){const e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",l.localize(64,"editor")),this._domNode.domNode.setAttribute("aria-label",nw(e,this._keybindingService));const t=this._context.viewModel.model.getOptions().tabSize,i=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*i}px`;const n=e.get(154),s=n==="inherit"?e.get(153):n,r=s==="inherit"?e.get(149):s;this._domNode.domNode.style.textWrap=r==="off"?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new l.Selection(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._context.viewLayout.getCurrentScrollLeft(),i=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(i<this._contentLeft||i>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getCurrentScrollTop(),s=this._primarySelection.positionLineNumber,r=this._context.viewLayout.getVerticalOffsetForLineNumber(s)-n;if(r<0||r>this._contentHeight){this._renderAtTopLeft();return}const a=this._context.viewLayout.getLineHeightForLineNumber(s);this._doRender(r,this._contentLeft,this._divWidth,a),this._state.value?.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,i,n){Ot(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(i),this._domNode.setHeight(n),this._domNode.setLineHeight(n)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete",
Line truncated
|
||||
`,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register(R(this.domNode.domNode,"paste",u=>{this.logService.trace("NativeEditContext#paste");const f=LI(u);if(this._onWillPaste.fire(f),f.isHandled){u.preventDefault();return}if(u.preventDefault(),!u.clipboardData||(this.logService.trace("NativeEditContext#paste with id : ",f.metadata?.id," with text.length: ",f.text.length),!f.text))return;let g=!1,m=null,p=null;f.metadata&&(g=this._context.configuration.options.get(45)&&!!f.metadata.isFromEmptySelection,m=typeof f.metadata.multicursorText<"u"?f.metadata.multicursorText:null,p=f.metadata.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(f.text,g,m,p)})),this._register(Jd(this._editContext,"textformatupdate",u=>this._handleTextFormatUpdate(u))),this._register(Jd(this._editContext,"characterboundsupdate",u=>this._updateCharacterBounds(u)));let h;this._register(Jd(this._editContext,"textupdate",u=>{_n.onInput();const f=u.text;if(f.length===1){const g=f.charCodeAt(0);if(l.isHighSurrogate(g)){h=f;return}if(l.isLowSurrogate(g)&&h){const m={text:h+f,selectionEnd:u.selectionEnd,selectionStart:u.selectionStart,updateRangeStart:u.updateRangeStart-1,updateRangeEnd:u.updateRangeEnd-1};h=void 0,this._emitTypeEvent(this._viewController,m);return}}this._emitTypeEvent(this._viewController,u)})),this._register(Jd(this._editContext,"compositionstart",u=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(Jd(this._editContext,"compositionend",u=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let d=!1;this._register(Ss.onDidChange(()=>{Ss.enabled&&d&&(this._focusTracker.resume(),this.domNode.focus(),d=!1),!Ss.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),d=!0)})),this._register(NT.register(e,this)),this._register(t.viewModel.model.onDidChangeContent(u=>{let f=!1;for(const g of u.changes)if(g.range.startLineNumber<=this._editContextPrimarySelection.endLineNumber&&g.range.endLineNumber>=this._editContextPrimarySelection.startLineNumber){f=!0;break}f&&this._updateEditContext()}))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}onBeforeRender(e){this._parentBounds=this._parent.getBoundingClientRect()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBoundsData(e)}render(e){this._screenReaderSupport.render(e),this._updateSelectionAndControlBounds()}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new l.Selection(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}handleWillPaste(){this.logService.trace("NativeEditContext#handleWillPaste"),this._prepareScreenReaderForPaste()}_prepareScreenReaderForPaste(){this._screenReaderSupport.onWillPaste()}handleWillCopy(){this.logService.trace("NativeEditContext#handleWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===wt())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){const e=j(this.domNode.domNode),t=td(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){_n.onKeyUp(),this._viewController.emitKeyUp(new Be(e))}_onKeyDown(e){_n.onKeyDown();const t=new Be(e);t.keyCode===114&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){const e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){const e=this._getNewEditContextState();if(!e)return;const t=e.text??" ";t!==this._previousEditContextText&&(this._editContext.updateText(0,this._previousEditContextText.length,t),this._previousEditContextText=t),(e.selectionStartOffset!==this._previousEditContextSelection.start||e.selectionEndOffset!==this._previousEditContextSelection.endExclusive)&&this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new l.OffsetRange(e.s
Line truncated
|
||||
`,"gi"):null,s=[];let r,a=0,c=0,h=0,d=0;const u=[];for(let m=0;m<60;m++)u.push(new gr(ht(0,m),0,-1,Ki.getEmpty(),new Oa(ht(0,m))));const f=[];for(let m=0;m<60;m++)f.push(new gr(ht(1,m),0,-1,Ki.getEmpty(),new Oa(ht(1,m))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const m=r.index,p=r[0];if(p===`
|
||||
`)a++,c=m+1;else{if(h!==m){let b;if(d===a){const v=m-h;if(v<u.length)b=u[v];else{const C=ht(0,v);b=new gr(C,0,-1,Ki.getEmpty(),new Oa(C))}}else{const v=a-d,C=m-c;if(v===1&&C<f.length)b=f[C];else{const w=ht(v,C);b=new gr(w,0,-1,Ki.getEmpty(),new Oa(w))}}s.push(b)}s.push(t.getToken(p)),h=m+p.length,d=a}}const g=e.length;if(h!==g){const m=d===a?ht(0,g-h):ht(a-d,g-c);s.push(new gr(m,0,-1,Ki.getEmpty(),new Oa(m)))}this.length=ht(a,g-c),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new l.NotSupportedError}}class yw{static createFromLanguage(e,t){function i(s){return t.getKey(`${s.languageId}:::${s.bracketText}`)}const n=new Map;for(const s of e.bracketsNew.openingBrackets){const r=ht(0,s.bracketText.length),a=i(s),c=Ki.getEmpty().add(a,QT);n.set(s.bracketText,new gr(r,1,a,c,Tm.create(r,s,c)))}for(const s of e.bracketsNew.closingBrackets){const r=ht(0,s.bracketText.length);let a=Ki.getEmpty();const c=s.getOpeningBrackets();for(const h of c)a=a.add(i(h),QT);n.set(s.bracketText,new gr(r,2,i(c[0]),a,Tm.create(r,s,a)))}return new yw(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>z5(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function z5(o){let e=l.escapeRegExpCharacters(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class WT{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=yw.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function V5(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e<o.length&&o[e].listHeight===a;)e++;return e-r>=2?HT(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())e1(i,n)<=e1(n,r)?(i=Lw(i,n),n=r):n=Lw(n,r);return Lw(i,n)}function HT(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;o[n]=ys.create23(o[s],o[s+1],s+3===t?o[s+2]:null,e)}t=i}return ys.create23(o[0],o[1],t>=3?o[2]:null,e)}function e1(o,e){return Math.abs(o.listHeight-e.listHeight)}function Lw(o,e){return o.listHeight===e.listHeight?ys.create23(o,e,null,!1):o.listHeight>e.listHeight?U5(o,e):$5(e,o)}function U5(o,e){o=o.toMutable();let t=o;const i=[];let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=ys.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?ys.create23(o,n,null,!1):o}function $5(o,e){o=o.toMutable();let t=o;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=ys.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?ys.create23(n,o,null,!1):o}class K5{constructor(e){this.lastOffset=bi,this.nextNodes=[e],this.offsets=[bi],this.idxs=[]}readLongestNodeAt(e,t){if(xc(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=ru(this.nextNodes);if(!i)return;const n=ru(this.offsets);if(xc(e,n))return;if(xc(n,e))if(gt(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=Dw(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=Dw(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=ru(this.offsets),t=ru(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=ru(this.nextNodes),n=Dw(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(gt(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function Dw(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function ru(o){return o.length>0?o[o.length-1]:void 0}function xw(o,e,t,i){return new G5(o,e,
Line truncated
|
||||
`?0:1}function bo(o){return o?o instanceof o1||o instanceof J5:!1}class Rw{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);bo(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);bo(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(bo(i)&&i.canAppend(this._model))return i;const n=new o1(l.localize(820,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Nw(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=$i.unknown({name:"pushEditOperation"})){const r=this._getOrCreateEditStackElement(e,n),a=this._model.applyEdits(t,!0,s),c=Rw._computeCursorState(i,a),h=a.map((d,u)=>({index:u,textChange:d.textChange}));return h.sort((d,u)=>d.textChange.oldPosition===u.textChange.oldPosition?d.index-u.index:d.textChange.oldPosition-u.textChange.oldPosition),r.append(this._model,h.map(d=>d.textChange),Nw(this._model),this._model.getAlternativeVersionId(),c),c}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return l.onUnexpectedError(i),null}}}class W5{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function H5(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){const f=o.charCodeAt(s),g=t.charCodeAt(s);if(f!==g)break}let r=0,a=0;for(let f=s;f<e;f++)o.charCodeAt(f)===32?r++:a++;let c=0,h=0;for(let f=s;f<i;f++)t.charCodeAt(f)===32?c++:h++;if(r>0&&a>0||c>0&&h>0)return;const d=Math.abs(a-h),u=Math.abs(r-c);if(d===0){n.spacesDiff=u,u>0&&0<=c-1&&c-1<o.length&&c<t.length&&t.charCodeAt(c)!==32&&o.charCodeAt(c-1)===32&&o.charCodeAt(o.length-1)===44&&(n.looksLikeAlignment=!0);return}if(u%d===0){n.spacesDiff=u/d;return}}function r1(o,e,t){const i=Math.min(o.getLineCount(),1e4);let n=0,s=0,r="",a=0;const c=[2,4,6,8,3,5,7],h=8,d=[0,0,0,0,0,0,0,0,0],u=new W5;for(let m=1;m<=i;m++){const p=o.getLineLength(m),b=o.getLineContent(m),v=p<=65536;let C=!1,w=0,S=0,L=0;for(let x=0,I=p;x<I;x++){const T=v?b.charCodeAt(x):o.getLineCharCode(m,x);if(T===9)L++;else if(T===32)S++;else{C=!0,w=x;break}}if(!C||(L>0?n++:S>1&&s++,H5(r,a,b,w,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;const D=u.spacesDiff;D<=h&&d[D]++,r=b,a=w}let f=t;n!==s&&(f=n<s);let g=e;if(f){let m=0;c.forEach(p=>{const b=d[p];b>m&&(m=b,g=p)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]*2/3&&(g=2)}return{insertSpaces:f,tabSize:g}}function Oi(o){return(o.metadata&1)>>>0}function qe(o,e){o.metadata=o.metadata&254|e<<0}function jt(o){return(o.metadata&2)>>>1===1}function Ue(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function a1(o){return(o.metadata&4)>>>2===1}function l1(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function c1(o){return(o.metadata&64)>>>6===1}function h1(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function d1(o){return(o.metadata&128)>>>7===1}function u1(o,e){o.metadata=o.metadata&127|(e?1:0)<<7}function eK(o){return(o.metadata&24)>>>3}function f1(o,e){o.metadata=o.metadata&231|e<<3}function tK(o){return(o.metadata&32)>>>5===1}function g1(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class m1{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,qe(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,l1(this,!1),h1(this,!1),f1(this,1),g1(this,!1),u1(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Ue(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;l1(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),h1(this,this.options.glyphMarginClassName!==null),f1(this,this.options.stickiness),g1(this,this.options.collapseOnReplaceEdit),u1(this,this.options.affectsFont??!1)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const ue=new m1(null,0,0);ue.parent=ue,ue.left=ue,ue.right=ue,qe(ue,0);class Mw{constructor(){this.root=ue,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r,a){return this.root===ue?[]:cK(this,e,t,i,n,s,r,a)}search(e,t,i,n,s){return this.root===ue?[]:lK(this,e,t,i,n,s)}collectNodesFromOwner(e){return rK(this,e)}collectNodesPostOrder(){return aK(this)}insert(e){p1(this,e),this._normalizeDeltaIfNecessary()}delete(e){_1(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptRep
Line truncated
|
||||
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const p=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,p),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,h);else this.deleteNodeTail(n,h);const f=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let g=n;for(let m=0;m<f.length;m++)g=this.rbInsertRight(g,f[m]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{const n=this.createNewPieces(t);let s=this.rbInsertLeft(null,n[0]);for(let r=1;r<n.length;r++)s=this.rbInsertRight(s,n[r])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===ie)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,r=n.node;if(s===r){const f=this.positionInBuffer(s,i.remainder),g=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){const m=s.next();Am(this,s),this.validateCRLFWithPrevNode(m),this.computeBufferMetadata();return}this.deleteNodeHead(s,g),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,f),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,f,g),this.computeBufferMetadata();return}const a=[],c=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,c),this._searchCache.validate(e),s.piece.length===0&&a.push(s);const h=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,h),r.piece.length===0&&a.push(r);const d=s.next();for(let f=d;f!==ie&&f!==r;f=f.next())a.push(f);const u=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(u),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const r=t.piece,a={line:r.start.line+1,column:0},c=new Gi(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),r.length-1);t.piece=c,e+=`
|
||||
`,Co(this,t,-1,-1),t.piece.length===0&&i.push(t)}const n=this.createNewPieces(e);let s=this.rbInsertLeft(t,n[n.length-1]);for(let r=n.length-2;r>=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
|
||||
`);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r<i.length;r++)s=this.rbInsertRight(s,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,s=e.piece.bufferIndex,r=this._buffers[s].lineStarts,c=r[n.start.line]+n.start.column+t;let h=n.start.line,d=n.end.line,u=0,f=0,g=0;for(;h<=d&&(u=h+(d-h)/2|0,g=r[u],u!==d);)if(f=r[u+1],c<g)d=u-1;else if(c>=f)h=u+1;else break;return i?(i.line=u,i.column=c-g,null):{line:u,column:c-g}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)Am(this,e[t])}createNewPieces(e){if(e.length>vo){const d=[];for(;e.length>vo;){const f=e.charCodeAt(vo-1);let g;f===13||f>=55296&&f<=56319?(g=e.substring(0,vo-1),e=e.substring(vo-1)):(g=e.substring(0,vo),e=e.substring(vo));const m=wo(g);d.push(new Gi(this._buffers.length,{line:0,column:0},{line:m.length-1,column:g.length-m[m.length-1]},m.length-1,g.length)),this._buffers.push(new Pa(g,m))}const u=wo(e);return d.push(new Gi(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new Pa(e,u)),d}let t=this._buffers[0].buffer.length;const i=wo(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d<i.length;d++)i[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<i.length;d++)i[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[r],c={line:r,column:a},h=new Gi(0,n,c,this.getLineFeedCnt(0,n,c),s-t);return this._lastChangeBufferPos=c,[h]}getLineRawContent(e,t=0){let i=this.root,n="";const s=this._searchCache.get2(e);if(s){i=s.node;const r=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(c+r,c+i.piece.length);else{const h=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(c+r,c+h-t)}}else{let r=0;const a=e;for(;i!==ie;)if(i.left!==ie&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const c=this.getAccumulatedValue(i,e-i.lf_left-2),h=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(u+c,u+h-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const c=this.getAccumulatedValue(i,e-i.lf_left-2),h=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=h.substring(d+c,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==ie;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(c,c+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==ie;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),c=this.getLineFeedCnt(i.bufferIndex,i.start,r),h=c-n,d=a-s,u=i.length+d;e.piece=new Gi(i.bufferIndex,i.start,r,c,u),Co(this,e,d,h)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,
Line truncated
|
||||
`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=wo(t,!1);for(let g=0;g<s.length;g++)s[g]+=n;if(i){const g=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-g}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const r=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],c={line:r,column:a},h=e.piece.length+t.length,d=e.piece.lineFeedCnt,u=this.getLineFeedCnt(0,e.piece.start,c),f=u-d;e.piece=new Gi(e.piece.bufferIndex,e.piece.start,c,u,h),this._lastChangeBufferPos=c,Co(this,e,t.length,f)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==ie;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==ie;)if(i.left!==ie&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==ie;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
||||
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===ie||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===ie||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Gi(e.piece.bufferIndex,e.piece.start,s,a,r),Co(this,e,-1,-1),e.piece.length===0&&i.push(e);const c={line:t.piece.start.line+1,column:0},h=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,c,t.piece.end);t.piece=new Gi(t.piece.bufferIndex,c,t.piece.end,d,h),Co(this,t,-1,-1),t.piece.length===0&&i.push(t);const u=this.createNewPieces(`\r
|
||||
`);this.rbInsertRight(e,u[0]);for(let f=0;f<i.length;f++)Am(this,i[f])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+=`
|
||||
`,i.piece.length===1)Am(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},r=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new Gi(n.bufferIndex,s,n.end,a,r),Co(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===ie)return t(ie);const i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===ie)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),s=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,s)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new Ow(t,1);if(i.left=ie,i.right=ie,i.parent=ie,i.size_left=0,i.lf_left=0,this.root===ie)this.root=i,i.color=0;else if(e.right===ie)e.right=i,i.parent=e;else{const s=Pw(e.right);s.left=i,i.parent=s}return v1(this,i),i}rbInsertLeft(e,t){const i=new Ow(t,1);if(i.left=ie,i.right=ie,i.parent=ie,i.size_left=0,i.lf_left=0,this.root===ie)this.root=i,i.color=0;else if(e.left===ie)e.left=i,i.parent=e;else{const n=C1(e.left);n.right=i,i.parent=n}return v1(this,i),i}}class Rc extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this._onDidChangeContent=this._register(new l.Emitter),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new _K(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),s=this.getPositionAt(i);return new l.Range(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);let s=0;const r=this._getEndOfLine(t),a=this.getEOL();if(r.length!==a.length){const c=r.length-a.length,h=e.endLineNumber-e.startLineNumber;s=c*h}return n-i+s}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let r=n;r<=s;r++){const a=this.getLineContent(r),c=r===n?e.startColumn-1:0,h=r===s?e.endColumn-1:a.length;for(let d=c;d<h;d++)l.isHighSurrogate(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getNearestChunk(e){return this._pieceTree.getNearestChunk(e)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=l.firstNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=l.lastNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return`
|
||||
`;case 2:return`\r
|
||||
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,a=!0,c=[];for(let p=0;p<e.length;p++){const b=e[p];a&&b._isTracked&&(a=!1);const v=b.range;if(b.text){let D=!0;r||(D=!l.isBasicASCII(b.text),r=D),!n&&D&&(n=l.containsRTL(b.text)),!s&&D&&(s=l.containsUnusualLineTerminators(b.text))}let C="",w=0,S=0,L=0;if(b.text){let D;[w,S,L,D]=fr(b.text);const x=this.getEOL();D===0||D===(x===`\r
|
||||
`?2:1)?C=b.text:C=b.text.replace(/\r\n|\r|\n/g,x)}c[p]={sortIndex:p,identifier:b.identifier||null,range:v,rangeOffset:this.getOffsetAt(v.startLineNumber,v.startColumn),rangeLength:this.getValueLengthInRange(v),text:C,eolCount:w,firstLineLength:S,lastLineLength:L,forceMoveMarkers:!!b.forceMoveMarkers,isAutoWhitespaceEdit:b.isAutoWhitespaceEdit||!1}}c.sort(Rc._sortOpsAscending);let h=!1;for(let p=0,b=c.length-1;p<b;p++){const v=c[p].range.getEndPosition(),C=c[p+1].range.getStartPosition();if(C.isBeforeOrEqual(v)){if(C.isBefore(v))throw new Error("Overlapping ranges are not allowed!");h=!0}}a&&(c=this._reduceOperations(c));const d=i||t?Rc._getInverseEditRanges(c):[],u=[];if(t)for(let p=0;p<c.length;p++){const b=c[p],v=d[p];if(b.isAutoWhitespaceEdit&&b.range.isEmpty())for(let C=v.startLineNumber;C<=v.endLineNumber;C++){let w="";C===v.startLineNumber&&(w=this.getLineContent(b.range.startLineNumber),l.firstNonWhitespaceIndex(w)!==-1)||u.push({lineNumber:C,oldContent:w})}}let f=null;if(i){let p=0;f=[];for(let b=0;b<c.length;b++){const v=c[b],C=d[b],w=this.getValueInRange(v.range),S=v.rangeOffset+p;p+=v.text.length-w.length,f[b]={sortIndex:v.sortIndex,identifier:v.identifier,range:C,text:w,textChange:new Gt(v.rangeOffset,w,S,v.text)}}h||f.sort((b,v)=>b.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(c);let m=null;if(t&&u.length>0){u.sort((p,b)=>b.lineNumber-p.lineNumber),m=[];for(let p=0,b=u.length;p<b;p++){const v=u[p].lineNumber;if(p>0&&u[p-1].lineNumber===v)continue;const C=u[p].oldContent,w=this.getLineContent(v);w.length===0||w===C||l.firstNonWhitespaceIndex(w)!==-1||m.push(v)}}return this._onDidChangeContent.fire(),new l.ApplyEditsResult(f,g,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new l.Range(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const c=[];for(let g=0,m=e.length;g<m;g++){const p=e[g],b=p.range;t=t||p.forceMoveMarkers,c.push(this.getValueInRange(new l.Range(r,a,b.startLineNumber,b.startColumn))),p.text.length>0&&c.push(p.text),r=b.endLineNumber,a=b.endColumn}const h=c.join(""),[d,u,f]=fr(h);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:h,eolCount:d,firstLineLength:u,lastLineLength:f,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Rc._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],s=n.range.startLineNumber,r=n.range.startColumn,a=n.range.endLineNumber,c=n.range.endColumn;if(s===a&&r===c&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const h=new l.Range(s,r,a,c);t.push({range:h,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,s=null;for(let r=0,a=e.length;r<a;r++){const c=e[r];let h,d;s?s.range.endLineNumber===c.range.startLineNumber?(h=i,d=n+(c.range.startColumn-s.range.endColumn)):(h=i+(c.range.startLineNumber-s.range.endLineNumber),d=c.range.startColumn):(h=c.range.startLineNumber,d=c.range.startColumn);let u;if(c.text.length>0){const f=c.eolCount+1;f===1?u=new l.Range(h,d,h,d+c.firstLineLength):u=new l.Range(h,d,h+f-1,c.lastLineLength+1)}else u=new l.Range(h,d,h,d);i=u.endLineNumber,n=u.endColumn,t.push(u),s=c}return t}static _sortOpsAscending(e,t){const i=l.Range.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=l.Range.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class bK{constructor(e,t,i,n,s,r,a,c,h){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=c,this._normalizeEOL=h}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?`
|
||||
`:`\r
|
||||
`:i>t/2?`\r
|
||||
`:`
|
||||
`}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r
|
||||
`&&(this._cr>0||this._lf>0)||t===`
|
||||
`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s<r;s++){const a=i[s].buffer.replace(/\r\n|\r|\n/g,t),c=wo(a);i[s]=new Pa(a,c)}const n=new Rc(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class S1{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&l.startsWithUTF8BOM(e)&&(this.BOM=l.UTF8_BOM_CHARACTER,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=gK(this._tmpLineStarts,e);this.chunks.push(new Pa(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.containsRTL(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.containsUnusualLineTerminators(e)))}finish(e=!0){return this._finish(),new bK(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=wo(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class CK{constructor(){this._onDidChangeVisibleRanges=new l.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set,this._viewsChanged=qr(this),this.visibleLineRanges=fn({owner:this,equalsFn:Zh(Qb())},e=>(this._viewsChanged.read(e),l.LineRange.joinMany([...this._views].map(i=>i.state.read(e)?.visibleLineRanges??[]))))}attachView(){const e=new wK(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),this._viewsChanged.trigger(void 0),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0}),this._viewsChanged.trigger(void 0)}dispose(){this._onDidChangeVisibleRanges.dispose()}}class vK{constructor(e,t){this.visibleLineRanges=e,this.stabilized=t}equals(e){return this===e?!0:!(!l.equals(this.visibleLineRanges,e.visibleLineRanges,(t,i)=>t.equals(i))||this.stabilized!==e.stabilized)}}class wK{get state(){return this._state}constructor(e){this.handleStateChange=e,this._state=Wh({owner:this,equalsFn:Gr((t,i)=>t.equals(i))},void 0)}setVisibleLines(e,t){const i=e.map(s=>new l.LineRange(s.startLineNumber,s.endLineNumber+1)),n=new vK(i,t);this._state.set(n,void 0,void 0),this.handleStateChange(n)}}class SK extends l.Disposable{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new l.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){l.equals(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class y1 extends l.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t){super(),this._languageIdCodec=e,this._textModel=t,this._onDidChangeTokens=this._register(new l.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeFontTokens=this._register(new l.Emitter),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class uu{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i,n){this.ownerId=e,this.decorationId=t,this.lineNumber=i,this.lineHeight=n}}class fu{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i){this.ownerId=e,this.decorationId=t,this.lineNumber=i}}class yK{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function LK(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i<n;i++){const s=o[i];let r=-1;if(typeof s.fontStyle=="string"){r=0;const h=s.fontStyle.split(" ");for(let d=0,u=h.length;d<u;d++)switch(h[d]){case"italic":r=r|1;break;case"bold":r=r|2;break;case"underline":r=r|4;break;case"strikethrough":r=r|8;break}}let a=null;typeof s.foreground=="string"&&(a=s.foreground);let c=null;typeof s.background=="string"&&(c=s.background),e[t++]=new yK(s.token||"",i,r,a,c)}return e}function DK(o,e
Line truncated
|
||||
`)}function MK(o,e){const t=AK(o);return D1(`font-decoration-${t}-${e}`)}function AK(o){const e=o.toLowerCase().trim();return e?D1(e):"default"}function D1(o){return o.replace(/[^a-z0-9_-]/gi,"-")}class OK{constructor(e=[]){this._annotations=[],this._annotations=e}setAnnotations(e){for(const t of e.annotations){const i=this._getStartIndexOfIntersectingAnnotation(t.range.start),n=this._getEndIndexOfIntersectingAnnotation(t.range.endExclusive);t.annotation!==void 0?this._annotations.splice(i,n-i,{range:t.range,annotation:t.annotation}):this._annotations.splice(i,n-i)}}getAnnotationsIntersecting(e){const t=this._getStartIndexOfIntersectingAnnotation(e.start),i=this._getEndIndexOfIntersectingAnnotation(e.endExclusive);return this._annotations.slice(t,i)}_getStartIndexOfIntersectingAnnotation(e){const t=l.binarySearch2(this._annotations.length,n=>this._annotations[n].range.start-e);let i;if(t>=0){i=t;const n=this._annotations[i]?.range;n&&n.endExclusive===e&&i--}else{const n=this._annotations[-(t+2)]?.range;n&&e>=n.start&&e<n.endExclusive?i=-(t+2):i=-(t+1)}return i}_getEndIndexOfIntersectingAnnotation(e){const t=l.binarySearch2(this._annotations.length,n=>this._annotations[n].range.endExclusive-e);let i;if(t>=0){i=t+1;const n=this._annotations[i]?.range;n&&n.start===e&&i++}else{const n=this._annotations[-(t+1)]?.range;n&&e>=n.start&&e<=n.endExclusive?i=-t:i=-(t+1)}return i}applyEdit(e){const t=this._annotations.slice(),i=[],n=[];let s=0;for(const r of e.replacements){for(;;){const c=t[0];if(!c)break;const h=c.range;if(h.endExclusive>=r.replaceRange.start)break;t.shift();const d={range:h.delta(s),annotation:c.annotation};d.range.isEmpty?n.push(d):i.push(d)}const a=[];for(;;){const c=t[0];if(!c||!c.range.intersectsOrTouches(r.replaceRange))break;t.shift(),a.push(c)}for(let c=a.length-1;c>=0;c--){const h=a[c];let d=h.range;const u=c===0&&r.replaceRange.endExclusive>d.start&&r.replaceRange.start<d.endExclusive,f=d.intersect(r.replaceRange).length;d=d.deltaEnd(-f+(u?r.newText.length:0));const g=d.start-r.replaceRange.start;g>0&&(d=d.delta(-g)),!u&&g>=0&&(d=d.delta(r.newText.length)),d=d.delta(-(r.newText.length-r.replaceRange.length)),t.unshift({annotation:h.annotation,range:d})}s+=r.newText.length-r.replaceRange.length}for(;;){const r=t[0];if(!r)break;t.shift();const a={annotation:r.annotation,range:r.range.delta(s)};a.range.isEmpty?n.push(a):i.push(a)}return this._annotations=i,n}}class Uw{static create(e){return new Uw(e)}constructor(e){this._annotations=e}get annotations(){return this._annotations}}function x1(o){const e=o.map(i=>new l.StringReplacement(l.OffsetRange.ofStartAndLength(i.rangeOffset,i.rangeLength),i.text));return e.reverse(),new l.StringEdit(e)}const Cf=class Cf extends l.Disposable{constructor(e,t){super(),this.textModel=e,this.tokenizationTextModelPart=t,this._onDidChangeLineHeight=this._register(new l.Emitter),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new l.Emitter),this.onDidChangeFont=this._onDidChangeFont.event,this._fontAnnotatedString=new OK,this._register(this.tokenizationTextModelPart.onDidChangeFontTokens(i=>{const n=new Set,s=[],r=new Set,a=new Set;for(const c of i.changes.annotations){const d=this.textModel.getPositionAt(c.range.start).lineNumber;let u;if(c.annotation===void 0)u={range:c.range,annotation:void 0};else{const f=`tokenization-font-decoration-${Cf.DECORATION_COUNT}`,g={fontToken:c.annotation,decorationId:f};u={range:c.range,annotation:g},Cf.DECORATION_COUNT++,c.annotation.lineHeightMultiplier&&r.add(new uu(0,f,d,c.annotation.lineHeightMultiplier)),a.add(new fu(0,f,d))}if(s.push(u),!n.has(d)){const f=this.textModel.getOffsetAt(new l.Position(d,1)),g=this.textModel.getOffsetAt(new l.Position(d,this.textModel.getLineMaxColumn(d))),m=new l.OffsetRange(f,g),p=this._fontAnnotatedString.getAnnotationsIntersecting(m);for(const b of p){const v=b.annotation.decorationId;r.add(new uu(0,v,d,null)),a.add(new fu(0,v,d))}n.add(d)}}this._fontAnnotatedString.setAnnotations(Uw.create(s)),this._onDidChangeLineHeight.fire(r),this._onDidChangeFont.fire(a)}))}handleDidChangeContent(e){const t=x1(e.changes),i=this._fontAnnotatedString.applyEdit(t);if(i.length===0)return;const n=new Set,s=new Set;for(const r of i){const c=this.textModel.getPositionAt(r.range.start).lineNumber,h=r.annotation.decorationId;n.add(new uu(0,h,c,null)),s.add(new fu(0,h,c))}this._onDidChangeLineHeight.fire(n),this._onDidChangeFont.fire(s)}getDecorationsInRange(e,t,i,n,s){const r=this.textModel.getOffsetAt(e.getStartPosition()),a=this.textModel.getOffsetAt(e.getEndPosition()),c=this._fontAnnotatedString.getAnnotationsIntersecting(new l.OffsetRange(r,a)),h=[];for(const d of c){const u=d.annotation,f=!!(u.fontToken.fontFamily||u.fontToken.fontSizeMultiplier);if(!(f&&n)){const g=this.textModel.getPositionAt(d.range.start),m=this.textModel.getPositionAt(d.range.endExclusive),p=l.Range.fromPositions(g,m),b=d.annotation,v=MK(b.fontToken.fontFamily??"",b.fontToken.fontSizeM
Line truncated
|
||||
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=l.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new l.BugIndicatingError("Model is disposed!")}registerViewModel(e){this._viewModels.add(e)}unregisterViewModel(e){this._viewModels.delete(e)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t,i=null){if(this.__isDisposing)return;this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._fontTokenDecorationsProvider.handleDidChangeContent(t);const n=new Ra(e,t);i&&(n.rawContentChangedEvent.resultingSelection=i),this._onDidChangeContentOrInjectedText(n),this._eventEmitter.fire(n)}setValue(e,t=$i.setValue()){if(this._assertNotDisposed(),e==null)throw l.illegalArgument();const{textBuffer:i,disposable:n}=P1(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n,t)}_createContentChanged2(e,t,i,n,s,r,a,c,h,d){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:s}],eol:this._buffer.getEOL(),isEolChange:h,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:c,detailedReasons:[d],detailedReasonsChangeLengths:[1]}}_setValueFromTextBuffer(e,t,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new F1,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Dc([new d5],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,r,a),0,s,new l.Position(r,a),this.getValue(),!1,!1,!0,!1,i))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r
|
||||
`:`
|
||||
`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Dc([new p5],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,s,r),0,n,new l.Position(s,r),this.getValue(),!1,!1,!1,!0,$i.eolChange()))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=s.range,a=s.cachedAbsoluteStart-s.start,c=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),h=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);s.cachedAbsoluteStart=c,s.cachedAbsoluteEnd=h,s.cachedVersionId=e,s.start=c-a,s.end=h-a,pr(s)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=h6?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new l.TextModelResolvedOptions({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const c=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(c),this._decorationProvider.handleDidChangeOptions(c),this._onDidChangeOptions.fire(c)}detectIndentation(e,t){this._assertNotDisposed();const i=r1(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),xv(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.BugIndicatingError("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new u6(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getVa
Line truncated
|
||||
`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const u=this.getLineMaxColumn(s);r>=u&&(r=u)}const a=e.endLineNumber,c=e.endColumn;let h=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof c=="number"&&!isNaN(c)?c:1);if(h<1)h=1,d=1;else if(h>t)h=t,d=this.getLineMaxColumn(h);else if(d<=1)d=1;else{const u=this.getLineMaxColumn(h);d>=u&&(d=u)}return i===s&&n===r&&a===h&&c===d&&e instanceof l.Range&&!(e instanceof l.Selection)?e:new l.Range(s,r,h,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(l.isHighSurrogate(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new l.Position(1,1);if(n>r)return new l.Position(r,this.getLineMaxColumn(r));if(s<=1)return new l.Position(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new l.Position(n,a);if(i===1){const c=this._buffer.getLineCharCode(n,s-2);if(l.isHighSurrogate(c))return new l.Position(n,s-1)}return new l.Position(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof l.Position&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}isValidRange(e){return this._isValidRange(e,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,c=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,h=l.isHighSurrogate(a),d=l.isHighSurrogate(c);return!h&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof l.Range&&!(e instanceof l.Selection)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,c=n.column;{const h=r>1?this._buffer.getLineCharCode(s,r-2):0,d=c>1&&c<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,c-2):0,u=l.isHighSurrogate(h),f=l.isHighSurrogate(d);return!u&&!f?new l.Range(s,r,a,c):s===a&&r===c?new l.Range(s,r-1,a,c-1):u&&f?new l.Range(s,r-1,a,c+1):u?new l.Range(s,r-1,a,c):new l.Range(s,r,a,c+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new l.Range(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=c6){this._assertNotDisposed();let c=null;t!==null&&typeof t!="boolean"&&(Array.isArray(t)||(t=[t]),t.every(u=>l.Range.isIRange(u))&&(c=t.map(u=>this.validateRange(u)))),c===null&&(c=[this.getFullModelRange()]),c=c.sort((u,f)=>u.startLineNumber-f.startLineNumber||u.startColumn-f.startColumn);const h=[];h.push(c.reduce((u,f)=>l.Range.areIntersecting(u,f)?u.plusRange(f):(h.push(u),f)));let d;if(!i&&e.indexOf(`
|
||||
`)<0){const f=new l.SearchParams(e,i,n,s).parseSearchRequest();if(!f)return[];d=g=>this.findMatchesLineByLine(g,f,r,a)}else d=u=>l.TextModelSearch.findMatches(this,new l.SearchParams(e,i,n,s),u,r,a);return h.map(d).reduce((u,f)=>u.concat(f),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(`
|
||||
`)<0){const h=new l.SearchParams(e,i,n,s).parseSearchRequest();if(!h)return null;const d=this.getLineCount();let u=new l.Range(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),f=this.findMatchesLineByLine(u,h,r,1);return l.TextModelSearch.findNextMatch(this,new l.SearchParams(e,i,n,s),a,r),f.length>0||(u=new l.Range(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),f=this.findMatchesLineByLine(u,h,r,1),f.length>0)?f[0]:null}return l.TextModelSearch.findNextMatch(this,new l.SearchParams(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return l.TextModelSearch.findPreviousMatch(this,new l.SearchParams(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
|
||||
`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){if(e instanceof l.ValidAnnotatedEditOperation)return e;const t=this.validateRange(e.range);let i=e.text;if(i){const n=i.length>0&&i.charCodeAt(i.length-1)===13;this.getEOL()===`\r
|
||||
`&&n&&t.endColumn===this.getLineMaxColumn(t.endLineNumber)&&(i=i.substring(0,i.length-1))}return new l.ValidAnnotatedEditOperation(e.identifier||null,t,i,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}edit(e,t){this.pushEditOperations(null,e.replacements.map(i=>({range:i.range,text:i.text})),null)}pushEditOperations(e,t,i,n,s){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n,s)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n,s){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const r=t.map(c=>({range:this.validateRange(c.range),text:c.text}));let a=!0;if(e)for(let c=0,h=e.length;c<h;c++){const d=e[c];let u=!1;for(let f=0,g=r.length;f<g;f++){const m=r[f].range,p=m.startLineNumber>d.endLineNumber,b=d.startLineNumber>m.endLineNumber;if(!p&&!b){u=!0;break}}if(!u){a=!1;break}}if(a)for(let c=0,h=this._trimAutoWhitespaceLines.length;c<h;c++){const d=this._trimAutoWhitespaceLines[c],u=this.getLineMaxColumn(d);let f=!0;for(let g=0,m=r.length;g<m;g++){const p=r[g].range,b=r[g].text;if(!(d<p.startLineNumber||d>p.endLineNumber)&&!(d===p.startLineNumber&&p.startColumn===u&&p.isEmpty()&&b&&b.length>0&&b.charAt(0)===`
|
||||
`)&&!(d===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&b&&b.length>0&&b.charAt(b.length-1)===`
|
||||
`)){f=!1;break}}if(f){const g=new l.Range(d,1,d,u);t.push(new l.ValidAnnotatedEditOperation(null,g,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n,s)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),c=this.getPositionAt(r.newEnd);return{range:new l.Range(a.lineNumber,a.column,c.lineNumber,c.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),c=this.getPositionAt(r.oldEnd);return{range:new l.Range(a.lineNumber,a.column,c.lineNumber,c.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n;const a=this._validateEditOperations(e);this._doApplyEdits(a,!1,$i.applyEdits(),r),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t,i){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t??!1,i??$i.applyEdits())}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t,i,n=null){const s=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),a=this._buffer.getLineCount(),c=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,c.length!==0){for(let u=0,f=c.length;u<f;u++){const g=c[u];this._decorationsTree.acceptReplace(g.rangeOffset,g.rangeLength,g.text.length,g.forceMoveMarkers)}const h=[];this._increaseVersionId();let d=s;for(let u=0,f=c.length;u<f;u++){const g=c[u],[m]=fr(g.text);this._onDidChangeDecorations.fire();const p=g.range.startLineNumber,b=g.range.endLineNumber,v=b-p,C=m,w=Math.min(v,C),S=C-v,L=a-d-S+p;for(let D=w;D>=0;D--){const x=p+D,I=L+D;h.push(new PT(x,I))}if(w<v){const D=p+w,x=C-v,I=a-d-x+D;h.push(new g5(D+1,b,I))}if(w<C){const D=p+w,x=C-w,I=a-d-x+D+1;h.push(new m5(D+1,I,x))}d+=S}this._emitContentChangedEvent(new Dc(h,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:c,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1,detailedReasons:[i],detailedReasonsChangeLengths:[c.length]},n)}return r.reverseEdits===null?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e,t,i){if(e&&e.size>0){const s=Array.from(e).map(r=>new PT(r,r));this._onDidChangeContentOrInjectedText(new kT(s))}this._fireOnDidChangeLineHeight(t),this._fireOnDidChangeFont(i)}_fireOnDidChangeLineHeight(e){if(e&&e.size>0){const i=Array.from(e).map(n=>new u5(n.ownerId,n.decorationId,n.lineNumber,n.lineHeight));this._onDidChangeLineHeight.fire(new FT(i))}}_fireOnDidChangeFont(e){if(e&&e.size>0){const i=Array.from(e).map(n=>new f5(n.ownerId,n.lineNumber));this._onDidChangeFont.fire(new BT(i))}}_onDidChangeContentOrInjectedText(e){for(const t of this._viewModels)try{t.onDidChangeContentOrInjectedText(e)}catch(i){l.onUnexpectedError(i)}for(const t of this._viewModels)try{t.emitContentChangeEvent(e)}catch(i){l.onUnexpectedError(i)}}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(e,s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(e,s,V1(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){l.onUnexpectedError(s)}return i.addDecoration=pu,i.changeDecoration=pu,i.changeDecorationOptions=pu,i.removeDecoration=pu,i.deltaDecorations=pu,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),l.onUnexpectedError(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationC
Line truncated
|
||||
`)>=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],c=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!c||c.length!==1)return null;const h=c[0].open,d=s.text.length-r[2].length-1,u=s.text.lastIndexOf(h,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,i,n,s){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(i)),r&&(i[0]._isTracked=!0);const a=[],c=[],h=this._model.pushEditOperations(this.getSelections(),i,d=>{if(r)for(let f=0,g=r.length;f<g;f++){const[m,p]=r[f],b=d[f],v=b.range.startLineNumber,C=b.range.startColumn-1+m,w=b.range.startColumn-1+p;a.push(new l.Range(v,w+1,v,w+2)),c.push(new l.Range(v,C+1,v,w+2))}const u=n(d);return u&&(this._isHandling=!0),u},void 0,s);h&&(this._isHandling=!1,this.setSelections(e,t,h,0)),a.length>0&&this._pushAutoClosedAction(a,c)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Cu.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){l.onUnexpectedError(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return q1.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new vu(this._model,this.getSelections())}endComposition(e,t){const i=$i.cursor({kind:"compositionEnd",detailedSource:t}),n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(cr.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()),i)},e,t)}type(e,t,i){const n=$i.cursor({kind:"type",detailedSource:i});this._executeEdit(()=>{if(i==="keyboard"){const s=t.length;let r=0;for(;r<s;){const a=l.nextCharLength(t,r),c=t.substr(r,a);this._executeEditOperation(cr.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),c),n),r+=a}}else this._executeEditOperation(cr.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t),n)},e,i)}compositionType(e,t,i,n,s,r){const a=$i.cursor({kind:"compositionType",detailedSource:r});if(t.length===0&&i===0&&n===0){if(s!==0){const c=this.getSelections().map(h=>{const d=h.getPosition();return new l.Selection(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,c,0)}return}this._executeEdit(()=>{this._executeEditOperation(cr.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s),a)},e,r)}paste(e,t,i,n,s){const r=$i.cursor({kind:"paste",detailedSource:s});this._executeEdit(()=>{this._executeEditOperation(cr.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]),r)},e,s,4)}cut(e,t){const i=$i.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(va.cut(this.context.cursorConfig,this._model,this.getSelections()),i)},e,t)}executeCommand(e,t,i){const n=$i.cursor({kind:"executeCommand",detailedSource:i});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new pi(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}executeCommands(e,t,i){const n=$i.cursor({kind:"executeCommands",detailedSource:i});this._executeEdit(()=>{this._executeEditOperation(new pi(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}}class Cu{static from(e,t){return new Cu(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class q1{static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(Line truncated
|
||||
`:this.model.getEOL();e=e.slice(0),e.sort(l.Range.compareRangesUsingStarts);let s=!1,r=!1;for(const d of e)d.isEmpty()?s=!0:r=!0;if(!r&&!t)return{sourceRanges:[],sourceText:""};const a=[],c=[],h=(d,u="")=>{a.push(d),c.push(this.model.getValueInRange(d,i?2:0)+u)};if(s&&t){let d=0;for(const u of e){const f=u.startLineNumber;u.isEmpty()?f!==d&&h(new l.Range(f,this.model.getLineMinColumn(f),f,this.model.getLineMaxColumn(f)),n):h(u),d=f}}else for(const d of e)d.isEmpty()||h(d);return{sourceRanges:a,sourceText:c.length===1?c[0]:c}}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===pn||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new l.Range(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(59),r=this._getColorMap(),c=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===Zi.fontFamily;let h;return c?h=Zi.fontFamily:(h=s.fontFamily,h=h.replace(/"/g,"'"),/[,']/.test(h)||/[+ ]/.test(h)&&(h=`'${h}'`),h=`${h}, ${Zi.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${h};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let c="";for(let h=i;h<=s;h++){const d=this.model.tokenization.getLineTokens(h),u=d.getLineContent(),f=h===i?n-1:0,g=h===s?r-1:u.length;u===""?c+="<br>":c+=H6(u,d.inflate(),t,f,g,a,l.isWindows)}return c}_getColorMap(){const e=l.TokenizationRegistry.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=l.Color.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new V6);return}this._withViewEventsCollector(e)}executeEdits(e,t,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,t,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealAll(n,e,i,0,t,0))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new l.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new bu(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new l.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new bu(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new bu(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new O6),this._eventDispatcher.emitOutgoingEvent(new B6))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>this._emitViewEvent(e))}_emitViewEvent(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class lS{sta
Line truncated
|
||||
`?i=1:e&&e.lineEnding&&e.lineEnding===`\r
|
||||
`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),this.hasModel()?n&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Va._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Va._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?Va._getVerticalOffsetAfterPosition(this._modelData,e,Number.MAX_SAFE_INTEGER,t):-1}getLineHeightForPosition(e){if(!this._modelData)return-1;const t=this._modelData.viewModel,i=t.coordinatesConverter,n=l.Position.lift(e);if(i.modelPositionIsVisible(n)){const s=i.convertModelPositionToViewPosition(n);return t.viewLayout.getLineHeightForLineNumber(s.lineNumber)}return 0}setHiddenAreas(e,t,i){this._modelData?.viewModel.setHiddenAreas(e.map(n=>l.Range.lift(n)),t,i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Xe.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!l.Position.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!l.Range.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealAllCursors(e,t){this._modelData&&this._modelData.viewModel.revealAllCursors("api",e,t)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new l.Range(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!l.Position.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new l.Range(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=l.Selection.isISelection(e),n=l.Range.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelection
Line truncated
|
||||
`:`
|
||||
|
||||
`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`
|
||||
${fG(t,e)}
|
||||
`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(l.escapeRegExpCharacters(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function DN(o){return Do(o)?!o.value:Array.isArray(o)?o.every(DN):!0}function Do(o){return o instanceof DS?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0)&&(typeof o.supportAlertSyntax=="boolean"||o.supportAlertSyntax===void 0):!1}function dG(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&o.supportAlertSyntax===e.supportAlertSyntax&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&Nx(l.URI.from(o.baseUri),l.URI.from(e.baseUri)))}function uG(o){return o.replace(/[\\`*_{}[\]()#+!~]/g,"\\$&").replace(/^([ \t]*)-/gm,"$1\\-")}function fG(o,e){const t=o.match(/^`+/gm)?.reduce((n,s)=>n.length>s.length?n:s).length??0,i=t>=3?t+1:3;return[`${"`".repeat(i)}${e}`,o,`${"`".repeat(i)}`].join(`
|
||||
`)}function yu(o){return o.replace(/"/g,""")}function xS(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function gG(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",c=isFinite(parseInt(a)),h=isFinite(parseInt(r));c&&e.push(`width="${a}"`),h&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function mG(o,...e){return l.URI.from({scheme:l.Schemas.command,path:o,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}class ES{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const IS=new ES("id#");function TS(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ga=TS();function xN(o){Ga=o}const EN=/[&<>"']/,pG=new RegExp(EN.source,"g"),IN=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_G=new RegExp(IN.source,"g"),bG={"&":"&","<":"<",">":">",'"':""","'":"'"},TN=o=>bG[o];function Dn(o,e){if(e){if(EN.test(o))return o.replace(pG,TN)}else if(IN.test(o))return o.replace(_G,TN);return o}const CG=/(^|[^\[])\^/g;function at(o,e){let t=typeof o=="string"?o:o.source;e=e||"";const i={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(CG,"$1"),t=t.replace(n,r),i},getRegex:()=>new RegExp(t,e)};return i}function NN(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const Lu={exec:()=>null};function RN(o,e){const t=o.replace(/\|/g,(s,r,a)=>{let c=!1,h=r;for(;--h>=0&&a[h]==="\\";)c=!c;return c?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function Du(o,e,t){const i=o.length;if(i===0)return"";let n=0;for(;n<i&&o.charAt(i-n-1)===e;)n++;return o.slice(0,i-n)}function vG(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<o.length;i++)if(o[i]==="\\")i++;else if(o[i]===e[0])t++;else if(o[i]===e[1]&&(t--,t<0))return i;return-1}function MN(o,e,t,i){const n=e.href,s=e.title?Dn(e.title):null,r=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){i.state.inLink=!0;const a={type:"link",raw:t,href:n,title:s,text:r,tokens:i.inlineTokens(r)};return i.state.inLink=!1,a}return{type:"image",raw:t,href:n,title:s,text:Dn(r)}}function wG(o,e){const t=o.match(/^(\s+)(?:```)/);if(t===null)return e;const i=t[1];return e.split(`
|
||||
`).map(n=>{const s=n.match(/^\s+/);if(s===null)return n;const[r]=s;return r.length>=i.length?n.slice(i.length):n}).join(`
|
||||
`)}class op{options;rules;lexer;constructor(e){this.options=e||Ga}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Du(i,`
|
||||
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const i=t[0],n=wG(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){const n=Du(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Du(t[0],`
|
||||
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let i=Du(t[0],`
|
||||
`).split(`
|
||||
`),n="",s="";const r=[];for(;i.length>0;){let a=!1;const c=[];let h;for(h=0;h<i.length;h++)if(/^ {0,3}>/.test(i[h]))c.push(i[h]),a=!0;else if(!a)c.push(i[h]);else break;i=i.slice(h);const d=c.join(`
|
||||
`),u=d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
||||
$1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}
|
||||
${d}`:d,s=s?`${s}
|
||||
${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=f,i.length===0)break;const g=r[r.length-1];if(g?.type==="code")break;if(g?.type==="blockquote"){const m=g,p=m.raw+`
|
||||
`+i.join(`
|
||||
`),b=this.blockquote(p);r[r.length-1]=b,n=n.substring(0,n.length-m.raw.length)+b.raw,s=s.substring(0,s.length-m.text.length)+b.text;break}else if(g?.type==="list"){const m=g,p=m.raw+`
|
||||
`+i.join(`
|
||||
`),b=this.list(p);r[r.length-1]=b,n=n.substring(0,n.length-g.raw.length)+b.raw,s=s.substring(0,s.length-m.raw.length)+b.raw,i=p.substring(r[r.length-1].raw.length).split(`
|
||||
`);continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const r=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;e;){let c=!1,h="",d="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let u=t[2].split(`
|
||||
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=e.split(`
|
||||
`,1)[0],g=!u.trim(),m=0;if(this.options.pedantic?(m=2,d=u.trimStart()):g?m=t[1].length+1:(m=t[2].search(/[^ ]/),m=m>4?1:m,d=u.slice(m),m+=t[1].length),g&&/^ *$/.test(f)&&(h+=f+`
|
||||
`,e=e.substring(f.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),C=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,m-1)}}#`);for(;e;){const L=e.split(`
|
||||
`,1)[0];if(f=L,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(f)||S.test(f)||v.test(f)||C.test(e))break;if(f.search(/[^ ]/)>=m||!f.trim())d+=`
|
||||
`+f.slice(m);else{if(g||u.search(/[^ ]/)>=4||w.test(u)||S.test(u)||C.test(u))break;d+=`
|
||||
`+f}!g&&!f.trim()&&(g=!0),h+=L+`
|
||||
`,e=e.substring(L.length+1),u=f.slice(m)}}s.loose||(a?s.loose=!0:/\n *\n *$/.test(h)&&(a=!0));let p=null,b;this.options.gfm&&(p=/^\[[ xX]\] /.exec(d),p&&(b=p[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:h,task:!!p,checked:b,loose:!1,text:d,tokens:[]}),s.raw+=h}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){const h=s.items[c].tokens.filter(u=>u.type==="space"),d=h.length>0&&h.some(u=>/\n.*\n/.test(u.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const i=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const i=RN(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
|
||||
`):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const a of n)/^ *-+: *$/.test(a)?r.align.push("right"):/^ *:-+: *$/.test(a)?r.align.push("center"):/^ *:-+ *$/.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<i.length;a++)r.header.push({text:i[a],tokens:this.lexer.inline(i[a]),header:!0,align:r.align[a]});for(const a of s)r.rows.push(RN(a,r.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:r.align[h]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const i=t[1].charAt(t[1].length-1)===`
|
||||
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Dn(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const r=Du(i.slice(0,-1),"\\");if((i.length-r.length)%2===0)return}else{const r=vG(t[2],"()");if(r>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);r&&(n=r[1],s=r[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),MN(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const n=(i[2]||i[1]).replace(/\s+/g," "),s=t[n.toLowerCase()];if(!s){const r=i[0].charAt(0);return{type:"text",raw:r,text:r}}return MN(i,s,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const r=[...n[0]].length-1;let a,c,h=r,d=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(c=[...a].length,n[3]||n[4]){h+=c;continue}else if((n[5]||n[6])&&r%3&&!((r+c)%3)){d+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+d);const f=[...n[0]][0].length,g=e.slice(0,r+n.index+f+c);if(Math.min(r,c)%2){const p=g.slice(1,-1);return{type:"em",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}const m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," ");const n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=Dn(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let i,n;return t[2]==="@"?(i=Dn(t[1]),n="mailto:"+i):(i=Dn(t[1]),n=i),{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=Dn(t[0]),n="mailto:"+i;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);i=Dn(t[0]),t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let i;return this.lexer.state.inRawBlock?i=t[0]:i=Dn(t[0]),{type:"text",raw:t[0],text:i}}}}const SG=/^(?: *(?:\n|$))+/,yG=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,LG=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,DG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AN=/(?:[*+-]|\d{1,9}[.)])/,ON=at(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,AN).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),NS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xG=/^[^\n]+/,RS=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EG=at(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",RS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),IG=at(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AN).getRegex(),rp="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieLine truncated
|
||||
]`).replace("lheading",ON).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},FN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,MG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,BN=/^( {2,}|\\)\n(?!\s*$)/,AG=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Eu="\\p{P}\\p{S}",OG=at(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Eu).getRegex(),PG=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,kG=at(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Eu).getRegex(),FG=at("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Eu).getRegex(),BG=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Eu).getRegex(),zG=at(/\\([punct])/,"gu").replace(/punct/g,Eu).getRegex(),VG=at(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),UG=at(MS).replace("(?:-->|$)","-->").getRegex(),$G=at("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",UG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ap=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,KG=at(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ap).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zN=at(/^!?\[(label)\]\[(ref)\]/).replace("label",ap).replace("ref",RS).getRegex(),VN=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",RS).getRegex(),GG=at("reflink|nolink(?!\\()","g").replace("reflink",zN).replace("nolink",VN).getRegex(),OS={_backpedal:Lu,anyPunctuation:zG,autolink:VG,blockSkip:PG,br:BN,code:MG,del:Lu,emStrongLDelim:kG,emStrongRDelimAst:FG,emStrongRDelimUnd:BG,escape:FN,link:KG,nolink:VN,punctuation:OG,reflink:zN,reflinkSearch:GG,tag:$G,text:AG,url:Lu},jG={...OS,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ap).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ap).getRegex()},PS={...OS,escape:at(FN).replace("])","~|])").getRegex(),url:at(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qG={...PS,br:at(BN).replace("{2,}","*").getRegex(),text:at(PS.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},lp={normal:AS,gfm:NG,pedantic:RG},Iu={normal:OS,gfm:PS,breaks:qG,pedantic:jG};class Ts{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ga,this.options.tokenizer=this.options.tokenizer||new op,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:lp.normal,inline:Iu.normal};this.options.pedantic?(t.block=lp.pedantic,t.inline=Iu.pedantic):this.options.gfm&&(t.block=lp.gfm,this.options.breaks?t.inline=Iu.breaks:t.inline=Iu.gfm),this.tokenizer.rules=t}static get rules(){return{block:lp,inline:Iu}}static lex(e,t){return new Ts(t).lex(e)}static lexInline(e,t){return new Ts(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
|
||||
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(a,c,h)=>c+" ".repeat(h.length));let n,s,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
|
||||
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const c=e.slice(1);let h;this.options.extensions.startBlock.forEach(d=>{h=d.call({lexer:this},c),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(r=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=`
|
||||
`+n.raw,s.text+=`
|
||||
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,r=e,a,c,h;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(h=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(i=d.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,r,h)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const u=e.slice(1);let f;this.options.extensions.startInline.forEach(g=>{f=g.call({lexer:this},u),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(s=e.substring(0,d+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(h=i.raw.slice(-1)),c=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}}class Tu{options;parser;constructor(e){this.options=e||Ga}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+`
|
||||
`;return n?'<pre><code class="language-'+Dn(n)+'">'+(i?s:Dn(s,!0))+`</code></pre>
|
||||
`:"<pre><code>"+(i?s:Dn(s,!0))+`</code></pre>
|
||||
`}blockquote({tokens:e}){return`<blockquote>
|
||||
${this.parser.parse(e)}</blockquote>
|
||||
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
||||
`}hr(e){return`<hr>
|
||||
`}list(e){const t=e.ordered,i=e.start;let n="";for(let a=0;a<e.items.length;a++){const c=e.items[a];n+=this.listitem(c)}const s=t?"ol":"ul",r=t&&i!==1?' start="'+i+'"':"";return"<"+s+r+`>
|
||||
`+n+"</"+s+`>
|
||||
`}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
||||
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||||
`}table(e){let t="",i="";for(let s=0;s<e.header.length;s++)i+=this.tablecell(e.header[s]);t+=this.tablerow({text:i});let n="";for(let s=0;s<e.rows.length;s++){const r=e.rows[s];i="";for(let a=0;a<r.length;a++)i+=this.tablecell(r[a]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||||
<thead>
|
||||
`+t+`</thead>
|
||||
`+n+`</table>
|
||||
`}tablerow({text:e}){return`<tr>
|
||||
${e}</tr>
|
||||
`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>
|
||||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),s=NN(e);if(s===null)return n;e=s;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image({href:e,title:t,text:i}){const n=NN(e);if(n===null)return i;e=n;let s=`<img src="${e}" alt="${i}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class kS{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Ns{options;renderer;textRenderer;constructor(e){this.options=e||Ga,this.options.renderer=this.options.renderer||new Tu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kS}static parse(e,t){return new Ns(t).parse(e)}static parseInline(e,t){return new Ns(t).parseInline(e)}parse(e,t=!0){let i="";for(let n=0;n<e.length;n++){const s=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const a=s,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=c||"";continue}}const r=s;switch(r.type){case"space":{i+=this.renderer.space(r);continue}case"hr":{i+=this.renderer.hr(r);continue}case"heading":{i+=this.renderer.heading(r);continue}case"code":{i+=this.renderer.code(r);continue}case"table":{i+=this.renderer.table(r);continue}case"blockquote":{i+=this.renderer.blockquote(r);continue}case"list":{i+=this.renderer.list(r);continue}case"html":{i+=this.renderer.html(r);continue}case"paragraph":{i+=this.renderer.paragraph(r);continue}case"text":{let a=r,c=this.renderer.text(a);for(;n+1<e.length&&e[n+1].type==="text";)a=e[++n],c+=`
|
||||
`+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c}]}):i+=c;continue}default:{const a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const s=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=a||"";continue}}const r=s;switch(r.type){case"escape":{i+=t.text(r);break}case"html":{i+=t.html(r);break}case"link":{i+=t.link(r);break}case"image":{i+=t.image(r);break}case"strong":{i+=t.strong(r);break}case"em":{i+=t.em(r);break}case"codespan":{i+=t.codespan(r);break}case"br":{i+=t.br(r);break}case"del":{i+=t.del(r);break}case"text":{i+=t.text(r);break}default:{const a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}}class cp{options;constructor(e){this.options=e||Ga}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class UN{defaults=TS();options=this.setOptions;parse=this.parseMarkdown(Ts.lex,Ns.parse);parseInline=this.parseMarkdown(Ts.lexInline,Ns.parseInline);Parser=Ns;Renderer=Tu;TextRenderer=kS;Lexer=Ts;Tokenizer=op;Hooks=cp;constructor(...e){this.use(...e)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const s=n;for(const r of s.header)i=i.concat(this.walkTokens(r.tokens,t));for(const r of s.rows)for(const a of r)i=i.concat(this.walkTokens(a.tokens,t));break}case"list":{const s=n;i=i.concat(this.walkTokens(s.items,t));break}default:{const s=n;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(r=>{const a=s[r].flat(1/0);i=i.concat(this.walkTokens(a,t))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const r=t.renderers[s.name];r?t.renderers[s.name]=function(...a){let c=s.renderer.apply(this,a);return c===!1&&(c=r.apply(this,a)),c}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[s.level];r?r.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),n.extensions=t),i.renderer){const s=this.defaults.renderer||new Tu(this.defaults);for(const r in i.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const a=r,c=i.renderer[a],h=s[a];s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u||""}}n.renderer=s}if(i.tokenizer){const s=this.defaults.tokenizer||new op(this.defaults);for(const r in i.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const a=r,c=i.tokenizer[a],h=s[a];s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u}}n.tokenizer=s}if(i.hooks){const s=this.defaults.hooks||new cp;for(const r in i.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;const a=r,c=i.hooks[a],h=s[a];cp.passThroughHooks.has(r)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(c.call(s,d)).then(f=>h.call(s,f));const u=c.call(s,d);return h.call(s,u)}:s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u}}n.hooks=s}if(i.walkTokens){const s=this.defaults.walkTokens,r=i.walkTokens;n.walkTokens=function(a){let c=[];return c.push(r.call(this,a)),s&&(c=c.concat(s.call(this,a))),c}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ts.lex(e,t??this.defaults)}parser(e,t){return Ns.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,s)=>{const r={...s},a={...this.defaults,...r},c=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return c(new Error("marked(): input parameter is of
Line truncated
|
||||
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Dn(i.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(i);throw i}}}const ja=new UN;function it(o,e){return ja.parse(o,e)}it.options=it.setOptions=function(o){return ja.setOptions(o),it.defaults=ja.defaults,xN(it.defaults),it},it.getDefaults=TS,it.defaults=Ga,it.use=function(...o){return ja.use(...o),it.defaults=ja.defaults,xN(it.defaults),it},it.walkTokens=function(o,e){return ja.walkTokens(o,e)},it.parseInline=ja.parseInline,it.Parser=Ns,it.parser=Ns.parse,it.Renderer=Tu,it.TextRenderer=kS,it.Lexer=Ts,it.lexer=Ts.lex,it.Tokenizer=op,it.Hooks=cp,it.parse=it,it.options,it.setOptions,it.use,it.walkTokens,it.parseInline;const YG=it;Ns.parse;const Nu=Ts.lex;function ZG(o){return JSON.stringify(o,QG)}function FS(o){let e=JSON.parse(o);return e=BS(e),e}function QG(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function BS(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return l.URI.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof l.VSBuffer||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t<o.length;++t)o[t]=BS(o[t],e+1);else for(const t in o)Object.hasOwnProperty.call(o,t)&&(o[t]=BS(o[t],e+1))}return o}function $N(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,i=Array(e);t<e;t++)i[t]=o[t];return i}function XG(o){if(Array.isArray(o))return o}function JG(o,e){var t=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(t!=null){var i,n,s,r,a=[],c=!0,h=!1;try{if(s=(t=t.call(o)).next,e!==0)for(;!(c=(i=s.call(t)).done)&&(a.push(i.value),a.length!==e);c=!0);}catch(d){h=!0,n=d}finally{try{if(!c&&t.return!=null&&(r=t.return(),Object(r)!==r))return}finally{if(h)throw n}}return a}}function WG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HG(o,e){return XG(o)||JG(o,e)||ej(o,e)||WG()}function ej(o,e){if(o){if(typeof o=="string")return $N(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$N(o,e):void 0}}const KN=Object.entries,GN=Object.setPrototypeOf,tj=Object.isFrozen,ij=Object.getPrototypeOf,nj=Object.getOwnPropertyDescriptor;let ji=Object.freeze,Fn=Object.seal,zc=Object.create,jN=typeof Reflect<"u"&&Reflect,zS=jN.apply,VS=jN.construct;ji||(ji=function(e){return e}),Fn||(Fn=function(e){return e}),zS||(zS=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return e.apply(t,n)}),VS||(VS=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return new e(...i)});const qa=qt(Array.prototype.forEach),sj=qt(Array.prototype.lastIndexOf),qN=qt(Array.prototype.pop),Vc=qt(Array.prototype.push),oj=qt(Array.prototype.splice),qi=Array.isArray,Ru=qt(String.prototype.toLowerCase),US=qt(String.prototype.toString),YN=qt(String.prototype.match),Uc=qt(String.prototype.replace),ZN=qt(String.prototype.indexOf),rj=qt(String.prototype.trim),aj=qt(Number.prototype.toString),lj=qt(Boolean.prototype.toString),QN=typeof BigInt>"u"?null:qt(BigInt.prototype.toString),XN=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),It=qt(Object.prototype.hasOwnProperty),Mu=qt(Object.prototype.toString),vi=qt(RegExp.prototype.test),$c=cj(TypeError);function qt(o){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return zS(o,e,i)}}function cj(o){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return VS(o,t)}}function Re(o,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ru;if(GN&&GN(o,null),!qi(e))return o;let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){const s=t(n);s!==n&&(tj(e)||(e[i]=s),n=s)}o[n]=!0}return o}function hj(o){for(let e=0;e<o.length;e++)It(o,e)||(o[e]=null);return o}function Pi(o){const e=zc(null);for(const i of KN(o)){var t=HG(i,2);const n=t[0],s=t[1];It(o,n)&&(qi(s)?e[n]=hj(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=Pi(s):e[n]=s)}return e}function dj(o){switch(typeof o){case"string":return o;case"number":return aj(o);case"boolean":return lj(o);case"bigint":return QN?QN(o):"0";case"symbol":return XN?XN(o):"Symbol()";case"undefined":return Mu(o);case"function":case"object":{if(o===null)return Mu(o);const e=o,t=Rs(e,"toString");if(typeof t=="function"){const i=t(e);return typeof i=="string"?i:Mu(i)}return Mu(o)}default:return Mu(o)}}function Rs(o,e){for(;o!==null;){const i=nj(o,e);if(i){if(i.get)return qt(i.get);if(typeof i.value=="function")return qt(i.value)}o=ij(o)}function t(){return null}return t}function uj(o){try{return vi(o,""),!0}catch{return!1}}const JN=ji(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$S=ji(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),KS=ji(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fj=ji(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","s
Line truncated
|
||||
`+ni),Vr&&qa([X,re,Y],$n=>{ni=Uc(ni,$n," ")}),D&&Ab?T(ni):ni},e.setConfig=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};LD(ae),mD=!0},e.clearConfig=function(){Vh=null,mD=!1},e.isValidAttribute=function(ae,N,V){Vh||LD({});const te=Bt(ae),He=Bt(N);return vP(te,He,V)},e.addHook=function(ae,N){typeof N=="function"&&Vc(G[ae],N)},e.removeHook=function(ae,N){if(N!==void 0){const V=sj(G[ae],N);return V===-1?void 0:oj(G[ae],V,1)[0]}return qN(G[ae])},e.removeHooks=function(ae){G[ae]=[]},e.removeAllHooks=function(){G=iR()},e}var Kc=nR();const sR=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),oR=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),qS="vscode-relative-path";function rR(o,e){if(e.override==="*")return!0;try{const t=new URL(o,qS+"://");return!!(e.override.includes(t.protocol.replace(/:$/,""))||e.allowRelativePaths&&t.protocol===qS+":"&&!o.trim().toLowerCase().startsWith(qS))}catch{return!1}}function xj(o,e){Kc.addHook("afterSanitizeAttributes",t=>{for(const i of["href","src"])if(t.hasAttribute(i)){const n=t.getAttribute(i);i==="href"?!n.startsWith("#")&&!rR(n,o)&&t.removeAttribute(i):rR(n,e)||t.removeAttribute(i)}})}const Ej=Object.freeze({ALLOWED_TAGS:[...sR],ALLOWED_ATTR:[...oR],ALLOW_UNKNOWN_PROTOCOLS:!0});function Ij(o,e){return aR(o,e,"trusted")}function aR(o,e,t){try{const i={...Ej};e?.allowedTags&&(e.allowedTags.override&&(i.ALLOWED_TAGS=[...e.allowedTags.override]),e.allowedTags.augment&&(i.ALLOWED_TAGS=[...i.ALLOWED_TAGS??[],...e.allowedTags.augment]));let n=[...oR];e?.allowedAttributes&&(e.allowedAttributes.override&&(n=[...e.allowedAttributes.override]),e.allowedAttributes.augment&&(n=[...n,...e.allowedAttributes.augment])),n=n.map(a=>typeof a=="string"?a.toLowerCase():{attributeName:a.attributeName.toLowerCase(),shouldKeep:a.shouldKeep});const s=new Set(n.map(a=>typeof a=="string"?a:a.attributeName)),r=new Map;for(const a of n)typeof a=="string"?r.delete(a):r.set(a.attributeName,a);return i.ALLOWED_ATTR=Array.from(s),xj({override:e?.allowedLinkProtocols?.override??[l.Schemas.http,l.Schemas.https],allowRelativePaths:e?.allowRelativeLinkPaths??!1},{override:e?.allowedMediaProtocols?.override??[l.Schemas.http,l.Schemas.https],allowRelativePaths:e?.allowRelativeMediaPaths??!1}),e?.replaceWithPlaintext&&Kc.addHook("uponSanitizeElement",Nj),r.size&&Kc.addHook("uponSanitizeAttribute",(a,c)=>{const h=r.get(c.attrName);if(h){const d=h.shouldKeep(a,c);typeof d=="string"?(c.keepAttr=!0,c.attrValue=d):c.keepAttr=d}else c.keepAttr=s.has(c.attrName)}),t==="dom"?Kc.sanitize(o,{...i,RETURN_DOM_FRAGMENT:!0}):Kc.sanitize(o,{...i,RETURN_TRUSTED_TYPE:!0})}finally{Kc.removeAllHooks()}}const Tj=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Nj=(o,e,t)=>{if(!e.allowedTags[e.tagName]&&e.tagName!=="body"){const i=lR(o);i&&(o.nodeType===Node.COMMENT_NODE?o.parentElement?.insertBefore(i,o):o.parentElement?.replaceChild(i,o))}};function lR(o){if(!o.ownerDocument)return;let e,t;if(o.nodeType===Node.COMMENT_NODE)e=`<!--${o.textContent}-->`;else if(o instanceof Element){const r=o.tagName.toLowerCase(),a=Tj.includes(r),c=o.attributes.length?" "+Array.from(o.attributes).map(h=>`${h.name}="${h.value}"`).join(" "):"";e=`<${r}${c}>`,a||(t=`</${r}>`)}else return;const i=document.createDocumentFragment(),n=o.ownerDocument.createTextNode(e);for(i.appendChild(n);o.firstChild;)i.appendChild(o.firstChild);const s=t?o.ownerDocument.createTextNode(t):void 0;return s&&i.appendChild(s),i}function cR(o,e,t){const i=aR(e,t,"dom");oi(o,i)}const Rj=new RegExp(`(\\\\)?\\$\\((${_.ThemeIcon.iconNameExpression}(?:${_.ThemeIcon.iconModifierExpression})?)\\)`,"g");function vr(o,e){const t=new Array;let i,n=0,s=0;for(;(i=Rj.exec(o))!==null;){s=i.index||0,n<s&&t.push(o.substring(n,s)),n=(i.index||0)+i[0].length;const[,r,a]=i;t.push(r?`$(${a})`:Gc({id:a},e))}return n<o.length&&t.push(o.substring(n)),t}function Gc(o,e){const t=Q("span"),i=_.ThemeIcon.asClassNameArray(o);return e&&i.push("codicon-colored"),t.classList.add(...i),t}function Mj(o){try{const e=l.URI.parse(o);if(e.scheme===l.Schemas.file){const t=e.fsPath,i=e.fragment;return yu(i?`${t}#${i}`:t)}}catch{}return""}const YS=Object.freeze({image:({href:o,title:e,text:t})=>{let i=[],n=[];return o&&({href:o,dimensions:i}=gG(o),n.push(`src="${yu(o)}"`)),t&&n.push(`alt="${yu(t)}"`),e&&n.push(`title="${yu(e)}"`),i.length&&(n=n.concat(i)),"<img "+n.join(" ")+">"},paragraph({tokens:o}){retuLine truncated
|
||||
`}}function dp(o,e={},t){const i=new l.DisposableStore;let n=!1;const s=new UN(...e.markedExtensions??[]),{renderer:r,codeBlocks:a,syncCodeBlocks:c}=Pj(s,e,o),h=kj(o);let d;if(e.fillInIncompleteTokens){const m={...s.defaults,...e.markedOptions,renderer:r},p=s.lexer(h,m),b=Qj(p);d=s.parser(b,m)}else d=s.parse(h,{...e?.markedOptions,renderer:r,async:!1});o.supportThemeIcons&&(d=vr(d).map(p=>typeof p=="string"?p:p.outerHTML).join(""));const u=document.createElement("div"),f=fR(o,e.sanitizerConfig??{});cR(u,d,f),Oj(o,e,u);let g;if(t?(g=t,oi(t,...u.childNodes)):g=u,a.length>0)Promise.all(a).then(m=>{if(n)return;const p=new Map(m),b=g.querySelectorAll("div[data-code]");for(const v of b){const C=p.get(v.dataset.code??"");C&&oi(v,C)}e.asyncRenderCallback?.()});else if(c.length>0){const m=new Map(c),p=g.querySelectorAll("div[data-code]");for(const b of p){const v=m.get(b.dataset.code??"");v&&oi(b,v)}}if(e.asyncRenderCallback)for(const m of g.getElementsByTagName("img")){const p=i.add(R(m,"load",()=>{p.dispose(),e.asyncRenderCallback()}))}if(e.actionHandler){const m=p=>{const b=new Bi(j(g),p);!b.leftButton&&!b.middleButton||hR(o,e,b)};i.add(R(g,"click",m)),i.add(R(g,"auxclick",m)),i.add(R(g,"keydown",p=>{const b=new Be(p);!b.equals(10)&&!b.equals(3)||hR(o,e,b)}))}for(const m of[...g.getElementsByTagName("input")])if(m.attributes.getNamedItem("type")?.value==="checkbox")m.setAttribute("disabled","");else if(e.sanitizerConfig?.replaceWithPlaintext){const p=lR(m);p?m.parentElement?.replaceChild(p,m):m.remove()}else m.remove();return{element:g,dispose:()=>{n=!0,i.dispose()}}}function Oj(o,e,t){for(const i of t.querySelectorAll("img, audio, video, source")){const n=i.getAttribute("src");if(n){let s=n;try{o.baseUri&&(s=ZS(l.URI.from(o.baseUri),s))}catch{}if(i.setAttribute("src",dR(o,s,!0)),e.sanitizerConfig?.remoteImageIsAllowed){const r=l.URI.parse(s);r.scheme!==l.Schemas.file&&r.scheme!==l.Schemas.data&&!e.sanitizerConfig.remoteImageIsAllowed(r)&&i.replaceWith(Q("",void 0,i.outerHTML))}}}for(const i of t.querySelectorAll("a")){const n=i.getAttribute("href");if(i.setAttribute("href",""),!n||/^data:|javascript:/i.test(n)||/^command:/i.test(n)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(n))i.replaceWith(...i.childNodes);else{let s=dR(o,n,!1);o.baseUri&&(s=ZS(l.URI.from(o.baseUri),n)),i.dataset.href=s}}}function Pj(o,e,t){const i=new o.Renderer(e.markedOptions);i.image=YS.image,i.link=YS.link,i.paragraph=YS.paragraph,t.supportAlertSyntax&&(i.blockquote=Aj(i.blockquote));const n=[],s=[];return e.codeBlockRendererSync?i.code=({text:r,lang:a,raw:c})=>{const h=IS.nextId(),d=e.codeBlockRendererSync(uR(a),r,c);return s.push([h,d]),`<div class="code" data-code="${h}">${l.escape(r)}</div>`}:e.codeBlockRenderer&&(i.code=({text:r,lang:a})=>{const c=IS.nextId(),h=e.codeBlockRenderer(uR(a),r);return n.push(h.then(d=>[c,d])),`<div class="code" data-code="${c}">${l.escape(r)}</div>`}),t.supportHtml||(i.html=({text:r})=>e.sanitizerConfig?.replaceWithPlaintext?l.escape(r):(t.isTrusted?r.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?r:""),{renderer:i,codeBlocks:n,syncCodeBlocks:s}}function kj(o){let e=o.value;return e.length>1e5&&(e=`${e.substr(0,1e5)}…`),o.supportThemeIcons&&(e=cG(e)),e}function hR(o,e,t){const i=t.target.closest("a[data-href]");if(Ve(i))try{let n=i.dataset.href;n&&(o.baseUri&&(n=ZS(l.URI.from(o.baseUri),n)),e.actionHandler?.(n,o))}catch(n){l.onUnexpectedError(n)}finally{t.preventDefault(),t.stopPropagation()}}function Fj(o,e){let t;try{t=FS(decodeURIComponent(e))}catch{}return t?(t=l.cloneAndChange(t,i=>{if(o.uris&&o.uris[i])return l.URI.revive(o.uris[i])}),encodeURIComponent(JSON.stringify(t))):e}function dR(o,e,t){const i=o.uris&&o.uris[e];let n=l.URI.revive(i);return t?e.startsWith(l.Schemas.data+":")?e:(n||(n=l.URI.parse(e)),l.FileAccess.uriToBrowserUri(n).toString(!0)):!n||l.URI.parse(e).toString()===n.toString()?e:(n.query&&(n=n.with({query:Fj(o,n.query)})),n.toString())}function uR(o){if(!o)return"";const e=o.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:o}function ZS(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?Ax(o,e).toString():Ax(Rx(o),e).toString()}function Bj(o,e,t={}){const i=fR(e,t);return Ij(o,i)}const zj=Object.freeze([...sR,"input"]),Vj=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="style"?/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(e.attrValue):!1},{attributeName:"class",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="class"?/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue):!1}]);function fR(o,e){const t=o.isTrusted??!1,i=[l.Schemas.http,Line truncated
|
||||
`,o.html=e=>"",o.heading=function({tokens:e}){return this.parser.parseInline(e)+`
|
||||
`},o.hr=()=>"",o.list=function({items:e}){return e.map(t=>this.listitem(t)).join(`
|
||||
`)+`
|
||||
`},o.listitem=({text:e})=>e+`
|
||||
`,o.paragraph=function({tokens:e}){return this.parser.parseInline(e)+`
|
||||
`},o.table=function({header:e,rows:t}){return e.map(i=>this.tablecell(i)).join(" ")+`
|
||||
`+t.map(i=>i.map(n=>this.tablecell(n)).join(" ")).join(`
|
||||
`)+`
|
||||
`},o.tablerow=({text:e})=>e,o.tablecell=function({tokens:e}){return this.parser.parseInline(e)},o.strong=({text:e})=>e,o.em=({text:e})=>e,o.codespan=({text:e})=>e,o.br=e=>`
|
||||
`,o.del=({text:e})=>e,o.image=e=>"",o.text=({text:e})=>e,o.link=({text:e})=>e,o}function Au(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function gR(o){if(o.tokens)for(let e=o.tokens.length-1;e>=0;e--){const t=o.tokens[e];if(t.type==="text"){const i=t.raw.split(`
|
||||
`),n=i[i.length-1];if(n.includes("`"))return Jj(o);if(n.includes("**"))return n7(o);if(n.match(/\*\w/))return Wj(o);if(n.match(/(^|\s)__\w/))return s7(o);if(n.match(/(^|\s)_\w/))return Hj(o);if(Gj(n)||jj(n)&&o.tokens.slice(0,e).some(s=>s.type==="text"&&s.raw.match(/\[[^\]]*$/))){const s=o.tokens.slice(e+1);return s[0]?.type==="link"&&s[1]?.type==="text"&&s[1].raw.match(/^ *"[^"]*$/)||n.match(/^[^"]* +"[^"]*$/)?t7(o):e7(o)}else if(n.match(/(^|\s)\[\w*[^\]]*$/))return i7(o)}}}function Gj(o){return!!o.match(/(^|\s)\[.*\]\(\w*/)}function jj(o){return!!o.match(/^[^\[]*\]\([^\)]*$/)}function qj(o){const e=o.items[o.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,i=h=>{const u=h.items.at(-1)?.tokens.at(-1);return u?.type==="heading"||u?.type==="list"&&i(u)};let n;if(t?.type==="text"&&!("inRawBlock"in e))n=gR(t);else if(i(o)){const h=Nu(o.raw.trim()+" ")[0];return h.type!=="list"?void 0:h}if(!n||n.type!=="paragraph")return;const s=Au(o.items.slice(0,-1)),r=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!r)return;const a=r+Au(e.tokens.slice(0,-1))+n.raw,c=Nu(s+a)[0];if(c.type==="list")return c}function Yj(o,e){if(o.raw.match(/-\s*$/))return Nu(e+" ")}const Zj=3;function Qj(o){for(let e=0;e<Zj;e++){const t=Xj(o);if(t)o=t;else break}return o}function Xj(o){let e,t;for(e=0;e<o.length;e++){const a=o[e];if(a.type==="paragraph"&&a.raw.match(/(\n|^)\|/)){t=o7(o.slice(e));break}}let i=o.length-1;for(;i>=0&&(o[i].type==="space"||o[i].type==="html");)i--;const n=i>=0?o[i]:void 0,s=o.slice(i+1);if(!t&&n?.type==="list"){const a=qj(n);a&&(t=[a,...s],e=i)}if(!t&&n?.type==="paragraph"){const a=gR(n);a&&(t=[a,...s],e=i)}if(t){const a=[...o.slice(0,e),...t];return a.links=o.links,a}const r=o.at(-1);if(r?.type==="heading"){const a=Yj(r,Au(o));if(a)return a}return null}function Jj(o){return wr(o,"`")}function Wj(o){return wr(o,"*")}function Hj(o){return wr(o,"_")}function e7(o){return wr(o,")",!1)}function t7(o){return wr(o,'")',!1)}function i7(o){return wr(o,"](https://microsoft.com)",!1)}function n7(o){return wr(o,"**")}function s7(o){return wr(o,"__")}function wr(o,e,t=!0){const i=Au(Array.isArray(o)?o:[o]),n=t?i.trimEnd():i;return Nu(n+e)[0]}function o7(o){const e=Au(o),t=e.split(`
|
||||
`);let i,n=!1;for(let s=0;s<t.length;s++){const r=t[s].trim();if(typeof i>"u"&&r.match(/^\s*\|/)){const a=r.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(r.match(/^\s*\|/)){if(s!==t.length-1)return;n=!0}else return}if(typeof i=="number"&&i>0){const s=n?t.slice(0,-1).join(`
|
||||
`):e,r=!!s.match(/\|\s*$/),a=s+(r?"":"|")+`
|
||||
|${" --- |".repeat(i)}`;return Nu(a)}}const Ou=le("openerService");function r7(o,e){return o.with({fragment:`${e.startLineNumber},${e.startColumn}${e.endLineNumber?`-${e.endLineNumber}${e.endColumn?`,${e.endColumn}`:""}`:""}`})}function a7(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var l7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c7=function(o,e){return function(t,i){e(t,i,o)}};const Pu=le("markdownRendererService");let QS=class{constructor(e){this._openerService=e}render(e,t,i){const n={...t};n.actionHandler||(n.actionHandler=(r,a)=>mR(this._openerService,r,a.isTrusted)),n.codeBlockRenderer||(n.codeBlockRenderer=(r,a)=>this._defaultCodeBlockRenderer?.renderCodeBlock(r,a,n??{})??Promise.resolve(document.createElement("span")));const s=dp(e,n,i);return s.element.classList.add("rendered-markdown"),s}setDefaultCodeBlockRenderer(e){this._defaultCodeBlockRenderer=e}};QS=l7([c7(0,Ou)],QS);async function mR(o,e,t,i){try{return await o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:h7(t),skipValidation:i})}catch(n){return l.onUnexpectedError(n),!1}}function h7(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}fe(Pu,QS,1);var d7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},up=function(o,e){return function(t,i){e(t,i,o)}};const As=Q;let XS=class extends Wn{get _targetWindow(){return j(this._target.targetElements[0])}get _targetDocumentElement(){return j(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}addMouseTrackingElement(e){return this._lockMouseTracker.addElement(e)}constructor(e,t,i,n,s){if(super(),this._keybindingService=t,this._configurationService=i,this._markdownRenderer=n,this._accessibilityService=s,this._messageListeners=new l.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new l.Emitter),this._onRequestLayout=this._register(new l.Emitter),this._linkHandler=e.linkHandler,this._target="targetElements"in e.target?e.target:new u7(e.target),e.style)switch(e.style){case 1:{e.appearance??={},e.appearance.compact??=!0,e.appearance.showPointer??=!0;break}case 2:{e.appearance??={},e.appearance.compact??=!0;break}}this._hoverPointer=e.appearance?.showPointer?As("div.workbench-hover-pointer"):void 0,this._hover=this._register(new sN(!e.appearance?.skipFadeInAnimation)),this._hover.containerDomNode.classList.add("workbench-hover"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),this._hoverPointer&&this._hover.containerDomNode.classList.add("with-pointer"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0);const r=e.appearance?.maxHeightRatio;r!==void 0&&r>0&&r<=1&&(this._maxHeightRatioRelativeToWindow=r),this._hoverPosition=e.position?.hoverPosition===void 0?3:l.isNumber(e.position.hoverPosition)?e.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,f=>f.stopPropagation()),this.onkeydown(this._hover.containerDomNode,f=>{f.equals(9)&&this.dispose()}),this._register(R(this._targetWindow,"blur",()=>this.dispose()));const a=As("div.hover-row.markdown-hover"),c=As("div.hover-contents");if(typeof e.content=="string")c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(Ve(e.content)){c.appendChild(e.content),c.classList.add("html-hover-contents");const f=new ResizeObserver(()=>{this.layout(),this._onRequestLayout.fire()});f.observe(c),this._register(l.toDisposable(()=>f.disconnect()))}else{const f=e.content,{element:g}=t
Line truncated
|
||||
:host {
|
||||
all: initial; /* 1st rule so subsequent properties are reset. */
|
||||
}
|
||||
|
||||
.codicon[class*='codicon-'] {
|
||||
font: normal normal normal 16px/1 codicon;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
text-rendering: auto;
|
||||
text-align: center;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
:host {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
||||
}
|
||||
|
||||
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
||||
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
|
||||
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
|
||||
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
|
||||
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif; }
|
||||
|
||||
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
|
||||
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
|
||||
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
|
||||
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
|
||||
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
|
||||
|
||||
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
|
||||
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
|
||||
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
|
||||
`,Os=le("layoutService");function bR(o){const e=o;return typeof e=="object"&&"markdown"in e&&"markdownNotSupportedFallback"in e}class m7{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(l.isString(e)||Ve(e)||e===void 0)n=e;else{this._cancellationTokenSource=new l.CancellationTokenSource;const s=this._cancellationTokenSource.token;let r;if(bR(e)?l.isFunction(e.markdown)?r=e.markdown(s).then(a=>a??e.markdownNotSupportedFallback):r=e.markdown??e.markdownNotSupportedFallback:r=e.element(s),r instanceof Promise?(this._hoverWidget||this.show(l.localize(1762,"Loading..."),t,i),n=await r):n=r,this.isDisposed||s.isCancellationRequested)return}this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return e?Do(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var p7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qc=function(o,e){return function(t,i){e(t,i,o)}};const _7=3;let WS=class extends l.Disposable{get _currentHover(){return this._hoverStack.at(-1)?.hover}get _currentHoverOptions(){return this._hoverStack.at(-1)?.options}_getContainingHoverIndex(e){const t=Ve(e)?[e]:e.targetElements;for(let i=this._hoverStack.length-1;i>=0;i--)for(const n of t)if(ut(n,this._hoverStack[i].hover.domNode))return i;return-1}constructor(e,t,i,n,s,r){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=n,this._layoutService=s,this._accessibilityService=r,this._hoverStack=[],this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(i.onDidShowContextMenu(()=>this.hideHover())),this._register(Zn.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:0,primary:l.KeyChord(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,i,n){const s=this._createHover(e,i);if(s)return this._showHover(s,e,t),s.hover}showDelayedHover(e,t){if(e.id===void 0&&(e.id=CR(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked&&this._getContainingHoverIndex(e.target)<0)return;if(Yc(this._currentHoverOptions)===Yc(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===t?.groupId)return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&Yc(this._currentHoverOptions)===Yc(e))return this._currentDelayedHover;const i=this._createHover(e,void 0);if(!i){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}this._currentDelayedHover=i.hover,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t?.groupId;const n=t?.reducedDelay?this._configurationService.getValue("workbench.hover.reducedDelay"):this._configurationService.getValue("workbench.hover.delay");return l.timeout(n).then(()=>{i.hover&&!i.hover.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(i,e))}),i.hover}setupDelayedHover(e,t,i){const n=s=>{const r={...typeof t=="function"?t():t,target:e};return r.style===2&&s&&(r.target=wR(e,s)),r};return this._setupDelayedHover(e,n,i)}setupDelayedHoverAtMouse(e,t,i){const n=s=>({...typeof t=="function"?t():t,target:s?wR(e,s):e});return this._setupDelayedHover(e,n,i)}_setupDelayedHover(e,t,i){const n=new l.DisposableStore;return n.add(R(e,F.MOUSE_OVER,s=>{this.showDelayedHover(t(s),{groupId:i?.groupId,reducedDelay:i?.reducedDelay})})),i?.setupKeyboardEvents&&n.add(R(e,F.KEY_DOWN,s=>{const r=new Be(s);(r.equals(10)||r.equals(3))&&this.showInstantHover(t(),!0)})),this._delayedHovers.set(e,{show:s=>{this.showInstantHover(t(),s)}}),n.add(l.toDisposable(()=>this._delayedHovers.delete(e))),n}_createHover(e,t){if(this._currentDelayedHover?.dispose(),this._currentDelayedHover=void 0,e.content==="")return;if(e.id===void 0&&(e.id=CR(e.content)),this._getContainingHoverIndex(e.target)>=0){if(this._hoverStack.length>=_7)return}else if(this._c
Line truncated
|
||||
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class S7{constructor(e,t,i,n,s,r,a){this.id=++yR,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new DR),this.removedResources.has(t)||this.removedResources.set(t,new LR(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new DR),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new LR(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class xR{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(`
|
||||
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new KT(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,c=this._past.length;a<c;a++,n++){const h=this._past[a];i&&(n>=t||h.id!==e.elements[n])&&(i=!1,s=a),!i&&h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const c=this._future[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,r=a),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class ty{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const ER=new xR("","");ER.locked=!0;let iy=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(`
|
||||
`))}pushElement(e,t=Cw.None,i=Ma.None){if(e.type===0){const n=gp(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new mp(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],r=[];for(const a of e.resources){const c=gp(a),h=this.getUriComparisonKey(a);n.has(h)||(n.add(h),s.push(c),r.push(h))}s.length===1?this._pushElement(new mp(e,s[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new S7(e,s,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],s=e.strResources[t];let r;this._editStacks.has(s)?r=this._editStacks.get(s):(r=new xR(n,s),this._editStacks.set(s,r)),r.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=gp(s.resource),a=this.getUriComparisonKey(s.resource),c=new mp(s,r,a,0,0,0,0);n.set(c.strResource,c)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=gp(s.resource),a=this.getUriComparisonKey(s.resource),c=new mp(s,r,a,0,0,0,0);n.set(c.strResource,c)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new KT(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();r&&r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Ma){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){l.onUnexpectedError(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(c){return r(),n.dispose(),this._onError(c,e)}return a?a.then(()=>(r(),n.dispose(),s()),c=>(r(),n.dispose(),this._onError(c,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return l.Disposable.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?l.Disposable.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(l.Disposable.None);const i=e.actual.prepareUndoRedo();return i?l.isDisposable(i)?t(i):i.then(n=>t(n)):t(l.Disposable.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||ER);return new ty(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new pp(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new pp}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,l.localize(2101,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,l.localize(2102,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,l.localize(2103,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,l.localize(2104,"Could not undo '{0}' across all files because there is already an undo or
Line truncated
|
||||
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const r of e.keys)this.affectedKeys.add(r);for(const[,r]of e.overrides)for(const a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Np.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){const a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!l.equals$1(a,c)}return!0}}class d9 extends l.Disposable{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Tt.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Tt.createEmptyModel(this.logService);const e=St.as(Xo.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const s=i[n],r=t[n];s!==void 0?this._configurationModel.setValue(n,s):r?this._configurationModel.setValue(n,this.getDefaultValue(n,r)):this._configurationModel.removeValue(n)}}getDefaultValue(e,t){return l.deepClone(t.default)}}class u9{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return t-i}value(){return this._value[this._pos]}}class f9{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?l.compareSubstring(e,this._value,0,e.length,this._from,this._to):l.compareSubstringIgnoreCase(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class g9{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let t=e.length-1;t>=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const t=this._value.charCodeAt(this._to);if(t===47||this._splitOnBackslash&&t===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?l.compareSubstring(e,this._value,0,e.length,this._from,this._to):l.compareSubstringIgnoreCase(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class m9{constructor(e,t){this._ignorePathCasing=e,this._ignoreQueryAndFragment=t,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new g9(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(e)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return l.compareIgnoreCase(e,this._value.scheme);if(this._states[this._stateIdx]===2)return l.compareIgnoreCase(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return l.compare(e,this._value.query);if(this._states[this._stateIdx]===5)return l.compare(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.f
Line truncated
|
||||
`){return this._parts.join(e)}}let Op=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const E9=new l.Lazy(()=>Op("mouse",!1)),I9=new l.Lazy(()=>Op("element",!1));function T9(o){Op=o}function Io(o){return o==="element"?I9.value:E9.value}function sM(){return Op("element",!0)}let oM={showInstantHover:()=>{},showDelayedHover:()=>{},setupDelayedHover:()=>l.Disposable.None,setupDelayedHoverAtMouse:()=>l.Disposable.None,hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>({dispose:()=>{},show:()=>{},hide:()=>{},update:()=>{}}),showManagedHover:()=>{}};function N9(o){oM=o}function En(){return oM}class R9{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}const Pp="notSelectable";class Ja extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function rM(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.end<i.range.start)break;const n=ii.intersect(o,i.range);ii.isEmpty(n)||t.push({range:n,size:i.size})}return t}function My({start:o,end:e},t){return{start:o+t,end:e+t}}function M9(o){const e=[];let t=null;for(const i of o){const n=i.range.start,s=i.range.end,r=i.size;if(t&&r===t.size){t.range.end=s;continue}t={range:{start:n,end:s},size:r},e.push(t)}return e}function A9(...o){return M9(o.reduce((e,t)=>e.concat(t),[]))}class O9{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=rM({start:0,end:e},this.groups),r=rM({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(c=>({range:My(c.range,n),size:c.size})),a=i.map((c,h)=>({range:{start:e+h,end:e+h+1},size:c.size}));this.groups=A9(s,a,r),this._size=this._paddingTop+this.groups.reduce((c,h)=>c+h.size*(h.range.end-h.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e<this._paddingTop)return 0;let t=0,i=this._paddingTop;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s*n.size;if(e<r)return t+Math.floor((e-i)/n.size);t+=s,i=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s;if(e<r)return this._paddingTop+t+(e-i)*n.size;t+=s*n.size,i=r}return-1}}class P9{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)i=this.transactionNodesPendingRemoval.delete(t.domNode);else{const n=Q(".monaco-list-row"),r=this.getRenderer(e).renderTemplate(n);t={domNode:n,templateId:e,templateData:r}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}function k9(o,e,t,i=[]){if(!o.dataTransfer)return;const n=Q(".monaco-drag-image");n.textContent=t,n.classList.add(...i),(a=>{for(;a&&!a.classList.contains("monaco-workbench");)a=a.parentElement;return a||e.ownerDocument.body})(e).appendChild(n),o.dataTransfer.setDragImage(n,-10,-10),setTimeout(()=>n.remove(),0)}var To=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const Wa={CurrentDragAndDropData:void 0},zs={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class $u{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class F9{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class B9{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&thi
Line truncated
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
|
||||
`),e.listFocusAndSelectionForeground&&i.push(`
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
|
||||
`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const n=Eo(e.listFocusAndSelectionOutline,Eo(e.listSelectionOutline,e.listFocusOutline??""));n&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${n}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`
|
||||
.monaco-drag-image${t},
|
||||
.monaco-list${t}:focus .monaco-list-row.focused,
|
||||
.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
|
||||
`);const s=Eo(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`
|
||||
.monaco-list${t}.drop-target,
|
||||
.monaco-list${t} .monaco-list-rows.drop-target,
|
||||
.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }
|
||||
`),e.listDropBetweenBackground&&(i.push(`
|
||||
.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,
|
||||
.monaco-list${t} .monaco-list-row.drop-target-before::before {
|
||||
content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;
|
||||
background-color: ${e.listDropBetweenBackground};
|
||||
}`),i.push(`
|
||||
.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,
|
||||
.monaco-list${t} .monaco-list-row.drop-target-after::after {
|
||||
content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;
|
||||
background-color: ${e.listDropBetweenBackground};
|
||||
}`)),e.tableColumnsBorder&&i.push(`
|
||||
.monaco-table > .monaco-split-view2,
|
||||
.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
|
||||
.monaco-enable-motion .monaco-table:hover > .monaco-split-view2,
|
||||
.monaco-enable-motion .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
||||
border-color: ${e.tableColumnsBorder};
|
||||
}
|
||||
|
||||
.monaco-enable-motion .monaco-table > .monaco-split-view2,
|
||||
.monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
|
||||
border-color: transparent;
|
||||
}
|
||||
`),e.tableOddRowsBackgroundColor&&i.push(`
|
||||
.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
|
||||
.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
|
||||
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
|
||||
background-color: ${e.tableOddRowsBackgroundColor};
|
||||
}
|
||||
`),this.styleElement.textContent=i.join(`
|
||||
`)}}const X9={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:l.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:l.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:l.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},J9={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function W9(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n<o.length&&o[n]===e+(n-t);)i.push(o[n++]);return i}function Oy(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):t.push(e[n++]);return t}function H9(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):n++;return t}const fM=(o,e)=>o-e;class eq{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const r of this.renderers)r.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class tq{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new l.DisposableStore}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),s=n&&typeof n!="string"?n:Zr(n);i.disposables.add(he(a=>{this.setAriaLabel(a.readObservable(s),i.container)}));const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?i.container.setAttribute("aria-level",`${r}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class iq{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class zn{get onDidChangeFocus(){return l.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return l.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=l.Event.chain(this.disposables.add(new Te(this.view.domNode,"keydown")).event,s=>s.map(r=>new Be(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ve.stop(r,!0)).filter(()=>!1)),i=l.Event.chain(this.disposables.add(new Te(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new Be(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ve.stop(r,!0)).map(({browserEvent:r})=>{const a=this.getFocus(),c=a.length?a[0]:void 0,h=typeof c<"u"?this.view.element(c):void 0,d=typeof c<"u"?
Line truncated
|
||||
`)}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=Eo(this.styles.selectListBackground,e);this.selectDropDownContainer.style.backgroundColor=t,this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t,this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){e.appendChild(this.selectDropDownContainer);const i=j(this.selectElement).getComputedStyle(this.selectElement).fontSize;return i&&(this.selectDropDownContainer.style.fontSize=i),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=j(this.selectElement),i=Qi(this.selectElement),n=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),s=i.top-Js.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,r=this.selectElement.offsetWidth,a=this.setWidthControlElement(this.widthControlElement),c=`${Math.max(a,Math.round(r))}px`;this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,u=h+d,f=Math.floor((n-d)/this.getHeight()),g=Math.floor((s-d)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.top<Js.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||f<1&&g<1?!1:(f<Js.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&g>f&&this.options.length>f?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.top<Js.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&f<1||this._dropDownPosition===1&&g<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&f+g<1)return this.hideSelectDropDown(!0),!1;u>n&&(h=f*this.getHeight())}else u>s&&(h=g*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=`${h}px`,this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=`${h}px`,this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((s,r)=>{const a=s
Line truncated
|
||||
[{1}] {2}`,t,ky.modifierLabels[l.OS].altKey,n)}return t}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&mq(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(_.ThemeIcon.isThemeIcon(n)){const s=_.ThemeIcon.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=l.toDisposable(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=rr(this._themeService.getColorTheme().type)?Bs(n.dark):Bs(n.light),i.classList.add("icon"),this._itemClassDispose.value=l.combinedDisposable(l.toDisposable(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}},_.MenuEntryActionViewItem=Kp([Si(2,xt),Si(3,yn),Si(4,be),Si(5,_i),Si(6,nn),Si(7,Ui)],_.MenuEntryActionViewItem);class Vy extends _.MenuEntryActionViewItem{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Vy._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=l.localize(1699,"{1} to {0}",this._action.label,t):this.label.textContent=l.localize(1700,"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let Uy=class extends Bp{constructor(e,t,i,n,s){const r={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(_.ThemeIcon.isThemeIcon(e.item.icon)?_.ThemeIcon.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>i.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},n,r),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),l.assertType(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!_.ThemeIcon.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=rr(this._themeService.getColorTheme().type)?Bs(i.dark):Bs(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};Uy=Kp([Si(2,xt),Si(3,nn),Si(4,_i)],Uy);let $y=class extends Vn{constructor(e,t,i,n,s,r,a,c){super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=c,this._defaultActionDisposables=this._register(new l.DisposableStore),this._container=null,this._primaryActionListener=this._register(new l.MutableDisposable),this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const d=t?.togglePrimaryAction?c.get(this._storageKey,1):void 0;d&&(h=e.actions.find(f=>d===f.id)),h||(h=e.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(_.MenuEntryActionViewItem,h,{keybinding:this._getDefaultActionKeybindingLabel(h),hoverDelegate:t?.hoverDelegate}));const u={keybindingProvider:f=>this._keybindingService.lookupKeybinding(f.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??this._register(new Jr)};this._dropdown=this._register(new Bp(e,e.actions,this._contextMenuService,u)),t?.togglePrimaryAction&&this.registerTogglePrimaryActionListener()}registerTogglePrimaryActionListener(){this._primaryActionListener.value=this._dropdown.actionRunner.onDidRun(e=>{e.action instanceof _.MenuItemAction&&this.update(e.action)})}update(e){this._options?.togglePrimaryAction&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(_.MenuEntryActionViewItem,e,{keybinding:this._getDefaultActionKeybindingLabel(e),hoverDelegate:this._options?.hoverDelegate})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends Jr{async runAction(t,i){await t.run(void 0)}}),this._container&&this._defaultAction.render(Xf(this._container,Q(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}set actionRunner(e){super.actionRunner=e,this._defaultAction.actionRunner=e,this._options?.togglePrimaryAction||(this._dropdown.actionRunner=e),this._primaryActionListener.value&&this.registerTogglePrimaryActionListener()}get actionRunner(){r
Line truncated
|
||||
.monaco-menu {
|
||||
font-size: 13px;
|
||||
border-radius: var(--vscode-cornerRadius-large);
|
||||
border: 1px solid ${o.borderColor??"var(--vscode-menu-border)"};
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
${DM(l.Codicon.menuSelection)}
|
||||
${DM(l.Codicon.menuSubmenu)}
|
||||
|
||||
.monaco-menu .monaco-action-bar {
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .actions-container {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.reverse .actions-container {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
transition: transform 50ms ease;
|
||||
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item .icon,
|
||||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-label {
|
||||
font-size: 11px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
|
||||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
|
||||
color: var(--vscode-disabledForeground);
|
||||
}
|
||||
|
||||
/* Vertical actions */
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
display: block;
|
||||
border-bottom: 1px solid var(--vscode-menu-separatorBackground);
|
||||
padding-top: 1px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* Action Items */
|
||||
.monaco-menu .monaco-action-bar .action-item.select-container {
|
||||
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
|
||||
flex: 1;
|
||||
max-width: 170px;
|
||||
min-width: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
margin-left: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
padding: 0;
|
||||
transform: none;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.active {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
height: 24px;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin: 0 4px;
|
||||
border-radius: var(--vscode-cornerRadius-medium);
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
|
||||
opacity: unset;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label {
|
||||
flex: 1 1 auto;
|
||||
text-decoration: none;
|
||||
padding: 0 1em;
|
||||
background: none;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
display: inline-block;
|
||||
flex: 2 1 auto;
|
||||
padding: 0 1em;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
||||
font-size: 16px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
|
||||
margin-left: auto;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
position: static;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
width: 100%;
|
||||
height: 0px !important;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
|
||||
padding: 0.7em 1em 0.1em 1em;
|
||||
font-weight: bold;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
width: 1em;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
|
||||
visibility: visible;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Context Menu */
|
||||
|
||||
.context-view.monaco-menu-container {
|
||||
outline: 0;
|
||||
border: none;
|
||||
animation: fadeIn 0.083s linear;
|
||||
-webkit-app-region: no-drag;
|
||||
box-shadow: var(--vscode-shadow-lg${o.shadowColor?`, 0 0 12px ${o.shadowColor}`:""});
|
||||
border-radius: var(--vscode-cornerRadius-large);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.context-view.monaco-menu-container :focus,
|
||||
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
|
||||
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.hc-black .context-view.monaco-menu-container,
|
||||
.hc-light .context-view.monaco-menu-container,
|
||||
:host-context(.hc-black) .context-view.monaco-menu-container,
|
||||
:host-context(.hc-light) .context-view.monaco-menu-container {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
||||
:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Show the menu item selection border only for keyboard navigation. Pointer-driven focus typically does not set :focus-visible, so suppress the border in that case. */
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus:not(:focus-visible) {
|
||||
outline: none !important;
|
||||
outline-offset: 0 !important;
|
||||
}
|
||||
|
||||
/* High contrast themes always show the selection border to indicate the focused item, regardless of input modality. The duplicated .monaco-menu raises specificity above the keyboard-only suppression rule above so this wins independent of declaration order. */
|
||||
.hc-black .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item,
|
||||
.hc-light .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item,
|
||||
:host-context(.hc-black) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item,
|
||||
:host-context(.hc-light) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item {
|
||||
outline: 1px solid var(--vscode-menu-selectionBorder) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
|
||||
/* Vertical Action Bar Styles */
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
|
||||
.monaco-menu .monaco-action-bar.vertical .keybinding {
|
||||
font-size: inherit;
|
||||
padding: 0 2em;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||||
font-size: inherit;
|
||||
width: 2em;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
font-size: inherit;
|
||||
margin: 5px 0 !important;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
|
||||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
font-size: 60%;
|
||||
padding: 0 1.8em;
|
||||
}
|
||||
|
||||
.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,
|
||||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||||
height: 100%;
|
||||
mask-size: 10px 10px;
|
||||
-webkit-mask-size: 10px 10px;
|
||||
}
|
||||
|
||||
.monaco-menu .action-item {
|
||||
cursor: default;
|
||||
}`;if(e){i+=`
|
||||
/* Arrows */
|
||||
.monaco-scrollable-element > .scrollbar > .scra {
|
||||
cursor: pointer;
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .visible {
|
||||
opacity: 1;
|
||||
|
||||
/* Background rule added for IE9 - to allow clicks on dom node */
|
||||
background:rgba(0,0,0,0);
|
||||
|
||||
transition: opacity 100ms linear;
|
||||
}
|
||||
.monaco-scrollable-element > .invisible {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.monaco-scrollable-element > .invisible.fade {
|
||||
transition: opacity 800ms linear;
|
||||
}
|
||||
|
||||
/* Scrollable Content Inset Shadow */
|
||||
.monaco-scrollable-element > .shadow {
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.top {
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 3px;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.left {
|
||||
display: block;
|
||||
top: 3px;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 3px;
|
||||
}
|
||||
.monaco-scrollable-element > .shadow.top-left-corner {
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 3px;
|
||||
width: 3px;
|
||||
}
|
||||
/* Fix for https://github.com/microsoft/vscode/issues/103170 */
|
||||
.monaco-menu .action-item .monaco-submenu {
|
||||
z-index: 1;
|
||||
}
|
||||
`;const n=o.scrollbarShadow;n&&(i+=`
|
||||
.monaco-scrollable-element > .shadow.top {
|
||||
box-shadow: ${n} 0 6px 6px -6px inset;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .shadow.left {
|
||||
box-shadow: ${n} 6px 0 6px -6px inset;
|
||||
}
|
||||
|
||||
.monaco-scrollable-element > .shadow.top.left {
|
||||
box-shadow: ${n} 6px 6px 6px -6px inset;
|
||||
}
|
||||
`);const s=o.scrollbarSliderBackground;s&&(i+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider {
|
||||
background: ${s};
|
||||
}
|
||||
`);const r=o.scrollbarSliderHoverBackground;r&&(i+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
||||
background: ${r};
|
||||
}
|
||||
`);const a=o.scrollbarSliderActiveBackground;a&&(i+=`
|
||||
.monaco-scrollable-element > .scrollbar > .slider.active {
|
||||
background: ${a};
|
||||
}
|
||||
`)}return i}class Pq{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=wt();let i;const n=Ve(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,layer:e.layer,render:s=>{this.lastContainer=s;const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(Q(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=R(this.block,F.MOUSE_DOWN,d=>d.stopPropagation()));const a=new l.DisposableStore,c=e.actionRunner||a.add(new Jr);c.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,a),c.onDidRun(this.onDidActionRun,this,a),i=new th(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:c,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},wq),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);const h=j(s);return a.add(R(h,F.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(R(h,F.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;const u=new Bi(h,d);let f=u.target;if(!u.rightButton){for(;f;){if(f===s)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),l.combinedDisposable(a,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide?.(!!s),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(wt()===this.lastContainer||ut(wt(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!l.isCancellationError(e.error)&&this.notificationService.error(e.error)}}var kq=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ih=function(o,e){return function(t,i){e(t,i,o)}};let Zy=class extends l.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Pq(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new l.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new l.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Qy.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),hs.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};Zy=kq([ih(0,Xn),ih(1,yn),ih(2,Fc),ih(3,xt),ih(4,Zo),ih(5,be)],Zy);var Qy;(function(o){function e(i){return i&&i.menuId instanceof ct}function t(i,n,s){if(!e(i))return i;const{menuId:r,menuActionOptions:a,contextKeyService:c}=i;return{...i,getActions:()=>{let h=[];if(r){const d=n.getMenuActions(r,c??s,a);h=Nq(d)}return i.getActions?ft.join(i.getActions(),h):h}}}o.transform=t})(Qy||(Qy={}));var Fq=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bq=function(o,e){return function(t,i){e(t,i,o)}};let Xy=class extends l.Disposable{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new fp(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(j(t))?n=1:i?n=3:n=2:n=
Line truncated
|
||||
(-> incoming)[${[...i.incoming.keys()].join(", ")}]
|
||||
(outgoing ->)[${[...i.outgoing.keys()].join(",")}]
|
||||
`);return e.join(`
|
||||
`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const $q=!1;class TM extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph:
|
||||
${e.toString()}`}}class jp{constructor(e=new Oc,t=!1,i,n=$q){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(me,this),this._globalGraph=n?i?._globalGraph??new IM(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,l.dispose(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)l.isDisposable(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends jp{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Zu.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:r=>{if(n)throw l.illegalState("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);return a||this._throwIfStrict(`[invokeFunction] unknown service '${r}'`,!1),a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){this._throwIfDisposed();let i,n;return e instanceof gs?(i=Zu.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Zu.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Yn.getServiceDependencies(e).sort((a,c)=>a.index-c.index),s=[];for(const a of n){const c=this._getOrCreateServiceInstance(a.id,i);c||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(c)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof gs)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof gs?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new IM(c=>c.id.toString());let s=0;const r=[{id:e,desc:t,_trace:i}],a=new Set;for(;r.length;){const c=r.pop();if(!a.has(String(c.id))){if(a.add(String(c.id)),n.lookupOrInsertNode(c),s++>1e3)throw new TM(n);for(const h of Yn.getServiceDependencies(c.desc.ctor)){const d=this._getServiceInstanceOrDescriptor(h.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${h.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(c.id),String(h.id)),d instanceof gs){const u={id:h.id,desc:d,_trace:c._trace.branch(h.id,!0)};n.insertEdge(c,u),r.push(u)}}}}for(;;){const c=n.roots();if(c.length===0){if(!n.isEmpty())throw new TM(n);break}for(const{data:h}of c){if(this._getServiceInstanceOrDescriptor(h.id)instanceof gs){const u=this._createServiceInstanceWithOwner(h.id,h.desc.ctor,h.desc.staticArguments,h.desc.supportsDelayedInstantiation,h._trace);this._setCreatedServiceInstance(h.id,u)}n.removeNode(h)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof gs)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,r){if(n){const a=new jp(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);const c=new Map,h=new l.GlobalIdleValue(()=>{const d=a._createInstance(t,i,s);for(const[u,f]of c){const g=d[u];if(typeof g=="function")for(const m of f)m.disposable=g.apply(d,m.listener)}return c.clear(),r.add(d),d});return new Proxy(Object.create(null),{get(d,u){if(!h.isInitialized&&typeof u=="string"&&(u.startsWith("onDid")||u.startsWith("onWill"))){let m=c.get(u);return m||(m=new l.LinkedList,c.set(u,m)),(b,v,C)=>{if(h.isInitialized)return h.value[u](b,v,C);{const w=
Line truncated
|
||||
`).slice(3,4).join(`
|
||||
`)):dn._None}static traceCreation(e,t){return e?new dn(1,t.name):dn._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new dn(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;dn._totals+=e;let t=!1;function i(s,r){const a=[],c=new Array(s+1).join(" ");for(const[h,d,u]of r._dep)if(d&&u){t=!0,a.push(`${c}CREATES -> ${h}`);const f=i(s+1,u);f&&a.push(f)}else a.push(`${c}uses -> ${h}`);return a.join(`
|
||||
`)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${dn._totals.toFixed(2)}ms)`];(e>2||t)&&dn.all.add(n.join(`
|
||||
`))}};dn.all=new Set,dn._None=new class extends dn{constructor(){super(0,null)}stop(){}branch(){return this}},dn._totals=0;let Zu=dn;const qp={kind:0},Kq={kind:1};function Gq(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}class nh{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=nh.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n<s;n++){const r=this._keybindings[n];if(r.chords.length===0)continue;const a=r.when?.substituteConstants();a&&a.type===0||this._addKeyPress(r.chords[0],r)}}static _isTargetedForRemoval(e,t,i){if(t){for(let n=0;n<t.length;n++)if(t[n]!==e.chords[n])return!1}if(i&&i.type!==1){if(!e.when)return!1;const n=e.when.substituteConstants(),s=i.substituteConstants();if(!nh.whenIsEntirelyIncluded(n,s))return!1}return!0}static handleRemovals(e){const t=new Map;for(let n=0,s=e.length;n<s;n++){const r=e[n];if(r.command&&r.command.charAt(0)==="-"){const a=r.command.substring(1);t.has(a)?t.get(a).push(r):t.set(a,[r])}}if(t.size===0)return e;const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];if(!r.command||r.command.length===0){i.push(r);continue}if(r.command.charAt(0)==="-")continue;const a=t.get(r.command);if(!a||!r.isDefault){i.push(r);continue}let c=!1;for(const h of a){const d=h.when;if(this._isTargetedForRemoval(r,h.chords,d)){c=!0;break}}if(!c){i.push(r);continue}}return i}_addKeyPress(e,t){const i=this._map.get(e);if(typeof i>"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a<s.chords.length&&a<t.chords.length;a++)if(s.chords[a]!==t.chords[a]){r=!1;break}r&&nh.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t>"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i<n;i++)if(t[i]===e){t.splice(i,1);return}}}static whenIsEntirelyIncluded(e,t){return!t||t.type===1?!0:!e||e.type===1?!1:mC(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t,i=!1){const n=this._lookupMap.get(e);if(typeof n>"u"||n.length===0)return null;if(n.length===1&&!i)return n[0];for(let s=n.length-1;s>=0;s--){const r=n[s];if(t.contextMatchesRules(r.when))return r}return i?null:n[n.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),qp;let r=null;if(n.length<2)r=s;else{r=[];for(let c=0,h=s.length;c<h;c++){const d=s[c];if(n.length>d.chords.length)continue;let u=!0;for(let f=1;f<n.length;f++)if(d.chords[f]!==n[f]){u=!1;break}u&&r.push(d)}}const a=this._findCommand(e,r);return a?n.length<a.chords.length?(this._log(`\\ From ${r.length} keybinding entries, awaiting ${a.chords.length-n.length} more chord(s), when: ${NM(a.when)}, source: ${RM(a)}.`),Kq):(this._log(`\\ From ${r.length} keybinding entries, matched ${a.command}, when: ${NM(a.when)}, source: ${RM(a)}.`),Gq(a.command,a.commandArgs,a.bubble)):(this._log(`\\ From ${r.length} keybinding entries, no when clauses matched the context.`),qp)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(nh._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function NM(o){return o?`${o.serialize()}`:"no when condition"}function RM(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}const jq=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class qq extends l.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:l.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new l.Emitter),this._currentChords=[],this._currentChordChecker=new l.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=sh.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new l.TimeoutTimer,this._currentlyDispatchingCommandId=null,this._logging=!1}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t,i=!1){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService,i);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft
Line truncated
|
||||
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
||||
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
||||
}`),this.styleElement.textContent=t.join(`
|
||||
`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};_b.InstanceCount=0;let eL=_b;const FM={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class lY extends Vn{constructor(e,t,i){super(e,t,i);const n=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle=this._register(new tl({actionClassName:this._action.class,isChecked:!!this._action.checked,title:n,notFocusable:!0,inputActiveOptionBackground:i.toggleStyles?.inputActiveOptionBackground,inputActiveOptionBorder:i.toggleStyles?.inputActiveOptionBorder,inputActiveOptionForeground:i.toggleStyles?.inputActiveOptionForeground})),this._register(this.toggle.onChange(()=>{this._action.checked=!!this.toggle&&this.toggle.checked}))}render(e){this.element=e,this.element.appendChild(this.toggle.domNode),this.updateChecked(),this.updateEnabled()}updateEnabled(){this.toggle&&(this.isEnabled()?(this.toggle.enable(),this.element?.classList.remove("disabled")):(this.toggle.disable(),this.element?.classList.add("disabled")))}updateChecked(){this.toggle.checked=!!this._action.checked}updateLabel(){const e=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle.setTitle(e)}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(e){this.toggle.domNode.tabIndex=e?0:-1}}class tl extends Wn{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new l.Emitter),this._onKeyDown=this._register(new l.Emitter),this._opts=e,this._title=this._opts.title,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(..._.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._register(En().setupDelayedHover(this.domNode,()=>({content:!Do(this._title)&&!Ve(this._title)?sp(this._title):this._title,style:1}),this._opts.hoverLifecycleOptions)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.setTitle(this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault(),i.stopPropagation())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(this.enabled){if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)}})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(..._.ThemeIcon.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(..._.ThemeIcon.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=0)}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=-1)}setTitle(e){this._title=e;const t=typeof e=="string"?e:Do(e)?e.value:e.textContent;this.domNode.setAttribute("aria-label",yS(t))}}const uD=class uD extends Wn{constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new l.Emitter),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisab
Line truncated
|
||||
`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const h={type:2,content:a};n.children.push(h),s.push(n),n=h}else n.content+=a}return n.type===2&&(n=s.pop()),t}function pY(o,e){return iL(o)!==0}function iL(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 0;default:return 0}}class _Y{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class bY{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new _Y(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;if(e.length>this._limit){const t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}const ah=Q;let CY=class extends Wn{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this.hover=this._register(new l.MutableDisposable),this._onDidChange=this._register(new l.Emitter),this._onDidHeightChange=this._register(new l.Emitter),this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=K(e,ah(".monaco-inputbox.idle"));const n=this.options.flexibleHeight?"textarea":"input",s=K(this.element,ah(".ibwrapper"));if(this.input=K(s,ah(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=K(s,ah("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new uI(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),K(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const r=this._register(new Te(e.ownerDocument,"selectionchange")),a=l.Event.filter(r.event,()=>e.ownerDocument.getSelection()?.anchorNode===s);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new el(this.element,{actionViewItemProvider:this.options.actionViewItemProvider})),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}setActions(e,t){this.actionbar?(this.actionbar.clear(),e&&this.actionbar.push(e,{icon:!0,label:!1})):e&&(this.actionbar=this._register(new el(this.element,{actionViewItemProvider:t??this.options.actionViewItemProvider})),this.actionbar.push(e,{icon:!0,label:!1}))}get actionsWidth(){return this.actLine truncated
|
||||
`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=so(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=so(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(c=>c.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:s,deleteCount:r,elements:a})=>this.view.splice(s,r,a)));const t=l.Event.forEach(e.onDidSpliceModel,s=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(s),this.selection.onDidModelSplice(s)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);const i=this.modelDisposables.add(new l.Emitter),n=this.modelDisposables.add(new l.Delayer(0));this.modelDisposables.add(l.Event.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{const s=new Set;for(const r of this.focus.getNodes())s.add(r);for(const r of this.selection.getNodes())s.add(r);i.fire([...s.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=l.Event.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel,l.isMacintosh&&this.modelDisposables.add(e.onDidChangeCollapseState(s=>{const{node:r,deep:a}=s;r.collapsible&&!a&&this.isDOMFocused()&&ha(r.collapsed?l.localize(30,"collapsed"):l.localize(31,"expanded"))}))}dispose(){l.dispose(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}class cL{constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new wY(e,null,t),this.onDidSpliceModel=this.model.onDidSpliceModel,this.onDidSpliceRenderedNodes=this.model.onDidSpliceRenderedNodes,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,t.sorter&&(this.sorter={compare(i,n){return t.sorter.compare(i.element,n.element)}}),this.identityProvider=t.identityProvider}setChildren(e,t=l.Iterable.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=l.Iterable.empty(),i){co
Line truncated
|
||||
`?r=2:a===`
|
||||
`&&(r=1);let c=zt.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let h=zt.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(h=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=zt.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let u=zt.bracketPairColorizationOptions;if(e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"){const f=e.editor.bracketPairColorization;u={enabled:!!f.enabled,independentColorPoolPerBracketType:!!f.independentColorPoolPerBracketType}}return{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:c,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:l.OS===3||l.OS===2?`
|
||||
`:`\r
|
||||
`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){const n=typeof e=="string"?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=hh._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const r=i[n],a=this._models[r],c=a.model.getLanguageId(),h=a.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:c,resource:h})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:c,resource:h}))continue;const d=t[c+h],u=this.getCreationOptions(c,h,a.model.isForSimpleWidget);hh._setModelOptionsForModel(a.model,u,d)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&l.equals$1(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(ll(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(ll(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(ll(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=this._instantiationService.createInstance(_.TextModel,e,t,s,i);if(i&&this._disposedModels.has(ll(i))){const h=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),u=this._getSHA1Computer(),f=u.canComputeSHA1(r)?u.computeSHA1(r)===h.sha1:!1;if(f||h.sharesUndoRedoStack){for(const g of d.past)bo(g)&&g.matchesResource(i)&&g.setModel(r);for(const g of d.future)bo(g)&&g.matchesResource(i)&&g.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,g=>bo(g)&&g.matchesResource(i)),f&&(r._overwriteVersionId(h.versionId),r._overwriteAlternativeVersionId(h.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(h.initialUndoRedoSnapshot))}else h.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(h.initialUndoRedoSnapshot)}const a=ll(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const c=new BZ(r,h=>this._onWillDispose(h),(h,d)=>this._onDidChangeLanguage(h,d));return this._models[a]=c,c}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,pn,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=ll(e),i=this._models[t];return i?i.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===l.Schemas.file||e.scheme===l.Schemas.vscodeRemote||e.scheme===l.Schemas.vscodeUserData||e.scheme===l.Schemas.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=ll(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let s=!1,r=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const h=this._undoRedoService.getElements(e.uri);if(h.past.length>0||h.future.length>0){for(const d of h.past)bo(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri));for(const d of h.future)bo(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri))}}const a=hh.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,c=this._getSHA1Computer();if(s)if(!n&&(r>a||!c.canComputeSHA1(e))){const h=i.model.getInitialUndoRedoSnapshot();h!==null&&this._undoRedoService.restoreSnapshot(h)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,h=>bo(h)&&h.matchesResource(e.uri)),this._insertDisposedModel(new VZ(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,c.computeS
Line truncated
|
||||
`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};jL=XZ([BA(0,Ge),BA(1,kc)],jL);const gh=20,mh=4,qL="--vscode-toolbar-action-min-width";class ph extends l.Disposable{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,i={orientation:0}){if(super(),this.container=e,this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new l.EventMultiplexer),this.originalPrimaryActions=[],this.originalSecondaryActions=[],this.hiddenActions=[],this.disposables=this._register(new l.DisposableStore),i.hoverDelegate=i.hoverDelegate??this._register(sM()),this.options=i,this.toggleMenuAction=this._register(new _h(()=>this.toggleMenuActionViewItem?.show(),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new el(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(n,s)=>{if(n.id===_h.ID)return this.toggleMenuActionViewItem=new Bp(n,{getActions:()=>this.toggleMenuAction.menuActions},t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_.ThemeIcon.asClassNameArray(i.moreIcon??l.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const r=i.actionViewItemProvider(n,s);if(r)return r}if(n instanceof cd){const r=new Bp(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return r.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(r),this.disposables.add(this._onDidChangeDropdownVisibility.add(r.onDidChangeVisibility)),r}}})),this.options.responsiveBehavior?.enabled){this.element.classList.toggle("responsive",!0),this.element.classList.toggle("responsive-all",this.options.responsiveBehavior.kind==="all"),this.element.classList.toggle("responsive-last",this.options.responsiveBehavior.kind==="last"),this.element.style.setProperty(qL,`${this.getConfiguredActionMinWidth()}px`);const n=new ResizeObserver(()=>{this.updateActions(this.getAvailableWidth())});n.observe(this.options.responsiveBehavior?.observedElement??this.element),this._store.add(l.toDisposable(()=>n.disconnect()))}}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){this.actionBar.context=e,this.toggleMenuActionViewItem?.setActionContext(e);for(const t of this.submenuActionViewItems)t.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}getItemWidth(e){return this.actionBar.getWidth(e)}getItemsLength(){return this.actionBar.length()}setActions(e,t){this.clear(),this.originalPrimaryActions=e?e.slice(0):[],this.originalSecondaryActions=t?t.slice(0):[];const i=e?e.slice(0):[];if(this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.length>0&&this.options.trailingSeparator&&i.push(new ft),i.forEach(n=>{this.actionBar.push(n,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(n)})}),this.updateOverflowClassName(),this.applyResponsiveActionMinWidths(),this.options.responsiveBehavior?.enabled){if(this.hiddenActions.length=0,this.options.responsiveBehavior?.minItems!==void 0){const n=this.options.responsiveBehavior.minItems,s=this.originalPrimaryActions.slice(0,n).reduce((a,c)=>a+this.getActionMinWidth(c),0);let r=0;(this.originalSecondaryActions.length>0||n<this.originalPrimaryActions.length)&&(r=gh+mh),this.container.style.minWidth=`${s+r}px`,this.element.style.minWidth=`${s+r}px`}else{const n=this.originalPrimaryActions.length>0?this.getActionMinWidth(this.originalPrimaryActions[0]):gh+mh;this.container.style.minWidth=`${n}px`,this.element.style.minWidth=`${n}px`}this.updateActions(this.getAvailableWidth())}}getKeybindingLabel(e){return this.options.getKeyBinding?.(e)?.getLabel()??void 0}getConfiguredActionMinWidth(e){return e?.id===_h.ID?gh:this.options.respon
Line truncated
|
||||
`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"⏎"})}}class nf{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||l.equals$1(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class w_ extends l.Disposable{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new nf(K(e,Q(".monaco-icon-label")))),this.labelContainer=K(this.domNode.element,Q(".monaco-icon-label-container")),this.nameContainer=K(this.labelContainer,Q("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new dQ(this.nameContainer,!!t.supportIcons)):this.nameNode=new cQ(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??Io("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];let r="";i&&(i.extraClasses&&n.push(...i.extraClasses),i.bold&&n.push("bold"),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(typeof i.title=="string"?r+=i.title:r+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let c;if(!a||!Ve(a)?(c=Q(".monaco-icon-label-iconpath"),this.domNode.element.prepend(c)):c=a,_.ThemeIcon.isThemeIcon(i.iconPath)){const h=_.ThemeIcon.asClassName(i.iconPath);c.className=`monaco-icon-label-iconpath ${h}`,c.style.backgroundImage=""}else c.style.backgroundImage=Bs(i?.iconPath);c.style.backgroundRepeat="no-repeat",c.style.backgroundPosition="center",c.style.backgroundSize="contain"}else a&&a.remove();if(this.domNode.classNames=n,this.domNode.element.setAttribute("aria-label",r),this.labelContainer.classList.value="",this.labelContainer.classList.add(...s),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const c=this.getOrCreateDescriptionNode();if(c instanceof Ir){const h=i?.supportIcons??this.creationOptions?.supportIcons;c.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines,h),this.setupHover(c.element,i?.descriptionTitle)}else c.textContent=t&&i?.labelEscapeNewLines?Ir.escapeNewLines(t,[]):t||"",this.setupHover(c.element,i?.descriptionTitle||""),c.empty=!t}if(i?.suffix||this.suffixNode){const c=this.getOrCreateSuffixNode();c.textContent=i?.suffix??""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}let n=e;if(this.creationOptions?.hoverTargetOverride){if(!ut(e,this.creationOptions.hoverTargetOverride))throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement");n=this.creationOptions.hoverTargetOverride}const s=En().setupManagedHover(this.hoverDelegate,n,t);s&&this.customHovers.set(e,s)}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new nf(IF(this.nameContainer,Q("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new nf(K(e.element,Q("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new nf(K(this.labelContainer,Q("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new Ir(K(e.element,Q("span.label-description")))):this.descriptionNode=this._register(new nf(K(e.element,Q("span.label-description"))))}return this.descriptionNode}}class cQ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&l.equals$1(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=K(this.container,Q("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],s=t?.domId&&`${t?.domId}_${i}`;K(this.container,Q("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&K(this.container,Q("span.label-separator",void 0,t?.separator||"/"))}}}}function hQ(o,e,t){if(!t)return;let i=0;return o.map(n=>{const s={start:i,end:i+n.length},r=t.map(a=>ii.intersect(s,a)).filter(a=>!ii.isEmpty(a)).map(({start:a,end:c})=>({start:a-i,end:c-i}));return i=s.end+e.length,r})}class dQ extends l.Disposable{constructor(e,t){super(),this.container=e,this.supp
Line truncated
|
||||
`);r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}loadViewState(){try{const e=JSON.parse(this.storageService.get(s0,-1,"{}"));if(e.top!==void 0||e.left!==void 0)return e}catch{}}saveViewState(e){this.layoutService.activeContainer===this.layoutService.mainContainer&&(e!==void 0?this.storageService.store(s0,JSON.stringify(e),-1,1):this.storageService.remove(s0,-1))}},n0=Ml,Ml.MAX_WIDTH=600,Ml);o0=n0=WA([Tr(1,Os),Tr(2,me),Tr(3,be),Tr(4,Qa),Tr(5,nn)],o0);let r0=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this._container=e,this._quickInputContainer=t,this._quickInputDragAreas=i,this._layoutService=s,this.configurationService=a,this.dndViewState=W(this,void 0),this._enabled=!0,this._snapThreshold=20,this._snapLineHorizontalRatio=.25,this._alignment=W(this,"top"),this.alignment=this._alignment,this._quickInputAlignmentContext=HZ.bindTo(r);const c=Tq(this.configurationService)==="custom";this._controlsOnLeft=c&&l.platform===1,this._controlsOnRight=c&&(l.platform===3||l.platform===2),this._registerLayoutListener(),this.registerMouseListeners(),this.dndViewState.set({...n,done:!0},void 0),n?.top!==void 0&&n?.left!==void 0&&this._setAlignmentState(void 0)}reparentUI(e){this._container=e}layoutContainer(e=this._layoutService.activeContainerDimension){if(!this._enabled)return;const t=this.dndViewState.get(),i=this._quickInputContainer.getBoundingClientRect();if(t?.top!==void 0&&t?.left!==void 0){const n=Math.round(t.left*100)/100,s=e.width,r=i.width,a=n*s-r/2;this._layout(t.top*e.height,a)}}setEnabled(e){this._enabled=e,this._quickInputContainer.classList.toggle("no-drag",!e)}_setAlignmentState(e){this._quickInputAlignmentContext.set(e),this._alignment.set(e??"custom",void 0)}_registerLayoutListener(){this._register(l.Event.filter(this._layoutService.onDidLayoutContainer,e=>e.container===this._container)(e=>this.layoutContainer(e.dimension)))}registerMouseListeners(){const e=this._quickInputContainer;this._register(ox(e,t=>{if(!this._enabled)return;const i=new Bi(j(e),t);if(i.detail!==2)return;const n=this._quickInputDragAreas.find(({node:s,includeChildren:r})=>r?ut(i.target,s):i.target===s);!n||n.excludeNodes?.some(s=>ut(i.target,s))||(this.dndViewState.set({top:void 0,left:void 0,done:!0},void 0),this._setAlignmentState("top"))})),this._register(nC(e,t=>{if(!this._enabled)return;const i=j(this._layoutService.activeContainer),n=new Bi(i,t),s=this._quickInputDragAreas.find(({node:f,includeChildren:g})=>g?ut(n.target,f):n.target===f);if(!s||s.excludeNodes?.some(f=>ut(n.target,f)))return;const r=this._quickInputContainer.getBoundingClientRect(),a=n.browserEvent.clientX-r.left,c=n.browserEvent.clientY-r.top;let h=!1;const d=bF(i,f=>{new Bi(i,f).preventDefault(),h||(h=!0),this._layout(f.clientY-c,f.clientX-a)}),u=ox(i,f=>{if(h){const g=this.dndViewState.get();this.dndViewState.set({top:g?.top,left:g?.left,done:!0},void 0)}d.dispose(),u.dispose()})}))}_layout(e,t){const i=this._getTopSnapValue(),n=this._getCenterYSnapValue(),s=this._getCenterXSnapValue();e=Math.max(0,Math.min(e,this._container.clientHeight-this._quickInputContainer.clientHeight)),e<this._layoutService.activeContainerOffset.top&&(this._controlsOnLeft?t=Math.max(t,80/Kb(Le())):this._controlsOnRight&&(t=Math.min(t,this._container.clientWidth-this._quickInputContainer.clientWidth-140/Kb(Le()))));const r=Math.abs(e-i)<this._snapThreshold;e=r?i:e;const a=Math.abs(e-n)<this._snapThreshold;e=a?n:e;const c=e/this._container.clientHeight;t=Math.max(0,Math.min(t,this._container.clientWidth-this._quickInputContainer.clientWidth));const h=Math.abs(t-s)<this._snapThreshold;t=h?s:t;const d=this._container.clientWidth,u=this._quickInputContainer.clientWidth,g=(t+u/2)/d;if(this.dndViewState.set({top:c,left:g,done:!1},void 0),h){if(r){this._setAlignmentState("top");return}else if(a){this._setAlignmentState("center");return}}this._setAlignmentState(void 0)}_getTopSnapValue(){return this._layoutService.activeContainerOffset.quickPickTop}_getCenterYSnapValue(){return Math.round(this._container.clientHeight*this._snapLineHorizontalRatio)}_getCenterXSnapValue(){return Math.round(this._container.clientWidth/2)-Math.round(this._quickInputContainer.clientWidth/2)}};r0=WA([Tr(4,Os),Tr(5,be),Tr(6,Ge)],r0);var MQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lf=function(o,e){return function(t,i){e(t,i,o)}};let a0=class extends zU{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(
Line truncated
|
||||
Ensure your bundler properly bundles modules referenced by "new URL('...?esm', import.meta.url)".`}getWorkerUrl(e){const t=Bf();if(t&&typeof t.getWorkerUrl=="function"){const s=t.getWorkerUrl("workerMain.js",e.label);if(s!==void 0)return new URL(s,document.baseURI).toString()}if(!e.esmModuleLocationBundler)throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker for the worker label: ${e.label}`);return(typeof e.esmModuleLocationBundler=="function"?e.esmModuleLocationBundler():e.esmModuleLocationBundler).toString()}}const BQ={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[vn]:"#FFFFFE",[nc]:"#000000",[kE]:"#E5EBF1",[Ud]:"#D3D3D3",[$d]:"#939393",[$g]:"#ADD6FF4D"}},zQ={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[vn]:"#1E1E1E",[nc]:"#D4D4D4",[kE]:"#3A3D41",[Ud]:"#404040",[$d]:"#707070",[$g]:"#ADD6FF26"}},VQ={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foregrou
Line truncated
|
||||
`)}}const fl=new jQ;St.add($Q.IconContribution,fl);function Mo(o,e,t,i){return fl.registerIcon(o,e,t,i)}function nO(){return fl}function qQ(){const o=l.getCodiconFontCharacters();for(const e in o){const t="\\"+o[e].toString(16);fl.registerIcon(e,{fontCharacter:t})}}qQ();const sO="vscode://schemas/icons",oO=St.as(Cg.JSONContribution);oO.registerSchema(sO,fl.getIconSchema());const rO=new l.RunOnceScheduler(()=>oO.notifySchemaChanged(sO),200);fl.onDidChange(()=>{rO.isScheduled()||rO.schedule()});const YQ=Mo("widget-close",l.Codicon.close,l.localize(2096,"Icon for the close action in widgets."));Mo("goto-previous-location",l.Codicon.arrowUp,l.localize(2097,"Icon for goto previous editor location.")),Mo("goto-next-location",l.Codicon.arrowDown,l.localize(2098,"Icon for goto next editor location.")),_.ThemeIcon.modify(l.Codicon.sync,"spin"),_.ThemeIcon.modify(l.Codicon.loading,"spin");function ZQ(o){const e=new l.DisposableStore,t=e.add(new l.Emitter),i=nO();return e.add(i.onDidChange(()=>t.fire())),o&&e.add(o.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const n=o?o.getProductIconTheme():new aO,s={},r=new Ry,a=new Ry;for(const c of i.getIcons()){const h=n.getIcon(c);if(!h)continue;const d=h.font,u=Yi`--vscode-icon-${Ap(c.id)}-font-family`,f=Yi`--vscode-icon-${Ap(c.id)}-content`;d?(s[d.id]=d.definition,a.push(Yi`${u}: ${yr(d.id)};`,Yi`${f}: ${yr(h.fontCharacter)};`),r.push(Yi`.codicon-${Ap(c.id)}:before { content: ${yr(h.fontCharacter)}; font-family: ${yr(d.id)}; }`)):(a.push(Yi`${f}: ${yr(h.fontCharacter)}; ${u}: 'codicon';`),r.push(Yi`.codicon-${Ap(c.id)}:before { content: ${yr(h.fontCharacter)}; }`))}for(const c in s){const h=s[c],d=h.weight?Yi`font-weight: ${nM(h.weight)};`:Yi``,u=h.style?Yi`font-style: ${nM(h.style)};`:Yi``,f=new Ry;for(const g of h.src)f.push(Yi`${Bs(g.location)} format(${yr(g.format)})`);r.push(Yi`@font-face { src: ${f.join(", ")}; font-family: ${yr(c)};${d}${u} font-display: block; }`)}return r.push(Yi`:root { ${a.join(" ")} }`),r.join(`
|
||||
`)}}}class aO{getIcon(e){const t=nO();let i=e.defaults;for(;_.ThemeIcon.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Ao="vs",bh="vs-dark",gl="hc-black",ml="hc-light",lO=St.as(IE.ColorContribution),QQ=St.as(VI.ThemingContribution);class cO{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(I_(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,l.Color.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=u0(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,l.Color.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=lO.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Ao:return Sn.LIGHT;case gl:return Sn.HIGH_CONTRAST_DARK;case ml:return Sn.HIGH_CONTRAST_LIGHT;default:return Sn.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=u0(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=L1.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Vi.getForeground(s),a=Vi.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}get tokenColorMap(){return[]}}function I_(o){return o===Ao||o===bh||o===gl||o===ml}function u0(o){switch(o){case Ao:return BQ;case bh:return zQ;case gl:return VQ;case ml:return UQ}}function T_(o){const e=u0(o);return new cO(o,e)}class XQ extends l.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new l.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new l.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new aO,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Ao,T_(Ao)),this._knownThemes.set(bh,T_(bh)),this._knownThemes.set(gl,T_(gl)),this._knownThemes.set(ml,T_(ml));const e=this._register(ZQ(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
||||
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Ao),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),OD(Ae,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Yf(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=bn(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),l.Disposable.None}_registerShadowDomContainer(e){const t=bn(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!I_(t.base)&&!I_(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new cO(e,t)),I_(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Ao),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=Ae.matchMedia("(forced-colors: active)").matches;if(e!==pa(this._theme.type)){let t;rr(this._theme.type)?t=e?gl:bh:t=e?ml:Ao,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};QQ.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of lO.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${qC(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(`
|
||||
`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(RK(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join(`
|
||||
`),this._updateCSS(),l.TokenizationRegistry.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
||||
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}class JQ{getParserClass(){throw new Error("not implemented in StandaloneTreeSitterLibraryService")}supportsLanguage(e,t){return!1}getLanguage(e,t,i){}getInjectionQueries(e,t){return null}getHighlightingQueries(e,t){return null}}var Oo=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nt=function(o,e){return function(t,i){e(t,i,o)}};class WQ{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new l.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let f0=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.ImmortalReference(new WQ(t))):Promise.reject(new Error("Model not found"))}};f0=Oo([Nt(0,ri)],f0);const Eb=class Eb{show(){return Eb.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};Eb.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let g0=Eb;class HQ{withProgress(e,t,i){return t({report:()=>{}})}}class eX{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class tX{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+`
|
||||
|
||||
`+t),Ae.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const n=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&n.push(e.cancelButton),t=await n[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:rt.Error,message:e,detail:t})}}const Df=class Df{info(e){return this.notify({severity:rt.Info,message:e})}warn(e){return this.notify({severity:rt.Warning,message:e})}error(e){return this.notify({severity:rt.Error,message:e})}notify(e){switch(e.severity){case rt.Error:console.error(e.message);break;case rt.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Df.NO_OP}prompt(e,t,i,n){return Df.NO_OP}status(e,t){return{close:()=>{}}}};Df.NO_OP=new D4;let m0=Df,p0=class{constructor(e){this._onWillExecuteCommand=new l.Emitter,this._onDidExecuteCommand=new l.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Ut.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};p0=Oo([Nt(0,me)],p0);let Ch=class extends qq{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const m=new l.DisposableStore;m.add(R(g,F.KEY_DOWN,p=>{const b=new Be(p);this._dispatch(b,b.target)&&(b.preventDefault(),b.stopPropagation())})),m.add(R(g,F.KEY_UP,p=>{const b=new Be(p);this._singleModifierDispatch(b,b.target)&&b.preventDefault()})),this._domNodeListeners.push(new iX(g,m))},c=g=>{for(let m=0;m<this._domNodeListeners.length;m++){const p=this._domNodeListeners[m];p.domNode===g&&(this._domNodeListeners.splice(m,1),p.dispose())}},h=g=>{g.getOption(70)||a(g.getContainerDomNode())},d=g=>{g.getOption(70)||c(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(h)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(h);const u=g=>{a(g.getContainerDomNode())},f=g=>{c(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(f)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return l.combinedDisposable(Ut.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>({keybinding:jb(i.keybinding,l.OS),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),l.toDisposable(()=>{for(let i=0;i<this._dynamicKeybindings.length;i++)if(this._dynamicKeybindings[i]===t[0]){this._dynamicKeybindings.splice(i,t.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Zn.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new nh(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return Ae.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new MM(void 0,s.command,s.commandArgs,r,t,null,!1);else{const c=Qu.resolveKeybinding(a,l.OS);for(const h of c)i[n++]=new MM(h,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Yh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Qu([t],l.OS)}};Ch=Oo([Nt(0,be),Nt(1,zi),Nt(2,Xn),Nt(3,yn),Nt(4,ei),Nt(5,pt)],Ch);class iX extends l.Disposable{constructor(e,t){super(),this.domNode=e,this._register(t)}}function hO(o){return!!o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof l.URI)}let N_=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new l.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new d9(e);this._configuration=new Np(t.reload(),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),new l.ResourceMap,Tt.createEmptyModel(e),new l.ResourceMap,e),t.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=hO(e)?e:hO(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new h9({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);n.source=8,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValu
Line truncated
|
||||
`:`\r
|
||||
`}};b0=Oo([Nt(0,Ge)],b0);class nX{publicLog2(){}}const xf=class xf{constructor(){const e=l.URI.from({scheme:xf.SCHEME,authority:"model",path:"/"});this.workspace={id:LA,folders:[new vZ({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===xf.SCHEME?this.workspace.folders[0]:null}};xf.SCHEME="inmemory";let C0=xf;function R_(o,e,t){if(!e||!(o instanceof N_))return;const i=[];Object.keys(e).forEach(n=>{LZ(n)&&i.push([`editor.${n}`,e[n]]),t&&DZ(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let v0=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:EL.convert(e),n=new Map;for(const a of i){if(!(a instanceof Er))throw new Error("bad edit - only text edits are supported");const c=this._modelService.getModel(a.resource);if(!c)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&c.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let h=n.get(c);h||(h=[],n.set(c,h)),h.push(p_.replaceMove(l.Range.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,c]of n)a.pushStackElement(),a.pushEditOperations([],c,()=>[]),a.pushStackElement(),r+=1,s+=c.length;return{ariaSummary:l.format(zL.bulkEditServiceSummary,s,r),isApplied:s>0}}};v0=Oo([Nt(0,ri)],v0);class sX{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return dg(e)}}let w0=class extends zq{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};w0=Oo([Nt(0,Os),Nt(1,pt)],w0);class oX{constructor(){this._neverEmitter=new l.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class rX extends OL{constructor(){super()}}class aX extends uZ{constructor(){super(new _B)}}let S0=class extends Zy{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};S0=Oo([Nt(0,Xn),Nt(1,yn),Nt(2,Fc),Nt(3,xt),Nt(4,Zo),Nt(5,be)],S0);class lX{async playSignal(e,t){}}class cX{constructor(){this.onDidChangeDefaultAccount=l.Event.None}async getDefaultAccount(){return null}}fe(fd,FQ,0),fe(ei,aX,0),fe(Ge,N_,0),fe(TC,_0,0),fe(cE,b0,0),fe(wA,C0,0),fe(AM,sX,0),fe(Xn,nX,0),fe(ey,tX,0),fe(ly,eX,0),fe(yn,m0,0),fe(xr,al,0),fe(yt,rX,0),fe(Tn,XQ,0),fe(ri,kL,0),fe($C,PL,0),fe(be,Ny,0),fe(CA,HQ,0),fe(d_,g0,0),fe(Qa,x7,0),fe(xA,v0,0),fe(DA,oX,0),fe(ql,f0,0),fe(Ui,Sy,0),fe(ts,iZ,0),fe(zi,p0,0),fe(xt,Ch,0),fe(Ps,c0,0),fe(Fc,w0,0),fe(Ou,RL,0),fe(Ip,Ey,0),fe(nn,S0,0),fe(Zo,yy,0),fe(Xa,lX,0),fe(Yw,JQ,0),fe(kx,wB,0),fe(xM,Vq,0),fe(EM,cX,0),fe(EA,SZ,0),fe(Na,vA,0);var J;(function(o){const e=new Oc;for(const[c,h]of Jx())e.set(c,h);const t=new jp(e,!0);e.set(me,t);function i(c){n||r({});const h=e.get(c);if(!h)throw new Error("Missing service "+c);return h instanceof gs?t.invokeFunction(d=>d.get(c)):h}o.get=i;let n=!1;const s=new l.Emitter;function r(c){if(n)return t;n=!0;for(const[d,u]of Jx())e.get(d)||e.set(d,u);for(const d in c)if(c.hasOwnProperty(d)){const u=le(d);e.get(u)instanceof gs&&e.set(u,c[d])}const h=EZ();for(const d of h)try{t.createInstance(d)}catch(u){l.onUnexpectedError(u)}return s.fire(),t}o.initialize=r;function a(c){if(n)return c();const h=new l.DisposableStore,d=h.add(s.event(()=>{d.dispose(),h.add(c())}));return h}o.withServices=a})(J||(J={}));function Po(o,e){return o}function hX(o){return Zr(o)}function dX(o,e,t,i=_.DebugLocation.ofCaller()){return An({debugName:()=>`Configuration Key "${o}"`},n=>t.onDidChangeConfiguration(s=>{s.affectsConfiguration(o)&&n(s)}),()=>t.getValue(o)??e,i)}function qs(o,e,t,i=_.DebugLocation.ofCaller()){const n=o.bindTo(e),s=new l.DisposableStore;return fn({debugName:()=>`Set Context Key "${o.key}"`},r=>{const a=t(r);return n.set(a),a},i).recomputeInitiallyAndOnChange(s),s}class vh{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new vh(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new vh(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.g
Line truncated
|
||||
`:`\r
|
||||
`),await this._clipboardService.writeText(L)})),n.getOption(104)||C.push(new oo("diff.inline.revertChange",l.localize(134,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),C},autoSelectFirstItem:!0})};this._register(At(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;const{top:b,height:v}=Qi(this._diffActions),C=Math.floor(u/3);p.preventDefault(),m({x:p.posx,y:b+v+C})})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(f=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),this.visibility=!0):this.visibility=!1})),this._register(BX({domNode:this._deletedCodeDomNode,diffEntry:s,originalModel:this._originalTextModel,renderLinesResult:this._renderLinesResult,clipboardService:d}))}_updateLightBulbPosition(e,t,i){const{top:n}=Qi(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._renderLinesResult.viewLineCounts){let c=0;for(let h=0;h<this._renderLinesResult.viewLineCounts.length;h++)if(c+=this._renderLinesResult.viewLineCounts[h],r<c)return h}return r}}const LO=lo("diffEditorWidget",{createHTML:o=>o});function DO(o,e,t,i,n=!1){Ot(i,e.fontInfo);const s=t.length>0,r=new ra(1e4);let a=0,c=0;const h=[],d=[];for(let m=0;m<o.lineTokens.length;m++){const p=m+1,b=o.lineTokens[m],v=o.lineBreakData[m],C=Ji.filter(t,p,1,Number.MAX_SAFE_INTEGER);if(v){let w=0;for(const S of v.breakOffsets){const L=b.sliceAndInflate(w,S,0),D=IO(c,L,Ji.extractWrapped(C,w,S),s,o.mightContainNonBasicASCII,o.mightContainRTL,e,r,n);a=Math.max(a,D.maxCharWidth),d.push(new EO(D.output.characterMapping,D.output.containsForeignElements,w)),c++,w=S}h.push(v.breakOffsets.length)}else{h.push(1);const w=IO(c,b,C,s,o.mightContainNonBasicASCII,o.mightContainRTL,e,r,n);a=Math.max(a,w.maxCharWidth),d.push(new EO(w.output.characterMapping,w.output.containsForeignElements,0)),c++}}a+=e.scrollBeyondLastColumn;const u=r.build(),f=LO?LO.createHTML(u):u;i.innerHTML=f;const g=a*e.typicalHalfwidthCharacterWidth;return new VX(c,g,h,d,o)}class xO{constructor(e,t=e.map(s=>null),i=!0,n=!0){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}}class yh{static fromEditor(e){const t=e.getOptions(),i=t.get(59),n=t.get(165);return new yh(e.getModel()?.getOptions().tabSize||0,i,t.get(40),i.typicalHalfwidthCharacterWidth,t.get(118),t.get(75),n.decorationsWidth,t.get(133),t.get(113),t.get(108),t.get(60),t.get(117).verticalScrollbarSize)}constructor(e,t,i,n,s,r,a,c,h,d,u,f,g=!0){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=s,this.lineHeight=r,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=c,this.renderWhitespace=h,this.renderControlCharacters=d,this.fontLigatures=u,this.verticalScrollbarSize=f,this.setWidth=g}withSetWidth(e){return new yh(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,this.scrollBeyondLastColumn,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,e)}withScrollBeyondLastColumn(e){return new yh(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,e,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,this.setWidth)}}class VX{constructor(e,t,i,n,s){this.heightInLines=e,this.minWidthInPx=t,this.viewLineCounts=i,this._renderOutputs=n,this._source=s}getModelPositionAt(e,t){let i=e;for(;i&&!i.classList.contains("view-line");)i=i.parentElement;if(!i)return;const n=i.parentElement;if(!n)return;const s=n.querySelectorAll(".view-line");let r=-1;for(let u=0;u<s.length;u++)if(s[u]===i){r=u;break}if(r===-1||r>=this._renderOutputs.length)return;let a=1,c=r;for(let u=0;u<this.viewLineCounts.length;u++){if(c<this.viewLineCounts[u]){a=u+1;break}c-=this.viewLineCounts[u]}if(a>this._source.lineTokens.length)return;const h=this._renderOutputs[r];if(!h)return;const d=dc(h.characterMapping,e,t)+h.offset;return new l.Position(a,d)}}class EO extends xg{constructor(e,t,i){super(e,t),this.offset=i}}function IO(o,e,t,i,n,s,r,a,c){a.appendString('<div class="view-line'),!c&&!i&&a.appendString(" char-delete"),a.appendString('" style="top:'),a.appendString(String(o*r.lineHeight)),r.setWidth?a.appendString('px;width:1000000px;">'):a.appendString('px;">');const h=e.getLineContent(),d=Wi.isBasicASCII(h,n),u=Wi.containsRTL(h,d,s),f=bd(new Wo(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,h,!1,d,u,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==io.OFF,null,null,r.verticalScrollbarSize),a);a.appendString(
Line truncated
|
||||
`);let r=t;return s!==-1&&(r=t.substring(0,s)),qO(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return qO(o,t,e.createById(i),n)}function qO(o,e,t,i){return o.createModel(e,t,i)}E("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},l.localize(158,"The background color of the diff editor's header")),E("multiDiffEditor.background",vn,l.localize(159,"The background color of the multi file diff editor")),E("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},l.localize(160,"The border color of the multi file diff editor"));var dJ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YO=function(o,e){return function(t,i){e(t,i,o)}};class uJ{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let eD=class extends l.Disposable{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=W(this,void 0),this._collapsed=Z(this,c=>this._viewModel.read(c)?.collapsed.read(c)),this._editorContentHeight=W(this,500),this.contentHeight=Z(this,c=>(this._collapsed.read(c)?0:this._editorContentHeight.read(c))+this._outerEditorHeight),this._modifiedContentWidth=W(this,0),this._modifiedWidth=W(this,0),this._originalContentWidth=W(this,0),this._originalWidth=W(this,0),this.maxScroll=Z(this,c=>{const h=this._modifiedContentWidth.read(c)-this._modifiedWidth.read(c),d=this._originalContentWidth.read(c)-this._originalWidth.read(c);return h>d?{maxScroll:h,width:this._modifiedWidth.read(c)}:{maxScroll:d,width:this._originalWidth.read(c)}}),this._elements=_e("div.multiDiffEntry",[_e("div.header@header",[_e("div.header-content",[_e("div.collapse-button@collapseButton"),_e("div.file-path",[_e("div.title.modified.show-file-icons@primaryPath",[]),_e("div.status.deleted@status",["R"]),_e("div.title.original.show-file-icons@secondaryPath",[])]),_e("div.actions@actions")])]),_e("div.editorParent",[_e("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(_.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Mr(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Mr(this.editor.getOriginalEditor()).isFocused,this.isFocused=Z(this,c=>this.isModifedFocused.read(c)||this.isOriginalFocused.read(c)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.DisposableStore),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=this._register(new v_(this._elements.collapseButton,{}));this._register(he(c=>{r.element.className="",r.icon=this._collapsed.read(c)?l.Codicon.chevronRight:l.Codicon.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._workbenchUIElementFactory.headerClickToCollapse&&(this._elements.header.tabIndex=0,this._elements.header.setAttribute("role","button"),this._register(R(this._elements.header,F.CLICK,c=>{const h=c.target;h instanceof Element&&(h.closest(".actions")||h.closest(".collapse-button")||this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0))})),this._register(R(this._elements.header,F.KEY_DOWN,c=>{if(c.key==="Enter"||c.key===" "){const h=c.target;if(h instanceof Element&&(h.closest(".actions")||h.closest(".collapse-button")))return;c.preventDefault(),this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}}))),this._register(he(c=>{const h=this._collapsed.read(c);this._elements.editor.style.display=h?"none":"block",this._workbenchUIElementFactory.headerClickToCollapse&&this._elements.header.setAttribute("aria-expanded",String(!h))})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(c=>{const h=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(h,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(c=>{const h=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(h,void 0)})),this._register(this.editor.onDidContentSizeChange(c=>{Xh(h=>{this._editorContentHeight.set(c.contentHeight,h),this._modifiedContentWidth.set(this.editor.getModifiedEditor().g
Line truncated
|
||||
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:co(t,a.open),close:co(t,a.close)});else throw je(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function sW(o){Jl.registerLanguage(o)}function oW(){let o=[];return o=o.concat(Jl.getLanguages()),o}function rW(o){return J.get(yt).languageIdCodec.encodeLanguageId(o)}function aW(o,e){return J.withServices(()=>{const i=J.get(yt).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function lW(o,e){return J.withServices(()=>{const i=J.get(yt).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function cW(o,e){if(!J.get(yt).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return J.get(ms).register(o,e,100)}class hW{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return ff.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new l.EncodedTokenizationResult(n.tokens,[],n.endState)}}class ff{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const a=e[s];let c=a.startIndex;s===0?c=0:c<n&&(c=n),i[s]=new l.Token(c,a.scopes,t),n=c}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),r=ff._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new l.TokenizationResult(r,a)}tokenize(e,t,i){return ff.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let r=0,a=0;for(let h=0,d=t.length;h<d;h++){const u=t[h],f=n.match(i,u.scopes)|1024;if(r>0&&s[r-1]===f)continue;let g=u.startIndex;h===0?g=0:g<a&&(g=a),s[r++]=g,s[r++]=f,a=g}const c=new Uint32Array(r);for(let h=0;h<r;h++)c[h]=s[h];return c}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new l.EncodedTokenizationResult(s,[],r)}}function dW(o){return typeof o.getInitialState=="function"}function uW(o){return"tokenizeEncoded"in o}function HO(o){return o&&typeof o.then=="function"}function fW(o){const e=J.get(Tn);if(o){const t=[null];for(let i=1,n=o.length;i<n;i++)t[i]=l.Color.fromHex(o[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function eP(o,e){return uW(e)?new hW(o,e):new ff(o,e,J.get(yt),J.get(Tn))}function oD(o,e){const t=new l.LazyTokenizationSupport(async()=>{const i=await Promise.resolve(e.create());return i?dW(i)?eP(o,i):new Sd(J.get(yt),J.get(Tn),o,WO(o,i),J.get(Ge)):null});return l.TokenizationRegistry.registerFactory(o,t)}function gW(o,e){if(!J.get(yt).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return HO(e)?oD(o,{create:()=>e}):l.TokenizationRegistry.register(o,eP(o,e))}function mW(o,e){const t=i=>new Sd(J.get(yt),J.get(Tn),o,WO(o,i),J.get(Ge));return HO(e)?oD(o,{create:()=>e}):l.TokenizationRegistry.register(o,t(e))}function pW(o,e){return J.get(ze).referenceProvider.register(o,e)}function _W(o,e){return J.get(ze).renameProvider.register(o,e)}function bW(o,e){return J.get(ze).newSymbolNamesProvider.register(o,e)}function CW(o,e){return J.get(ze).signatureHelpProvider.register(o,e)}function vW(o,e){return J.get(ze).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(c=>{if(c)return!c.range&&a&&(c.range=new l.Range(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),c.range||(c.range=new l.Range(n.lineNumber,n.column,n.lineNumber,n.column)),c})}})}function wW(o,e){return J.get(ze).documentSymbolProvider.register(o,e)}function SW(o,e){return J.get(ze).documentHighlightProvider.register(o,e)}function yW(o,e){return J.get(ze).linkedEditingRangeProvider.register(o,e)}function LW(o,e){return J.get(ze).definitionProvider.register(o,e)}function DW(o,e){return J.get(ze).implementationProvider.register(o,e)}function xW(o,e){return J.get(ze).typeDefinitionProvider.register(o,e)}function EW(o,e){return J.get(ze).codeLensProvider.register(o,e)}function IW(o,e,t){return J.get(ze).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const h=J.get(xr).read({resource:n.uri}).filter(d=>l.Range.areIntersectingOrTouching(d,s));return e.provideCodeActions(n
Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
define("vs/editor",["exports","./editor-KLE6jdfb"],(function(e,n){"use strict";e.CancellationTokenSource=n.CancellationTokenSource,e.Emitter=n.Emitter,e.KeyCode=n.KeyCode,e.KeyMod=n.KeyMod,e.MarkerSeverity=n.MarkerSeverity,e.MarkerTag=n.MarkerTag,e.Position=n.Position,e.Range=n.Range,e.Selection=n.Selection,e.SelectionDirection=n.SelectionDirection,e.Token=n.Token,e.Uri=n.Uri,e.editor=n.editor,e.languages=n.languages,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor .synthetic-focus,.monaco-diff-editor .synthetic-focus,.monaco-editor [tabindex="0"]:focus,.monaco-diff-editor [tabindex="0"]:focus,.monaco-editor [tabindex="-1"]:focus,.monaco-diff-editor [tabindex="-1"]:focus,.monaco-editor button:focus,.monaco-diff-editor button:focus,.monaco-editor input[type=button]:focus,.monaco-diff-editor input[type=button]:focus,.monaco-editor input[type=checkbox]:focus,.monaco-diff-editor input[type=checkbox]:focus,.monaco-editor input[type=search]:focus,.monaco-diff-editor input[type=search]:focus,.monaco-editor input[type=text]:focus,.monaco-diff-editor input[type=text]:focus,.monaco-editor select:focus,.monaco-diff-editor select:focus,.monaco-editor textarea:focus,.monaco-diff-editor textarea:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:var(--vscode-focusBorder);opacity:1}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;text-spacing-trim:space-all;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background);overflow-wrap:initial}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .editorCanvas{position:absolute;width:100%;height:100%;z-index:0;pointer-events:none}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .view-overlays>div,.monaco-editor .margin-view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.disable-animations .monaco-scrollable-element>.visible,.disable-animations .monaco-scrollable-element>.invisible.fade{transition:none}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;leLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
define("vs/editor/editor.main",["exports","../json.worker-BizpAl9O","../css.worker-CyhWkhHo","../html.worker-CA3iAimZ","../ts.worker-2QLmBukE","require","vs/nls.messages-loader!","../index-CBVt3dzv","../monaco.contribution-9cKT3C7t","../editor-KLE6jdfb","../monaco.contribution-BgRy6xDf","../monaco.contribution-BE88ZNGY","../monaco.contribution-BPhsneLd"],(function(e,m,k,v,h,a,S,l,u,r,g,y,f){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const d=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,d.get?d:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const j=w(a),T=""+new URL(a.toUrl("../assets/editor.worker-lj3bdIIn.js"),document.baseURI).href;typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),self.MonacoEnvironment={getWorker:function(t,n){return n==="json"?new Worker(o(m.__worker_url_0__)):n==="css"||n==="scss"||n==="less"?new Worker(o(k.__worker_url_0__)):n==="html"||n==="handlebars"||n==="razor"?new Worker(o(v.__worker_url_0__)):n==="typescript"||n==="javascript"?new Worker(o(h.__worker_url_0__)):new Worker(o(T))}};function o(t){typeof t!="string"&&(t=t.toString());const n=new Blob([["const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`importScripts(ttPolicy?.createScriptURL(${JSON.stringify(t)}) ?? ${JSON.stringify(t)});`,"globalThis.postMessage({ type: 'vscode-worker-ready' });"].join("")],{type:"application/javascript"});return URL.createObjectURL(n)}globalThis.monaco=l.monaco;const i=r.languages;i.css=u.register,i.html=g.register,i.typescript=y.register,i.json=f.register;const b=j.toUrl("vs/editor/editor.main.css"),c=document.createElement("link");c.rel="stylesheet",c.href=b,document.head.appendChild(c),e.lsp=l.index,e.css=u.register,e.CancellationTokenSource=r.CancellationTokenSource,e.Emitter=r.Emitter,e.KeyCode=r.KeyCode,e.KeyMod=r.KeyMod,e.MarkerSeverity=r.MarkerSeverity,e.MarkerTag=r.MarkerTag,e.Position=r.Position,e.Range=r.Range,e.Selection=r.Selection,e.SelectionDirection=r.SelectionDirection,e.Token=r.Token,e.Uri=r.Uri,e.editor=r.editor,e.languages=r.languages,e.html=g.register,e.typescript=y.register,e.json=f.register,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
define("vs/editor/editor.worker",["exports","../initialize-DL0l1TGY"],(function(i,e){"use strict";self.onmessage=()=>{e.isWorkerInitialized()||e.start(()=>({}))},i.initialize=e.initialize,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
define("vs/editorWorkerHost-fVE1cjcC",["require","exports"],(function(w1,u){"use strict";function _1(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function y1(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}function as(t,e,n=(i,s)=>i===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let i=0,s=t.length;i<s;i++)if(!n(t[i],e[i]))return!1;return!0}function L1(t,e){const n=t.length-1;e<n&&(t[e]=t[n]),t.pop()}function v1(t,e,n){return os(t.length,i=>n(t[i],e))}function os(t,e){let n=0,i=t-1;for(;n<=i;){const s=(n+i)/2|0,r=e(s);if(r<0)n=s+1;else if(r>0)i=s-1;else return s}return-(n+1)}function $n(t,e,n){if(t=t|0,t>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],s=[],r=[],a=[];for(const l of e){const c=n(l,i);c<0?s.push(l):c>0?r.push(l):a.push(l)}return t<s.length?$n(t,s,n):t<s.length+a.length?a[0]:$n(t-(s.length+a.length),r,n)}function x1(t,e){const n=[];let i;for(const s of t.slice(0).sort(e))!i||e(i[0],s)!==0?(i=[s],n.push(i)):i.push(s);return n}function*ls(t,e){let n,i;for(const s of t)i!==void 0&&e(i,s)?n.push(s):(n&&(yield n),n=[s]),i=s;n&&(yield n)}function us(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function S1(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function N1(t){return t.filter(e=>!!e)}function C1(t){let e=0;for(let n=0;n<t.length;n++)t[n]&&(t[e]=t[n],e+=1);t.length=e}function R1(t){return!Array.isArray(t)||t.length===0}function A1(t){return Array.isArray(t)&&t.length>0}function E1(t,e=n=>n){const n=new Set;return t.filter(i=>{const s=e(i);return n.has(s)?!1:(n.add(s),!0)})}function M1(t,e){let n=typeof e=="number"?t:0;typeof e=="number"?n=t:(n=0,e=t);const i=[];if(n<=e)for(let s=n;s<e;s++)i.push(s);else for(let s=n;s>e;s--)i.push(s);return i}function cs(t,e,n){const i=t.slice(0,e),s=t.slice(e);return i.concat(n,s)}function k1(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.unshift(e))}function T1(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.push(e))}function hs(t,e){for(const n of e)t.push(n)}function P1(t,e){const n=[];for(const i of t){const s=e(i);s!==void 0&&n.push(s)}return n}function I1(t){return Array.isArray(t)?t:[t]}function F1(t,e,n){const i=fs(t,e),s=t.length,r=n.length;t.length=s+r;for(let a=s-1;a>=i;a--)t[a+r]=t[a];for(let a=0;a<r;a++)t[a+i]=n[a]}function D1(t,e,n,i){const s=fs(t,e);let r=t.splice(s,n);return r===void 0&&(r=[]),F1(t,s,i),r}function fs(t,e){return e<0?Math.max(e+t.length,0):Math.min(e,t.length)}var qe;(function(t){function e(r){return r<0}t.isLessThan=e;function n(r){return r<=0}t.isLessThanOrEqual=n;function i(r){return r>0}t.isGreaterThan=i;function s(r){return r===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(qe||(qe={}));function $e(t,e){return(n,i)=>e(t(n),t(i))}function B1(...t){return(e,n)=>{for(const i of t){const s=i(e,n);if(!qe.isNeitherLessOrGreaterThan(s))return s}return qe.neitherLessOrGreaterThan}}const Oe=(t,e)=>t-e,V1=(t,e)=>Oe(t?1:0,e?1:0);function ds(t){return(e,n)=>-t(e,n)}function q1(t){return(e,n)=>e===void 0?n===void 0?qe.neitherLessOrGreaterThan:qe.lessThan:n===void 0?qe.greaterThan:t(e,n)}class U1{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let n=this.firstIdx;for(;n<this.items.length&&e(this.items[n]);)n++;const i=n===this.firstIdx?null:this.items.slice(this.firstIdx,n);return this.firstIdx=n,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const n=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,n}}const Ct=class Ct{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Ct(n=>this.iterate(i=>e(i)?n(i):!0))}map(e){return new Ct(n=>this.iterate(i=>n(e(i))))}findLast(e){let n;return this.iterate(i=>(e(i)&&(n=i),!0)),n}findLastMaxBy(e){let n,i=!0;return this.iterate(s=>((i||qe.isGreaterThan(e(s,n)))&&(i=!1,n=s),!0)),n}};Ct.empty=new Ct(e=>{});let On=Ct;class tn{constructor(e){this._indexMap=e}static createSortPermutation(e,n){const i=Array.from(e.keys()).sort((s,r)=>n(e[s],e[r]));return new tn(i)}apply(e){return e.map((n,i)=>e[this._indexMap[i]])}inverse(){const e=this._indexMap.slice();for(let n=0;n<this._indexMap.length;n++)e[this._indexMap[n]]=n;return new tn(e)}}function W1(t){return t.reduce((e,n)=>e+n,0)}class $1{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?st.isErrorNoTelemetry(e)?new st(e.message+`
|
||||
|
||||
`+e.stack):new Error(e.message+`
|
||||
|
||||
`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const zn=new $1;function O1(t){zn.onUnexpectedError(t)}function ze(t){sn(t)||zn.onUnexpectedError(t)}function ms(t){sn(t)||zn.onUnexpectedExternalError(t)}function Hn(t){if(t instanceof Error){const{name:e,message:n,cause:i}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:st.isErrorNoTelemetry(t),cause:i?Hn(i):void 0,code:t.code}}return t}const nn="Canceled";function sn(t){return t instanceof Ce?!0:t instanceof Error&&t.name===nn&&t.message===nn}class Ce extends Error{constructor(){super(nn),this.name=this.message}}function z1(){const t=new Error(nn);return t.name=t.message,t}function H1(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}function j1(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}class G1 extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class st extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof st)return e;const n=new st;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class G extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,G.prototype)}}function Q1(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function gs(t,e="Unreachable"){throw new Error(e)}function jn(t,e="unexpected state"){if(!t)throw typeof e=="string"?new G(`Assertion Failed: ${e}`):e}function X1(t,e="Soft Assertion Failed"){t||ze(new G(e))}function rt(t){if(!t()){debugger;t(),ze(new G("Assertion Failed"))}}function rn(t,e){let n=0;for(;n<t.length-1;){const i=t[n],s=t[n+1];if(!e(i,s))return!1;n++}return!0}function Gn(t){return typeof t=="string"}function Y1(t,e){return Array.isArray(t)&&t.every(e)}function at(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function J1(t){const e=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof e}function Z1(t){return typeof t=="number"&&!isNaN(t)}function ps(t){return!!t&&typeof t[Symbol.iterator]=="function"}function K1(t){return t===!0||t===!1}function bs(t){return typeof t>"u"}function ea(t){return!an(t)}function an(t){return bs(t)||t===null}function ta(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function na(t){return jn(t!=null,"Argument is `undefined` or `null`."),t}function ws(t){return typeof t=="function"}function ia(t,e){const n=Math.min(t.length,e.length);for(let i=0;i<n;i++)sa(t[i],e[i])}function sa(t,e){if(Gn(e)){if(typeof t!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(ws(e)){try{if(t instanceof e)return}catch{}if(!an(t)&&t.constructor===e||e.length===1&&e.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function ra(t){return t}function _s(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;const e=Array.isArray(t)?[]:{};return Object.entries(t).forEach(([n,i])=>{e[n]=i&&typeof i=="object"?_s(i):i}),e}function aa(t){if(!t||typeof t!="object")return t;const e=[t];for(;e.length>0;){const n=e.shift();Object.freeze(n);for(const i in n)if(ys.call(n,i)){const s=n[i];typeof s=="object"&&!Object.isFrozen(s)&&!J1(s)&&e.push(s)}}return t}const ys=Object.prototype.hasOwnProperty;function oa(t,e){return Qn(t,e,new Set)}function Qn(t,e,n){if(an(t))return t;const i=e(t);if(typeof i<"u")return i;if(Array.isArray(t)){const s=[];for(const r of t)s.push(Qn(r,e,n));return s}if(at(t)){if(n.has(t))throw new Error("Cannot clone recursive data-structure");n.add(t);const s={};for(const r in t)ys.call(t,r)&&(s[r]=Qn(t[r],e,n));return n.delete(t),s}return t}function Ls(t,e,n=!0){return at(t)?(at(e)&&Object.keys(e).forEach(i=>{i in t?n&&(at(t[i])&&at(e[i])?Ls(t[i],e[i],n):t[i]=e[i]):t[i]=e[i]}),t):e}function Tt(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,i;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!Tt(t[n],e[n]))return!1}else{const s=[];for(i in t)s.push(i);s.sort();const r=[];for(i in e)r.push(i);if(r.sort(),!Tt(s,r))return!1;for(n=0;n<s.length;n++)if(!Tt(t[s[n]],e[s[n]]))return!1}return!0}function vs(){return globalThis._VSCODE_NLS_MESSAGES}function Xn(){return globalThis._VSCODE_NLS_LANGUAGE}const la=Xn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function on(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(i,s)=>{const r=s[0],a=e[r];let l=i;return typeof a=="string"?l=a:(typeof a=="number"||ty
Line truncated
|
||||
`).slice(2).join(`
|
||||
`))}}class dn extends Error{constructor(e,n,i,s,r){super(r?`[${r}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=s,this.details=n,this.stack=i}static is(e){return e instanceof dn||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}}class Fa extends dn{constructor(e,n,i,s,r){super(e,n,i,s,r),this.name="ListenerRefusalError"}}class si{constructor(e){this.value=e}}const Da=2;class ie{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new ii(e?.onListenerError??ze,this._options?.leakWarningThreshold??Ia,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new ni(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const c=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=c[1]/this._size>.3?"dominated":"popular",d=new Fa(h,`${l}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||ze)(d),we.None}if(this._disposed)return we.None;n&&(e=e.bind(n));const s=new si(e);let r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=fn.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof si?(this._deliveryQueue??=new Vs,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=xe(()=>{r?.(),this._removeListener(s)});return ri(a,i),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,i=n.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[i]=void 0;const s=this._deliveryQueue.current===this;if(this._size*Da<=n.length){let r=0;for(let a=0;a<n.length;a++)n[a]?n[r++]=n[a]:s&&r<this._deliveryQueue.end&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=r}}_deliver(e,n){if(!e)return;const i=this._options?.onListenerError||ze;if(!i){e.value(n);return}try{e.value(n)}catch(s){i(s)}}_deliverQueue(e){const n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof si)this._deliver(this._listeners,e);else{const n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}}const Ba=()=>new Vs;class Vs{constructor(){this.i=-1,this.end=0}enqueue(e,n,i){this.i=0,this.end=i,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class qs extends ie{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Kn,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Va extends qs{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class qa extends ie{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(n=>super.fire(n)),this._queuedEvents=[]}))}}class Ua{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new ie({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const n=
Line truncated
|
||||
`+e(a,i+1):s+=`${a}
|
||||
`;return s};return e(this._data,0)}}const Wt="default",Pr="$initialize";let Ir=!1;function Fr(t){Zn&&(Ir||(Ir=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(t.message))}class Jl{constructor(e,n,i,s,r){this.vsWorker=e,this.req=n,this.channel=i,this.method=s,this.args=r,this.type=0}}class Dr{constructor(e,n,i,s){this.vsWorker=e,this.seq=n,this.res=i,this.err=s,this.type=1}}class Zl{constructor(e,n,i,s,r){this.vsWorker=e,this.req=n,this.channel=i,this.eventName=s,this.arg=r,this.type=2}}class Kl{constructor(e,n,i){this.vsWorker=e,this.req=n,this.event=i,this.type=3}}class eu{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Br{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,i){const s=String(++this._lastSentReq);return new Promise((r,a)=>{this._pendingReplies[s]={resolve:r,reject:a},this._send(new Jl(this._workerId,s,e,n,i))})}listen(e,n,i){let s=null;const r=new ie({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,r),this._send(new Zl(this._workerId,s,e,n,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new eu(this._workerId,s)),s=null}});return r.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){const i={get:(s,r)=>(typeof r=="string"&&!s[r]&&(Bi(r)?s[r]=a=>this.listen(e,r,a):Di(r)?s[r]=this.listen(e,r,void 0):r.charCodeAt(0)===36&&(s[r]=async(...a)=>(await n?.(),this.sendMessage(e,r,a)))),s[r])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;if(e.err.$isError){const s=new Error;s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack,i=s}n.reject(i);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(s=>{this._send(new Dr(this._workerId,n,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=Hn(s.detail)),this._send(new Dr(this._workerId,n,void 0,Hn(s)))})}_handleSubscribeEventMessage(e){const n=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)(s=>{this._send(new Kl(this._workerId,n,s))});this._pendingEvents.set(n,i)}_handleEventMessage(e){const n=this._pendingEmitters.get(e.req);if(n===void 0){console.warn("Got event for unknown req");return}n.fire(e.event)}_handleUnsubscribeEventMessage(e){const n=this._pendingEvents.get(e.req);if(n===void 0){console.warn("Got unsubscribe for unknown req");return}n.dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let i=0;i<e.args.length;i++){const s=e.args[i];s instanceof ArrayBuffer&&n.push(s)}else e.type===1&&e.res instanceof ArrayBuffer&&n.push(e.res);this._handler.sendMessage(e,n)}}class tu extends we{constructor(e){super(),this._localChannels=new Map,this._worker=this._register(e),this._register(this._worker.onMessage(n=>{this._protocol.handleMessage(n)})),this._register(this._worker.onError(n=>{Fr(n),ze(n)})),this._protocol=new Br({sendMessage:(n,i)=>{this._worker.postMessage(n,i)},handleMessage:(n,i,s)=>this._handleMessage(n,i,s),handleEvent:(n,i,s)=>this._handleEvent(n,i,s)}),this._protocol.setWorkerId(this._worker.getId()),this._onModuleLoaded=this._protocol.sendMessage(Wt,Pr,[this._worker.getId()]).then(()=>{}),this.proxy=this._protocol.createProxyToRemoteChannel(Wt,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(n=>{this._onError("Worker failed to load ",n)})}_handleMessage(e,n,i){const s=this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on main thread`));const r=s[n];if(typeof r!="function")return Promise.reject(new Error(`Missing method ${n} on main thread channel ${e}`));try{return Promise.resolve(r.apply(s,i))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,i){const s=this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on main thread`);if(Bi(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing dynamic event ${n} on main thread channel ${e}.`);const a=r.call(s,i);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on main thread channel ${e}.`);return a}if(Di(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing event ${n} on main thread channel ${e}.`);return r}throw new Err
Line truncated
|
||||
`)>=0;let n=null;try{n=sr(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!n)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new mu(n,this.wordSeparators?Wr(this.wordSeparators,[]):null,i?this.searchString:null)}}function $r(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i===10)return!0;if(i===92){if(e++,e>=n)break;const s=t.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function _t(t,e,n){if(!n)return new An(t,null);const i=[];for(let s=0,r=e.length;s<r;s++)i[s]=e[s];return new An(t,i)}class Or{constructor(e){const n=[];let i=0;for(let s=0,r=e.length;s<r;s++)e.charCodeAt(s)===10&&(n[i++]=s);this._lineFeedsOffsets=n}findLineFeedCountBeforeOffset(e){const n=this._lineFeedsOffsets;let i=0,s=n.length-1;if(s===-1||e<=n[0])return 0;for(;i<s;){const r=i+((s-i)/2>>0);n[r]>=e?s=r-1:n[r+1]>=e?(i=r,s=r):i=r+1}return i+1}}class _u{static findMatches(e,n,i,s,r){const a=n.parseSearchRequest();return a?a.regex.multiline?this._doFindMatchesMultiline(e,i,new yt(a.wordSeparators,a.regex),s,r):this._doFindMatchesLineByLine(e,i,a,s,r):[]}static _getMultilineMatchRange(e,n,i,s,r,a){let l,c=0;s?(c=s.findLineFeedCountBeforeOffset(r),l=n+r+c):l=n+r;let h;if(s){const b=s.findLineFeedCountBeforeOffset(r+a.length)-c;h=l+a.length+b}else h=l+a.length;const d=e.getPositionAt(l),f=e.getPositionAt(h);return new N(d.lineNumber,d.column,f.lineNumber,f.column)}static _doFindMatchesMultiline(e,n,i,s,r){const a=e.getOffsetAt(n.getStartPosition()),l=e.getValueInRange(n,1),c=e.getEOL()===`\r
|
||||
`?new Or(l):null,h=[];let d=0,f;for(i.reset(0);f=i.next(l);)if(h[d++]=_t(this._getMultilineMatchRange(e,a,l,c,f.index,f[0]),f,s),d>=r)return h;return h}static _doFindMatchesLineByLine(e,n,i,s,r){const a=[];let l=0;if(n.startLineNumber===n.endLineNumber){const h=e.getLineContent(n.startLineNumber).substring(n.startColumn-1,n.endColumn-1);return l=this._findMatchesInLine(i,h,n.startLineNumber,n.startColumn-1,l,a,s,r),a}const c=e.getLineContent(n.startLineNumber).substring(n.startColumn-1);l=this._findMatchesInLine(i,c,n.startLineNumber,n.startColumn-1,l,a,s,r);for(let h=n.startLineNumber+1;h<n.endLineNumber&&l<r;h++)l=this._findMatchesInLine(i,e.getLineContent(h),h,0,l,a,s,r);if(l<r){const h=e.getLineContent(n.endLineNumber).substring(0,n.endColumn-1);l=this._findMatchesInLine(i,h,n.endLineNumber,0,l,a,s,r)}return a}static _findMatchesInLine(e,n,i,s,r,a,l,c){const h=e.wordSeparators;if(!l&&e.simpleSearch){const m=e.simpleSearch,b=m.length,p=n.length;let g=-b;for(;(g=n.indexOf(m,g+b))!==-1;)if((!h||$i(h,n,p,g,b))&&(a[r++]=new An(new N(i,g+1+s,i,g+1+b+s),null),r>=c))return r;return r}const d=new yt(e.wordSeparators,e.regex);let f;d.reset(0);do if(f=d.next(n),f&&(a[r++]=_t(new N(i,f.index+1+s,i,f.index+1+f[0].length+s),f,l),r>=c))return r;while(f);return r}static findNextMatch(e,n,i,s){const r=n.parseSearchRequest();if(!r)return null;const a=new yt(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,i,a,s):this._doFindNextMatchLineByLine(e,i,a,s)}static _doFindNextMatchMultiline(e,n,i,s){const r=new U(n.lineNumber,1),a=e.getOffsetAt(r),l=e.getLineCount(),c=e.getValueInRange(new N(r.lineNumber,r.column,l,e.getLineMaxColumn(l)),1),h=e.getEOL()===`\r
|
||||
`?new Or(c):null;i.reset(n.column-1);const d=i.next(c);return d?_t(this._getMultilineMatchRange(e,a,c,h,d.index,d[0]),d,s):n.lineNumber!==1||n.column!==1?this._doFindNextMatchMultiline(e,new U(1,1),i,s):null}static _doFindNextMatchLineByLine(e,n,i,s){const r=e.getLineCount(),a=n.lineNumber,l=e.getLineContent(a),c=this._findFirstMatchInLine(i,l,a,n.column,s);if(c)return c;for(let h=1;h<=r;h++){const d=(a+h-1)%r,f=e.getLineContent(d+1),m=this._findFirstMatchInLine(i,f,d+1,1,s);if(m)return m}return null}static _findFirstMatchInLine(e,n,i,s,r){e.reset(s-1);const a=e.next(n);return a?_t(new N(i,a.index+1,i,a.index+1+a[0].length),a,r):null}static findPreviousMatch(e,n,i,s){const r=n.parseSearchRequest();if(!r)return null;const a=new yt(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,i,a,s):this._doFindPreviousMatchLineByLine(e,i,a,s)}static _doFindPreviousMatchMultiline(e,n,i,s){const r=this._doFindMatchesMultiline(e,new N(1,1,n.lineNumber,n.column),i,s,10*bu);if(r.length>0)return r[r.length-1];const a=e.getLineCount();return n.lineNumber!==a||n.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new U(a,e.getLineMaxColumn(a)),i,s):null}static _doFindPreviousMatchLineByLine(e,n,i,s){const r=e.getLineCount(),a=n.lineNumber,l=e.getLineContent(a).substring(0,n.column-1),c=this._findLastMatchInLine(i,l,a,s);if(c)return c;for(let h=1;h<=r;h++){const d=(r+a-h-1)%r,f=e.getLineContent(d+1),m=this._findLastMatchInLine(i,f,d+1,s);if(m)return m}return null}static _findLastMatchInLine(e,n,i,s){let r=null,a;for(e.reset(0);a=e.next(n);)r=_t(new N(i,a.index+1,i,a.index+1+a[0].length),a,s);return r}}function yu(t,e,n,i,s){if(i===0)return!0;const r=e.charCodeAt(i-1);if(t.get(r)!==0||r===13||r===10)return!0;if(s>0){const a=e.charCodeAt(i);if(t.get(a)!==0)return!0}return!1}function Lu(t,e,n,i,s){if(i+s===n)return!0;const r=e.charCodeAt(i+s);if(t.get(r)!==0||r===13||r===10)return!0;if(s>0){const a=e.charCodeAt(i+s-1);if(t.get(a)!==0)return!0}return!1}function $i(t,e,n,i,s){return yu(t,e,n,i,s)&&Lu(t,e,n,i,s)}class yt{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(i=this._searchRegex.exec(e),!i))return null;const s=i.index,r=i[0].length;if(s===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){Ri(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=r,!this._wordSeparators||$i(this._wordSeparators,e,n,s,r))return i}while(i);return null}}class zr{static computeUnicodeHighlights(e,n,i){const s=i?i.startLineNumber:1,r=i?i.endLineNumber:e.getLineCount(),a=new Hr(n),l=a.getCandidateCodePoints();let c;l==="allNonBasicAscii"?c=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):c=new RegExp(`${vu(Array.from(l))}`,"g");const h=new yt(null,c),d=[];let f=!1,m,b=0,p=0,g=0;e:for(let _=s,x=r;_<=x;_++){const S=e.getLineContent(_),v=S.length;h.reset(0);do if(m=h.next(S),m){let k=m.index,D=m.index+m[0].length;if(k>0){const R=S.charCodeAt(k-1);ft(R)&&k--}if(D+1<v){const R=S.charCodeAt(D-1);ft(R)&&D++}const O=S.substring(k,D);let y=mn(k+1,ai,S,0);y&&y.endColumn<=k+1&&(y=null);const L=a.shouldHighlightNonBasicASCII(O,y?y.word:null);if(L!==0){if(L===3?b++:L===2?p++:L===1?g++:gs(),d.length>=1e3){f=!0;break e}d.push(new N(_,k+1,_,D+1))}}while(m)}return{ranges:d,hasMore:f,ambiguousCharacterCount:b,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,n){const i=new Hr(n);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),a=i.ambiguousCharacters.getPrimaryConfusable(r),l=Vt.getLocales().filter(c=>!Vt.getInstance(new Set([...n.allowedLocales,c])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:l}}case 1:return{kind:2}}}}function vu(t,e){return`[${vi(t.map(i=>String.fromCodePoint(i)).join(""))}]`}class Hr{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Vt.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of mt.codePoints)jr(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,r=!1;if(n)for(const a of n){const l=a.codePointAt(0),c=dr(a);s=s||c,!c&&!this.ambiguousCharacters.isAmbiguous(l)&&!mt.isInvisibl
Line truncated
|
||||
`||t===" "}class Ot{constructor(e,n,i){this.changes=e,this.moves=n,this.hitTimeout=i}}class Oi{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}class I{static fromTo(e,n){return new I(e,n)}static addRange(e,n){let i=0;for(;i<n.length&&n[i].endExclusive<e.start;)i++;let s=i;for(;s<n.length&&n[s].start<=e.endExclusive;)s++;if(i===s)n.splice(i,0,e);else{const r=Math.min(e.start,n[i].start),a=Math.max(e.endExclusive,n[s-1].endExclusive);n.splice(i,s-i,new I(r,a))}}static tryCreate(e,n){if(!(e>n))return new I(e,n)}static ofLength(e){return new I(0,e)}static ofStartAndLength(e,n){return new I(e,e+n)}static emptyAt(e){return new I(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new G(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new I(this.start+e,this.endExclusive+e)}deltaStart(e){return new I(this.start+e,this.endExclusive)}deltaEnd(e){return new I(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new I(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(n<=i)return new I(n,i)}intersectionLength(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,i-n)}intersects(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<i}intersectsOrTouches(e){const n=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);return n<=i}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new G(`Invalid join: ${this.toString()} and ${e.toString()}`);return new I(this.start,e.endExclusive)}withMargin(e,n){return n===void 0&&(n=e),new I(this.start-e,this.endExclusive+n)}}class zi{constructor(){this._sortedRanges=[]}addRange(e){let n=0;for(;n<this._sortedRanges.length&&this._sortedRanges[n].endExclusive<e.start;)n++;let i=n;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(n===i)this._sortedRanges.splice(n,0,e);else{const s=Math.min(e.start,this._sortedRanges[n].start),r=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(n,i-n,new I(s,r))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let n=0;for(;n<this._sortedRanges.length&&this._sortedRanges[n].endExclusive<=e.start;)n++;return n<this._sortedRanges.length&&this._sortedRanges[n].start<e.endExclusive}intersectWithRange(e){const n=new zi;for(const i of this._sortedRanges){const s=i.intersect(e);s&&n.addRange(s)}return n}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,n)=>e+n.length,0)}}function xu(t,e,n=t.length-1){const i=Su(t,e,n);if(i!==-1)return t[i]}function Su(t,e,n=t.length-1){for(let i=n;i>=0;i--){const s=t[i];if(e(s,i))return i}return-1}function Lt(t,e){const n=vt(t,e);return n===-1?void 0:t[n]}function vt(t,e,n=0,i=t.length){let s=n,r=i;for(;s<r;){const a=Math.floor((s+r)/2);e(t[a])?s=a+1:r=a}return s-1}function Nu(t,e){const n=En(t,e);return n===t.length?void 0:t[n]}function En(t,e,n=0,i=t.length){let s=n,r=i;for(;s<r;){const a=Math.floor((s+r)/2);e(t[a])?r=a:s=a+1}return s}const Un=class Un{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(Un.assertInvariants){if(this._prevFindLastPredicate){for(const i of this._array)if(this._prevFindLastPredicate(i)&&!e(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const n=vt(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Un.assertInvariants=!1;let Mn=Un;function Gr(t,e){if(t.length===0)return;let n=t[0];for(let i=1;i<t.length;i++){const s=t[i];e(s,n)>0&&(n=s)}return n}function Cu(t,e){if(t.length===0)return;let n=t[0];for(let i=1;i<t.length;i++){const s=t[i];e(s,n)>=0&&(n=s)}return n}function Ru(t,e){return Gr(t,(n,i)=>
Line truncated
|
||||
`?(n++,i=0):i++;return new Le(n,i)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Le(this.lineCount,this.columnCount+e.columnCount):new Le(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new N(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new N(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new N(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return H.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new U(e.lineNumber,e.column+this.columnCount):new U(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Le.zero=new Le(0,0);let Fe=Le;class Qr{getOffsetRange(e){return new I(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return N.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Xe.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Xe.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(i=>this.getTextReplacement(i));return new Xe.deps.TextEdit(n)}}const rs=class rs{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};rs._deps=void 0;let Xe=rs;function Mu(t){Xe._deps=t}class Hi extends Qr{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
|
||||
`&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new U(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const s=this.getLineLength(n);return new U(n,s+1)}if(e.column<1)return new U(e.lineNumber,1);const i=this.getLineLength(e.lineNumber);return e.column-1>i?new U(e.lineNumber,i+1):e}getPosition(e){const n=vt(this.lineStartOffsetByLineIdx,r=>r<=e),i=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new U(i,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Xe.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class ji{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new U(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new N(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Hi(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new N(e,1,e,Number.MAX_SAFE_INTEGER))}}class ku extends ji{constructor(e,n){jn(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)n+=`
|
||||
`+this._getLineContent(i);return n+=`
|
||||
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){const e=this._getLineContent(this._lineCount);return new Fe(this._lineCount-1,e.length)}}class kn extends ku{constructor(e){super(n=>e[n-1],e.length)}}class zt extends ji{constructor(e){super(),this.value=e,this._t=new Hi(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}class Ht{static fromStringEdit(e,n){const i=e.replacements.map(s=>ge.fromStringReplacement(s,n));return new Ht(i)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort($e(i=>i.range,N.compareRangesUsingStarts));return new Ht(n)}constructor(e){this.replacements=e,rt(()=>rn(e,(n,i)=>n.range.getEndPosition().isBeforeOrEqual(i.range.getStartPosition())))}mapPosition(e){let n=0,i=0,s=0;for(const r of this.replacements){const a=r.range.getStartPosition();if(e.isBeforeOrEqual(a))break;const l=r.range.getEndPosition(),c=Fe.ofText(r.text);if(e.isBefore(l)){const h=new U(a.lineNumber+n,a.column+(a.lineNumber+n===i?s:0)),d=c.addToPosition(h);return Tn(h,d)}a.lineNumber+n!==i&&(s=0),n+=c.lineCount-(r.range.endLineNumber-r.range.startLineNumber),c.lineCount===0?l.lineNumber!==a.lineNumber?s+=c.columnCount-(l.column-1):s+=c.columnCount-(l.column-a.column):s=c.columnCount,i=l.lineNumber+n}return new U(e.lineNumber+n,e.column+(e.lineNumber+n===i?s:0))}mapRange(e){function n(a){return a instanceof U?a:a.getStartPosition()}function i(a){return a instanceof U?a:a.getEndPosition()}const s=n(this.mapPosition(e.getStartPosition())),r=i(this.mapPosition(e.getEndPosition()));return Tn(s,r)}apply(e){let n="",i=new U(1,1);for(const r of this.replacements){const a=r.range,l=a.getStartPosition(),c=a.getEndPosition(),h=Tn(i,l);h.isEmpty()||(n+=e.getValueOfRange(h)),n+=r.text,i=c}const s=Tn(i,e.endPositionExclusive);return s.isEmpty()||(n+=e.getValueOfRange(s)),n}applyToString(e){const n=new zt(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,i=0,s=0;for(const r of this.replacements){const a=Fe.ofText(r.text),l=U.lift({lineNumber:r.range.startLineNumber+i,column:r.range.startColumn+(r.range.startLineNumber===n?s:0)}),c=a.createRange(l);e.push(c),i=c.endLineNumber-r.range.endLineNumber,s=c.endColumn-r.range.endColumn,n=r.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new G;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition();let s="";for(let r=0;r<this.replacements.length;r++){const a=this.replacements[r];if(s+=a.text,r<this.replacements.length-1){const l=this.replacements[r+1],c=N.fromPositions(a.range.getEndPosition(),l.range.getStartPosition()),h=e.getValueOfRange(c);s+=h}}return new ge(N.fromPositions(n,i),s)}toString(e){return e===void 0?this.replacements.map(n=>n.toString()).join(`
|
||||
`):typeof e=="string"?this.toString(new zt(e)):this.replacements.length===0?"":this.replacements.map(n=>{const s=e.getValueOfRange(n.range),r=N.fromPositions(new U(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let a=e.getValueOfRange(r);a.length>10&&(a="..."+a.substring(a.length-10));const l=N.fromPositions(n.range.getEndPosition(),new U(n.range.endLineNumber+1,1));let c=e.getValueOfRange(l);c.length>10&&(c=c.substring(0,10)+"...");let h=s;if(h.length>10){const f=Math.floor(5);h=h.substring(0,f)+"..."+h.substring(h.length-f)}let d=n.text;if(d.length>10){const f=Math.floor(5);d=d.substring(0,f)+"..."+d.substring(d.length-f)}return h.length===0?`${a}❰${d}❱${c}`:`${a}❰${h}↦${d}❱${c}`}).join(`
|
||||
`)}}class ge{static joinReplacements(e,n){if(e.length===0)throw new G;if(e.length===1)return e[0];const i=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let r="";for(let a=0;a<e.length;a++){const l=e[a];if(r+=l.text,a<e.length-1){const c=e[a+1],h=N.fromPositions(l.range.getEndPosition(),c.range.getStartPosition()),d=n.getValueOfRange(h);r+=d}}return new ge(N.fromPositions(i,s),r)}static fromStringReplacement(e,n){return new ge(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new ge(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return ge.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=yn(n,i),r=Fe.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),a=i.substring(s),l=N.fromPositions(r,this.range.getEndPosition());return new ge(l,a)}removeCommonSuffix(e){const n=e.getValueOfRange(this.range).replaceAll(`\r
|
||||
`,`
|
||||
`),i=this.text.replaceAll(`\r
|
||||
`,`
|
||||
`),s=Ln(n,i),r=Fe.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),a=i.substring(0,i.length-s),l=N.fromPositions(this.range.getStartPosition(),r);return new ge(l,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}function Tn(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return N.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new G("start must be before end");return new N(t.lineNumber,t.column,e.lineNumber,e.column)}class he{static inverse(e,n,i){const s=[];let r=1,a=1;for(const c of e){const h=new he(new H(r,c.original.startLineNumber),new H(a,c.modified.startLineNumber));h.modified.isEmpty||s.push(h),r=c.original.endLineNumberExclusive,a=c.modified.endLineNumberExclusive}const l=new he(new H(r,n+1),new H(a,i+1));return l.modified.isEmpty||s.push(l),s}static clip(e,n,i){const s=[];for(const r of e){const a=r.original.intersect(n),l=r.modified.intersect(i);a&&!a.isEmpty&&l&&!l.isEmpty&&s.push(new he(a,l))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new he(this.modified,this.original)}join(e){return new he(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new fe(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new G("not a valid diff");return new fe(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new fe(new N(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new N(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Xr(this.original.endLineNumberExclusive,e)&&Xr(this.modified.endLineNumberExclusive,n))return new fe(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new fe(N.fromPositions(new U(this.original.startLineNumber,1),xt(new U(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(new U(this.modified.startLineNumber,1),xt(new U(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new fe(N.fromPositions(xt(new U(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),xt(new U(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(xt(new U(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),xt(new U(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new G}}function xt(t,e){if(t.lineNumber<1)return new U(1,1);if(t.lineNumber>e.length)return new U(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new U(t.lineNumber,n.length+1):t}function Xr(t,e){return t>=1&&t<=e.length}class Se extends he{static fromRangeMappings(e){const n=H.join(e.map(s=>H.fromRangeInclusive(s.originalRange))),i=H.join(e.map(s=>H.fromRangeInclusive(s.modifiedRange)));return new Se(n,i,e)}constructor(e,n,i){super(e,n),this.innerChanges=i}flip(){return new Se(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Se(this.original,this.modified,[this.toRangeMapping()])}}class fe{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((s,r)=>new fe(s.range,n[r]))}static assertSorted(e){for(let n=1;n<e.length;n++){const i=e[n-1],s=e[n];if(!(i.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&i.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new G("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new fe(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new ge(this.originalRange,n)}}function Pn(t,e,n,i=!1){const s=[];for(const r of ls(t.map(a=>Tu(a,e,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){const a=r[0],l=r[r.length-1];s.push(new Se(a.original.join(l.original),a.modified.join(l.modified),r.map(c=>c.innerChanges[0])))}return rt(()=>!i&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.line
Line truncated
|
||||
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=s}computeSimilarity(e){let n=0;const i=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<i;s++)n+=Math.abs((this.histogram[s]??0)-(e.histogram[s]??0));return 1-n/(this.totalCount+e.totalCount)}};Kt.chrKeys=new Map;let In=Kt;class qu{compute(e,n,i=Gt.instance,s){if(e.length===0||n.length===0)return De.trivial(e,n);const r=new Xi(e.length,n.length),a=new Xi(e.length,n.length),l=new Xi(e.length,n.length);for(let p=0;p<e.length;p++)for(let g=0;g<n.length;g++){if(!i.isValid())return De.trivialTimedOut(e,n);const _=p===0?0:r.get(p-1,g),x=g===0?0:r.get(p,g-1);let S;e.getElement(p)===n.getElement(g)?(p===0||g===0?S=0:S=r.get(p-1,g-1),p>0&&g>0&&a.get(p-1,g-1)===3&&(S+=l.get(p-1,g-1)),S+=s?s(p,g):1):S=-1;const v=Math.max(_,x,S);if(v===S){const k=p>0&&g>0?l.get(p-1,g-1):0;l.set(p,g,k+1),a.set(p,g,3)}else v===_?(l.set(p,g,0),a.set(p,g,1)):v===x&&(l.set(p,g,0),a.set(p,g,2));r.set(p,g,v)}const c=[];let h=e.length,d=n.length;function f(p,g){(p+1!==h||g+1!==d)&&c.push(new J(new I(p+1,h),new I(g+1,d))),h=p,d=g}let m=e.length-1,b=n.length-1;for(;m>=0&&b>=0;)a.get(m,b)===3?(f(m,b),m--,b--):a.get(m,b)===1?m--:b--;return f(-1,-1),c.reverse(),new De(c,!1)}}class Kr{compute(e,n,i=Gt.instance){if(e.length===0||n.length===0)return De.trivial(e,n);const s=e,r=n;function a(g,_){for(;g<s.length&&_<r.length&&s.getElement(g)===r.getElement(_);)g++,_++;return g}let l=0;const c=new Uu;c.set(0,a(0,0));const h=new Wu;h.set(0,c.get(0)===0?null:new e1(null,0,0,c.get(0)));let d=0;e:for(;;){if(l++,!i.isValid())return De.trivialTimedOut(s,r);const g=-Math.min(l,r.length+l%2),_=Math.min(l,s.length+l%2);for(d=g;d<=_;d+=2){const x=d===_?-1:c.get(d+1),S=d===g?-1:c.get(d-1)+1,v=Math.min(Math.max(x,S),s.length),k=v-d;if(v>s.length||k>r.length)continue;const D=a(v,k);c.set(d,D);const O=v===x?h.get(d+1):h.get(d-1);if(h.set(d,D!==v?new e1(O,v,k,D-v):O),c.get(d)===s.length&&c.get(d)-d===r.length)break e}}let f=h.get(d);const m=[];let b=s.length,p=r.length;for(;;){const g=f?f.x+f.length:0,_=f?f.y+f.length:0;if((g!==b||_!==p)&&m.push(new J(new I(g,b),new I(_,p))),!f)break;b=f.x,p=f.y,f=f.prev}return m.reverse(),new De(m,!1)}}class e1{constructor(e,n,i,s){this.prev=e,this.x=n,this.y=i,this.length=s}}class Uu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=n}}}class Wu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Fn{constructor(e,n,i){this.lines=e,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let r=e[s-1],a=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,r=r.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!i){const h=r.trimStart();l=r.length-h.length,r=h.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const c=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,r.length):r.length;for(let h=0;h<c;h++)this.elements.push(r.charCodeAt(h));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new I(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=i1(e>0?this.elements[e-1]:-1),i=i1(e<this.elements.length?this.elements[e]:-1);if(n===7&&i===8)return 0;if(n===8)return 150;let s=0;return n!==i&&(s+=10,n===0&&i===1&&(s+=1)),s+=n1(n),s+=n1(i),s}translateOffset(e,n="right"){const i=vt(this.firstElementOffsetByLineIdx,r=>r<=e),s=e-this.firstElementOffsetByLineIdx[i];return new U(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const n=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(n)?N.fromPositions(i,i):N.fromPositions(n,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!Nt(this.elements[e]))return;let n=e;for(;n>0&&Nt(this.elements[n-1]);)n--;let i=e;for(;i<this.elements.length&&Nt(this.elements[i]);)i++;return new I(n,i)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Nt(this.elements[e]))return;l
Line truncated
|
||||
`).length>=15&&zu(f,b=>b.length>=2)>=2}),a=Qu(t,a),a}function zu(t,e){let n=0;for(const i of t)e(i)&&n++;return n}function Hu(t,e,n,i){const s=[],r=t.filter(c=>c.modified.isEmpty&&c.original.length>=3).map(c=>new In(c.original,e,c)),a=new Set(t.filter(c=>c.original.isEmpty&&c.modified.length>=3).map(c=>new In(c.modified,n,c))),l=new Set;for(const c of r){let h=-1,d;for(const f of a){const m=c.computeSimilarity(f);m>h&&(h=m,d=f)}if(h>.9&&d&&(a.delete(d),s.push(new he(c.range,d.range)),l.add(c.source),l.add(d.source)),!i.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function ju(t,e,n,i,s,r){const a=[],l=new Tr;for(const m of t)for(let b=m.original.startLineNumber;b<m.original.endLineNumberExclusive-2;b++){const p=`${e[b-1]}:${e[b+1-1]}:${e[b+2-1]}`;l.add(p,{range:new H(b,b+3)})}const c=[];t.sort($e(m=>m.modified.startLineNumber,Oe));for(const m of t){let b=[];for(let p=m.modified.startLineNumber;p<m.modified.endLineNumberExclusive-2;p++){const g=`${n[p-1]}:${n[p+1-1]}:${n[p+2-1]}`,_=new H(p,p+3),x=[];l.forEach(g,({range:S})=>{for(const k of b)if(k.originalLineRange.endLineNumberExclusive+1===S.endLineNumberExclusive&&k.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){k.originalLineRange=new H(k.originalLineRange.startLineNumber,S.endLineNumberExclusive),k.modifiedLineRange=new H(k.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),x.push(k);return}const v={modifiedLineRange:_,originalLineRange:S};c.push(v),x.push(v)}),b=x}if(!r.isValid())return[]}c.sort(ds($e(m=>m.modifiedLineRange.length,Oe)));const h=new ye,d=new ye;for(const m of c){const b=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,p=h.subtractFrom(m.modifiedLineRange),g=d.subtractFrom(m.originalLineRange).getWithDelta(b),_=p.getIntersection(g);for(const x of _.ranges){if(x.length<3)continue;const S=x,v=x.delta(-b);a.push(new he(v,S)),h.addRange(S),d.addRange(v)}}a.sort($e(m=>m.original.startLineNumber,Oe));const f=new Mn(t);for(let m=0;m<a.length;m++){const b=a[m],p=f.findLastMonotonous(O=>O.original.startLineNumber<=b.original.startLineNumber),g=Lt(t,O=>O.modified.startLineNumber<=b.modified.startLineNumber),_=Math.max(b.original.startLineNumber-p.original.startLineNumber,b.modified.startLineNumber-g.modified.startLineNumber),x=f.findLastMonotonous(O=>O.original.startLineNumber<b.original.endLineNumberExclusive),S=Lt(t,O=>O.modified.startLineNumber<b.modified.endLineNumberExclusive),v=Math.max(x.original.endLineNumberExclusive-b.original.endLineNumberExclusive,S.modified.endLineNumberExclusive-b.modified.endLineNumberExclusive);let k;for(k=0;k<_;k++){const O=b.original.startLineNumber-k-1,y=b.modified.startLineNumber-k-1;if(O>i.length||y>s.length||h.contains(y)||d.contains(O)||!s1(i[O-1],s[y-1],r))break}k>0&&(d.addRange(new H(b.original.startLineNumber-k,b.original.startLineNumber)),h.addRange(new H(b.modified.startLineNumber-k,b.modified.startLineNumber)));let D;for(D=0;D<v;D++){const O=b.original.endLineNumberExclusive+D,y=b.modified.endLineNumberExclusive+D;if(O>i.length||y>s.length||h.contains(y)||d.contains(O)||!s1(i[O-1],s[y-1],r))break}D>0&&(d.addRange(new H(b.original.endLineNumberExclusive,b.original.endLineNumberExclusive+D)),h.addRange(new H(b.modified.endLineNumberExclusive,b.modified.endLineNumberExclusive+D))),(k>0||D>0)&&(a[m]=new he(new H(b.original.startLineNumber-k,b.original.endLineNumberExclusive+D),new H(b.modified.startLineNumber-k,b.modified.endLineNumberExclusive+D)))}return a}function s1(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const s=new Kr().compute(new Fn([t],new N(1,1,1,t.length),!1),new Fn([e],new N(1,1,1,e.length),!1),n);let r=0;const a=J.invert(s.diffs,t.length);for(const d of a)d.seq1Range.forEach(f=>{Yi(t.charCodeAt(f))||r++});function l(d){let f=0;for(let m=0;m<t.length;m++)Yi(d.charCodeAt(m))||f++;return f}const c=l(t.length>e.length?t:e);return r/c>.6&&c>10}function Gu(t){if(t.length===0)return t;t.sort($e(n=>n.original.startLineNumber,Oe));const e=[t[0]];for(let n=1;n<t.length;n++){const i=e[e.length-1],s=t[n],r=s.original.startLineNumber-i.original.endLineNumberExclusive,a=s.modified.startLineNumber-i.modified.endLineNumberExclusive;if(r>=0&&a>=0&&r+a<=2){e[e.length-1]=i.join(s);continue}e.push(s)}return e}function Qu(t,e){const n=new Mn(t);return e=e.filter(i=>{const s=n.findLastMonotonous(l=>l.original.startLineNumber<i.original.endLineNumberExclusive)||new he(new H(1,1),new H(1,1)),r=Lt(t,l=>l.modified.startLineNumber<i.modified.endLineNumberExclusive);return s!==r}),e}function r1(t,e,n){let i=n;return i=a1(t,e,i),i=a1(t,e,i),i=Xu(t,e,i),i}function a1(t,e,n){if(n.length===0)return n;const i=[];i.push(n[0]);for(let r=1;r<n.length;r++){const a=i[i.length-1];let l=n[r];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const c=l.seq1Range.start-a.seq1Range.endExclusive;let h;for(h=1;h<=c&&!(t.getElement(l.seq1Range.start-h)!==t.getElement(l.seq1Range.endExclusive-h)||e.getElement(l.seq2Range.
Line truncated
|
||||
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function c1(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}class ec{constructor(){this.dynamicProgrammingDiffing=new qu,this.myersDiffingAlgorithm=new Kr}computeDiff(e,n,i){if(e.length<=1&&as(e,n,(y,L)=>y===L))return new Ot([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Ot([new Se(new H(1,e.length+1),new H(1,n.length+1),[new fe(new N(1,1,e.length,e[e.length-1].length+1),new N(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=i.maxComputationTimeMs===0?Gt.instance:new Vu(i.maxComputationTimeMs),r=!i.ignoreTrimWhitespace,a=new Map;function l(y){let L=a.get(y);return L===void 0&&(L=a.size,a.set(y,L)),L}const c=e.map(y=>l(y.trim())),h=n.map(y=>l(y.trim())),d=new u1(c,e),f=new u1(h,n),m=d.length+f.length<1700?this.dynamicProgrammingDiffing.compute(d,f,s,(y,L)=>e[y]===n[L]?n[L].length===0?.1:1+Math.log(1+n[L].length):.99):this.myersDiffingAlgorithm.compute(d,f,s);let b=m.diffs,p=m.hitTimeout;b=r1(d,f,b),b=Zu(d,f,b);const g=[],_=y=>{if(r)for(let L=0;L<y;L++){const R=x+L,V=S+L;if(e[R]!==n[V]){const W=this.refineDiff(e,n,new J(new I(R,R+1),new I(V,V+1)),s,r,i);for(const q of W.mappings)g.push(q);W.hitTimeout&&(p=!0)}}};let x=0,S=0;for(const y of b){rt(()=>y.seq1Range.start-x===y.seq2Range.start-S);const L=y.seq1Range.start-x;_(L),x=y.seq1Range.endExclusive,S=y.seq2Range.endExclusive;const R=this.refineDiff(e,n,y,s,r,i);R.hitTimeout&&(p=!0);for(const V of R.mappings)g.push(V)}_(e.length-x);const v=new kn(e),k=new kn(n),D=Pn(g,v,k);let O=[];return i.computeMoves&&(O=this.computeMoves(D,e,n,c,h,s,r,i)),rt(()=>{function y(R,V){if(R.lineNumber<1||R.lineNumber>V.length)return!1;const W=V[R.lineNumber-1];return!(R.column<1||R.column>W.length+1)}function L(R,V){return!(R.startLineNumber<1||R.startLineNumber>V.length+1||R.endLineNumberExclusive<1||R.endLineNumberExclusive>V.length+1)}for(const R of D){if(!R.innerChanges)return!1;for(const V of R.innerChanges)if(!(y(V.modifiedRange.getStartPosition(),n)&&y(V.modifiedRange.getEndPosition(),n)&&y(V.originalRange.getStartPosition(),e)&&y(V.originalRange.getEndPosition(),e)))return!1;if(!L(R.modified,n)||!L(R.original,e))return!1}return!0}),new Ot(D,O,p)}computeMoves(e,n,i,s,r,a,l,c){return Ou(e,n,i,s,r,a).map(f=>{const m=this.refineDiff(n,i,new J(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,l,c),b=Pn(m.mappings,new kn(n),new kn(i),!0);return new Oi(f,b)})}refineDiff(e,n,i,s,r,a){const c=tc(i).toRangeMapping2(e,n),h=new Fn(e,c.originalRange,r),d=new Fn(n,c.modifiedRange,r),f=h.length+d.length<500?this.dynamicProgrammingDiffing.compute(h,d,s):this.myersDiffingAlgorithm.compute(h,d,s);let m=f.diffs;return m=r1(h,d,m),m=l1(h,d,m,(p,g)=>p.findWordContaining(g)),a.extendToSubwords&&(m=l1(h,d,m,(p,g)=>p.findSubWordContaining(g),!0)),m=Yu(h,d,m),m=Ku(h,d,m),{mappings:m.map(p=>new fe(h.translateRange(p.seq1Range),d.translateRange(p.seq2Range))),hitTimeout:f.hitTimeout}}}function tc(t){return new he(new H(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new H(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}function nc(t,e){(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit;const i=`${t}/${e}`,r=`${kl}/${i}`;return Nr.asBrowserUri(r).toString(!0)}class ic{constructor(e){this.replacements=e;let n=-1;for(const i of e){if(!(i.replaceRange.start>=n))throw new G(`Edits must be disjoint and sorted. Found ${i} after ${n}`);n=i.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(n=>n.toString()).join(", ")}]`}normalize(){const e=[];let n;for(const i of this.replacements)if(!(i.getNewLength()===0&&i.replaceRange.length===0)){if(n&&n.replaceRange.endExclusive===i.replaceRange.start){const s=n.tryJoinTouching(i);if(s){n=s;continue}}n&&e.push(n),n=i}return n&&e.push(n),this._createNew(e)}compose(e){const n=this.normalize(),i=e.normalize();if(n.isEmpty())return i;if(i.isEmpty())return n;const s=[...n.replacements],r=[];let a=0;for(const l of i.replacements){for(;;){const f=s[0];if(!f||f.replaceRange.start+a+f.getNewLength()>=l.replaceRange.start)break;s.shift(),r.push(f),a+=f.getNewLength()-f.replaceRange.length}const c=a;let h,d;for(;;){const f=s[0];if(!f||f.replaceRange.start+a>l.replaceRange.endExclusive)break;h||(h=f),d=f,s.shift(),a+=f.getNewLength()-f.replaceRange.length}if(!h)r.push(l.delta(-a));else{const f=Math.min(h.replaceRange.start,l.replaceRange.start-c),m=l.replaceRange.start-(h.replaceRange.start+c);if(m>0){const _=h.slice(I.emptyAt(f),new I(0,m));r.push(_)}if(!d)throw new G("Invariant violation: lastIntersecting is undefined");const b=d.replaceRange.endExclusive+a-l.replaceRange.endExclusive;if(b>0){const _=d.slice(I.ofStartAndLength(d.replaceRange.endExclusive,0),new I(d.getNewLength()-b,d.getNewLength()));s.unshift(_),a-=_.getNewLength()-_.replaceRange.length}const p=new I(f,l.replaceRange.endExclusive-a),g=l.slice(p,new I(0,l.getNewLength()));r.push(g)}}for(;;){cons
Line truncated
|
||||
`)),r=new zt(n.join(`
|
||||
`)),a=this._computer.computeDiff(s.value,r.value,{ignoreTrimWhitespace:!0,computeMoves:i.computeMoves,extendToSubwords:i.extendToSubwords}),l=s.getTransformer(),c=r.getTransformer(),h=[];let d=0;for(const b of a.edits.replacements){const p=b.range.start+d,g=p+b.newText.length,_=l.getRange(new I(b.range.start,b.range.endExclusive)),x=c.getRange(new I(p,g));h.push(new fe(_,x)),d+=b.newText.length-(b.range.endExclusive-b.range.start)}const f=Pn(h,s,r),m=[];if(i.computeMoves)for(const b of a.moves){const p=l.getPosition(b.range.original.start),g=l.getPosition(b.range.original.endExclusive),_=c.getPosition(b.range.modified.start),x=c.getPosition(b.range.modified.endExclusive),S=new H(p.lineNumber,g.lineNumber),v=new H(_.lineNumber,x.lineNumber);m.push(new Oi(new he(S,v),[]))}return new Ot(f,m,a.hitTimeout)}}const Xt={getLegacy:()=>new Iu,getDefault:()=>new ec,getAdvancedExternal:()=>f1(!1),getAdvancedWasm:()=>f1(!0)};function We(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class w{constructor(e,n,i,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class pe{constructor(e,n,i,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=We(Math.max(Math.min(1,n),0),3),this.l=We(Math.max(Math.min(1,i),0),3),this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,s=e.b/255,r=e.a,a=Math.max(n,i,s),l=Math.min(n,i,s);let c=0,h=0;const d=(l+a)/2,f=a-l;if(f>0){switch(h=Math.min(d<=.5?f/(2*d):f/(2-2*d),1),a){case n:c=(i-s)/f+(i<s?6:0);break;case i:c=(s-n)/f+2;break;case s:c=(n-i)/f+4;break}c*=60,c=Math.round(c)}return new pe(c,h,d,r)}static _hue2rgb(e,n,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(n-e)*6*i:i<1/2?n:i<2/3?e+(n-e)*(2/3-i)*6:e}static toRGBA(e){const n=e.h/360,{s:i,l:s,a:r}=e;let a,l,c;if(i===0)a=l=c=s;else{const h=s<.5?s*(1+i):s+i-s*i,d=2*s-h;a=pe._hue2rgb(d,h,n+1/3),l=pe._hue2rgb(d,h,n),c=pe._hue2rgb(d,h,n-1/3)}return new w(Math.round(a*255),Math.round(l*255),Math.round(c*255),r)}}class Ye{constructor(e,n,i,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=We(Math.max(Math.min(1,n),0),3),this.v=We(Math.max(Math.min(1,i),0),3),this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,s=e.b/255,r=Math.max(n,i,s),a=Math.min(n,i,s),l=r-a,c=r===0?0:l/r;let h;return l===0?h=0:r===n?h=((i-s)/l%6+6)%6:r===i?h=(s-n)/l+2:h=(n-i)/l+4,new Ye(Math.round(h*60),c,r,e.a)}static toRGBA(e){const{h:n,s:i,v:s,a:r}=e,a=s*i,l=a*(1-Math.abs(n/60%2-1)),c=s-a;let[h,d,f]=[0,0,0];return n<60?(h=a,d=l):n<120?(h=l,d=a):n<180?(d=a,f=l):n<240?(d=l,f=a):n<300?(h=l,f=a):n<=360&&(h=a,f=l),h=Math.round((h+c)*255),d=Math.round((d+c)*255),f=Math.round((f+c)*255),new w(h,d,f,r)}}const j=class j{static fromHex(e){return j.Format.CSS.parseHex(e)||j.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:pe.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ye.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof w)this.rgba=e;else if(e instanceof pe)this._hsla=e,this.rgba=pe.toRGBA(e);else if(e instanceof Ye)this._hsva=e,this.rgba=Ye.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&w.equals(this.rgba,e.rgba)&&pe.equals(this.hsla,e.hsla)&&Ye.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=j._relativeLuminanceForComponent(this.rgba.r),n=j._relativeLuminanceForComponent(this.rgba.g),i=j._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*n+.0722*i;return We(s,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n>i}isDarkerThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n<i}lighten(e){return new j(new pe(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new j(new pe(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:n,g:i,b:s,a:r}=this.rgba;return new j(new w(n,i,s,r*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new j(new w(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,n=.5){const i=Math.min(Math.max(n,0),1),s=this.rgba,r=e.rgba,a=s.r+(r.r-s.r)*i,l=s.g+(r.g-s.g)*i,c=s.b+(r.b-s.b)*i,h=s.a+(r.a-s.a)*i;return new j(new w(a,l,c,h))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:n,g:i,b:s,a:r}=this.rgba;return new j(new w(e.rgba.r-r*(e.rgba.r-n),e.rgba.g-r*(e.rgba.g-i),e.rgba.b-r*(e.rgba.
Line truncated
|
||||
`);r.lastIndex=0;let d;for(;(d=r.exec(h))!==null;){const f=h.substring(0,d.index),m=(f.match(/\n/g)||[]).length,b=a+m,p=d[0].split(`
|
||||
`),g=p.length,_=b+g-1,x=f.lastIndexOf(`
|
||||
`)+1,S=d.index-x+1,v=p[p.length-1],k=g===1?S+d[0].length:v.length+1,D={startLineNumber:b,startColumn:S,endLineNumber:_,endColumn:k},O=(d.groups??{}).label??"",y=((d.groups??{}).separator??"")!=="",L={range:D,text:O,hasSeparatorLine:y,shouldBeInComments:!0};(L.text||L.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<L.range.startLineNumber)&&n.push(L),r.lastIndex=d.index+d[0].length}}return n}function wc(t){t=t.trim();const e=t.startsWith("-");return t=t.replace(dc,""),{text:t,hasSeparatorLine:e}}class _c{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=bt(e);const i=this.values,s=this.prefixSum,r=n.length;return r===0?!1:(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(n,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=bt(e),n=bt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,n){e=bt(e),n=bt(n);const i=this.values,s=this.prefixSum;if(e>=i.length)return!1;const r=i.length-e;return n>=r&&(n=r),n===0?!1:(this.values=new Uint32Array(i.length-n),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=bt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let i=n;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,i=this.values.length-1,s=0,r=0,a=0;for(;n<=i;)if(s=n+(i-n)/2|0,r=this.prefixSum[s],a=r-this.values[s],e<a)i=s-1;else if(e>=r)n=s+1;else break;return new ts(s,e-a)}}class yc{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const n=this._indexBySum[e];if(n===void 0){const s=Math.max(0,this._values.length-1),r=s>0?this._prefixSum[s-1]:0;return new ts(s,e-r)}const i=n>0?this._prefixSum[n-1]:0;return new ts(n,e-i)}removeValues(e,n){this._values.splice(e,n),this._invalidate(e)}insertValues(e,n){this._values=cs(this._values,e,n),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,n=this._values.length;e<n;e++){const i=this._values[e],s=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=s+i;for(let r=0;r<i;r++)this._indexBySum[s+r]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._values.length>0?this._prefixSum[this._values.length-1]:0,this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,n){this._values[e]!==n&&(this._values[e]=n,this._invalidate(e))}}class ts{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class Lc{constructor(e,n,i,s){this._uri=e,this._lines=n,this._eol=i,this._versionId=s,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const i of n)this._acceptDeleteRange(i.range),this._acceptInsertText(new U(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,i=new Uint32Array(n);for(let s=0;s<n;s++)i[s]=this._lines[s].length+e;this._lineStarts=new _c(i)}}_setLineText(e,n){this._lines[e]=n,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumb
Line truncated
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,3 +1,3 @@
|
||||
define("vs/freemarker2-CJME-ah8",["exports","./editor.api-i0YVFWkl"],(function(i,c){"use strict";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},f={close:"[>\\]]",id:"auto",open:"[<\\[]"},p={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},g={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
|
||||
define("vs/freemarker2-FWreY7v7",["exports","./editor-KLE6jdfb"],(function(i,c){"use strict";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},f={close:"[>\\]]",id:"auto",open:"[<\\[]"},p={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},g={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
|
||||
\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.languages.IndentAction.Indent}}]}}function A(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:`
|
||||
\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.languages.IndentAction.Indent}}]}}function _(t,n){const u=`_${t.id}_${n.id}`,e=k=>k.replace(/__id__/g,u),o=k=>{const D=k.source.replace(/__id__/g,u);return new RegExp(D,k.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_t
Line truncated
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Vendored
+1
@@ -0,0 +1 @@
|
||||
define("vs/handlebars-CZi4pHCH",["exports","./editor-KLE6jdfb"],(function(e,t){"use strict";const n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"aLine truncated
|
||||
Loaded 100 of 228 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user