@lokascript/compilation-service 2.8.0 → 2.9.0

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.
package/dist/http.cjs CHANGED
@@ -8437,6 +8437,26 @@ function filterBySeverity(diagnostics, severity) {
8437
8437
  return diagnostics.filter((d) => d.severity === severity);
8438
8438
  }
8439
8439
  function defineCommand(schema) {
8440
+ if (typeof schema !== "object" || schema === null) {
8441
+ throw new TypeError(`defineCommand: expected a schema object, got ${describeValue(schema)}.`);
8442
+ }
8443
+ if (typeof schema.action !== "string" || schema.action.length === 0) {
8444
+ throw new TypeError(
8445
+ `defineCommand: 'action' must be a non-empty string (got ${describeValue(schema.action)}).`
8446
+ );
8447
+ }
8448
+ if (!Array.isArray(schema.roles)) {
8449
+ throw new TypeError(
8450
+ `defineCommand("${schema.action}"): 'roles' must be an array of RoleSpec (got ${describeValue(schema.roles)}). Build entries with defineRole().`
8451
+ );
8452
+ }
8453
+ for (const [index2, role] of schema.roles.entries()) {
8454
+ if (typeof role !== "object" || role === null || typeof role.role !== "string") {
8455
+ throw new TypeError(
8456
+ `defineCommand("${schema.action}"): roles[${index2}] must be a RoleSpec with a string 'role' field (got ${describeValue(role)}). Build it with defineRole().`
8457
+ );
8458
+ }
8459
+ }
8440
8460
  return {
8441
8461
  description: schema.description || `${schema.action} command`,
8442
8462
  category: schema.category || "general",
@@ -8456,8 +8476,16 @@ function defineRole(role) {
8456
8476
  };
8457
8477
  }
8458
8478
  function getRoleSpec(schema, role) {
8479
+ if (!schema || !Array.isArray(schema.roles)) return void 0;
8459
8480
  return schema.roles.find((r) => r.role === role);
8460
8481
  }
8482
+ function describeValue(value) {
8483
+ if (value === null) return "null";
8484
+ if (Array.isArray(value)) return `an array of length ${value.length}`;
8485
+ if (typeof value === "string") return `the string ${JSON.stringify(value)}`;
8486
+ if (typeof value === "object") return "an object";
8487
+ return typeof value === "undefined" ? "undefined" : String(value);
8488
+ }
8461
8489
  function inferRolesFromSchema(schema, args, modifiers, target, adapter) {
8462
8490
  const roles = {};
8463
8491
  const skipTokens = new Set(schema.argSkipTokens ?? []);
@@ -9777,10 +9805,12 @@ function buildTokens$1(schema, profile, keyword, alternatives) {
9777
9805
  addRoleWithMarker(tokens, role, profile);
9778
9806
  }
9779
9807
  } else if (profile.wordOrder === "SOV") {
9808
+ const preVerb = [];
9809
+ const postVerb = [];
9780
9810
  for (const role of sortedRoles) {
9781
- addRoleWithMarker(tokens, role, profile);
9811
+ addRoleWithMarker(role.sovSlot === "postVerb" ? postVerb : preVerb, role, profile);
9782
9812
  }
9783
- tokens.push(keywordToken);
9813
+ tokens.push(...preVerb, keywordToken, ...postVerb);
9784
9814
  } else if (profile.wordOrder === "VSO") {
9785
9815
  tokens.push(keywordToken);
9786
9816
  for (const role of sortedRoles) {
@@ -9863,35 +9893,145 @@ function buildExtractionRules$1(schema, profile) {
9863
9893
  return rules;
9864
9894
  }
9865
9895
  function buildFormatString$1(schema, profile, keyword) {
9866
- const parts = [];
9867
- if (profile.wordOrder === "SVO" || profile.wordOrder === "VSO") {
9868
- parts.push(keyword);
9869
- }
9896
+ const isSOV = profile.wordOrder === "SOV";
9897
+ const preVerb = [];
9898
+ const postVerb = [];
9870
9899
  const sortedRoles = sortRolesByWordOrder$1(schema.roles, profile.wordOrder);
9871
9900
  for (const role of sortedRoles) {
9872
9901
  const marker = getMarkerForRole(role, profile);
9873
9902
  const roleName = `{${role.role}}`;
9903
+ const bucket = isSOV && role.sovSlot === "postVerb" ? postVerb : preVerb;
9874
9904
  if (marker) {
9875
9905
  const markerInfo = profile.roleMarkers?.[role.role];
9876
9906
  if (markerInfo?.position === "after") {
9877
- parts.push(`${roleName} ${marker}`);
9907
+ bucket.push(`${roleName} ${marker}`);
9878
9908
  } else {
9879
- parts.push(`${marker} ${roleName}`);
9909
+ bucket.push(`${marker} ${roleName}`);
9880
9910
  }
9881
9911
  } else {
9882
- parts.push(roleName);
9912
+ bucket.push(roleName);
9883
9913
  }
9884
9914
  }
9885
- if (profile.wordOrder === "SOV") {
9886
- parts.push(keyword);
9887
- }
9888
- return parts.join(" ");
9915
+ return (isSOV ? [...preVerb, keyword, ...postVerb] : [keyword, ...preVerb, ...postVerb]).join(
9916
+ " "
9917
+ );
9889
9918
  }
9890
9919
  function generatePatternVariants$1(schema, profile, config2 = defaultConfig$1) {
9891
9920
  const patterns = [];
9892
9921
  patterns.push(generatePattern$1(schema, profile, config2));
9893
9922
  return patterns;
9894
9923
  }
9924
+ function lookupKeyword(keywords, action, language) {
9925
+ return keywords[action]?.[language] ?? action;
9926
+ }
9927
+ function lookupMarker(markers, marker, language) {
9928
+ return markers[marker]?.[language] ?? marker;
9929
+ }
9930
+ function buildPhrase(...parts) {
9931
+ return parts.filter(Boolean).join(" ");
9932
+ }
9933
+ function buildTablesFromProfiles(schemas, profiles2) {
9934
+ const keywords = {};
9935
+ const markers = {};
9936
+ for (const profile of profiles2) {
9937
+ for (const [action, kw] of Object.entries(profile.keywords)) {
9938
+ if (!keywords[action]) keywords[action] = {};
9939
+ keywords[action][profile.code] = kw.primary;
9940
+ }
9941
+ }
9942
+ for (const schema of schemas) {
9943
+ for (const role of schema.roles) {
9944
+ if (role.markerOverride) {
9945
+ const markerKey = role.role;
9946
+ if (!markers[markerKey]) markers[markerKey] = {};
9947
+ for (const [lang, markerText] of Object.entries(role.markerOverride)) {
9948
+ markers[markerKey][lang] = markerText;
9949
+ }
9950
+ }
9951
+ }
9952
+ }
9953
+ for (const profile of profiles2) {
9954
+ if (profile.roleMarkers) {
9955
+ for (const [markerKey, markerDef] of Object.entries(profile.roleMarkers)) {
9956
+ if (!markers[markerKey]) markers[markerKey] = {};
9957
+ markers[markerKey][profile.code] = markerDef.primary;
9958
+ }
9959
+ }
9960
+ }
9961
+ return { keywords, markers };
9962
+ }
9963
+ function detectWordOrders(profiles2) {
9964
+ const sovLanguages = /* @__PURE__ */ new Set();
9965
+ const vsoLanguages = /* @__PURE__ */ new Set();
9966
+ for (const profile of profiles2) {
9967
+ if (profile.wordOrder === "SOV") sovLanguages.add(profile.code);
9968
+ if (profile.wordOrder === "VSO") vsoLanguages.add(profile.code);
9969
+ }
9970
+ return { sovLanguages, vsoLanguages };
9971
+ }
9972
+ function createSchemaRenderer(schemas, profiles2) {
9973
+ const tables = buildRenderTables(schemas, profiles2);
9974
+ return {
9975
+ render(node, language) {
9976
+ return renderFromSchema(node, language, tables) ?? node.action;
9977
+ }
9978
+ };
9979
+ }
9980
+ function createDomainRenderer(config2) {
9981
+ const { schemas, profiles: profiles2, overrides } = config2;
9982
+ let tables;
9983
+ return (node, language) => {
9984
+ const override = overrides?.[node.action];
9985
+ if (override) return override(node, language);
9986
+ tables ?? (tables = buildRenderTables(schemas, profiles2));
9987
+ return renderFromSchema(node, language, tables);
9988
+ };
9989
+ }
9990
+ function buildRenderTables(schemas, profiles2) {
9991
+ const { keywords, markers } = buildTablesFromProfiles(schemas, profiles2);
9992
+ const { sovLanguages } = detectWordOrders(profiles2);
9993
+ const markerPositions = {};
9994
+ for (const profile of profiles2) {
9995
+ for (const [role, markerDef] of Object.entries(profile.roleMarkers ?? {})) {
9996
+ if (!markerDef.position) continue;
9997
+ markerPositions[role] ?? (markerPositions[role] = {});
9998
+ markerPositions[role][profile.code] = markerDef.position;
9999
+ }
10000
+ }
10001
+ const schemaMap = /* @__PURE__ */ new Map();
10002
+ for (const s of schemas) schemaMap.set(s.action, s);
10003
+ return { keywords, markers, markerPositions, sovLanguages, schemaMap };
10004
+ }
10005
+ function renderFromSchema(node, language, tables) {
10006
+ const schema = tables.schemaMap.get(node.action);
10007
+ if (!schema) return null;
10008
+ const keyword = lookupKeyword(tables.keywords, node.action, language);
10009
+ const isSOV = tables.sovLanguages.has(language);
10010
+ const ordered = sortRolesByWordOrder$1([...schema.roles], isSOV ? "SOV" : "SVO");
10011
+ const preVerb = [];
10012
+ const postVerb = [];
10013
+ for (const role of ordered) {
10014
+ let value = extractRoleValue(node, role.role);
10015
+ if (!value && role.default !== void 0) {
10016
+ value = String(extractValue(role.default));
10017
+ }
10018
+ if (!value) continue;
10019
+ if (role.quoteMultiword && /\s/.test(value) && !/^(["']).*\1$/.test(value)) {
10020
+ value = `"${value}"`;
10021
+ }
10022
+ const markerText = role.renderOverride?.[language] ?? role.markerOverride?.[language] ?? role.renderOverride?.["*"] ?? tables.markers[role.role]?.[language];
10023
+ const markerPosition = role.markerPositionOverride?.[language] ?? role.markerPosition ?? tables.markerPositions[role.role]?.[language] ?? (isSOV ? "after" : "before");
10024
+ const bucket = isSOV && role.sovSlot === "postVerb" ? postVerb : preVerb;
10025
+ if (markerText && markerPosition === "before") {
10026
+ bucket.push(markerText, value);
10027
+ } else if (markerText) {
10028
+ bucket.push(value, markerText);
10029
+ } else {
10030
+ bucket.push(value);
10031
+ }
10032
+ }
10033
+ return isSOV ? buildPhrase(...preVerb, keyword, ...postVerb) : buildPhrase(keyword, ...preVerb, ...postVerb);
10034
+ }
9895
10035
  function reorderRoles(roles, targetOrder) {
9896
10036
  const result = [];
9897
10037
  const usedRoles = /* @__PURE__ */ new Set();
@@ -9950,6 +10090,9 @@ function joinTokens(tokens) {
9950
10090
  }
9951
10091
  return result;
9952
10092
  }
10093
+ function isSelectorBodyChar(char) {
10094
+ return SELECTOR_BODY_CHAR.test(char) && !PARTICLE_SCRIPT_CHAR.test(char);
10095
+ }
9953
10096
  function isContextAwareExtractor(extractor) {
9954
10097
  return "setContext" in extractor && typeof extractor.setContext === "function";
9955
10098
  }
@@ -10646,15 +10789,80 @@ function createDefaultProfileProvider(config2) {
10646
10789
  }
10647
10790
  return new InMemoryProfileProvider(profiles2);
10648
10791
  }
10792
+ function applyExtensions(config2) {
10793
+ const extensions = config2.extensions;
10794
+ if (!extensions || extensions.length === 0) return config2;
10795
+ const configuredLanguages = new Set(config2.languages.map((l) => l.code));
10796
+ const actions = new Set(config2.schemas.map((s) => s.action));
10797
+ for (const extension of extensions) {
10798
+ const { action } = extension.schema;
10799
+ if (actions.has(action)) {
10800
+ throw new Error(
10801
+ `Extension command "${action}" collides with a command this DSL already defines. Pick a different action name.`
10802
+ );
10803
+ }
10804
+ actions.add(action);
10805
+ for (const code of Object.keys(extension.vocabulary)) {
10806
+ if (!configuredLanguages.has(code)) {
10807
+ throw new Error(
10808
+ `Extension command "${action}" supplies vocabulary for language "${code}", which is not configured on this DSL. Configured languages: ${[...configuredLanguages].join(", ")}.`
10809
+ );
10810
+ }
10811
+ }
10812
+ }
10813
+ const schemas = [...config2.schemas, ...extensions.map((e) => e.schema)];
10814
+ const languages = config2.languages.map((lang) => {
10815
+ const keywords = { ...lang.patternProfile.keywords };
10816
+ let roleMarkers = lang.patternProfile.roleMarkers;
10817
+ for (const extension of extensions) {
10818
+ const vocabulary = extension.vocabulary[lang.code];
10819
+ if (!vocabulary) continue;
10820
+ keywords[extension.schema.action] = { ...vocabulary.keyword };
10821
+ if (vocabulary.roleMarkers) {
10822
+ roleMarkers = { ...roleMarkers, ...vocabulary.roleMarkers };
10823
+ }
10824
+ }
10825
+ return {
10826
+ ...lang,
10827
+ patternProfile: {
10828
+ ...lang.patternProfile,
10829
+ keywords,
10830
+ ...roleMarkers !== void 0 && { roleMarkers }
10831
+ }
10832
+ };
10833
+ });
10834
+ const extensionGenerators = new Map(
10835
+ extensions.filter((e) => e.generate).map((e) => [e.schema.action, e.generate])
10836
+ );
10837
+ const baseGenerator = config2.codeGenerator;
10838
+ const codeGenerator = extensionGenerators.size > 0 ? {
10839
+ generate(node) {
10840
+ const generate = extensionGenerators.get(node.action);
10841
+ if (generate) return generate(node);
10842
+ if (!baseGenerator) {
10843
+ throw new Error(`No code generator for action "${node.action}"`);
10844
+ }
10845
+ return baseGenerator.generate(node);
10846
+ }
10847
+ } : baseGenerator;
10848
+ return {
10849
+ ...config2,
10850
+ schemas,
10851
+ languages,
10852
+ ...codeGenerator !== void 0 && { codeGenerator }
10853
+ };
10854
+ }
10649
10855
  function createMultilingualDSL(config2) {
10650
- const dictionary = config2.dictionary ?? createDefaultDictionary(config2);
10651
- const profileProvider = config2.profileProvider ?? createDefaultProfileProvider(config2);
10856
+ const effectiveConfig = applyExtensions(config2);
10857
+ const extensionActions = new Set((config2.extensions ?? []).map((e) => e.schema.action));
10858
+ const dictionary = effectiveConfig.dictionary ?? createDefaultDictionary(effectiveConfig);
10859
+ const profileProvider = effectiveConfig.profileProvider ?? createDefaultProfileProvider(effectiveConfig);
10652
10860
  const transformer = new GrammarTransformer({
10653
10861
  dictionary,
10654
10862
  profileProvider
10655
10863
  });
10656
- const registry = new DSLRegistry(config2);
10657
- return new MultilingualDSLImpl(config2, registry, transformer);
10864
+ const registry = new DSLRegistry(effectiveConfig, extensionActions);
10865
+ return new MultilingualDSLImpl(effectiveConfig, registry, transformer, profileProvider);
10658
10866
  }
10659
10867
  function generatePrompt(config2) {
10660
10868
  const outputFormat = config2.outputFormat ?? "both";
@@ -11557,94 +11765,6 @@ async function registryToAOTBackends(registry) {
11557
11765
  }
11558
11766
  return backends;
11559
11767
  }
11560
- function lookupKeyword(keywords, action, language) {
11561
- return keywords[action]?.[language] ?? action;
11562
- }
11563
- function lookupMarker(markers, marker, language) {
11564
- return markers[marker]?.[language] ?? marker;
11565
- }
11566
- function buildPhrase(...parts) {
11567
- return parts.filter(Boolean).join(" ");
11568
- }
11569
- function buildTablesFromProfiles(schemas, profiles2) {
11570
- const keywords = {};
11571
- const markers = {};
11572
- for (const profile of profiles2) {
11573
- for (const [action, kw] of Object.entries(profile.keywords)) {
11574
- if (!keywords[action]) keywords[action] = {};
11575
- keywords[action][profile.code] = kw.primary;
11576
- }
11577
- }
11578
- for (const schema of schemas) {
11579
- for (const role of schema.roles) {
11580
- if (role.markerOverride) {
11581
- const markerKey = role.role;
11582
- if (!markers[markerKey]) markers[markerKey] = {};
11583
- for (const [lang, markerText] of Object.entries(role.markerOverride)) {
11584
- markers[markerKey][lang] = markerText;
11585
- }
11586
- }
11587
- }
11588
- }
11589
- for (const profile of profiles2) {
11590
- if (profile.roleMarkers) {
11591
- for (const [markerKey, markerDef] of Object.entries(profile.roleMarkers)) {
11592
- if (!markers[markerKey]) markers[markerKey] = {};
11593
- markers[markerKey][profile.code] = markerDef.primary;
11594
- }
11595
- }
11596
- }
11597
- return { keywords, markers };
11598
- }
11599
- function detectWordOrders(profiles2) {
11600
- const sovLanguages = /* @__PURE__ */ new Set();
11601
- const vsoLanguages = /* @__PURE__ */ new Set();
11602
- for (const profile of profiles2) {
11603
- if (profile.wordOrder === "SOV") sovLanguages.add(profile.code);
11604
- if (profile.wordOrder === "VSO") vsoLanguages.add(profile.code);
11605
- }
11606
- return { sovLanguages, vsoLanguages };
11607
- }
11608
- function createSchemaRenderer(schemas, profiles2) {
11609
- const { keywords, markers } = buildTablesFromProfiles(schemas, profiles2);
11610
- const { sovLanguages } = detectWordOrders(profiles2);
11611
- const schemaMap = /* @__PURE__ */ new Map();
11612
- for (const s of schemas) schemaMap.set(s.action, s);
11613
- return {
11614
- render(node, language) {
11615
- const schema = schemaMap.get(node.action);
11616
- if (!schema) return node.action;
11617
- const keyword = lookupKeyword(keywords, node.action, language);
11618
- const isSOV = sovLanguages.has(language);
11619
- const roleParts = [];
11620
- for (const role of schema.roles) {
11621
- const value = extractRoleValue(node, role.role);
11622
- if (!value && !role.required) continue;
11623
- const markerText = role.markerOverride?.[language] ?? markers[role.role]?.[language] ?? void 0;
11624
- roleParts.push({
11625
- ...markerText != null && { marker: markerText },
11626
- value: value || "",
11627
- role
11628
- });
11629
- }
11630
- const parts = [];
11631
- if (isSOV) {
11632
- for (const rp of roleParts) {
11633
- if (rp.value) parts.push(rp.value);
11634
- if (rp.marker) parts.push(rp.marker);
11635
- }
11636
- parts.push(keyword);
11637
- } else {
11638
- parts.push(keyword);
11639
- for (const rp of roleParts) {
11640
- if (rp.marker) parts.push(rp.marker);
11641
- if (rp.value) parts.push(rp.value);
11642
- }
11643
- }
11644
- return buildPhrase(...parts);
11645
- }
11646
- };
11647
- }
11648
11768
  function createPosition(start, end) {
11649
11769
  return { start, end };
11650
11770
  }
@@ -11694,6 +11814,9 @@ function isQuote(char) {
11694
11814
  function isDigit(char) {
11695
11815
  return /\d/.test(char);
11696
11816
  }
11817
+ function stripOptionalDiacritics(word) {
11818
+ return word.replace(/[ً-ْٰ]/g, "");
11819
+ }
11697
11820
  function isAsciiLetter(char) {
11698
11821
  return /[a-zA-Z]/.test(char);
11699
11822
  }
@@ -14336,7 +14459,7 @@ function getHyperscriptExtractors() {
14336
14459
  new UrlExtractor(),
14337
14460
  new EventModifierExtractor(),
14338
14461
  new VariableRefExtractor(),
14339
- new CssSelectorExtractor()
14462
+ new CssSelectorExtractor2()
14340
14463
  ];
14341
14464
  }
14342
14465
  function isAsciiIdentifierChar6(char) {
@@ -16335,8 +16458,10 @@ function resolveMarkerForRole(roleSpec, profile) {
16335
16458
  const overrideMarker = roleSpec.markerOverride?.[profile.code];
16336
16459
  const defaultMarker = profile.roleMarkers[roleSpec.role];
16337
16460
  if (overrideMarker !== void 0) {
16461
+ const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
16338
16462
  return {
16339
16463
  primary: overrideMarker,
16464
+ ...alternatives && { alternatives },
16340
16465
  position: defaultMarker?.position ?? "before",
16341
16466
  isOverride: true
16342
16467
  };
@@ -16354,25 +16479,34 @@ function resolveMarkerForRole(roleSpec, profile) {
16354
16479
  }
16355
16480
  return null;
16356
16481
  }
16482
+ function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
16483
+ const legacy = roleSpec.markerLegacy?.[languageCode];
16484
+ if (!legacy?.length) return void 0;
16485
+ const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
16486
+ return alternatives.length ? alternatives : void 0;
16487
+ }
16488
+ function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
16489
+ const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
16490
+ const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
16491
+ const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
16492
+ return alternatives.length ? alternatives : void 0;
16493
+ }
16357
16494
  function resolveRoleMarker(roleSpec, profile) {
16358
16495
  let marker;
16359
16496
  let alternatives;
16360
16497
  if (roleSpec.markerOverride && roleSpec.markerOverride[profile.code] !== void 0) {
16361
16498
  marker = roleSpec.markerOverride[profile.code];
16499
+ alternatives = marker ? schemaMarkerAlternatives(roleSpec, profile.code, marker) : void 0;
16362
16500
  } else {
16363
16501
  const roleMarker = profile.roleMarkers[roleSpec.role];
16364
16502
  if (roleMarker) {
16365
16503
  marker = roleMarker.primary;
16366
- alternatives = roleMarker.alternatives ? [...roleMarker.alternatives] : void 0;
16367
- }
16368
- }
16369
- const variants = roleSpec.markerVariants?.[profile.code];
16370
- if (variants && variants.length > 0) {
16371
- const merged = alternatives ? [...alternatives] : [];
16372
- for (const v2 of variants) {
16373
- if (v2 !== marker && !merged.includes(v2)) merged.push(v2);
16504
+ const schemaAlts = schemaMarkerAlternatives(roleSpec, profile.code, marker) ?? [];
16505
+ const merged = [.../* @__PURE__ */ new Set([...roleMarker.alternatives ?? [], ...schemaAlts])].filter(
16506
+ (a) => a !== marker
16507
+ );
16508
+ alternatives = merged.length ? merged : void 0;
16374
16509
  }
16375
- alternatives = merged;
16376
16510
  }
16377
16511
  return { marker, alternatives };
16378
16512
  }
@@ -16838,6 +16972,13 @@ function generateSOVTwoRoleDestFirstEventHandlerPattern(commandSchema, profile,
16838
16972
  extraction
16839
16973
  };
16840
16974
  }
16975
+ function mergeSchemaAlternatives(roleSpec, profile, roleMarker) {
16976
+ const schemaAlts = schemaMarkerAlternatives(roleSpec, profile.code, roleMarker.primary) ?? [];
16977
+ const merged = [.../* @__PURE__ */ new Set([...roleMarker.alternatives ?? [], ...schemaAlts])].filter(
16978
+ (a) => a !== roleMarker.primary
16979
+ );
16980
+ return merged.length ? merged : void 0;
16981
+ }
16841
16982
  function generateVSOEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config2) {
16842
16983
  const tokens = [];
16843
16984
  if (eventMarker.position === "before") {
@@ -16950,11 +17091,12 @@ function generateVSOVerbFirstTwoRoleEventHandlerPattern(commandSchema, profile,
16950
17091
  let markerAlternatives;
16951
17092
  if (roleSpec.markerOverride && roleSpec.markerOverride[profile.code] !== void 0) {
16952
17093
  marker = roleSpec.markerOverride[profile.code];
17094
+ markerAlternatives = marker ? schemaMarkerAlternatives(roleSpec, profile.code, marker) : void 0;
16953
17095
  } else {
16954
17096
  const roleMarker = profile.roleMarkers[roleSpec.role];
16955
17097
  if (roleMarker) {
16956
17098
  marker = roleMarker.primary;
16957
- markerAlternatives = roleMarker.alternatives;
17099
+ markerAlternatives = mergeSchemaAlternatives(roleSpec, profile, roleMarker);
16958
17100
  }
16959
17101
  }
16960
17102
  if (marker) {
@@ -17007,11 +17149,12 @@ function generateVSOTwoRoleEventHandlerPattern(commandSchema, profile, keyword,
17007
17149
  let markerAlternatives;
17008
17150
  if (roleSpec.markerOverride && roleSpec.markerOverride[profile.code] !== void 0) {
17009
17151
  marker = roleSpec.markerOverride[profile.code];
17152
+ markerAlternatives = marker ? schemaMarkerAlternatives(roleSpec, profile.code, marker) : void 0;
17010
17153
  } else {
17011
17154
  const roleMarker = profile.roleMarkers[roleSpec.role];
17012
17155
  if (roleMarker) {
17013
17156
  marker = roleMarker.primary;
17014
- markerAlternatives = roleMarker.alternatives;
17157
+ markerAlternatives = mergeSchemaAlternatives(roleSpec, profile, roleMarker);
17015
17158
  }
17016
17159
  }
17017
17160
  if (marker) {
@@ -17535,7 +17678,13 @@ function buildRoleToken(roleSpec, profile) {
17535
17678
  const position = defaultMarker?.position ?? "before";
17536
17679
  const optionalMarker = roleSpec.markerOptional?.[profile.code] === true;
17537
17680
  const pushWord = (word) => {
17538
- const literal = suppressMarker ? { type: "literal", value: word, renderSuppress: true } : { type: "literal", value: word };
17681
+ const alternatives = markerWords.length === 1 ? schemaMarkerAlternatives(roleSpec, profile.code, word) ?? [] : [];
17682
+ const literal = {
17683
+ type: "literal",
17684
+ value: word,
17685
+ ...alternatives.length ? { alternatives } : {},
17686
+ ...suppressMarker ? { renderSuppress: true } : {}
17687
+ };
17539
17688
  tokens.push(optionalMarker ? { type: "group", optional: true, tokens: [literal] } : literal);
17540
17689
  };
17541
17690
  if (position === "before") {
@@ -17546,10 +17695,12 @@ function buildRoleToken(roleSpec, profile) {
17546
17695
  for (const word of markerWords) pushWord(word);
17547
17696
  }
17548
17697
  } else if (defaultMarker) {
17549
- const variantAlts = roleSpec.markerVariants?.[profile.code] ?? [];
17550
17698
  const asMarker = () => {
17551
17699
  const alternatives = [
17552
- .../* @__PURE__ */ new Set([...defaultMarker.alternatives ?? [], ...variantAlts])
17700
+ .../* @__PURE__ */ new Set([
17701
+ ...defaultMarker.alternatives ?? [],
17702
+ ...schemaMarkerAlternatives(roleSpec, profile.code, defaultMarker.primary) ?? []
17703
+ ])
17553
17704
  ].filter((a) => a !== defaultMarker.primary);
17554
17705
  return {
17555
17706
  type: "literal",
@@ -17585,11 +17736,19 @@ function buildExtractionRules(schema, profile) {
17585
17736
  if (roleSpec.valuePrefixLiteral?.[profile.code]) {
17586
17737
  rules[roleSpec.role] = { marker: roleSpec.valuePrefixLiteral[profile.code] };
17587
17738
  } else if (overrideMarker !== void 0) {
17588
- rules[roleSpec.role] = overrideMarker ? { marker: overrideMarker } : {};
17739
+ if (!overrideMarker) {
17740
+ rules[roleSpec.role] = {};
17741
+ } else {
17742
+ const isSingleWord = !/\s/.test(overrideMarker.trim());
17743
+ const markerAlternatives = isSingleWord ? schemaMarkerAlternatives(roleSpec, profile.code, overrideMarker) ?? [] : [];
17744
+ rules[roleSpec.role] = markerAlternatives.length ? { marker: overrideMarker, markerAlternatives } : { marker: overrideMarker };
17745
+ }
17589
17746
  } else if (defaultMarker && defaultMarker.primary) {
17590
- const variantAlts = roleSpec.markerVariants?.[profile.code] ?? [];
17591
17747
  const markerAlternatives = [
17592
- .../* @__PURE__ */ new Set([...defaultMarker.alternatives ?? [], ...variantAlts])
17748
+ .../* @__PURE__ */ new Set([
17749
+ ...defaultMarker.alternatives ?? [],
17750
+ ...schemaMarkerAlternatives(roleSpec, profile.code, defaultMarker.primary) ?? []
17751
+ ])
17593
17752
  ].filter((a) => a !== defaultMarker.primary);
17594
17753
  rules[roleSpec.role] = markerAlternatives.length ? { marker: defaultMarker.primary, markerAlternatives } : { marker: defaultMarker.primary };
17595
17754
  } else {
@@ -20668,28 +20827,22 @@ function roundTrip(input, sourceLanguage, targetLanguage) {
20668
20827
  matches: normalizedOriginal === normalizedRendered
20669
20828
  };
20670
20829
  }
20671
- function getAllTranslations(input, sourceLanguage, targetLanguages = [
20672
- "en",
20673
- "ja",
20674
- "ar",
20675
- "es",
20676
- "ko",
20677
- "zh",
20678
- "tr",
20679
- "pt",
20680
- "fr",
20681
- "de",
20682
- "id",
20683
- "qu",
20684
- "sw"
20685
- ]) {
20686
- const result = {};
20830
+ function getAllTranslations(input, sourceLanguage, targetLanguages = getRegisteredLanguages()) {
20831
+ return getAllTranslationsWithStatus(input, sourceLanguage, targetLanguages).translations;
20832
+ }
20833
+ function getAllTranslationsWithStatus(input, sourceLanguage, targetLanguages = getRegisteredLanguages()) {
20834
+ const translations = {};
20835
+ const failed = {};
20687
20836
  const node = parseAny(input, sourceLanguage);
20688
20837
  for (const lang of targetLanguages) {
20689
- result[lang] = render(node, lang);
20838
+ try {
20839
+ translations[lang] = render(node, lang);
20840
+ } catch (error) {
20841
+ failed[lang] = error instanceof Error ? error.message : String(error);
20842
+ }
20690
20843
  }
20691
- result["explicit"] = renderExplicit$1(node);
20692
- return result;
20844
+ translations["explicit"] = renderExplicit$1(node);
20845
+ return { translations, failed };
20693
20846
  }
20694
20847
  function validateTranslation(original, translated, originalLang, translatedLang) {
20695
20848
  try {
@@ -28818,7 +28971,7 @@ async function semanticNodeToRuntimeAST(node) {
28818
28971
  const fw = await getFramework();
28819
28972
  return fw.semanticNodeToRuntimeAST(node);
28820
28973
  }
28821
- var KEYWORDS$1, COMMAND_TERMINATORS, COMMANDS, COMPOUND_COMMANDS, CONTROL_FLOW_COMMANDS, PUT_OPERATIONS, PUT_OPERATION_KEYWORDS, HYPERSCRIPT_KEYWORDS, CommandClassification, CSS_FUNCTIONS, CONTEXT_VARS$1, LOGICAL_OPERATORS$1, COMPARISON_OPERATORS, DOM_EVENTS, TOKENIZER_KEYWORDS, TokenKind, MATHEMATICAL_OPERATORS, TIME_UNITS$1, isDebugEnabled$1, DEBUG, debug, debugEnabled, debugEventTarget, stats, DEFAULT_CONFIDENCE_THRESHOLD$1, SemanticIntegrationAdapter, STOP_TOKENS, STOP_DELIMITERS, CORE_FRAGMENT, PARSER_COMPARISON_FRAGMENT, ASSIGNMENT_FRAGMENT, PARSER_TABLE, FEATURE_REGISTRY, NODE_EVALUATORS, NODE_WRITERS, GLOBAL_WRITE_HOOKS, GLOBAL_READ_HOOKS, LOCAL_WRITE_HOOKS, LOCAL_READ_HOOKS, ParserExtensionRegistry, SINGLETON, WINDOW_KEY, MULTI_WORD_PATTERNS, DEFAULT_BOUNDARY_KEYWORDS, CommandNodeBuilder, SWAP_STRATEGY_KEYWORDS, ELEMENT_PRONOUNS, GO_KEYWORDS, GO_URL_STOP, STRING_POSTFIX_UNITS, STRING_POSTFIX_BP, Parser, HookRegistry, sharedGlobals, elementScopes, ExpressionTypeRegistry, expressionTypeRegistry, BOOLEAN_ATTRIBUTES, SPECIAL_DOM_PROPERTIES, NUMBER_WORDS, isProduction, skipValidation, addDescribeToValidator, v, z, BaseExpressionImpl, enhancedConverters, AsExpressionInputSchema, AsExpression, IsExpressionInputSchema, IsExpression, conversionConfig, defaultConversions, TYPE_ALIASES, asExpression, isExpression, asyncExpression, conversionExpressions, UNSAFE_PROPS, possessiveExpression, myExpression, itsExpression$1, yourExpression, ofExpression, attributeExpression, attributeWithValueExpression, classReferenceExpression, idReferenceExpression, propertiesExpressions, NotSyncEvaluable, cachedFullRegistry, RAW_ARG_BUILTINS, CSS_PSEUDO_CLASSES, PSEUDO_CLASS_COLON_RE, BARE_REF_ESCAPE_RE, QUERY_REF_INTERP_RE, CleanupRegistry, EventSourceRegistry, ContextProviderRegistry, canonicalEvaluator, ContextBridge, CommandAdapterV2, CommandRegistryV2, defaultRegistry, RegistryIntegration, eventRecursionDepth, RuntimeBase, MeExpression, YouExpression, ItExpression, CSSelectorInputSchema, CSSSelectorExpression, meExpression, youExpression, itExpression, itsExpression, resultExpression, querySelectorExpression, querySelectorAllExpression, idExpression, classExpression, closestExpression, parentExpression, windowExpression, documentExpression, elementWithSelectorExpression, styleRefExpression, possessiveStyleRefExpression, ofStyleRefExpression, referencesExpressions, LRUCache, HyperscriptCache, globalCache, PerformanceTracker, performanceTracker, cleanupInterval, BinaryLogicalInputSchema, UnaryLogicalInputSchema, AndExpression, OrExpression, NotExpression, ComparisonInputSchema, PatternMatchingInputSchema, equalsExpression, strictEqualsExpression, notEqualsExpression, strictNotEqualsExpression, lessThanExpression, lessThanOrEqualExpression, greaterThanExpression, greaterThanOrEqualExpression, andExpression, orExpression, notExpression, isEmptyExpression, noExpression, isNotEmptyExpression, existsExpression, doesNotExistExpression, containsExpression, doesNotContainExpression, startsWithExpression, endsWithExpression, betweenExpression, matchesExpression, hasExpression, doesNotHaveExpression, logicalExpressions, StringLiteralInputSchema, NumberLiteralInputSchema, BooleanLiteralInputSchema, BinaryOperationInputSchema, StringLiteralExpression, NumberLiteralExpression, BooleanLiteralExpression, AdditionExpression$1, StringConcatenationExpression, MultiplicationExpression$1, specialExpressions, evaluationToHyperScriptType, CollectionInputSchema, IndexInputSchema, RandomInputSchema, FirstExpression, LastExpression, AtExpression, RandomExpression, firstExpression, lastExpression, atExpression, nextExpression, previousExpression, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, nextWithinExpression, previousWithinExpression, positionalExpressions, AdditionExpression2, SubtractionExpression, MultiplicationExpression2, DivisionExpression, ModuloExpression, PowerExpression, mathematicalExpressions, index$3, COMMAND_NAME, COMMAND_CATEGORY, COMMAND_METADATA, KEYWORD_PREPOSITIONS, VisibilityCommandBase, HideCommand, createHideCommand, ShowCommand, createShowCommand, SMART_ELEMENT_TAGS, DOMModificationBase, AddCommand, createAddCommand, RemoveCommand, createRemoveCommand, PATTERN, BOOL_PROPS, ToggleCommand, createToggleCommand, PutCommand, createPutCommand, HTML_ESCAPE, MakeCommand, createMakeCommand, EmptyCommand, createEmptyCommand, OpenCommand, createOpenCommand, CloseCommand, createCloseCommand, SelectCommand, createSelectCommand, ResetCommand, createResetCommand, SUPPORTS_MOVE_BEFORE, ELEMENT_NODE_TYPE, TEXT_NODE_TYPE, IS_PARENT_NODE_TYPE, Operation, candidateNodes, candidateElements, candidateElementsWithIds, unmatchedNodes, unmatchedElements, whitespaceNodes, _idArrayMap, _idSetMap, _options, _Morph_instances, morphOneToMany_fn, morphOneToOne_fn, morphMatchingElements_fn, morphNonMatchingElements_fn, morphOtherNode_fn, visitAttributes_fn, visitTextArea_fn, replaceNode_fn, removeNode_fn, mapIdArraysForEach_fn, mapIdArrays_fn, mapIdSets_fn, Morph, morphAdapter, queue, processing, STRATEGY_KEYWORDS, SwapCommand, MorphCommand, createSwapCommand, createMorphCommand, CRITICAL_LAYOUT_ELEMENTS, STRUCTURAL_SEMANTIC_ELEMENTS, WARNING_ELEMENTS, DEFAULT_VALIDATION_CONFIG, globalConfig, STYLES, SEVERITY_ICONS, SEVERITY_LABELS, STRATEGY_MAP, ProcessPartialsCommand, createProcessPartialsCommand, WaitCommand, createWaitCommand, customResponseTypes, DEFAULT_FETCH_THROWS_ON, fetchThrowsOnPatterns, FetchCommand, createFetchCommand, SetCommand, createSetCommand, GetCommand, createGetCommand, NumericModifyCommand, createIncrementCommand, createDecrementCommand, ClearCommand, createClearCommand, LogCommand, createLogCommand, EventDispatchCommand, createTriggerCommand, createSendCommand, GoCommand, createGoCommand, KEYWORDS, HistoryCommand, createPushUrlCommand, createReplaceUrlCommand, ScrollCommand, createScrollCommand, ConditionalCommand, createConditionalCommand, createIfCommand, createUnlessCommand, RepeatCommand, createRepeatCommand, ControlFlowSignalBase, BreakCommand, createBreakCommand, ContinueCommand, createContinueCommand, HaltCommand, createHaltCommand, ReturnCommand, createReturnCommand, ExitCommand, createExitCommand, CallCommand, createCallCommand, FocusCommand, createFocusCommand, BlurCommand, createBlurCommand, AppendCommand, createAppendCommand, TransitionCommand, createTransitionCommand, MeasureCommand, createMeasureCommand, SettleCommand, createSettleCommand, StartViewTransitionCommand, createStartViewTransitionCommand, JsCommand, createJsCommand, AsyncCommand, createAsyncCommand, DefaultCommand, createDefaultCommand, PseudoCommand, TellCommand, createTellCommand, CopyCommand, createCopyCommand, PickCommand, createPickCommand, ThrowCommand, createThrowCommand, BeepCommand, createBeepCommand, BreakpointCommand, createBreakpointCommand, InstallCommand, TakeCommand, createTakeCommand, RenderCommand, Runtime, DEFAULT_REFERENCES, STRUCTURAL_ROLES, CHAIN_KEYWORDS, VERSION_HEADER_RE, VALID_KINDS, VALID_VALUE_TYPES$1, VALID_CHAIN_TYPES, VALID_ASYNC_VARIANTS, VALID_DIAGNOSTIC_LEVELS, DebugLogger, _PatternMatcher$1, PatternMatcher$1, patternMatcher$1, defaultConfig$1, GrammarTransformer, InMemoryDictionary, NullDictionary, InMemoryProfileProvider, NullProfileProvider, StringLiteralExtractor, NumberExtractor, IdentifierExtractor, UnicodeIdentifierExtractor, LatinExtendedIdentifierExtractor, WhitespaceExtractor, VALID_VALUE_TYPES, SCROLL_MARKERS, URL_MARKERS, PARTIALS_IN_MARKERS, DSLRegistry, MultilingualDSLImpl, DomainRegistry, COMMENT_PATTERN, CrossDomainDispatcher, DomainAwareScanner, AOTOrchestrator, TokenStreamImpl, DEFAULT_OPERATORS$1, OperatorExtractor$1, DEFAULT_PUNCTUATION$1, PunctuationExtractor$1, SIMPLE_TOKENIZER_OPERATOR_SET, MARKER_CONCEPT_NORMALIZEDS, ENGLISH_DOM_EVENT_NAMES, _BaseTokenizer, BaseTokenizer, BaseMorphologicalNormalizer, PatternTracker, MultiStatementParserImpl, index$2, __defProp2, __getOwnPropNames2, __esm2, __export2, tokenizers, profiles, patternCache, patternGenerator, registeredPatterns, init_registry, arabic_exports, arabicProfile, init_arabic, bengali_exports, bengaliProfile, init_bengali, german_exports, germanProfile, init_german, english_exports, englishProfile, init_english, spanish_exports, spanishProfile, init_spanish, french_exports, frenchProfile, init_french, he_exports, hebrewProfile, init_he, hindi_exports, hindiProfile, init_hindi, indonesian_exports, indonesianProfile, init_indonesian, italian_exports, italianProfile, init_italian, japanese_exports, japaneseProfile, init_japanese, korean_exports, koreanProfile, init_korean, ms_exports, malayProfile, init_ms, polish_exports, polishProfile, init_polish, portuguese_exports, portugueseProfile, init_portuguese, quechua_exports, quechuaProfile, init_quechua, russian_exports, russianProfile, init_russian, swahili_exports, swahiliProfile, init_swahili, thai_exports, thaiProfile, init_thai, tl_exports, tagalogProfile, init_tl, turkish_exports, turkishProfile, init_turkish, ukrainian_exports, ukrainianProfile, init_ukrainian, vietnamese_exports, vietnameseProfile, init_vietnamese, chinese_exports, chineseProfile, init_chinese, SchemaErrorCodes, SchemaErrorMessages, SchemaErrorSuggestions, init_schema_error_codes, schema_validator_exports, MULTI_TYPE_PATIENT_COMMANDS, NO_REQUIRED_ROLES_COMMANDS, init_schema_validator, toggleSchema, addSchema, removeSchema, putSchema, setSchema, bindSchema, liveSchema, eventsourceSchema, socketSchema, workerSchema, interceptSchema, showSchema, hideSchema, onSchema, triggerSchema, waitSchema, fetchSchema, incrementSchema, decrementSchema, appendSchema, prependSchema, logSchema, getCommandSchema, takeSchema, makeSchema, haltSchema, settleSchema, throwSchema, sendSchema, ifSchema, unlessSchema, elseSchema, repeatSchema, forSchema, whileSchema, continueSchema, URL_MARKER_ALL_LANGS, goSchema, transitionSchema, cloneSchema, focusSchema, blurSchema, emptySchema, openSchema, closeSchema, selectSchema, clearSchema, resetSchema, breakpointSchema, callSchema, returnSchema, jsSchema, asyncSchema, tellSchema, defaultSchema, initSchema, behaviorSchema, installSchema, measureSchema, swapSchema, morphSchema, beepSchema, breakSchema, copySchema, exitSchema, pickSchema, scrollSchema, PARTIALS_IN_MARKER_ALL_LANGS, pushSchema, replaceSchema, processSchema, renderSchema, commandSchemas, init_command_schemas, PUT_POSITIONAL, PUT_AT_END, init_put, init_token_utils, init_char_classifiers, init_base_tokenizer, init_base, DEFAULT_OPERATORS, OperatorExtractor2, DEFAULT_PUNCTUATION, PunctuationExtractor2, init_generic_extractors, CssSelectorExtractor, init_css_selector, EventModifierExtractor, init_event_modifier, URL_PREFIXES, UrlExtractor, init_url, VariableRefExtractor, init_variable_ref, JapaneseKeywordExtractor, init_japanese_keyword, SINGLE_CHAR_PARTICLES, MULTI_CHAR_PARTICLES, JapaneseParticleExtractor, init_japanese_particle, TEMPORAL_EVENT_SUFFIXES, KoreanKeywordExtractor, init_korean_keyword, SINGLE_CHAR_PARTICLES2, MULTI_CHAR_PARTICLES2, KoreanParticleExtractor, init_korean_particle, ChineseKeywordExtractor, init_chinese_keyword, SINGLE_CHAR_PARTICLES3, MULTI_CHAR_PARTICLES3, ChineseParticleExtractor, init_chinese_particle, isVietnameseLetter, isVietnameseIdentifierChar, PREPOSITIONS, VietnameseKeywordExtractor, init_vietnamese_keyword, isArabic, PREPOSITIONS2, ArabicKeywordExtractor, init_arabic_keyword, isArabic2, PROCLITICS, NON_PROCLITIC_WORDS, ArabicProcliticExtractor, init_arabic_proclitic, isArabic3, TEMPORAL_MARKERS, ArabicTemporalExtractor, init_arabic_temporal, CyrillicKeywordExtractor, RUSSIAN_PREPOSITIONS, UKRAINIAN_PREPOSITIONS, init_cyrillic_keyword, HindiKeywordExtractor, init_hindi_keyword, SINGLE_POSTPOSITIONS, COMPOUND_POSTPOSITIONS, HindiParticleExtractor, init_hindi_particle, BengaliKeywordExtractor, init_bengali_keyword, SINGLE_POSTPOSITIONS2, BengaliParticleExtractor, init_bengali_particle, ThaiKeywordExtractor, init_thai_keyword, MalayKeywordExtractor, init_malay_keyword, PREPOSITIONS3, TagalogKeywordExtractor, init_tagalog_keyword, PREPOSITIONS4, isPolishLetter, isPolishIdentifierChar, PolishKeywordExtractor, init_polish_keyword, PREPOSITIONS5, isIndonesianLetter, isIndonesianIdentifierChar, IndonesianKeywordExtractor, init_indonesian_keyword, PREPOSITIONS6, isSwahiliLetter, isSwahiliIdentifierChar, SwahiliKeywordExtractor, init_swahili_keyword, POSTPOSITIONS, CASE_SUFFIXES, TurkishKeywordExtractor, init_turkish_keyword, SUFFIXES, POSTPOSITIONS2, AGGLUTINATIVE_MARKERS, QuechuaKeywordExtractor, init_quechua_keyword, isHebrew, PREPOSITIONS7, CONJUNCTIONS, HebrewKeywordExtractor, init_hebrew_keyword, isHebrew2, PROCLITIC_PREFIXES, EVENT_MARKER_PREFIXES, EVENT_NAMES, HebrewProcliticExtractor, init_hebrew_proclitic, AsciiIdentifierExtractor, init_ascii_identifier, init_extractors, init_extractor_helpers, EnglishKeywordExtractor, init_english_keyword, english_exports2, ENGLISH_EXTRAS, EnglishTokenizer, englishTokenizer, init_english2, init_types, JAPANESE_SUFFIX_RULES, SURU_PATTERNS, JapaneseMorphologicalNormalizer, init_japanese_normalizer, japanese_exports2, PARTICLES, JAPANESE_EXTRAS, JapaneseTokenizer, japaneseTokenizer, init_japanese2, KOREAN_SUFFIX_RULES, HADA_PATTERNS, KoreanMorphologicalNormalizer, init_korean_normalizer, korean_exports2, PARTICLES2, KOREAN_EXTRAS, KoreanTokenizer, koreanTokenizer, init_korean2, COMBINED_PREFIXES, SINGLE_PREFIXES, VERB_PREFIXES, SUFFIXES2, ArabicMorphologicalNormalizer, init_arabic_normalizer, arabic_exports2, CONJUNCTIONS2, PREPOSITIONS8, ARABIC_EXTRAS, ArabicTokenizer, arabicTokenizer, init_arabic2, AR_ENDINGS, ER_ENDINGS, IR_ENDINGS, ALL_ENDINGS, SpanishMorphologicalNormalizer, init_spanish_normalizer, isSpanishLetter, isSpanishIdentifierChar, PREPOSITIONS9, SpanishKeywordExtractor, init_spanish_keyword, spanish_exports2, PREPOSITIONS10, SPANISH_EXTRAS, SpanishTokenizer, spanishTokenizer, init_spanish2, TURKISH_SUFFIX_RULES, TurkishMorphologicalNormalizer, init_turkish_normalizer, turkish_exports2, POSTPOSITIONS3, CASE_SUFFIXES2, TURKISH_EXTRAS, TurkishTokenizer, turkishTokenizer, init_turkish2, chinese_exports2, PARTICLES3, CHINESE_EXTRAS, ChineseTokenizer, chineseTokenizer, init_chinese2, REFLEXIVE_SUFFIXES, AR_ENDINGS2, ER_ENDINGS2, IR_ENDINGS2, ALL_ENDINGS2, PortugueseMorphologicalNormalizer, init_portuguese_normalizer, isPortugueseLetter, isPortugueseIdentifierChar, PREPOSITIONS11, PortugueseKeywordExtractor, init_portuguese_keyword, portuguese_exports2, PREPOSITIONS12, PORTUGUESE_EXTRAS, PortugueseTokenizer, portugueseTokenizer, init_portuguese2, REFLEXIVE_SUFFIXES2, ER_ENDINGS3, IR_ENDINGS3, RE_ENDINGS, ALL_ENDINGS3, FrenchMorphologicalNormalizer, init_french_normalizer, isFrenchLetter, isFrenchIdentifierChar, PREPOSITIONS13, FrenchKeywordExtractor, init_french_keyword, french_exports2, FRENCH_EXTRAS, FrenchTokenizer, frenchTokenizer, init_french2, SEPARABLE_PREFIXES, VERB_ENDINGS, ELN_ERN_ENDINGS, ALL_ENDINGS4, GermanMorphologicalNormalizer, init_german_normalizer, isGermanLetter, isGermanIdentifierChar, PREPOSITIONS14, GermanKeywordExtractor, init_german_keyword, german_exports2, GERMAN_EXTRAS, GermanTokenizer, germanTokenizer, init_german2, indonesian_exports2, PREPOSITIONS15, INDONESIAN_EXTRAS, IndonesianTokenizer, indonesianTokenizer, init_indonesian2, QUECHUA_SUFFIX_RULES, QuechuaMorphologicalNormalizer, quechuaMorphologicalNormalizer, init_quechua_normalizer, quechua_exports2, QuechuaStringLiteralExtractor, SUFFIXES3, QUECHUA_EXTRAS, QuechuaTokenizer, quechuaTokenizer, init_quechua2, swahili_exports2, PREPOSITIONS16, SWAHILI_EXTRAS, SwahiliTokenizer, swahiliTokenizer, init_swahili2, REFLEXIVE_SUFFIXES3, ARE_ENDINGS, ERE_ENDINGS, IRE_ENDINGS, ALL_ENDINGS5, ItalianMorphologicalNormalizer, init_italian_normalizer, RomanceKeywordExtractor, ITALIAN_PREPOSITIONS, init_romance_language_keyword, italian_exports2, PREPOSITIONS17, ITALIAN_EXTRAS, ItalianTokenizer, italianTokenizer, init_italian2, vietnamese_exports2, VIETNAMESE_EXTRAS, VietnameseTokenizer, vietnameseTokenizer, init_vietnamese2, IMPERATIVE_TO_INFINITIVE, PolishMorphologicalNormalizer, init_polish_normalizer, polish_exports2, PREPOSITIONS18, POLISH_EXTRAS, PolishTokenizer, polishTokenizer, init_polish2, IMPERATIVE_TO_INFINITIVE2, RussianMorphologicalNormalizer, init_russian_normalizer, russian_exports2, PREPOSITIONS19, RUSSIAN_EXTRAS, RussianTokenizer, russianTokenizer, init_russian2, IMPERATIVE_TO_INFINITIVE3, UkrainianMorphologicalNormalizer, init_ukrainian_normalizer, ukrainian_exports2, PREPOSITIONS20, UKRAINIAN_EXTRAS, UkrainianTokenizer, ukrainianTokenizer, init_ukrainian2, he_exports2, PREPOSITIONS21, HEBREW_EXTRAS, HebrewTokenizer, hebrewTokenizer, init_he2, SUFFIX_RULES, HindiMorphologicalNormalizer, init_hindi_normalizer, hindi_exports2, SINGLE_POSTPOSITIONS3, HINDI_EXTRAS, HindiTokenizer, hindiTokenizer, init_hindi2, SUFFIX_RULES2, BengaliMorphologicalNormalizer, bengaliMorphologicalNormalizer, init_bengali_normalizer, bengali_exports2, SINGLE_POSTPOSITIONS4, BENGALI_EXTRAS, BengaliTokenizer, bengaliTokenizer, init_bengali2, thai_exports2, THAI_EXTRAS, ThaiTokenizer, thaiTokenizer, init_thai2, ms_exports2, MALAY_EXTRAS, MalayTokenizer, malayTokenizer, init_ms2, COMBINED_PREFIXES2, SINGLE_PREFIXES2, INFIXES, SUFFIXES4, TagalogMorphologicalNormalizer, tagalogMorphologicalNormalizer, init_tagalog_normalizer, tl_exports2, TAGALOG_EXTRAS, TagalogTokenizer, tagalogTokenizer, init_tl2, eventNameTranslations, eventNameLocalizations, eventLocalizationDenylist, init_event_handler, init_role_positioning, init_marker_resolution, init_event_handlers_sov, init_event_handlers_vso, defaultConfig, init_pattern_generator, fetchWithResponseTypeEnglish, fetchWithOptionsAndResponseTypeEnglish, fetchWithOptionsEnglish, fetchSimpleEnglish, fetchPatternsEn, init_fetch, pickVariantEnglish, pickPatternsEn, init_pick, init_toggle, VERB_FIRST_REPEAT_TIMES, SOV_REPEAT_TIMES, FOR_IN_HEADS, WHILE_HEADS, VERB_FIRST_UNTIL_HEADS, repeatUntilHeadQuMidClause, SOV_UNTIL_HEADS, repeatUntilHeadQu, SOV_FOR_BINDING_HEADS, BY_LANG, addPattern, init_repeat, init_wait, en_exports, swapSimpleEnglish, swapElementEnglish, repeatUntilEventFromEnglish, repeatUntilEventEnglish, repeatTimesEnglish, repeatForeverEnglish, setPossessiveEnglish, forEnglish, ifEnglish, unlessEnglish, temporalInEnglish, temporalAfterEnglish, init_en, DEFAULT_CONFIDENCE_THRESHOLD, HIGH_CONFIDENCE_THRESHOLD, CONTEXT_VARS, LOGICAL_OPERATORS, BOOLEAN_LITERALS, COMPARISON_KEYWORDS, POSITIONAL_KEYWORDS, TIME_UNITS, POSSESSIVE_CONTEXT_TYPES, POSTFIX_STOP_WORDS, POSITIONAL_CALL_KEYWORDS, ExpressionParser, toggleMapper, addMapper, removeMapper, setMapper, showMapper, hideMapper, incrementMapper, decrementMapper, waitMapper, logMapper, putMapper, fetchMapper, appendMapper, prependMapper, triggerMapper, sendMapper, goMapper, transitionMapper, focusMapper, blurMapper, getMapper, takeMapper, callMapper, returnMapper, haltMapper, throwMapper, settleMapper, swapMapper, RANGE_METHODS, COUNT_METHODS, REGEX_METHODS, pickMapper, morphMapper, cloneMapper, makeMapper, measureMapper, tellMapper, jsMapper, asyncMapper, ifMapper, unlessMapper, repeatMapper, forMapper, whileMapper, continueMapper, defaultMapper, initMapper, behaviorMapper, installMapper, onMapper, mappers, ASTBuilder, KNOWN_PROFILES, PROPERTY_NAME_LEXICON, CONNECTIVE_LEXICON, OF_POSSESSIVE_MARKERS, ROLE_CONCEPT_TO_ENGLISH_LOCATIVE, LOCATIVE_SURFACES, ENGLISH_LOCATIVE_SENSES, POSITIONAL_KEYWORDS2, POSITIONAL_HEAD_DUALS, COMMAND_ACTION_KEYWORDS, AMBIGUOUS_SENSES, SENSE_PREDICATE_NORMALIZED, CONVERSION_TYPE_NAMES, CURATED_END_KEYWORDS, MAX_FOLD_TOKENS, KEY_RE, FUSED_PAIR_RE, OPTIONAL_ROLE_WEIGHT, DEFAULT_PARTIAL_CREDIT, MAX_STEM_PENALTY, STEM_PENALTY_FLOOR, VSO_VERB_BOOST, MAX_PREPOSITION_ADJUSTMENT, ARABIC_VERBS, PREFERRED_PREPOSITIONS, DefaultConfidenceModel, defaultConfidenceModel, BAREKEYWORD_BLOCK_ACTIONS, _PatternMatcher2, PatternMatcher, patternMatcher, OPENER_ACTIONS, PASCAL_CASE_NAME, OPENER_NORMS, TARGET_REFERENCES, ROLE_CONCEPTS, TRIGGER_SIGNATURE_LANGS, DEF_NAME, FEATURE_ACTIONS, OPAQUE_BODY_FEATURES, NAMED_FEATURES, HANDLER_BODY_FEATURES, DEF_BODY_FEATURES, SOV_KEYWORD_SEARCH_LIMIT, INTERCEPT_SOV_KEYWORD_LIMIT, MODIFIER_KEYWORDS, ONCE_SEQUENCES, DURATION_RE, EXCLUDED_FIRST_KINDS, BLOCK_HEADER_ACTIONS, BLOCK_NEEDS_TRAILING_END, SemanticRendererImpl, semanticRenderer, hyperscriptSchemaLookup, BLOCK_BODY_ACTIONS, NON_VALUE_KEYWORDS, POSITIONAL_VALUE_KEYWORDS, WAITABLE_EVENT_WORDS, SemanticParseError, MAX_UNCONSUMED_SPAN_CHARS, COVERAGE_RESIDUE_NORMALIZED, NORMALIZE_CHILD_FIELDS, _SemanticParserImpl, SemanticParserImpl, semanticParser, SemanticCache2, semanticCache, LANGUAGE_IMPORTERS, SUPPORTED_LANGUAGES, VERB_INITIAL_SPECS, VERB_FINAL_SPECS, swapSimpleEnglish2, swapElementEnglish2, swapPatternsEn, repeatUntilEventFromEnglish2, repeatUntilEventEnglish2, repeatPatternsEn, setPossessiveEnglish2, setPatternsEn, forEnglish2, ifEnglish2, unlessEnglish2, controlFlowPatternsEn, temporalInEnglish2, temporalAfterEnglish2, temporalPatternsEn, allEnglishOnlyPatterns, PATTERN_LOADERS, _generatedPatternsPerLanguage, handcraftedLanguages, patternCache2, _allPatterns, schemaRegistry, DEFAULT_CONFIG, HIGH_FREQUENCY_TRIGGERS, THROTTLE_RECOMMENDED_TRIGGERS, _devModeEnabled, _devModeConfig, VERSION, index$1, HistorySwapBehavior, BoostedBehavior, DEFAULT_EVENT_TYPE, DEFAULT_LANGUAGE$1, compileSyncFn, compileAsyncFn, getRuntimeFn, configRef, RingBuffer, HISTORY_CAPACITY, DebugController, DEFAULT_LANGUAGE, ASTCache, astCache, semanticAnalyzerInstance, bridgeInstance, config, _defaultRuntime, _debugController, hyperscript, lokascript, OP_TABLE, Lexer, Tokens, MAX_HISTORY_SIZE$5, DefInputSchema, TypedDefFeatureImplementation, enhancedDefImplementation, MAX_HISTORY_SIZE$4, EnhancedOnInputSchema, TypedOnFeatureImplementation, enhancedOnImplementation, MAX_HISTORY_SIZE$3, BehaviorsInputSchema, TypedBehaviorsFeatureImplementation, enhancedBehaviorsImplementation, MAX_HISTORY_SIZE$2, SocketsInputSchema, TypedSocketsFeatureImplementation, enhancedSocketsImplementation, MAX_HISTORY_SIZE$1, WebWorkerInputSchema, TypedWebWorkerFeatureImplementation, enhancedWebWorkerImplementation, MAX_HISTORY_SIZE, EventSourceInputSchema, TypedEventSourceFeatureImplementation, enhancedEventSourceImplementation, INTERCHANGE_ADAPTER, POS, DiagnosticSeverity, SymbolKind, CompletionItemKind, _semanticModule, SemanticGrammarBridge, bridge, _fw, index;
28974
+ var KEYWORDS$1, COMMAND_TERMINATORS, COMMANDS, COMPOUND_COMMANDS, CONTROL_FLOW_COMMANDS, PUT_OPERATIONS, PUT_OPERATION_KEYWORDS, HYPERSCRIPT_KEYWORDS, CommandClassification, CSS_FUNCTIONS, CONTEXT_VARS$1, LOGICAL_OPERATORS$1, COMPARISON_OPERATORS, DOM_EVENTS, TOKENIZER_KEYWORDS, TokenKind, MATHEMATICAL_OPERATORS, TIME_UNITS$1, isDebugEnabled$1, DEBUG, debug, debugEnabled, debugEventTarget, stats, DEFAULT_CONFIDENCE_THRESHOLD$1, SemanticIntegrationAdapter, STOP_TOKENS, STOP_DELIMITERS, CORE_FRAGMENT, PARSER_COMPARISON_FRAGMENT, ASSIGNMENT_FRAGMENT, PARSER_TABLE, FEATURE_REGISTRY, NODE_EVALUATORS, NODE_WRITERS, GLOBAL_WRITE_HOOKS, GLOBAL_READ_HOOKS, LOCAL_WRITE_HOOKS, LOCAL_READ_HOOKS, ParserExtensionRegistry, SINGLETON, WINDOW_KEY, MULTI_WORD_PATTERNS, DEFAULT_BOUNDARY_KEYWORDS, CommandNodeBuilder, SWAP_STRATEGY_KEYWORDS, ELEMENT_PRONOUNS, GO_KEYWORDS, GO_URL_STOP, STRING_POSTFIX_UNITS, STRING_POSTFIX_BP, Parser, HookRegistry, sharedGlobals, elementScopes, ExpressionTypeRegistry, expressionTypeRegistry, BOOLEAN_ATTRIBUTES, SPECIAL_DOM_PROPERTIES, NUMBER_WORDS, isProduction, skipValidation, addDescribeToValidator, v, z, BaseExpressionImpl, enhancedConverters, AsExpressionInputSchema, AsExpression, IsExpressionInputSchema, IsExpression, conversionConfig, defaultConversions, TYPE_ALIASES, asExpression, isExpression, asyncExpression, conversionExpressions, UNSAFE_PROPS, possessiveExpression, myExpression, itsExpression$1, yourExpression, ofExpression, attributeExpression, attributeWithValueExpression, classReferenceExpression, idReferenceExpression, propertiesExpressions, NotSyncEvaluable, cachedFullRegistry, RAW_ARG_BUILTINS, CSS_PSEUDO_CLASSES, PSEUDO_CLASS_COLON_RE, BARE_REF_ESCAPE_RE, QUERY_REF_INTERP_RE, CleanupRegistry, EventSourceRegistry, ContextProviderRegistry, canonicalEvaluator, ContextBridge, CommandAdapterV2, CommandRegistryV2, defaultRegistry, RegistryIntegration, eventRecursionDepth, RuntimeBase, MeExpression, YouExpression, ItExpression, CSSelectorInputSchema, CSSSelectorExpression, meExpression, youExpression, itExpression, itsExpression, resultExpression, querySelectorExpression, querySelectorAllExpression, idExpression, classExpression, closestExpression, parentExpression, windowExpression, documentExpression, elementWithSelectorExpression, styleRefExpression, possessiveStyleRefExpression, ofStyleRefExpression, referencesExpressions, LRUCache, HyperscriptCache, globalCache, PerformanceTracker, performanceTracker, cleanupInterval, BinaryLogicalInputSchema, UnaryLogicalInputSchema, AndExpression, OrExpression, NotExpression, ComparisonInputSchema, PatternMatchingInputSchema, equalsExpression, strictEqualsExpression, notEqualsExpression, strictNotEqualsExpression, lessThanExpression, lessThanOrEqualExpression, greaterThanExpression, greaterThanOrEqualExpression, andExpression, orExpression, notExpression, isEmptyExpression, noExpression, isNotEmptyExpression, existsExpression, doesNotExistExpression, containsExpression, doesNotContainExpression, startsWithExpression, endsWithExpression, betweenExpression, matchesExpression, hasExpression, doesNotHaveExpression, logicalExpressions, StringLiteralInputSchema, NumberLiteralInputSchema, BooleanLiteralInputSchema, BinaryOperationInputSchema, StringLiteralExpression, NumberLiteralExpression, BooleanLiteralExpression, AdditionExpression$1, StringConcatenationExpression, MultiplicationExpression$1, specialExpressions, evaluationToHyperScriptType, CollectionInputSchema, IndexInputSchema, RandomInputSchema, FirstExpression, LastExpression, AtExpression, RandomExpression, firstExpression, lastExpression, atExpression, nextExpression, previousExpression, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, nextWithinExpression, previousWithinExpression, positionalExpressions, AdditionExpression2, SubtractionExpression, MultiplicationExpression2, DivisionExpression, ModuloExpression, PowerExpression, mathematicalExpressions, index$3, COMMAND_NAME, COMMAND_CATEGORY, COMMAND_METADATA, KEYWORD_PREPOSITIONS, VisibilityCommandBase, HideCommand, createHideCommand, ShowCommand, createShowCommand, SMART_ELEMENT_TAGS, DOMModificationBase, AddCommand, createAddCommand, RemoveCommand, createRemoveCommand, PATTERN, BOOL_PROPS, ToggleCommand, createToggleCommand, PutCommand, createPutCommand, HTML_ESCAPE, MakeCommand, createMakeCommand, EmptyCommand, createEmptyCommand, OpenCommand, createOpenCommand, CloseCommand, createCloseCommand, SelectCommand, createSelectCommand, ResetCommand, createResetCommand, SUPPORTS_MOVE_BEFORE, ELEMENT_NODE_TYPE, TEXT_NODE_TYPE, IS_PARENT_NODE_TYPE, Operation, candidateNodes, candidateElements, candidateElementsWithIds, unmatchedNodes, unmatchedElements, whitespaceNodes, _idArrayMap, _idSetMap, _options, _Morph_instances, morphOneToMany_fn, morphOneToOne_fn, morphMatchingElements_fn, morphNonMatchingElements_fn, morphOtherNode_fn, visitAttributes_fn, visitTextArea_fn, replaceNode_fn, removeNode_fn, mapIdArraysForEach_fn, mapIdArrays_fn, mapIdSets_fn, Morph, morphAdapter, queue, processing, STRATEGY_KEYWORDS, SwapCommand, MorphCommand, createSwapCommand, createMorphCommand, CRITICAL_LAYOUT_ELEMENTS, STRUCTURAL_SEMANTIC_ELEMENTS, WARNING_ELEMENTS, DEFAULT_VALIDATION_CONFIG, globalConfig, STYLES, SEVERITY_ICONS, SEVERITY_LABELS, STRATEGY_MAP, ProcessPartialsCommand, createProcessPartialsCommand, WaitCommand, createWaitCommand, customResponseTypes, DEFAULT_FETCH_THROWS_ON, fetchThrowsOnPatterns, FetchCommand, createFetchCommand, SetCommand, createSetCommand, GetCommand, createGetCommand, NumericModifyCommand, createIncrementCommand, createDecrementCommand, ClearCommand, createClearCommand, LogCommand, createLogCommand, EventDispatchCommand, createTriggerCommand, createSendCommand, GoCommand, createGoCommand, KEYWORDS, HistoryCommand, createPushUrlCommand, createReplaceUrlCommand, ScrollCommand, createScrollCommand, ConditionalCommand, createConditionalCommand, createIfCommand, createUnlessCommand, RepeatCommand, createRepeatCommand, ControlFlowSignalBase, BreakCommand, createBreakCommand, ContinueCommand, createContinueCommand, HaltCommand, createHaltCommand, ReturnCommand, createReturnCommand, ExitCommand, createExitCommand, CallCommand, createCallCommand, FocusCommand, createFocusCommand, BlurCommand, createBlurCommand, AppendCommand, createAppendCommand, TransitionCommand, createTransitionCommand, MeasureCommand, createMeasureCommand, SettleCommand, createSettleCommand, StartViewTransitionCommand, createStartViewTransitionCommand, JsCommand, createJsCommand, AsyncCommand, createAsyncCommand, DefaultCommand, createDefaultCommand, PseudoCommand, TellCommand, createTellCommand, CopyCommand, createCopyCommand, PickCommand, createPickCommand, ThrowCommand, createThrowCommand, BeepCommand, createBeepCommand, BreakpointCommand, createBreakpointCommand, InstallCommand, TakeCommand, createTakeCommand, RenderCommand, Runtime, DEFAULT_REFERENCES, STRUCTURAL_ROLES, CHAIN_KEYWORDS, VERSION_HEADER_RE, VALID_KINDS, VALID_VALUE_TYPES$1, VALID_CHAIN_TYPES, VALID_ASYNC_VARIANTS, VALID_DIAGNOSTIC_LEVELS, DebugLogger, _PatternMatcher$1, PatternMatcher$1, patternMatcher$1, defaultConfig$1, GrammarTransformer, InMemoryDictionary, NullDictionary, InMemoryProfileProvider, NullProfileProvider, StringLiteralExtractor, NumberExtractor, IdentifierExtractor, UnicodeIdentifierExtractor, LatinExtendedIdentifierExtractor, SELECTOR_BODY_CHAR, PARTICLE_SCRIPT_CHAR, CssSelectorExtractor$1, WhitespaceExtractor, VALID_VALUE_TYPES, SCROLL_MARKERS, URL_MARKERS, PARTIALS_IN_MARKERS, DSLRegistry, MultilingualDSLImpl, DomainRegistry, COMMENT_PATTERN, CrossDomainDispatcher, DomainAwareScanner, AOTOrchestrator, TokenStreamImpl, DEFAULT_OPERATORS$1, OperatorExtractor$1, DEFAULT_PUNCTUATION$1, PunctuationExtractor$1, SIMPLE_TOKENIZER_OPERATOR_SET, MARKER_CONCEPT_NORMALIZEDS, ENGLISH_DOM_EVENT_NAMES, _BaseTokenizer, BaseTokenizer, BaseMorphologicalNormalizer, PatternTracker, MultiStatementParserImpl, index$2, __defProp2, __getOwnPropNames2, __esm2, __export2, tokenizers, profiles, patternCache, patternGenerator, registeredPatterns, init_registry, arabic_exports, arabicProfile, init_arabic, bengali_exports, bengaliProfile, init_bengali, german_exports, germanProfile, init_german, english_exports, englishProfile, init_english, spanish_exports, spanishProfile, init_spanish, french_exports, frenchProfile, init_french, he_exports, hebrewProfile, init_he, hindi_exports, hindiProfile, init_hindi, indonesian_exports, indonesianProfile, init_indonesian, italian_exports, italianProfile, init_italian, japanese_exports, japaneseProfile, init_japanese, korean_exports, koreanProfile, init_korean, ms_exports, malayProfile, init_ms, polish_exports, polishProfile, init_polish, portuguese_exports, portugueseProfile, init_portuguese, quechua_exports, quechuaProfile, init_quechua, russian_exports, russianProfile, init_russian, swahili_exports, swahiliProfile, init_swahili, thai_exports, thaiProfile, init_thai, tl_exports, tagalogProfile, init_tl, turkish_exports, turkishProfile, init_turkish, ukrainian_exports, ukrainianProfile, init_ukrainian, vietnamese_exports, vietnameseProfile, init_vietnamese, chinese_exports, chineseProfile, init_chinese, SchemaErrorCodes, SchemaErrorMessages, SchemaErrorSuggestions, init_schema_error_codes, schema_validator_exports, MULTI_TYPE_PATIENT_COMMANDS, NO_REQUIRED_ROLES_COMMANDS, init_schema_validator, toggleSchema, addSchema, removeSchema, putSchema, setSchema, bindSchema, liveSchema, eventsourceSchema, socketSchema, workerSchema, interceptSchema, showSchema, hideSchema, onSchema, triggerSchema, waitSchema, fetchSchema, incrementSchema, decrementSchema, appendSchema, prependSchema, logSchema, getCommandSchema, takeSchema, makeSchema, haltSchema, settleSchema, throwSchema, sendSchema, ifSchema, unlessSchema, elseSchema, repeatSchema, forSchema, whileSchema, continueSchema, URL_MARKER_ALL_LANGS, goSchema, transitionSchema, cloneSchema, focusSchema, blurSchema, emptySchema, openSchema, closeSchema, selectSchema, clearSchema, resetSchema, breakpointSchema, callSchema, returnSchema, jsSchema, asyncSchema, tellSchema, defaultSchema, initSchema, behaviorSchema, installSchema, measureSchema, swapSchema, morphSchema, beepSchema, breakSchema, copySchema, exitSchema, pickSchema, scrollSchema, PARTIALS_IN_MARKER_ALL_LANGS, pushSchema, replaceSchema, processSchema, renderSchema, commandSchemas, init_command_schemas, PUT_POSITIONAL, PUT_AT_END, init_put, init_token_utils, init_char_classifiers, init_base_tokenizer, init_base, DEFAULT_OPERATORS, OperatorExtractor2, DEFAULT_PUNCTUATION, PunctuationExtractor2, init_generic_extractors, CssSelectorExtractor2, init_css_selector, EventModifierExtractor, init_event_modifier, URL_PREFIXES, UrlExtractor, init_url, VariableRefExtractor, init_variable_ref, JapaneseKeywordExtractor, init_japanese_keyword, SINGLE_CHAR_PARTICLES, MULTI_CHAR_PARTICLES, JapaneseParticleExtractor, init_japanese_particle, TEMPORAL_EVENT_SUFFIXES, KoreanKeywordExtractor, init_korean_keyword, SINGLE_CHAR_PARTICLES2, MULTI_CHAR_PARTICLES2, KoreanParticleExtractor, init_korean_particle, ChineseKeywordExtractor, init_chinese_keyword, SINGLE_CHAR_PARTICLES3, MULTI_CHAR_PARTICLES3, ChineseParticleExtractor, init_chinese_particle, isVietnameseLetter, isVietnameseIdentifierChar, PREPOSITIONS, VietnameseKeywordExtractor, init_vietnamese_keyword, isArabic, PREPOSITIONS2, ArabicKeywordExtractor, init_arabic_keyword, isArabic2, PROCLITICS, NON_PROCLITIC_WORDS, ArabicProcliticExtractor, init_arabic_proclitic, isArabic3, TEMPORAL_MARKERS, ArabicTemporalExtractor, init_arabic_temporal, CyrillicKeywordExtractor, RUSSIAN_PREPOSITIONS, UKRAINIAN_PREPOSITIONS, init_cyrillic_keyword, HindiKeywordExtractor, init_hindi_keyword, SINGLE_POSTPOSITIONS, COMPOUND_POSTPOSITIONS, HindiParticleExtractor, init_hindi_particle, BengaliKeywordExtractor, init_bengali_keyword, SINGLE_POSTPOSITIONS2, BengaliParticleExtractor, init_bengali_particle, ThaiKeywordExtractor, init_thai_keyword, MalayKeywordExtractor, init_malay_keyword, PREPOSITIONS3, TagalogKeywordExtractor, init_tagalog_keyword, PREPOSITIONS4, isPolishLetter, isPolishIdentifierChar, PolishKeywordExtractor, init_polish_keyword, PREPOSITIONS5, isIndonesianLetter, isIndonesianIdentifierChar, IndonesianKeywordExtractor, init_indonesian_keyword, PREPOSITIONS6, isSwahiliLetter, isSwahiliIdentifierChar, SwahiliKeywordExtractor, init_swahili_keyword, POSTPOSITIONS, CASE_SUFFIXES, TurkishKeywordExtractor, init_turkish_keyword, SUFFIXES, POSTPOSITIONS2, AGGLUTINATIVE_MARKERS, QuechuaKeywordExtractor, init_quechua_keyword, isHebrew, PREPOSITIONS7, CONJUNCTIONS, HebrewKeywordExtractor, init_hebrew_keyword, isHebrew2, PROCLITIC_PREFIXES, EVENT_MARKER_PREFIXES, EVENT_NAMES, HebrewProcliticExtractor, init_hebrew_proclitic, AsciiIdentifierExtractor, init_ascii_identifier, init_extractors, init_extractor_helpers, EnglishKeywordExtractor, init_english_keyword, english_exports2, ENGLISH_EXTRAS, EnglishTokenizer, englishTokenizer, init_english2, init_types, JAPANESE_SUFFIX_RULES, SURU_PATTERNS, JapaneseMorphologicalNormalizer, init_japanese_normalizer, japanese_exports2, PARTICLES, JAPANESE_EXTRAS, JapaneseTokenizer, japaneseTokenizer, init_japanese2, KOREAN_SUFFIX_RULES, HADA_PATTERNS, KoreanMorphologicalNormalizer, init_korean_normalizer, korean_exports2, PARTICLES2, KOREAN_EXTRAS, KoreanTokenizer, koreanTokenizer, init_korean2, COMBINED_PREFIXES, SINGLE_PREFIXES, VERB_PREFIXES, SUFFIXES2, ArabicMorphologicalNormalizer, init_arabic_normalizer, arabic_exports2, CONJUNCTIONS2, PREPOSITIONS8, ARABIC_EXTRAS, ArabicTokenizer, arabicTokenizer, init_arabic2, AR_ENDINGS, ER_ENDINGS, IR_ENDINGS, ALL_ENDINGS, SpanishMorphologicalNormalizer, init_spanish_normalizer, isSpanishLetter, isSpanishIdentifierChar, PREPOSITIONS9, SpanishKeywordExtractor, init_spanish_keyword, spanish_exports2, PREPOSITIONS10, SPANISH_EXTRAS, SpanishTokenizer, spanishTokenizer, init_spanish2, TURKISH_SUFFIX_RULES, TurkishMorphologicalNormalizer, init_turkish_normalizer, turkish_exports2, POSTPOSITIONS3, CASE_SUFFIXES2, TURKISH_EXTRAS, TurkishTokenizer, turkishTokenizer, init_turkish2, chinese_exports2, PARTICLES3, CHINESE_EXTRAS, ChineseTokenizer, chineseTokenizer, init_chinese2, REFLEXIVE_SUFFIXES, AR_ENDINGS2, ER_ENDINGS2, IR_ENDINGS2, ALL_ENDINGS2, PortugueseMorphologicalNormalizer, init_portuguese_normalizer, isPortugueseLetter, isPortugueseIdentifierChar, PREPOSITIONS11, PortugueseKeywordExtractor, init_portuguese_keyword, portuguese_exports2, PREPOSITIONS12, PORTUGUESE_EXTRAS, PortugueseTokenizer, portugueseTokenizer, init_portuguese2, REFLEXIVE_SUFFIXES2, ER_ENDINGS3, IR_ENDINGS3, RE_ENDINGS, ALL_ENDINGS3, FrenchMorphologicalNormalizer, init_french_normalizer, isFrenchLetter, isFrenchIdentifierChar, PREPOSITIONS13, FrenchKeywordExtractor, init_french_keyword, french_exports2, FRENCH_EXTRAS, FrenchTokenizer, frenchTokenizer, init_french2, SEPARABLE_PREFIXES, VERB_ENDINGS, ELN_ERN_ENDINGS, ALL_ENDINGS4, GermanMorphologicalNormalizer, init_german_normalizer, isGermanLetter, isGermanIdentifierChar, PREPOSITIONS14, GermanKeywordExtractor, init_german_keyword, german_exports2, GERMAN_EXTRAS, GermanTokenizer, germanTokenizer, init_german2, indonesian_exports2, PREPOSITIONS15, INDONESIAN_EXTRAS, IndonesianTokenizer, indonesianTokenizer, init_indonesian2, QUECHUA_SUFFIX_RULES, QuechuaMorphologicalNormalizer, quechuaMorphologicalNormalizer, init_quechua_normalizer, quechua_exports2, QuechuaStringLiteralExtractor, SUFFIXES3, QUECHUA_EXTRAS, QuechuaTokenizer, quechuaTokenizer, init_quechua2, swahili_exports2, PREPOSITIONS16, SWAHILI_EXTRAS, SwahiliTokenizer, swahiliTokenizer, init_swahili2, REFLEXIVE_SUFFIXES3, ARE_ENDINGS, ERE_ENDINGS, IRE_ENDINGS, ALL_ENDINGS5, ItalianMorphologicalNormalizer, init_italian_normalizer, RomanceKeywordExtractor, ITALIAN_PREPOSITIONS, init_romance_language_keyword, italian_exports2, PREPOSITIONS17, ITALIAN_EXTRAS, ItalianTokenizer, italianTokenizer, init_italian2, vietnamese_exports2, VIETNAMESE_EXTRAS, VietnameseTokenizer, vietnameseTokenizer, init_vietnamese2, IMPERATIVE_TO_INFINITIVE, PolishMorphologicalNormalizer, init_polish_normalizer, polish_exports2, PREPOSITIONS18, POLISH_EXTRAS, PolishTokenizer, polishTokenizer, init_polish2, IMPERATIVE_TO_INFINITIVE2, RussianMorphologicalNormalizer, init_russian_normalizer, russian_exports2, PREPOSITIONS19, RUSSIAN_EXTRAS, RussianTokenizer, russianTokenizer, init_russian2, IMPERATIVE_TO_INFINITIVE3, UkrainianMorphologicalNormalizer, init_ukrainian_normalizer, ukrainian_exports2, PREPOSITIONS20, UKRAINIAN_EXTRAS, UkrainianTokenizer, ukrainianTokenizer, init_ukrainian2, he_exports2, PREPOSITIONS21, HEBREW_EXTRAS, HebrewTokenizer, hebrewTokenizer, init_he2, SUFFIX_RULES, HindiMorphologicalNormalizer, init_hindi_normalizer, hindi_exports2, SINGLE_POSTPOSITIONS3, HINDI_EXTRAS, HindiTokenizer, hindiTokenizer, init_hindi2, SUFFIX_RULES2, BengaliMorphologicalNormalizer, bengaliMorphologicalNormalizer, init_bengali_normalizer, bengali_exports2, SINGLE_POSTPOSITIONS4, BENGALI_EXTRAS, BengaliTokenizer, bengaliTokenizer, init_bengali2, thai_exports2, THAI_EXTRAS, ThaiTokenizer, thaiTokenizer, init_thai2, ms_exports2, MALAY_EXTRAS, MalayTokenizer, malayTokenizer, init_ms2, COMBINED_PREFIXES2, SINGLE_PREFIXES2, INFIXES, SUFFIXES4, TagalogMorphologicalNormalizer, tagalogMorphologicalNormalizer, init_tagalog_normalizer, tl_exports2, TAGALOG_EXTRAS, TagalogTokenizer, tagalogTokenizer, init_tl2, eventNameTranslations, eventNameLocalizations, eventLocalizationDenylist, init_event_handler, init_role_positioning, init_marker_resolution, init_event_handlers_sov, init_event_handlers_vso, defaultConfig, init_pattern_generator, fetchWithResponseTypeEnglish, fetchWithOptionsAndResponseTypeEnglish, fetchWithOptionsEnglish, fetchSimpleEnglish, fetchPatternsEn, init_fetch, pickVariantEnglish, pickPatternsEn, init_pick, init_toggle, VERB_FIRST_REPEAT_TIMES, SOV_REPEAT_TIMES, FOR_IN_HEADS, WHILE_HEADS, VERB_FIRST_UNTIL_HEADS, repeatUntilHeadQuMidClause, SOV_UNTIL_HEADS, repeatUntilHeadQu, SOV_FOR_BINDING_HEADS, BY_LANG, addPattern, init_repeat, init_wait, en_exports, swapSimpleEnglish, swapElementEnglish, repeatUntilEventFromEnglish, repeatUntilEventEnglish, repeatTimesEnglish, repeatForeverEnglish, setPossessiveEnglish, forEnglish, ifEnglish, unlessEnglish, temporalInEnglish, temporalAfterEnglish, init_en, DEFAULT_CONFIDENCE_THRESHOLD, HIGH_CONFIDENCE_THRESHOLD, CONTEXT_VARS, LOGICAL_OPERATORS, BOOLEAN_LITERALS, COMPARISON_KEYWORDS, POSITIONAL_KEYWORDS, TIME_UNITS, POSSESSIVE_CONTEXT_TYPES, POSTFIX_STOP_WORDS, POSITIONAL_CALL_KEYWORDS, ExpressionParser, toggleMapper, addMapper, removeMapper, setMapper, showMapper, hideMapper, incrementMapper, decrementMapper, waitMapper, logMapper, putMapper, fetchMapper, appendMapper, prependMapper, triggerMapper, sendMapper, goMapper, transitionMapper, focusMapper, blurMapper, getMapper, takeMapper, callMapper, returnMapper, haltMapper, throwMapper, settleMapper, swapMapper, RANGE_METHODS, COUNT_METHODS, REGEX_METHODS, pickMapper, morphMapper, cloneMapper, makeMapper, measureMapper, tellMapper, jsMapper, asyncMapper, ifMapper, unlessMapper, repeatMapper, forMapper, whileMapper, continueMapper, defaultMapper, initMapper, behaviorMapper, installMapper, onMapper, mappers, ASTBuilder, KNOWN_PROFILES, PROPERTY_NAME_LEXICON, CONNECTIVE_LEXICON, OF_POSSESSIVE_MARKERS, ROLE_CONCEPT_TO_ENGLISH_LOCATIVE, LOCATIVE_SURFACES, ENGLISH_LOCATIVE_SENSES, POSITIONAL_KEYWORDS2, POSITIONAL_HEAD_DUALS, COMMAND_ACTION_KEYWORDS, AMBIGUOUS_SENSES, SENSE_PREDICATE_NORMALIZED, CONVERSION_TYPE_NAMES, CURATED_END_KEYWORDS, MAX_FOLD_TOKENS, KEY_RE, FUSED_PAIR_RE, OPTIONAL_ROLE_WEIGHT, DEFAULT_PARTIAL_CREDIT, MAX_STEM_PENALTY, STEM_PENALTY_FLOOR, VSO_VERB_BOOST, MAX_PREPOSITION_ADJUSTMENT, ARABIC_VERBS, PREFERRED_PREPOSITIONS, DefaultConfidenceModel, defaultConfidenceModel, BAREKEYWORD_BLOCK_ACTIONS, _PatternMatcher2, PatternMatcher, patternMatcher, OPENER_ACTIONS, PASCAL_CASE_NAME, OPENER_NORMS, TARGET_REFERENCES, ROLE_CONCEPTS, TRIGGER_SIGNATURE_LANGS, DEF_NAME, FEATURE_ACTIONS, OPAQUE_BODY_FEATURES, NAMED_FEATURES, HANDLER_BODY_FEATURES, DEF_BODY_FEATURES, SOV_KEYWORD_SEARCH_LIMIT, INTERCEPT_SOV_KEYWORD_LIMIT, MODIFIER_KEYWORDS, ONCE_SEQUENCES, DURATION_RE, EXCLUDED_FIRST_KINDS, BLOCK_HEADER_ACTIONS, BLOCK_NEEDS_TRAILING_END, SemanticRendererImpl, semanticRenderer, hyperscriptSchemaLookup, BLOCK_BODY_ACTIONS, NON_VALUE_KEYWORDS, POSITIONAL_VALUE_KEYWORDS, WAITABLE_EVENT_WORDS, SemanticParseError, MAX_UNCONSUMED_SPAN_CHARS, COVERAGE_RESIDUE_NORMALIZED, NORMALIZE_CHILD_FIELDS, _SemanticParserImpl, SemanticParserImpl, semanticParser, SemanticCache2, semanticCache, LANGUAGE_IMPORTERS, SUPPORTED_LANGUAGES, VERB_INITIAL_SPECS, VERB_FINAL_SPECS, swapSimpleEnglish2, swapElementEnglish2, swapPatternsEn, repeatUntilEventFromEnglish2, repeatUntilEventEnglish2, repeatPatternsEn, setPossessiveEnglish2, setPatternsEn, forEnglish2, ifEnglish2, unlessEnglish2, controlFlowPatternsEn, temporalInEnglish2, temporalAfterEnglish2, temporalPatternsEn, allEnglishOnlyPatterns, PATTERN_LOADERS, _generatedPatternsPerLanguage, handcraftedLanguages, patternCache2, _allPatterns, schemaRegistry, DEFAULT_CONFIG, HIGH_FREQUENCY_TRIGGERS, THROTTLE_RECOMMENDED_TRIGGERS, _devModeEnabled, _devModeConfig, VERSION, index$1, HistorySwapBehavior, BoostedBehavior, DEFAULT_EVENT_TYPE, DEFAULT_LANGUAGE$1, compileSyncFn, compileAsyncFn, getRuntimeFn, configRef, RingBuffer, HISTORY_CAPACITY, DebugController, DEFAULT_LANGUAGE, ASTCache, astCache, semanticAnalyzerInstance, bridgeInstance, config, _defaultRuntime, _debugController, hyperscript, lokascript, OP_TABLE, Lexer, Tokens, MAX_HISTORY_SIZE$5, DefInputSchema, TypedDefFeatureImplementation, enhancedDefImplementation, MAX_HISTORY_SIZE$4, EnhancedOnInputSchema, TypedOnFeatureImplementation, enhancedOnImplementation, MAX_HISTORY_SIZE$3, BehaviorsInputSchema, TypedBehaviorsFeatureImplementation, enhancedBehaviorsImplementation, MAX_HISTORY_SIZE$2, SocketsInputSchema, TypedSocketsFeatureImplementation, enhancedSocketsImplementation, MAX_HISTORY_SIZE$1, WebWorkerInputSchema, TypedWebWorkerFeatureImplementation, enhancedWebWorkerImplementation, MAX_HISTORY_SIZE, EventSourceInputSchema, TypedEventSourceFeatureImplementation, enhancedEventSourceImplementation, INTERCHANGE_ADAPTER, POS, DiagnosticSeverity, SymbolKind, CompletionItemKind, _semanticModule, SemanticGrammarBridge, bridge, _fw, index;
28822
28975
  var init_dist = __esm({
28823
28976
  "../core/dist/index.mjs"() {
28824
28977
  "use strict";
@@ -48133,6 +48286,28 @@ var init_dist = __esm({
48133
48286
  return { value: input.slice(position, end), length: end - position };
48134
48287
  }
48135
48288
  };
48289
+ SELECTOR_BODY_CHAR = /[\p{L}\p{N}_-]/u;
48290
+ PARTICLE_SCRIPT_CHAR = /[\p{sc=Han}\p{sc=Hiragana}\p{sc=Katakana}\p{sc=Hangul}]/u;
48291
+ CssSelectorExtractor$1 = class CssSelectorExtractor {
48292
+ constructor() {
48293
+ this.name = "css-selector";
48294
+ }
48295
+ canExtract(input, position) {
48296
+ const char = input[position];
48297
+ if (char !== "#" && char !== ".") return false;
48298
+ const next = input[position + 1];
48299
+ if (next === void 0) return false;
48300
+ return next === "_" || next === "-" || /\p{L}/u.test(next) && !PARTICLE_SCRIPT_CHAR.test(next);
48301
+ }
48302
+ extract(input, position) {
48303
+ let end = position + 1;
48304
+ while (end < input.length && isSelectorBodyChar(input[end])) {
48305
+ end++;
48306
+ }
48307
+ if (end === position + 1) return null;
48308
+ return { value: input.slice(position, end), length: end - position };
48309
+ }
48310
+ };
48136
48311
  WhitespaceExtractor = class {
48137
48312
  constructor() {
48138
48313
  this.name = "whitespace";
@@ -48176,10 +48351,17 @@ var init_dist = __esm({
48176
48351
  URL_MARKERS = /* @__PURE__ */ new Set(["url"]);
48177
48352
  PARTIALS_IN_MARKERS = /* @__PURE__ */ new Set(["partials", "in"]);
48178
48353
  DSLRegistry = class {
48179
- constructor(config2) {
48354
+ /**
48355
+ * @param partiallyTranslatedActions Actions permitted to lack a keyword in
48356
+ * some configured languages — extension commands, which may be added for a
48357
+ * subset of the DSL's languages. A built-in command missing a keyword stays
48358
+ * an error, since that is a domain-authoring mistake.
48359
+ */
48360
+ constructor(config2, partiallyTranslatedActions = /* @__PURE__ */ new Set()) {
48180
48361
  this.patterns = /* @__PURE__ */ new Map();
48181
48362
  this.tokenizers = /* @__PURE__ */ new Map();
48182
48363
  this.schemas = config2.schemas;
48364
+ this.partiallyTranslatedActions = partiallyTranslatedActions;
48183
48365
  for (const lang of config2.languages) {
48184
48366
  this.registerLanguage(lang);
48185
48367
  }
@@ -48188,6 +48370,9 @@ var init_dist = __esm({
48188
48370
  this.tokenizers.set(lang.code, lang.tokenizer);
48189
48371
  const patterns = [];
48190
48372
  for (const schema of this.schemas) {
48373
+ if (this.partiallyTranslatedActions.has(schema.action) && !lang.patternProfile.keywords[schema.action]) {
48374
+ continue;
48375
+ }
48191
48376
  const pattern = generatePattern$1(schema, lang.patternProfile);
48192
48377
  patterns.push(pattern);
48193
48378
  }
@@ -48204,13 +48389,25 @@ var init_dist = __esm({
48204
48389
  }
48205
48390
  };
48206
48391
  MultilingualDSLImpl = class {
48207
- constructor(config2, registry, transformer) {
48392
+ constructor(config2, registry, transformer, profileProvider) {
48208
48393
  this.registry = registry;
48209
48394
  this.matcher = new PatternMatcher$1();
48210
48395
  this.transformer = transformer;
48396
+ this.profileProvider = profileProvider;
48211
48397
  if (config2.codeGenerator) {
48212
48398
  this.codeGenerator = config2.codeGenerator;
48213
48399
  }
48400
+ if (config2.renderer) {
48401
+ this.domainRenderer = config2.renderer;
48402
+ }
48403
+ this.extensionRenderers = /* @__PURE__ */ new Map();
48404
+ for (const extension of config2.extensions ?? []) {
48405
+ if (extension.render) this.extensionRenderers.set(extension.schema.action, extension.render);
48406
+ }
48407
+ this.schemaFallbackRenderer = createDomainRenderer({
48408
+ schemas: config2.schemas,
48409
+ profiles: config2.languages.map((l) => l.patternProfile)
48410
+ });
48214
48411
  const schemaMap = new Map(config2.schemas.map((s) => [s.action, s]));
48215
48412
  this.schemaLookup = {
48216
48413
  getSchema: (action) => schemaMap.get(action)
@@ -48272,6 +48469,13 @@ var init_dist = __esm({
48272
48469
  }
48273
48470
  translate(input, fromLanguage, toLanguage) {
48274
48471
  if (isExplicitSyntax$1(input)) return input;
48472
+ for (const language of [fromLanguage, toLanguage]) {
48473
+ if (!this.profileProvider.getProfile(language)) {
48474
+ throw new Error(
48475
+ `translate() requires a grammar profile for language "${language}", but none is configured. Set 'grammarProfile' on the LanguageConfig for "${language}" in createMultilingualDSL() (parse/validate/compile do not need it), or inject a custom 'profileProvider'.`
48476
+ );
48477
+ }
48478
+ }
48275
48479
  return this.transformer.transform(input, fromLanguage, toLanguage);
48276
48480
  }
48277
48481
  compile(input, language) {
@@ -48300,6 +48504,18 @@ var init_dist = __esm({
48300
48504
  };
48301
48505
  }
48302
48506
  }
48507
+ render(node, language) {
48508
+ const extensionRenderer = this.extensionRenderers.get(node.action);
48509
+ if (extensionRenderer) {
48510
+ const rendered = extensionRenderer(node, language);
48511
+ if (rendered != null) return rendered;
48512
+ }
48513
+ if (this.domainRenderer) {
48514
+ const rendered = this.domainRenderer(node, language);
48515
+ if (rendered != null) return rendered;
48516
+ }
48517
+ return this.schemaFallbackRenderer(node, language);
48518
+ }
48303
48519
  getSupportedLanguages() {
48304
48520
  return this.registry.getSupportedLanguages();
48305
48521
  }
@@ -48542,6 +48758,11 @@ var init_dist = __esm({
48542
48758
  rendered = typeof renderer === "function" ? renderer(node, to) : renderer.render(node, to);
48543
48759
  } catch {
48544
48760
  }
48761
+ } else if (dsl.render) {
48762
+ try {
48763
+ rendered = dsl.render(node, to);
48764
+ } catch {
48765
+ }
48545
48766
  }
48546
48767
  const roles = {};
48547
48768
  for (const [key, value] of node.roles) {
@@ -49387,7 +49608,7 @@ ${body}
49387
49608
  * @returns Word without diacritics
49388
49609
  */
49389
49610
  removeDiacritics(word) {
49390
- return word.replace(/[\u064B-\u0652\u0670]/g, "");
49611
+ return stripOptionalDiacritics(word);
49391
49612
  }
49392
49613
  /**
49393
49614
  * Try to match a keyword from profile at the current position.
@@ -49478,24 +49699,40 @@ ${body}
49478
49699
  });
49479
49700
  }
49480
49701
  /**
49481
- * Look up a keyword by native word (case-insensitive).
49702
+ * Look up a keyword by native word (case-insensitive, diacritic-insensitive).
49482
49703
  * O(1) lookup using the keyword map.
49483
49704
  *
49705
+ * The map is INDEXED both with and without diacritics (see
49706
+ * `initializeKeywordsFromProfile`), so a stripped QUERY is the other half of
49707
+ * that: it lets a surface form carrying harakat the profile does not happen to
49708
+ * spell still find its entry. Only consulted after the exact lookup misses, so
49709
+ * every previously-matching word resolves byte-identically.
49710
+ *
49711
+ * Half-implementing this — indexing stripped but querying exact — is what made
49712
+ * diacritized `بَدِّل` (toggle) tokenize as `kind=particle normalized=with`:
49713
+ * `isKeyword` returned false, so the guard in `ArabicProcliticExtractor` that
49714
+ * exists to prevent exactly that handed the word on, and the single-char `ب`
49715
+ * bi- proclitic claimed it. A wrong CONCEPT, not a failed parse.
49716
+ *
49484
49717
  * @param native - Native word to look up
49485
49718
  * @returns KeywordEntry if found, undefined otherwise
49486
49719
  */
49487
49720
  lookupKeyword(native) {
49488
- return this.profileKeywordMap.get(native.toLowerCase());
49721
+ const exact = this.profileKeywordMap.get(native.toLowerCase());
49722
+ if (exact) return exact;
49723
+ const stripped = this.removeDiacritics(native);
49724
+ if (stripped === native) return void 0;
49725
+ return this.profileKeywordMap.get(stripped.toLowerCase());
49489
49726
  }
49490
49727
  /**
49491
- * Check if a word is a known keyword (case-insensitive).
49492
- * O(1) lookup using the keyword map.
49728
+ * Check if a word is a known keyword (case-insensitive, diacritic-insensitive).
49729
+ * O(1) lookup using the keyword map. See {@link lookupKeyword}.
49493
49730
  *
49494
49731
  * @param native - Native word to check
49495
49732
  * @returns true if the word is a keyword
49496
49733
  */
49497
49734
  isKeyword(native) {
49498
- return this.profileKeywordMap.has(native.toLowerCase());
49735
+ return this.lookupKeyword(native) !== void 0;
49499
49736
  }
49500
49737
  /**
49501
49738
  * Set the morphological normalizer for this tokenizer.
@@ -50152,6 +50389,7 @@ ${body}
50152
50389
  BaseMorphologicalNormalizer,
50153
50390
  BaseTokenizer,
50154
50391
  CrossDomainDispatcher,
50392
+ CssSelectorExtractor: CssSelectorExtractor$1,
50155
50393
  DEFAULT_OPERATORS: DEFAULT_OPERATORS$1,
50156
50394
  DEFAULT_PUNCTUATION: DEFAULT_PUNCTUATION$1,
50157
50395
  DEFAULT_REFERENCES,
@@ -50188,6 +50426,7 @@ ${body}
50188
50426
  createCompoundNode: createCompoundNode$1,
50189
50427
  createConditionalNode: createConditionalNode$1,
50190
50428
  createDiagnosticCollector,
50429
+ createDomainRenderer,
50191
50430
  createEventHandlerNode,
50192
50431
  createExpression,
50193
50432
  createFlag,
@@ -50279,6 +50518,8 @@ ${body}
50279
50518
  semanticNodeToJSON,
50280
50519
  semanticNodeToRuntimeAST: semanticNodeToRuntimeAST$1,
50281
50520
  semanticValueToAST,
50521
+ sortRolesByWordOrder: sortRolesByWordOrder$1,
50522
+ stripOptionalDiacritics,
50282
50523
  synthesizeFromSchemas,
50283
50524
  toEnvelopeJSON: toEnvelopeJSON$1,
50284
50525
  toJSONL,
@@ -50489,9 +50730,12 @@ ${body}
50489
50730
  behavior: { primary: "\u0633\u0644\u0648\u0643", normalized: "behavior" },
50490
50731
  install: { primary: "\u062A\u062B\u0628\u064A\u062A", alternatives: ["\u062B\u0628\u0651\u062A"], normalized: "install" },
50491
50732
  // `قِس` is the imperative with the kasra diacritic; the i18n dict (and real
50492
- // Arabic prose) emits it undiacritized as `قس`, so list both — otherwise the
50493
- // generated `قس width`/`قس x` (behavior-draggable/resizable) parse to null and
50494
- // the whole `measure` command drops from the event-handler body (lossy).
50733
+ // Arabic prose) emits it undiacritized as `قس`. BOTH stay listed, and not
50734
+ // for the tokenizer's sake — keyword lookup is diacritic-insensitive now, so
50735
+ // either spelling resolves. It is the vocab gate's V1 check, which compares
50736
+ // the profile against the i18n DICTIONARY as strings: the dictionary says
50737
+ // `قس`, so dropping it here fails V1 (verified). Diacritic-insensitivity
50738
+ // would have to reach that comparison too before this pair can collapse.
50495
50739
  measure: { primary: "\u0642\u064A\u0627\u0633", alternatives: ["\u0642\u0650\u0633", "\u0642\u0633"], normalized: "measure" },
50496
50740
  beep: { primary: "\u0635\u0641\u0651\u0631", normalized: "beep" },
50497
50741
  break: { primary: "\u062A\u0648\u0642\u0641", normalized: "break" },
@@ -51163,6 +51407,15 @@ ${body}
51163
51407
  patient: { primary: "", position: "before" },
51164
51408
  style: { primary: "con", position: "before" }
51165
51409
  },
51410
+ // Imperative command forms are accepted on INPUT only — `primary` stays the
51411
+ // dictionary form, so rendering is unchanged (see LanguageProfile.defaultVerbForm:
51412
+ // infinitive is the industry standard for UI localization). Hyperscript is a
51413
+ // command language, though, and a native speaker giving a command writes the
51414
+ // imperative, so the parser should read it.
51415
+ //
51416
+ // Only the IRREGULARS are listed. The regular ones reach their keyword through
51417
+ // the morphological normalizer's stem (see spanish-keyword.ts and siblings),
51418
+ // which also covers conjugations nobody enumerated here.
51166
51419
  keywords: {
51167
51420
  // Class/Attribute operations
51168
51421
  toggle: { primary: "alternar", alternatives: ["conmutar", "toggle"], normalized: "toggle" },
@@ -51182,19 +51435,23 @@ ${body}
51182
51435
  swap: { primary: "intercambiar", alternatives: ["permutar"], normalized: "swap" },
51183
51436
  morph: { primary: "transformar", alternatives: ["convertir"], normalized: "morph" },
51184
51437
  // Variable operations
51185
- set: { primary: "establecer", alternatives: ["fijar", "definir"], normalized: "set" },
51186
- get: { primary: "obtener", alternatives: ["conseguir"], normalized: "get" },
51438
+ set: {
51439
+ primary: "establecer",
51440
+ alternatives: ["fijar", "definir", "establece"],
51441
+ normalized: "set"
51442
+ },
51443
+ get: { primary: "obtener", alternatives: ["conseguir", "obt\xE9n"], normalized: "get" },
51187
51444
  increment: { primary: "incrementar", alternatives: ["aumentar"], normalized: "increment" },
51188
51445
  decrement: { primary: "decrementar", alternatives: ["disminuir"], normalized: "decrement" },
51189
51446
  log: { primary: "registrar", alternatives: ["imprimir"], normalized: "log" },
51190
51447
  // Visibility
51191
- show: { primary: "mostrar", alternatives: ["ense\xF1ar"], normalized: "show" },
51448
+ show: { primary: "mostrar", alternatives: ["ense\xF1ar", "muestra"], normalized: "show" },
51192
51449
  hide: { primary: "ocultar", alternatives: ["esconder"], normalized: "hide" },
51193
51450
  transition: { primary: "transici\xF3n", alternatives: ["animar"], normalized: "transition" },
51194
51451
  // Events
51195
51452
  on: { primary: "en", alternatives: ["al"], normalized: "on" },
51196
51453
  trigger: { primary: "disparar", alternatives: ["activar"], normalized: "trigger" },
51197
- send: { primary: "enviar", normalized: "send" },
51454
+ send: { primary: "enviar", alternatives: ["env\xEDa"], normalized: "send" },
51198
51455
  // DOM focus
51199
51456
  focus: { primary: "enfocar", alternatives: ["enfoque"], normalized: "focus" },
51200
51457
  blur: { primary: "desenfocar", alternatives: ["desenfoque"], normalized: "blur" },
@@ -51231,7 +51488,7 @@ ${body}
51231
51488
  mousedown: { primary: "rat\xF3nabajo", normalized: "mousedown" },
51232
51489
  mouseup: { primary: "rat\xF3narriba", normalized: "mouseup" },
51233
51490
  // Navigation
51234
- go: { primary: "ir", alternatives: ["navegar"], normalized: "go" },
51491
+ go: { primary: "ir", alternatives: ["navegar", "ve"], normalized: "go" },
51235
51492
  push: { primary: "empujar", alternatives: ["push"], normalized: "push" },
51236
51493
  replace: { primary: "reemplazar", alternatives: ["sustituir"], normalized: "replace" },
51237
51494
  process: { primary: "procesar", normalized: "process" },
@@ -51417,11 +51674,24 @@ ${body}
51417
51674
  patient: { primary: "", position: "before" },
51418
51675
  style: { primary: "avec", position: "before" }
51419
51676
  },
51677
+ // Imperative command forms are accepted on INPUT only — `primary` stays the
51678
+ // dictionary form, so rendering is unchanged (see LanguageProfile.defaultVerbForm:
51679
+ // infinitive is the industry standard for UI localization). Hyperscript is a
51680
+ // command language, though, and a native speaker giving a command writes the
51681
+ // imperative, so the parser should read it.
51682
+ //
51683
+ // Only the IRREGULARS are listed. The regular ones reach their keyword through
51684
+ // the morphological normalizer's stem (see spanish-keyword.ts and siblings),
51685
+ // which also covers conjugations nobody enumerated here.
51420
51686
  keywords: {
51421
51687
  toggle: { primary: "basculer", alternatives: ["alterner"], normalized: "toggle" },
51422
51688
  add: { primary: "ajouter", normalized: "add" },
51423
- remove: { primary: "supprimer", alternatives: ["enlever", "retirer"], normalized: "remove" },
51424
- put: { primary: "mettre", alternatives: ["placer"], normalized: "put" },
51689
+ remove: {
51690
+ primary: "supprimer",
51691
+ alternatives: ["enlever", "retirer", "retire"],
51692
+ normalized: "remove"
51693
+ },
51694
+ put: { primary: "mettre", alternatives: ["placer", "mets"], normalized: "put" },
51425
51695
  append: { primary: "annexer", normalized: "append" },
51426
51696
  prepend: { primary: "pr\xE9fixer", normalized: "prepend" },
51427
51697
  take: { primary: "prendre", normalized: "take" },
@@ -51430,16 +51700,16 @@ ${body}
51430
51700
  swap: { primary: "\xE9changer", alternatives: ["permuter"], normalized: "swap" },
51431
51701
  morph: { primary: "transformer", alternatives: ["m\xE9tamorphoser"], normalized: "morph" },
51432
51702
  set: { primary: "d\xE9finir", alternatives: ["\xE9tablir"], normalized: "set" },
51433
- get: { primary: "obtenir", normalized: "get" },
51703
+ get: { primary: "obtenir", alternatives: ["obtiens"], normalized: "get" },
51434
51704
  increment: { primary: "incr\xE9menter", alternatives: ["augmenter"], normalized: "increment" },
51435
51705
  decrement: { primary: "d\xE9cr\xE9menter", alternatives: ["diminuer"], normalized: "decrement" },
51436
51706
  log: { primary: "enregistrer", alternatives: ["journaliser"], normalized: "log" },
51437
- show: { primary: "montrer", alternatives: ["afficher"], normalized: "show" },
51707
+ show: { primary: "montrer", alternatives: ["afficher", "montre"], normalized: "show" },
51438
51708
  hide: { primary: "cacher", alternatives: ["masquer"], normalized: "hide" },
51439
51709
  transition: { primary: "transition", alternatives: ["animer"], normalized: "transition" },
51440
51710
  on: { primary: "sur", alternatives: ["lors"], normalized: "on" },
51441
51711
  trigger: { primary: "d\xE9clencher", normalized: "trigger" },
51442
- send: { primary: "envoyer", normalized: "send" },
51712
+ send: { primary: "envoyer", alternatives: ["envoie"], normalized: "send" },
51443
51713
  focus: { primary: "focaliser", alternatives: ["concentrer"], normalized: "focus" },
51444
51714
  blur: { primary: "d\xE9focaliser", normalized: "blur" },
51445
51715
  // Phase 1 (v0.9.90): DOM / form state / debug
@@ -51453,13 +51723,13 @@ ${body}
51453
51723
  clear: { primary: "effacer", normalized: "clear" },
51454
51724
  reset: { primary: "r\xE9initialiser", alternatives: ["reinitialiser"], normalized: "reset" },
51455
51725
  breakpoint: { primary: "point-arr\xEAt", alternatives: ["point-arret"], normalized: "breakpoint" },
51456
- go: { primary: "aller", alternatives: ["naviguer"], normalized: "go" },
51726
+ go: { primary: "aller", alternatives: ["naviguer", "va"], normalized: "go" },
51457
51727
  scroll: { primary: "d\xE9filer", alternatives: ["faire-d\xE9filer"], normalized: "scroll" },
51458
51728
  push: { primary: "pousser", normalized: "push" },
51459
51729
  replace: { primary: "remplacer", normalized: "replace" },
51460
51730
  process: { primary: "traiter", normalized: "process" },
51461
51731
  wait: { primary: "attendre", normalized: "wait" },
51462
- fetch: { primary: "chercher", alternatives: ["r\xE9cup\xE9rer"], normalized: "fetch" },
51732
+ fetch: { primary: "chercher", alternatives: ["r\xE9cup\xE9rer", "r\xE9cup\xE8re"], normalized: "fetch" },
51463
51733
  settle: { primary: "stabiliser", normalized: "settle" },
51464
51734
  if: { primary: "si", normalized: "if" },
51465
51735
  unless: { primary: "saufsi", normalized: "unless" },
@@ -52812,16 +53082,25 @@ ${body}
52812
53082
  event: { primary: "\uC744", alternatives: ["\uB97C"], position: "after" }
52813
53083
  // Event as object marker
52814
53084
  },
53085
+ // Imperative command forms are accepted on INPUT only — `primary` stays the
53086
+ // dictionary form, so rendering is unchanged (see LanguageProfile.defaultVerbForm:
53087
+ // infinitive is the industry standard for UI localization). Hyperscript is a
53088
+ // command language, though, and a native speaker giving a command writes the
53089
+ // imperative, so the parser should read it.
53090
+ //
53091
+ // Only the IRREGULARS are listed. The regular ones reach their keyword through
53092
+ // the morphological normalizer's stem (see spanish-keyword.ts and siblings),
53093
+ // which also covers conjugations nobody enumerated here.
52815
53094
  keywords: {
52816
53095
  // Class/Attribute operations
52817
53096
  toggle: { primary: "\uD1A0\uAE00", normalized: "toggle" },
52818
53097
  add: { primary: "\uCD94\uAC00", normalized: "add" },
52819
53098
  remove: { primary: "\uC81C\uAC70", alternatives: ["\uC0AD\uC81C"], normalized: "remove" },
52820
53099
  // Content operations
52821
- put: { primary: "\uB123\uB2E4", alternatives: ["\uB123\uAE30", "\uB193\uAE30"], normalized: "put" },
53100
+ put: { primary: "\uB123\uB2E4", alternatives: ["\uB123\uAE30", "\uB193\uAE30", "\uB123\uC73C\uC138\uC694"], normalized: "put" },
52822
53101
  append: { primary: "\uB367\uBD99\uC774\uB2E4", alternatives: ["\uB05D\uC5D0\uCD94\uAC00"], normalized: "append" },
52823
53102
  prepend: { primary: "\uC55E\uC5D0\uCD94\uAC00", alternatives: ["\uC120\uB450\uCD94\uAC00"], normalized: "prepend" },
52824
- take: { primary: "\uAC00\uC838\uC624\uB2E4", normalized: "take" },
53103
+ take: { primary: "\uAC00\uC838\uC624\uB2E4", alternatives: ["\uAC00\uC838\uC624\uC138\uC694"], normalized: "take" },
52825
53104
  make: { primary: "\uB9CC\uB4E4\uB2E4", normalized: "make" },
52826
53105
  clone: { primary: "\uBCF5\uC81C", normalized: "clone" },
52827
53106
  // 복제=duplicate/clone, 복사=copy
@@ -52829,13 +53108,13 @@ ${body}
52829
53108
  morph: { primary: "\uBCC0\uD615", alternatives: ["\uBCC0\uD658"], normalized: "morph" },
52830
53109
  // Variable operations
52831
53110
  set: { primary: "\uC124\uC815", normalized: "set" },
52832
- get: { primary: "\uC5BB\uB2E4", normalized: "get" },
53111
+ get: { primary: "\uC5BB\uB2E4", alternatives: ["\uC5BB\uC73C\uC138\uC694"], normalized: "get" },
52833
53112
  increment: { primary: "\uC99D\uAC00", normalized: "increment" },
52834
53113
  decrement: { primary: "\uAC10\uC18C", normalized: "decrement" },
52835
53114
  log: { primary: "\uB85C\uADF8", normalized: "log" },
52836
53115
  // Visibility
52837
- show: { primary: "\uBCF4\uC774\uB2E4", alternatives: ["\uD45C\uC2DC", "\uBCF4\uC774\uAE30"], normalized: "show" },
52838
- hide: { primary: "\uC228\uAE30\uB2E4", alternatives: ["\uC228\uAE30\uAE30"], normalized: "hide" },
53116
+ show: { primary: "\uBCF4\uC774\uB2E4", alternatives: ["\uD45C\uC2DC", "\uBCF4\uC774\uAE30", "\uBCF4\uC774\uC138\uC694"], normalized: "show" },
53117
+ hide: { primary: "\uC228\uAE30\uB2E4", alternatives: ["\uC228\uAE30\uAE30", "\uC228\uAE30\uC138\uC694"], normalized: "hide" },
52839
53118
  // primary is the loanword 트랜지션; 전환 ("switch/transition") is the form the
52840
53119
  // i18n transformer emits — registered as an alternative (passthrough-alignment).
52841
53120
  // toggle uses 토글, so 전환 carries no collision.
@@ -52843,7 +53122,7 @@ ${body}
52843
53122
  // Events
52844
53123
  on: { primary: "\uC5D0", alternatives: ["\uC2DC", "\uD560 \uB54C"], normalized: "on" },
52845
53124
  trigger: { primary: "\uD2B8\uB9AC\uAC70", normalized: "trigger" },
52846
- send: { primary: "\uBCF4\uB0B4\uB2E4", normalized: "send" },
53125
+ send: { primary: "\uBCF4\uB0B4\uB2E4", alternatives: ["\uBCF4\uB0B4\uC138\uC694"], normalized: "send" },
52847
53126
  // DOM focus
52848
53127
  focus: { primary: "\uD3EC\uCEE4\uC2A4", normalized: "focus" },
52849
53128
  blur: { primary: "\uBE14\uB7EC", normalized: "blur" },
@@ -53616,25 +53895,38 @@ ${body}
53616
53895
  patient: { primary: "", position: "before" },
53617
53896
  style: { primary: "com", position: "before" }
53618
53897
  },
53898
+ // Imperative command forms are accepted on INPUT only — `primary` stays the
53899
+ // dictionary form, so rendering is unchanged (see LanguageProfile.defaultVerbForm:
53900
+ // infinitive is the industry standard for UI localization). Hyperscript is a
53901
+ // command language, though, and a native speaker giving a command writes the
53902
+ // imperative, so the parser should read it.
53903
+ //
53904
+ // Only the IRREGULARS are listed. The regular ones reach their keyword through
53905
+ // the morphological normalizer's stem (see spanish-keyword.ts and siblings),
53906
+ // which also covers conjugations nobody enumerated here.
53619
53907
  keywords: {
53620
53908
  toggle: { primary: "alternar", alternatives: [], normalized: "toggle" },
53621
53909
  add: { primary: "adicionar", alternatives: ["acrescentar"], normalized: "add" },
53622
- remove: { primary: "remover", alternatives: ["eliminar", "apagar"], normalized: "remove" },
53623
- put: { primary: "colocar", alternatives: ["p\xF4r", "por"], normalized: "put" },
53910
+ remove: {
53911
+ primary: "remover",
53912
+ alternatives: ["eliminar", "apagar", "remova"],
53913
+ normalized: "remove"
53914
+ },
53915
+ put: { primary: "colocar", alternatives: ["p\xF4r", "por", "coloque"], normalized: "put" },
53624
53916
  append: { primary: "anexar", normalized: "append" },
53625
53917
  prepend: { primary: "preceder", normalized: "prepend" },
53626
- take: { primary: "pegar", normalized: "take" },
53918
+ take: { primary: "pegar", alternatives: ["pegue"], normalized: "take" },
53627
53919
  make: { primary: "fazer", alternatives: ["criar"], normalized: "make" },
53628
53920
  clone: { primary: "clonar", alternatives: [], normalized: "clone" },
53629
53921
  swap: { primary: "trocar", alternatives: ["substituir"], normalized: "swap" },
53630
53922
  morph: { primary: "transformar", alternatives: ["converter"], normalized: "morph" },
53631
- set: { primary: "definir", alternatives: ["configurar"], normalized: "set" },
53632
- get: { primary: "obter", normalized: "get" },
53923
+ set: { primary: "definir", alternatives: ["configurar", "defina"], normalized: "set" },
53924
+ get: { primary: "obter", alternatives: ["obtenha"], normalized: "get" },
53633
53925
  increment: { primary: "incrementar", alternatives: ["aumentar"], normalized: "increment" },
53634
53926
  decrement: { primary: "decrementar", alternatives: ["diminuir"], normalized: "decrement" },
53635
53927
  log: { primary: "registrar", alternatives: ["imprimir"], normalized: "log" },
53636
53928
  show: { primary: "mostrar", alternatives: ["exibir"], normalized: "show" },
53637
- hide: { primary: "ocultar", alternatives: ["esconder"], normalized: "hide" },
53929
+ hide: { primary: "ocultar", alternatives: ["esconder", "esconda"], normalized: "hide" },
53638
53930
  transition: { primary: "transi\xE7\xE3o", alternatives: ["animar"], normalized: "transition" },
53639
53931
  on: { primary: "em", alternatives: ["ao"], normalized: "on" },
53640
53932
  trigger: { primary: "disparar", alternatives: ["ativar"], normalized: "trigger" },
@@ -53653,13 +53945,13 @@ ${body}
53653
53945
  alternatives: ["ponto-interrupcao"],
53654
53946
  normalized: "breakpoint"
53655
53947
  },
53656
- go: { primary: "ir", alternatives: ["navegar"], normalized: "go" },
53948
+ go: { primary: "ir", alternatives: ["navegar", "v\xE1"], normalized: "go" },
53657
53949
  scroll: { primary: "rolar", alternatives: ["scroll"], normalized: "scroll" },
53658
53950
  push: { primary: "empurrar", alternatives: ["push"], normalized: "push" },
53659
53951
  replace: { primary: "repor", alternatives: ["recolocar"], normalized: "replace" },
53660
53952
  process: { primary: "processar", normalized: "process" },
53661
53953
  wait: { primary: "esperar", alternatives: ["aguardar"], normalized: "wait" },
53662
- fetch: { primary: "buscar", normalized: "fetch" },
53954
+ fetch: { primary: "buscar", alternatives: ["busque"], normalized: "fetch" },
53663
53955
  settle: { primary: "estabilizar", normalized: "settle" },
53664
53956
  if: { primary: "se", normalized: "if" },
53665
53957
  // salvo — single token ('salvo se' = unless). a_menos kept as an
@@ -56351,8 +56643,53 @@ ${body}
56351
56643
  default: { type: "reference", value: "me" },
56352
56644
  svoPosition: 2,
56353
56645
  sovPosition: 1,
56354
- markerOverride: { en: "to" }
56355
- // "add .class to #element"
56646
+ // `add` is directional, but every profile's `destination` marker is
56647
+ // LOCATIVE (en on, es en, ar على, zh 在, fr sur, de auf, pt em) because
56648
+ // it also serves `toggle`/`show`. Without a per-language override the
56649
+ // rendered text said "add .class ON #element" in every language but
56650
+ // English — the gap lokascript-learn corrects with 6 of its 16 override
56651
+ // entries. ja に / ko 에 / tr e are already directional, so they keep
56652
+ // the profile default.
56653
+ //
56654
+ // Tier B (2.9): he/id/it/sw were the remaining locatives that this
56655
+ // language actually distinguishes.
56656
+ // he — `על` is "ON"; Hebrew adds with the allative `אל` (`ל` is a bound
56657
+ // prefix, so it cannot stand as a separate marker token).
56658
+ // id — `pada` is "at/on"; `ke` is the directional, and it is what the
56659
+ // i18n corpus already renders for every id destination.
56660
+ // it — `in` is locative; Italian adds with `a` (`aggiungere a`).
56661
+ // sw — `kwenye` is not merely locative, it is sw's EVENT keyword
56662
+ // (`on: 'kwenye'` in the dictionary), so reusing it as a
56663
+ // destination marker collides. `kwa` is the corpus rendering.
56664
+ // hi `में` / ru+uk `в` / th `ใน` / vi `vào` are already the right
56665
+ // container-directional for "add to", and keep the profile default.
56666
+ markerOverride: {
56667
+ en: "to",
56668
+ es: "a",
56669
+ ar: "\u0625\u0644\u0649",
56670
+ zh: "\u5230",
56671
+ fr: "\xE0",
56672
+ de: "zu",
56673
+ pt: "a",
56674
+ he: "\u05D0\u05DC",
56675
+ id: "ke",
56676
+ it: "a",
56677
+ sw: "kwa"
56678
+ },
56679
+ // Each language's previous primary marker (and its alternates) still
56680
+ // parses, so source written against ≤2.8 keeps working.
56681
+ markerLegacy: {
56682
+ es: ["en", "sobre", "hacia"],
56683
+ ar: ["\u0639\u0644\u0649", "\u0641\u064A", "\u0628"],
56684
+ zh: ["\u5728", "\u4E8E"],
56685
+ fr: ["sur", "dans"],
56686
+ de: ["auf", "in"],
56687
+ pt: ["em", "para"],
56688
+ he: ["\u05E2\u05DC", "\u05D1", "\u05DC"],
56689
+ id: ["pada", "di"],
56690
+ it: ["in", "su"],
56691
+ sw: ["kwenye"]
56692
+ }
56356
56693
  }
56357
56694
  ],
56358
56695
  // Runtime error documentation
@@ -56442,12 +56779,39 @@ ${body}
56442
56779
  svoPosition: 2,
56443
56780
  sovPosition: 2,
56444
56781
  // SOV: destination comes second (に/에/a marker)
56445
- markerOverride: { en: "into" },
56446
- // "put 'hello' into #output"
56782
+ // "put 'hello' into #output" — directional, so the same locative-default
56783
+ // correction as `add`. es `en` and pt `em` are already right for "into",
56784
+ // as are ja に / ko 에 / tr e; only ar/zh/fr/de need an override.
56785
+ //
56786
+ // Tier B (2.9): `put` is ILLATIVE, so it diverges from `add` where the
56787
+ // two senses differ. he takes `ב` ("in/into" — `שים ב`), NOT the allative
56788
+ // `אל` that `add`/`go` take. it keeps its locative `in` (`mettere in`) —
56789
+ // it is `add`/`go` that needed `a`. id/sw change for the same reason as
56790
+ // `add` (directional / event-keyword collision). hi `में`, ru+uk `в`,
56791
+ // th `ใน` and vi `vào` are all already the illative.
56792
+ markerOverride: {
56793
+ en: "into",
56794
+ ar: "\u0641\u064A",
56795
+ zh: "\u5230",
56796
+ fr: "dans",
56797
+ de: "in",
56798
+ he: "\u05D1",
56799
+ id: "ke",
56800
+ sw: "kwa"
56801
+ },
56447
56802
  // `before` / `after` are alternate position markers; the matched marker
56448
56803
  // is recorded as a literal in the `method` role (a derived role with no
56449
56804
  // surface form of its own — populated by schema-driven role inference).
56450
56805
  markerVariants: { en: ["before", "after"] },
56806
+ markerLegacy: {
56807
+ ar: ["\u0639\u0644\u0649", "\u0625\u0644\u0649", "\u0628"],
56808
+ zh: ["\u5728", "\u4E8E"],
56809
+ fr: ["sur", "\xE0"],
56810
+ de: ["auf", "zu"],
56811
+ he: ["\u05E2\u05DC", "\u05D0\u05DC", "\u05DC"],
56812
+ id: ["pada", "di"],
56813
+ sw: ["kwenye"]
56814
+ },
56451
56815
  methodCarrier: "method"
56452
56816
  }
56453
56817
  ],
@@ -56582,8 +56946,11 @@ ${body}
56582
56946
  // ending in a vowel (`doğru ya` = "true" in set-attribute). markerOverride
56583
56947
  // is a single string, so the generated tr set patterns carried only `e`
56584
56948
  // and set-attribute fell to the role-scrambling generic SOV extraction.
56585
- // markerVariants supplies the allomorphs the SOV two-role generators merge
56586
- // in as marker alternatives. See STRUCTURAL_ARCS_ROADMAP.md (tr set-attribute).
56949
+ // markerVariants supplies the allomorphs, merged in as marker alternatives.
56950
+ // Until 2026-07-25 only the SOV two-role generators merged them, so this
56951
+ // worked ONLY inside an event handler: `@disabled i doğru ya ayarla` did
56952
+ // not parse as a bare command while `tıklama da @disabled i doğru ya
56953
+ // ayarla` did. See STRUCTURAL_ARCS_ROADMAP.md (tr set-attribute).
56587
56954
  markerVariants: {
56588
56955
  tr: ["e", "a", "ye", "ya"]
56589
56956
  }
@@ -57515,17 +57882,100 @@ ${body}
57515
57882
  expectedTypes: ["literal", "expression"],
57516
57883
  svoPosition: 1,
57517
57884
  sovPosition: 1,
57518
- markerOverride: { en: "to" },
57519
- // "go to /page" (parsing)
57520
- renderOverride: { en: "" },
57521
- // "go /page" (rendering — no preposition)
57885
+ // "go to /page" (parsing). Directional, so the same locative-default
57886
+ // correction as `add`/`put`.
57887
+ //
57888
+ // Tier B (2.9): `go` is pure ALLATIVE — motion toward a target — so it
57889
+ // needs the directional in more languages than `add`/`put` do, including
57890
+ // ones where a container-locative was fine for those two.
57891
+ // he — `אל` ("toward"), as `add`; `לך על url` read "go ON url".
57892
+ // hi — `पर`: Hindi navigates to a page with `पर जाएं`; `में` is
57893
+ // "go INTO", which is entering a place, not opening a URL.
57894
+ // id — `ke`, as `add`.
57895
+ // it — `a`: `andare a` for a specific target (`andare in` is for
57896
+ // regions — `andare in Italia`).
57897
+ // ru/uk — `на`: `перейти на сторінку` is the navigation idiom; `в`
57898
+ // ("into") is right for `add`/`put` but not for opening a page.
57899
+ // sw — `kwa`, as `add`.
57900
+ // th is NOT here — it renders bare, with zh and vi; see below.
57901
+ markerOverride: {
57902
+ en: "to",
57903
+ es: "a",
57904
+ ar: "\u0625\u0644\u0649",
57905
+ fr: "\xE0",
57906
+ de: "zu",
57907
+ pt: "para",
57908
+ he: "\u05D0\u05DC",
57909
+ hi: "\u092A\u0930",
57910
+ id: "ke",
57911
+ it: "a",
57912
+ ru: "\u043D\u0430",
57913
+ sw: "kwa",
57914
+ uk: "\u043D\u0430"
57915
+ },
57916
+ // "go /page" (rendering — no preposition).
57917
+ //
57918
+ // zh, vi and th render BARE.
57919
+ //
57920
+ // zh and vi because their `go` keyword already encodes the direction, so
57921
+ // any destination marker is a second one: zh `前往` is "proceed-to"
57922
+ // (`前往 到 url` = "proceed-to to url") and vi `đi đến` is literally
57923
+ // "go to" (`đi đến vào url` = "go-to into url"). Both are corrected in
57924
+ // the i18n corpus in the same change
57925
+ // (`patterns-reference/scripts/fix-translations.sql`).
57926
+ //
57927
+ // th because Thai motion verbs take a BARE destination — `ไปบ้าน`
57928
+ // ("go home"), `ไปโรงเรียน` ("go school") — so `ไป url` is the idiomatic
57929
+ // form. The profile default rendered `ไป ใน url` ("go IN url"), which is
57930
+ // what needed fixing; the obvious replacement `ยัง` (giving the formal
57931
+ // `ไปยัง`) is rejected because `ยัง` is also the very common adverb
57932
+ // "still/yet", and the V4 vocab gate correctly refuses to classify it as
57933
+ // a particle — promoting it would mis-tokenize ordinary Thai.
57934
+ //
57935
+ // Parsing is unaffected for all three: none has a `markerOverride`, so
57936
+ // each stays on the profile-default branch and keeps accepting its old
57937
+ // markers (th `ใน` / `ไปยัง`) from the profile itself.
57938
+ renderOverride: { en: "", zh: "", vi: "", th: "" },
57522
57939
  // `go back` renders the destination bare in en (history nav has no `to`),
57523
57940
  // and he/zh render it with their PATIENT marker (לך את back / 前往 把 back)
57524
57941
  // while go-url keeps the destination marker (לך על url / 前往 到 url) —
57525
57942
  // the corpus is ground truth, so en's `to` is optional and he/zh accept
57526
57943
  // the patient particle as a destination-marker alternative, scoped to go.
57527
- markerOptional: { en: true },
57528
- markerVariants: { he: ["\u05D0\u05EA"], zh: ["\u628A"] }
57944
+ // The render side drops the preposition for these four, so the parse
57945
+ // side cannot require it: `go /page`, `前往 url`, `đi đến url`, `ไป url`
57946
+ // must parse alongside the marked forms the profile still accepts.
57947
+ markerOptional: { en: true, zh: true, vi: true, th: true },
57948
+ // zh renders `前往 把 back` with its PATIENT particle before go's
57949
+ // destination — a synonym here, not a distinct shape, so it is accepted as
57950
+ // a marker alternative scoped to go. he's `את` is the same thing and sits
57951
+ // in `markerLegacy` below: it moved there in #763 because the two fields
57952
+ // were then read by DIFFERENT branches, so leaving it here silently
57953
+ // stopped `לך את back` parsing the moment he gained a `markerOverride`.
57954
+ // Both fields now merge on both branches (`schemaMarkerAlternatives`), so
57955
+ // that trap is gone and the split is historical.
57956
+ markerVariants: { zh: ["\u628A"] },
57957
+ markerLegacy: {
57958
+ es: ["en", "sobre", "hacia"],
57959
+ ar: ["\u0639\u0644\u0649", "\u0641\u064A", "\u0628"],
57960
+ fr: ["sur", "dans"],
57961
+ de: ["auf", "in"],
57962
+ pt: ["em", "a"],
57963
+ // `את` is he's PATIENT particle, which the transformer renders before
57964
+ // go's destination in `go back` (`לך את back`) — a parse-only synonym
57965
+ // here, never rendered, which is exactly what markerLegacy is for.
57966
+ he: ["\u05E2\u05DC", "\u05D1", "\u05DC", "\u05D0\u05EA"],
57967
+ hi: ["\u092E\u0947\u0902"],
57968
+ id: ["pada", "di"],
57969
+ it: ["in", "su"],
57970
+ ru: ["\u0432", "\u043A"],
57971
+ sw: ["kwenye"],
57972
+ uk: ["\u0432", "\u0434\u043E"]
57973
+ // zh, vi and th are NOT listed: none has a markerOverride, so all three
57974
+ // stay on the profile-default branch and keep accepting their old
57975
+ // markers from the profile itself. Only their RENDERING changed.
57976
+ // Listing them here would be dead config — markerLegacy is read ONLY by
57977
+ // the override branch.
57978
+ }
57529
57979
  }
57530
57980
  ],
57531
57981
  // `go to url "/page"` — without this variant the destination captures the
@@ -58527,7 +58977,7 @@ ${body}
58527
58977
  roles: []
58528
58978
  }
58529
58979
  };
58530
- if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
58980
+ if (typeof process !== "undefined" && process.env.LOKASCRIPT_SCHEMA_VALIDATION === "1") {
58531
58981
  Promise.resolve().then(() => (init_schema_validator(), schema_validator_exports)).then(({ validateAllSchemas: validateAllSchemas2, formatValidationResults: formatValidationResults2 }) => {
58532
58982
  const validations = validateAllSchemas2(commandSchemas);
58533
58983
  if (validations.size > 0) {
@@ -58746,7 +59196,7 @@ ${body}
58746
59196
  });
58747
59197
  init_css_selector = __esm2({
58748
59198
  "src/tokenizers/extractors/css-selector.ts"() {
58749
- CssSelectorExtractor = class {
59199
+ CssSelectorExtractor2 = class {
58750
59200
  constructor() {
58751
59201
  this.name = "css-selector";
58752
59202
  }
@@ -63337,12 +63787,16 @@ ${body}
63337
63787
  const keywordEntry = this.context.lookupKeyword(word);
63338
63788
  const normalized2 = keywordEntry && keywordEntry.normalized !== keywordEntry.native ? keywordEntry.normalized : void 0;
63339
63789
  let morphNormalized;
63790
+ let morphStem;
63791
+ let morphConfidence;
63340
63792
  if (!keywordEntry && this.context.normalizer) {
63341
63793
  const morphResult = this.context.normalizer.normalize(word);
63342
63794
  if (morphResult.stem !== word && morphResult.confidence >= 0.7) {
63343
63795
  const stemEntry = this.context.lookupKeyword(morphResult.stem);
63344
63796
  if (stemEntry) {
63345
63797
  morphNormalized = stemEntry.normalized;
63798
+ morphStem = morphResult.stem;
63799
+ morphConfidence = morphResult.confidence;
63346
63800
  }
63347
63801
  }
63348
63802
  }
@@ -63351,6 +63805,8 @@ ${body}
63351
63805
  length: pos2 - position,
63352
63806
  metadata: {
63353
63807
  normalized: normalized2 || morphNormalized,
63808
+ stem: morphStem,
63809
+ stemConfidence: morphConfidence,
63354
63810
  isPreposition
63355
63811
  }
63356
63812
  };
@@ -64389,12 +64845,16 @@ ${body}
64389
64845
  const keywordEntry = this.context.lookupKeyword(lower);
64390
64846
  const normalized2 = keywordEntry && keywordEntry.normalized !== keywordEntry.native ? keywordEntry.normalized : void 0;
64391
64847
  let morphNormalized;
64848
+ let morphStem;
64849
+ let morphConfidence;
64392
64850
  if (!keywordEntry && this.context.normalizer) {
64393
64851
  const morphResult = this.context.normalizer.normalize(word);
64394
64852
  if (morphResult.stem !== word && morphResult.confidence >= 0.7) {
64395
64853
  const stemEntry = this.context.lookupKeyword(morphResult.stem);
64396
64854
  if (stemEntry) {
64397
64855
  morphNormalized = stemEntry.normalized;
64856
+ morphStem = morphResult.stem;
64857
+ morphConfidence = morphResult.confidence;
64398
64858
  }
64399
64859
  }
64400
64860
  }
@@ -64403,6 +64863,8 @@ ${body}
64403
64863
  length: pos2 - position,
64404
64864
  metadata: {
64405
64865
  normalized: normalized2 || morphNormalized,
64866
+ stem: morphStem,
64867
+ stemConfidence: morphConfidence,
64406
64868
  isPreposition
64407
64869
  }
64408
64870
  };
@@ -64857,12 +65319,16 @@ ${body}
64857
65319
  const keywordEntry = this.context.lookupKeyword(lower);
64858
65320
  const normalized2 = keywordEntry && keywordEntry.normalized !== keywordEntry.native ? keywordEntry.normalized : void 0;
64859
65321
  let morphNormalized;
65322
+ let morphStem;
65323
+ let morphConfidence;
64860
65324
  if (!keywordEntry && this.context.normalizer) {
64861
65325
  const morphResult = this.context.normalizer.normalize(word);
64862
65326
  if (morphResult.stem !== word && morphResult.confidence >= 0.7) {
64863
65327
  const stemEntry = this.context.lookupKeyword(morphResult.stem);
64864
65328
  if (stemEntry) {
64865
65329
  morphNormalized = stemEntry.normalized;
65330
+ morphStem = morphResult.stem;
65331
+ morphConfidence = morphResult.confidence;
64866
65332
  }
64867
65333
  }
64868
65334
  }
@@ -64871,6 +65337,8 @@ ${body}
64871
65337
  length: pos2 - position,
64872
65338
  metadata: {
64873
65339
  normalized: normalized2 || morphNormalized,
65340
+ stem: morphStem,
65341
+ stemConfidence: morphConfidence,
64874
65342
  isPreposition
64875
65343
  }
64876
65344
  };
@@ -69559,12 +70027,14 @@ ${body}
69559
70027
  init_event_handlers_sov = __esm2({
69560
70028
  "src/generators/event-handlers-sov.ts"() {
69561
70029
  init_command_schemas();
70030
+ init_marker_resolution();
69562
70031
  }
69563
70032
  });
69564
70033
  init_event_handlers_vso = __esm2({
69565
70034
  "src/generators/event-handlers-vso.ts"() {
69566
70035
  init_command_schemas();
69567
70036
  init_event_handlers_sov();
70037
+ init_marker_resolution();
69568
70038
  }
69569
70039
  });
69570
70040
  init_pattern_generator = __esm2({
@@ -73599,6 +74069,12 @@ ${body}
73599
74069
  if (token.kind === "keyword" && token.value.toLowerCase() === value.toLowerCase()) {
73600
74070
  return "case-insensitive";
73601
74071
  }
74072
+ if (token.kind === "keyword") {
74073
+ const strippedToken = stripOptionalDiacritics(token.value).toLowerCase();
74074
+ if (strippedToken && strippedToken === stripOptionalDiacritics(value).toLowerCase()) {
74075
+ return "case-insensitive";
74076
+ }
74077
+ }
73602
74078
  return "none";
73603
74079
  }
73604
74080
  /**
@@ -77875,6 +78351,7 @@ ${body}
77875
78351
  SemanticParserImpl = _SemanticParserImpl;
77876
78352
  semanticParser = new SemanticParserImpl();
77877
78353
  init_registry();
78354
+ init_registry();
77878
78355
  SemanticCache2 = class {
77879
78356
  constructor(config2 = {}) {
77880
78357
  this.cache = /* @__PURE__ */ new Map();
@@ -78626,7 +79103,7 @@ ${body}
78626
79103
  __proto__: null,
78627
79104
  ASTBuilder,
78628
79105
  get CssSelectorExtractor() {
78629
- return CssSelectorExtractor;
79106
+ return CssSelectorExtractor2;
78630
79107
  },
78631
79108
  DEFAULT_CONFIDENCE_THRESHOLD,
78632
79109
  get EventModifierExtractor() {
@@ -78746,6 +79223,7 @@ ${body}
78746
79223
  return germanProfile;
78747
79224
  },
78748
79225
  getAllTranslations,
79226
+ getAllTranslationsWithStatus,
78749
79227
  getCommandMapper,
78750
79228
  getCommandType,
78751
79229
  getDefaultExtractors,