evalkit-py 0.3.0.dev36__py3-none-any.whl → 0.3.0.dev38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evalkit/api/experiments.py +5 -1
- evalkit/api/review.py +51 -8
- evalkit/bundled/docs/case-schema.md +16 -1
- evalkit/bundled/docs/harness-api.md +18 -0
- evalkit/bundled/docs/quickstart.md +2 -0
- evalkit/bundled/docs/sdk-runs.md +2 -0
- evalkit/bundled/docs/workspaces.md +11 -0
- evalkit/bundled/skills/authoring-eval-cases/SKILL.md +9 -1
- evalkit/bundled/skills/evalkit-usage/SKILL.md +5 -0
- evalkit/bundled/ui/assets/{cssMode-iV9H59N0.js → cssMode-IFq6o6aT.js} +1 -1
- evalkit/bundled/ui/assets/{editor.api-BMVRa9lH.js → editor.api-D-HaeWb0.js} +1 -1
- evalkit/bundled/ui/assets/{freemarker2-BAUs2ieT.js → freemarker2-BwfLsBrS.js} +1 -1
- evalkit/bundled/ui/assets/{handlebars-DyVo4xPA.js → handlebars-Bp4kXP1V.js} +1 -1
- evalkit/bundled/ui/assets/{html-B8-5DJy2.js → html-WTBp8suX.js} +1 -1
- evalkit/bundled/ui/assets/{htmlMode-BPkOfwpw.js → htmlMode-BQ41fVNL.js} +1 -1
- evalkit/bundled/ui/assets/{index-D-6rQQTq.js → index-UUHH6eBf.js} +17 -4
- evalkit/bundled/ui/assets/{javascript-CWpM0yGO.js → javascript-D1RUbptp.js} +1 -1
- evalkit/bundled/ui/assets/{jsonMode-BUyZQ6NB.js → jsonMode-CCGzvKa9.js} +1 -1
- evalkit/bundled/ui/assets/{liquid-CWHawDBa.js → liquid-BEbRi0m9.js} +1 -1
- evalkit/bundled/ui/assets/{lspLanguageFeatures-BeVSQGcs.js → lspLanguageFeatures-bkR-LxpV.js} +1 -1
- evalkit/bundled/ui/assets/{mdx-B70WoLPQ.js → mdx-DYEliqcr.js} +1 -1
- evalkit/bundled/ui/assets/{monacoEditor-BctRVFz2.js → monacoEditor-CcBEKgBB.js} +4 -4
- evalkit/bundled/ui/assets/{python-Clny1bEf.js → python-DWxlWEzQ.js} +1 -1
- evalkit/bundled/ui/assets/{razor-BECDOMEW.js → razor-uiRE40pr.js} +1 -1
- evalkit/bundled/ui/assets/{tsMode-DoGTliDg.js → tsMode-CaXV8xVu.js} +1 -1
- evalkit/bundled/ui/assets/{typescript-BEVMS9ZE.js → typescript-C9LlAaHD.js} +1 -1
- evalkit/bundled/ui/assets/{workers-CTqoJCXZ.js → workers-nLZd2Kyp.js} +1 -1
- evalkit/bundled/ui/assets/{xml-NSk315wd.js → xml-C1nzbjkb.js} +1 -1
- evalkit/bundled/ui/assets/{yaml-Bs54n9nW.js → yaml-IrVF_tSu.js} +1 -1
- evalkit/bundled/ui/index.html +1 -1
- evalkit/cli/admin_commands.py +43 -1
- evalkit/cli/main.py +98 -18
- evalkit/client/summary.py +17 -2
- evalkit/contracts/settings.py +14 -1
- evalkit/core/capabilities.py +1 -0
- evalkit/core/data/cost_map.json +5 -11
- evalkit/core/runner.py +13 -6
- evalkit/db/agents.py +8 -3
- evalkit/sdk/runner.py +7 -3
- {evalkit_py-0.3.0.dev36.dist-info → evalkit_py-0.3.0.dev38.dist-info}/METADATA +4 -3
- {evalkit_py-0.3.0.dev36.dist-info → evalkit_py-0.3.0.dev38.dist-info}/RECORD +44 -44
- {evalkit_py-0.3.0.dev36.dist-info → evalkit_py-0.3.0.dev38.dist-info}/WHEEL +0 -0
- {evalkit_py-0.3.0.dev36.dist-info → evalkit_py-0.3.0.dev38.dist-info}/entry_points.txt +0 -0
- {evalkit_py-0.3.0.dev36.dist-info → evalkit_py-0.3.0.dev38.dist-info}/licenses/LICENSE +0 -0
evalkit/api/experiments.py
CHANGED
|
@@ -52,7 +52,7 @@ from evalkit.core.trajectory import backfill_step_costs
|
|
|
52
52
|
from evalkit.core.workspace import Reference, parse_slug
|
|
53
53
|
from evalkit.db import experiments as db_experiments
|
|
54
54
|
from evalkit.db import scorecard as db_scorecard
|
|
55
|
-
from evalkit.db.agents import agent_definition
|
|
55
|
+
from evalkit.db.agents import agent_definition, agent_id_for
|
|
56
56
|
from evalkit.db.cases import dataset_by_ref
|
|
57
57
|
from evalkit.db.models import AgentRun as AgentRunRow
|
|
58
58
|
from evalkit.db.models import ExperimentRun as ExperimentRunRow
|
|
@@ -334,6 +334,8 @@ async def list_experiments(
|
|
|
334
334
|
session: SessionDep,
|
|
335
335
|
workspace: str | None = None,
|
|
336
336
|
status: ExperimentStatus | None = None,
|
|
337
|
+
agent: str | None = None,
|
|
338
|
+
dataset: str | None = None,
|
|
337
339
|
limit: int = Query(50, ge=1),
|
|
338
340
|
offset: int = Query(0, ge=0),
|
|
339
341
|
brief: bool = False,
|
|
@@ -343,6 +345,8 @@ async def list_experiments(
|
|
|
343
345
|
session,
|
|
344
346
|
workspace_id=workspace_id,
|
|
345
347
|
status=status,
|
|
348
|
+
agent_id=await agent_id_for(session, agent) if agent else None,
|
|
349
|
+
dataset_id=(await dataset_by_ref(session, dataset)).id if dataset else None,
|
|
346
350
|
limit=min(limit, LIST_LIMIT),
|
|
347
351
|
offset=offset,
|
|
348
352
|
)
|
evalkit/api/review.py
CHANGED
|
@@ -22,7 +22,7 @@ from evalkit.core.review import (
|
|
|
22
22
|
review_summary,
|
|
23
23
|
)
|
|
24
24
|
from evalkit.core.workspace import parse_slug
|
|
25
|
-
from evalkit.db.cases import current_cases, dataset_by_ref, list_datasets
|
|
25
|
+
from evalkit.db.cases import current_cases, dataset_by_ref, find_dataset_row, list_datasets
|
|
26
26
|
from evalkit.db.promotion import execute_promotion, plan_promotion
|
|
27
27
|
from evalkit.db.review import ReviewLog
|
|
28
28
|
from evalkit.db.workspaces import WorkspaceStore
|
|
@@ -172,10 +172,31 @@ async def decide(
|
|
|
172
172
|
return {**summary, "promoted_to": plan.target_ref if plan is not None else None}
|
|
173
173
|
|
|
174
174
|
|
|
175
|
+
async def _source_dataset(request: Request, session: SessionDep, slug: str) -> str | None:
|
|
176
|
+
ws = await _dataset_workspace(session, slug)
|
|
177
|
+
if not ws.is_target:
|
|
178
|
+
return None
|
|
179
|
+
assert ws.promoted_from is not None
|
|
180
|
+
source = await WorkspaceStore(request.app.state.session_factory).get_by_id(ws.promoted_from)
|
|
181
|
+
name = parse_slug(slug).name
|
|
182
|
+
found = await find_dataset_row(session, source.name, name)
|
|
183
|
+
return None if found is None else found.ref
|
|
184
|
+
|
|
185
|
+
|
|
175
186
|
@router.get("/datasets/{slug}/cases/{case_id}/events")
|
|
176
|
-
async def events(
|
|
187
|
+
async def events(
|
|
188
|
+
slug: str, case_id: str, request: Request, session: SessionDep, review_log: ReviewLogDep
|
|
189
|
+
) -> dict:
|
|
177
190
|
await _load_case_review(session, review_log, slug, case_id)
|
|
178
|
-
|
|
191
|
+
found = await review_log.history(slug, case_id)
|
|
192
|
+
source = await _source_dataset(request, session, slug)
|
|
193
|
+
if source is not None:
|
|
194
|
+
promoted = {e.content_hash for e in found}
|
|
195
|
+
found += [
|
|
196
|
+
e for e in await review_log.history(source, case_id) if e.content_hash in promoted
|
|
197
|
+
]
|
|
198
|
+
found.sort(key=lambda e: (e.created_at, e.id), reverse=True)
|
|
199
|
+
return {"events": [e.model_dump() for e in found]}
|
|
179
200
|
|
|
180
201
|
|
|
181
202
|
@router.get("/datasets/{slug}/cases/{case_id}/comments")
|
|
@@ -242,6 +263,22 @@ async def resolve_comment(
|
|
|
242
263
|
return (await review_log.set_resolved(comment_id, body.resolved)).model_dump()
|
|
243
264
|
|
|
244
265
|
|
|
266
|
+
@router.patch("/review/comments/{comment_id}")
|
|
267
|
+
async def resolve_comment_by_id(
|
|
268
|
+
comment_id: int,
|
|
269
|
+
body: ResolveRequest,
|
|
270
|
+
review_log: ReviewLogDep,
|
|
271
|
+
session: SessionDep,
|
|
272
|
+
user: ActorDep,
|
|
273
|
+
) -> dict:
|
|
274
|
+
comment = await review_log.get_comment(comment_id)
|
|
275
|
+
if comment is None:
|
|
276
|
+
raise HTTPException(status_code=404, detail=f"unknown comment: {comment_id}")
|
|
277
|
+
return await resolve_comment(
|
|
278
|
+
comment.dataset, comment.case_id, comment_id, body, review_log, session, user
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
|
|
245
282
|
QueueState = Literal["review_requested", "changes_requested"]
|
|
246
283
|
|
|
247
284
|
|
|
@@ -252,15 +289,21 @@ async def queue(
|
|
|
252
289
|
reviewer: str | None = None,
|
|
253
290
|
state: QueueState = "review_requested",
|
|
254
291
|
workspace: str | None = None,
|
|
292
|
+
dataset: str | None = None,
|
|
255
293
|
) -> dict:
|
|
256
294
|
if workspace is not None:
|
|
257
295
|
await workspace_ref(session, workspace)
|
|
296
|
+
datasets = (
|
|
297
|
+
[await dataset_by_ref(session, dataset)]
|
|
298
|
+
if dataset is not None
|
|
299
|
+
else await list_datasets(session, workspace)
|
|
300
|
+
)
|
|
258
301
|
items: list[dict] = []
|
|
259
|
-
for
|
|
260
|
-
if not is_reviewable(
|
|
302
|
+
for dataset_row in datasets:
|
|
303
|
+
if not is_reviewable(dataset_row):
|
|
261
304
|
continue
|
|
262
|
-
cases = await current_cases(session,
|
|
263
|
-
reviews = await review_log.load(
|
|
305
|
+
cases = await current_cases(session, dataset_row)
|
|
306
|
+
reviews = await review_log.load(dataset_row.ref, [CaseVersion.of(case) for case in cases])
|
|
264
307
|
for case in cases:
|
|
265
308
|
r = reviews[case.case_id]
|
|
266
309
|
if r.last_event is None or r.state() is not CaseState(state):
|
|
@@ -270,7 +313,7 @@ async def queue(
|
|
|
270
313
|
question = case.input.get("question")
|
|
271
314
|
items.append(
|
|
272
315
|
{
|
|
273
|
-
"dataset":
|
|
316
|
+
"dataset": dataset_row.ref,
|
|
274
317
|
"case_id": case.case_id,
|
|
275
318
|
"requested_to": r.requested_to,
|
|
276
319
|
"requested_by": r.last_event.actor,
|
|
@@ -35,11 +35,26 @@ cases:
|
|
|
35
35
|
| -- | -- | -- |
|
|
36
36
|
| `id` | string, required | The case's identity, shared by every workspace. |
|
|
37
37
|
| `tags` | list of strings | Labels for `evalkit run --tag`. The case's folder in the suite is added as a tag too. |
|
|
38
|
-
| `input` | mapping | Sent to the agent as is.
|
|
38
|
+
| `input` | mapping | Sent to the agent as is. It must pass the agent's input schema; see [Input schema](#input-schema). |
|
|
39
39
|
| `fixtures` | list of strings | Keys from `fixtures.yaml` to attach as files. |
|
|
40
40
|
| `expected` | mapping | Free-form ground truth, passed to custom evaluators. |
|
|
41
41
|
| `evaluators` | mapping | Which evaluators score this case. See below. |
|
|
42
42
|
|
|
43
|
+
|
|
44
|
+
## Input schema
|
|
45
|
+
|
|
46
|
+
Every agent has an input schema, a JSON Schema each case's `input` must pass. `evalkit run`, `run_experiment` (dry runs too) and `evalkit lint --agent` refuse inputs that fail it. When the agent sets none, the default applies:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{"type": "object", "required": ["question"], "properties": {"question": {"type": "string"}}}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
A harness declares its own `input_schema` in `GET /capabilities` ([Harness API](harness-api.md)). A code-driven agent stores one on the agent: `evalkit agents create <name> --input-schema schema.json`, or `evalkit agents edit <name> --input-schema schema.json`; `--clear-input-schema` goes back to the default. `evalkit agents show` prints it. For a multi-turn agent:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{"type": "object", "required": ["turns"], "properties": {"turns": {"type": "array", "items": {"type": "string"}}}}
|
|
56
|
+
```
|
|
57
|
+
|
|
43
58
|
## Evaluators
|
|
44
59
|
|
|
45
60
|
Evaluators sit under `evaluators.output`, `evaluators.trajectory` or `evaluators.custom`. The scorecard groups their scores into buckets, but the bucket names are not YAML keys:
|
|
@@ -27,6 +27,24 @@ Every request carries `x-api-key`. Two rules matter more than the rest:
|
|
|
27
27
|
- **Capabilities honesty.** Declare only what works. evalkit neutral-skips evaluators whose inputs the harness does not provide; a false `true` produces failing scores blamed on the agent.
|
|
28
28
|
- **Implement stop.** evalkit calls stop on timeout when `accepts.stop` is true; a harness without it leaks resources on every timed-out run.
|
|
29
29
|
|
|
30
|
+
## Input schema
|
|
31
|
+
|
|
32
|
+
Every case input must pass the agent's input schema; `evalkit run` and `evalkit lint --agent` refuse inputs that fail it. A harness declares its schema as `input_schema` in `GET /capabilities`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"agent": "support-bot",
|
|
37
|
+
"input_schema": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["turns"],
|
|
40
|
+
"properties": {"turns": {"type": "array", "items": {"type": "string"}}}
|
|
41
|
+
},
|
|
42
|
+
"check_input": {"turns": ["Hi. Reply with one word."]}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Without `input_schema`, the default applies: an object with a required string `question`. Declare `check_input` too when the default probe `{"question": "Hi. Reply with one word."}` does not pass your schema, so `evalkit harness check` can run. See [Input schema](case-schema.md#input-schema).
|
|
47
|
+
|
|
30
48
|
## Already have a harness? Keep it
|
|
31
49
|
|
|
32
50
|
A harness that already emits OpenTelemetry traces can skip the trajectory endpoint: create the agent with `--trajectory-source otel --mapping FILE` and export spans to the collector with the run id it returned from `POST /runs` in the attribute the mapping's `session_id` rule names (`session.id` for OpenInference, `gen_ai.conversation.id` for GenAI). Everything else stays: server runs, `evalkit run`, the Workspace tab. The harness declares `provides.trajectory: false`. See [Tracing](tracing.md).
|
|
@@ -130,6 +130,8 @@ A run or sync uploads any fixture whose sha256 the server doesn't hold yet, and
|
|
|
130
130
|
## 7. Iterate and promote
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
+
evalkit experiments list --dataset smoke # experiment ids, newest first
|
|
134
|
+
evalkit summary <new-id> --baseline <old-id> # compare two experiments: fixed, broken, gauge deltas
|
|
133
135
|
evalkit evaluate <experiment-id> # re-score the same runs after an evaluator change; no agent calls
|
|
134
136
|
evalkit runs pull --experiment <experiment-id> # download every run (trajectory, case, scores) to diagnose failures
|
|
135
137
|
```
|
evalkit/bundled/docs/sdk-runs.md
CHANGED
|
@@ -141,6 +141,8 @@ An admin sets the default judge with `evalkit judge-default set`. Either way, th
|
|
|
141
141
|
|
|
142
142
|
A code-driven agent has no `GET /capabilities`, so evalkit writes its capabilities onto each experiment itself: `trajectory`, `tool_calls`, `token_usage` and `run_listing` are true; `thinking`, `artifacts` and `workspace` are false. Evaluators gated on a capability skip when it is false. evalkit does not read capabilities from the spans. Set `provides` on the agent (`evalkit agents create --provides`, or `evalkit agents edit`) to declare what it really does, for example `thinking: true` when its spans carry the model's reasoning. Declare only what works: a false `true` produces failing scores blamed on the agent.
|
|
143
143
|
|
|
144
|
+
The agent's input schema is the default (a required string `question`) unless you set one with `evalkit agents create --input-schema` or `evalkit agents edit --input-schema`. Every case input must pass it, in a dry run too; see [Input schema](case-schema.md#input-schema).
|
|
145
|
+
|
|
144
146
|
## Python evaluators
|
|
145
147
|
|
|
146
148
|
`@evaluator(name=..., kind="evaluator" | "gauge", requires_trajectory=False)` turns a function into an evaluator. It receives the same `EvalCase` and `EvalRun` the HTTP Custom Evaluator API sends: the case id, input, expected block and this evaluator's config from the case YAML; the answer, structured output and the ATIF trajectory as a dict. Return a float, a `ScoreItem` (`from evalkit.sdk import ScoreItem`), or a list of them. [Case schema](case-schema.md#python-evaluators) lists the fields of `EvalCase` and `EvalRun`. A case selects it by name under `evaluators.custom`, exactly like an HTTP evaluator.
|
|
@@ -82,6 +82,12 @@ Then:
|
|
|
82
82
|
4. **Review.** Alice asks for a review:
|
|
83
83
|
`evalkit review request finance@dev --case-id net-debt --reviewer bob`.
|
|
84
84
|
Bob approves it: `evalkit review approve finance@dev net-debt`.
|
|
85
|
+
He can approve several at once (`evalkit review approve finance@dev
|
|
86
|
+
net-debt fx-rate`) or every case waiting on him
|
|
87
|
+
(`evalkit review approve finance@dev --all-waiting`). To ask a question
|
|
88
|
+
first: `evalkit review comment finance@dev net-debt --comment "which
|
|
89
|
+
fiscal year?"`; resolve it later by its id: `evalkit review resolve 12`.
|
|
90
|
+
`evalkit review queue finance@dev` lists what is waiting in one dataset.
|
|
85
91
|
5. **Promotion.** The approval adds that version of the case to
|
|
86
92
|
`finance@prod`, approved.
|
|
87
93
|
6. **Run.** `finance@dev` holds every merged case, for regression runs
|
|
@@ -92,6 +98,11 @@ Changing a case starts the loop again. The new version is Unreviewed in
|
|
|
92
98
|
`@dev`, and `@prod` keeps the old approved version until the new one is
|
|
93
99
|
approved.
|
|
94
100
|
|
|
101
|
+
A change to a case that is waiting for review, or was sent back with
|
|
102
|
+
changes requested, goes back to the same reviewer on sync: you don't need
|
|
103
|
+
to run `review request` again. If you do, cases already waiting on that
|
|
104
|
+
reviewer are left as they are.
|
|
105
|
+
|
|
95
106
|
## Several branches
|
|
96
107
|
|
|
97
108
|
- `evalkit run` syncs the dataset directory first. The dataset in your
|
|
@@ -56,13 +56,21 @@ general conversational rule). Stop asking when the slots are full, not before.
|
|
|
56
56
|
| Slot | Becomes | Notes |
|
|
57
57
|
|---|---|---|
|
|
58
58
|
| The scenario, in the author's words | — | The raw material for everything below. |
|
|
59
|
-
| A realistic user phrasing | `input.question` | Derive it FROM the scenario and play it back for confirmation — authors are not expected to produce verbatim input. |
|
|
59
|
+
| A realistic user phrasing | `input.question` | Derive it FROM the scenario and play it back for confirmation — authors are not expected to produce verbatim input. The input must pass the agent's input schema; see below the table. |
|
|
60
60
|
| A date anchor in the input | part of `input.question` | Whenever the answer is time-sensitive, anchor the question itself ("as of 30 September 2025") so pinned ground truth cannot drift under the case. |
|
|
61
61
|
| What a correct answer contains | `answer_rubrics` | Concrete values (or the correct honest negative), dated — see the rubric sections below. |
|
|
62
62
|
| The intermediate values and visible steps the work should show | `trajectory_rubrics` | Checkpoint sentences — see below. |
|
|
63
63
|
| Presentation requirements, if any | `presentation_judge` | Units shown, columns present, an artifact relayed rather than restated. |
|
|
64
64
|
| A latency bound, if the case has one | `max_response_time` | `max_response_time: {max_seconds: 90}` under `evaluators.output`; settable file-wide via `defaults.max_response_time: 90`. |
|
|
65
65
|
|
|
66
|
+
`input` must pass the agent's input schema. By default that is an object
|
|
67
|
+
with a required string `question`, which the slots above assume. When the
|
|
68
|
+
agent takes another shape (multi-turn `turns`, structured fields), write the
|
|
69
|
+
input in that shape and check it with `evalkit lint <dir> --agent <name>`
|
|
70
|
+
before syncing. A code-driven agent sets its own schema with
|
|
71
|
+
`evalkit agents edit <name> --input-schema schema.json`, and a harness
|
|
72
|
+
declares one as `input_schema` in `GET /capabilities`.
|
|
73
|
+
|
|
66
74
|
For agents that return a structured `output` (classifiers, taggers,
|
|
67
75
|
extractors) instead of prose: `answer_rubrics` still works, since the judge
|
|
68
76
|
reads the output as JSON text, so a rubric like "The label is EVENT" can be
|
|
@@ -284,6 +284,11 @@ Rules of the road:
|
|
|
284
284
|
`artifacts` and `workspace` false) and never reads them from spans. Pass
|
|
285
285
|
`--provides thinking=true` to `evalkit agents create` (or `edit`) when its
|
|
286
286
|
spans carry the model's reasoning.
|
|
287
|
+
- A code-driven agent's case inputs must pass its input schema, by default
|
|
288
|
+
an object with a required string `question`. For other inputs (multi-turn
|
|
289
|
+
`turns`, structured fields), write a JSON Schema file and run
|
|
290
|
+
`evalkit agents edit <agent> --input-schema schema.json`.
|
|
291
|
+
`run_experiment(dry_run=...)` checks it too.
|
|
287
292
|
- Python evaluators (`@evaluator`) see the same payload as the HTTP Custom
|
|
288
293
|
Evaluator API and are selected by name under a case's `evaluators.custom`.
|
|
289
294
|
Re-score with `evaluate_experiment(...)` from the same script;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D-HaeWb0.js";import{t}from"./workers-nLZd2Kyp.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-bkR-LxpV.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/css/cssWorker`,createWorker:()=>new Worker(new URL(`/assets/css.worker-DwfUZ3fB.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function S(t){let n=[],s=[],c=new x(t);n.push(c);let g=(...e)=>c.getLanguageServiceWorker(...e);function y(){let{languageId:n,modeConfiguration:c}=t;w(s),c.completionItems&&s.push(e.registerCompletionItemProvider(n,new _(g,[`/`,`-`,`:`]))),c.hovers&&s.push(e.registerHoverProvider(n,new a(g))),c.documentHighlights&&s.push(e.registerDocumentHighlightProvider(n,new p(g))),c.definitions&&s.push(e.registerDefinitionProvider(n,new f(g))),c.references&&s.push(e.registerReferenceProvider(n,new o(g))),c.documentSymbols&&s.push(e.registerDocumentSymbolProvider(n,new u(g))),c.rename&&s.push(e.registerRenameProvider(n,new m(g))),c.colors&&s.push(e.registerColorProvider(n,new l(g))),c.foldingRanges&&s.push(e.registerFoldingRangeProvider(n,new v(g))),c.diagnostics&&s.push(new h(n,g,t.onDidChange)),c.selectionRanges&&s.push(e.registerSelectionRangeProvider(n,new d(g))),c.documentFormattingEdits&&s.push(e.registerDocumentFormattingEditProvider(n,new r(g))),c.documentRangeFormattingEdits&&s.push(e.registerDocumentRangeFormattingEditProvider(n,new i(g)))}return y(),n.push(C(s)),C(n)}function C(e){return{dispose:()=>w(e)}}function w(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,S as setupMode,n as toRange,y as toTextEdit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-UUHH6eBf.js";function t(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function n(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function r(e,t){let n=e.length-1;t<n&&(e[t]=e[n]),e.pop()}function i(e,t,n){return a(e.length,r=>n(e[r],t))}function a(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function o(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],s=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):s.push(e)}return e<i.length?o(e,i,n):e<i.length+s.length?s[0]:o(e-(i.length+s.length),a,n)}function s(e,t){let n=[],r;for(let i of e.slice(0).sort(t))!r||t(r[0],i)!==0?(r=[i],n.push(r)):r.push(i);return n}function*c(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function l(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function u(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function d(e){return e.filter(e=>!!e)}function f(e){let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t}function p(e){return!Array.isArray(e)||e.length===0}function m(e){return Array.isArray(e)&&e.length>0}function h(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return!n.has(r)&&(n.add(r),!0)})}function g(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;e<t;e++)r.push(e);else for(let e=n;e>t;e--)r.push(e);return r}function _(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function v(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function y(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function b(e,t){for(let n of t)e.push(n)}function x(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function S(e){return Array.isArray(e)?e:[e]}function C(e,t,n){let r=ee(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t<a;t++)e[t+r]=n[t]}function w(e,t,n,r){let i=ee(e,t),a=e.splice(i,n);return a===void 0&&(a=[]),C(e,i,r),a}function ee(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var te;(function(e){function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(te||={});function ne(e,t){return(n,r)=>t(e(n),e(r))}function re(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!te.isNeitherLessOrGreaterThan(e))return e}return te.neitherLessOrGreaterThan}}var ie=(e,t)=>e-t,ae=(e,t)=>ie(+!!e,+!!t);function oe(e){return(t,n)=>-e(t,n)}function se(e){return(t,n)=>t===void 0?n===void 0?te.neitherLessOrGreaterThan:te.lessThan:n===void 0?te.greaterThan:e(t,n)}var ce=class{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 t=this.firstIdx;for(;t<=this.lastIdx&&e(this.items[t]);)t++;let n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},le=class e{static{this.empty=new e(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||te.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}},ue=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;e<this._indexMap.length;e++)t[this._indexMap[e]]=e;return new e(t)}};function de(e){return e.reduce((e,t)=>e+t,0)}var fe=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?we.isErrorNoTelemetry(e)?new we(e.message+`
|
|
2
2
|
|
|
3
3
|
`+e.stack):Error(e.message+`
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D-HaeWb0.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
|
|
2
2
|
\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:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:`
|
|
3
3
|
\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:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`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`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@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:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.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`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D-HaeWb0.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={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:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.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:`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:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D-HaeWb0.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={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:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end: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`}],[/[^<]+/,``]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D-HaeWb0.js";import{t}from"./workers-nLZd2Kyp.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-bkR-LxpV.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-D9ugpX4y.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit};
|