witdem-analytics 0.2.1__tar.gz → 0.2.2__tar.gz

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.
Files changed (115) hide show
  1. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/PKG-INFO +1 -1
  2. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/pyproject.toml +1 -1
  3. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/operations.py +49 -4
  4. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/cli.py +34 -1
  5. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/service.py +82 -7
  6. witdem_analytics-0.2.1/src/witdem/dashboard/static/assets/echarts-runtime-B9YbVgkB.js → witdem_analytics-0.2.2/src/witdem/dashboard/static/assets/echarts-runtime-eFwAMB1Z.js +1 -1
  7. witdem_analytics-0.2.1/src/witdem/dashboard/static/assets/index-BslxSAMa.js → witdem_analytics-0.2.2/src/witdem/dashboard/static/assets/index-BBNwEw42.js +13 -13
  8. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/static/index.html +1 -1
  9. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/elt/adapter_stage.py +3 -0
  10. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/live_db.py +21 -4
  11. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/.gitignore +0 -0
  12. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/LICENSE +0 -0
  13. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/README.md +0 -0
  14. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/__init__.py +0 -0
  15. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/adapters/__init__.py +0 -0
  16. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/adapters/base.py +0 -0
  17. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/adapters/haystack_adapter.py +0 -0
  18. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/adapters/providers.py +0 -0
  19. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/adapters/registry.py +0 -0
  20. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/__init__.py +0 -0
  21. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/contracts/__init__.py +0 -0
  22. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/contracts/read_models.py +0 -0
  23. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/core.py +0 -0
  24. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/cost.py +0 -0
  25. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/derived.py +0 -0
  26. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/identity.py +0 -0
  27. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/entities/models.sql +0 -0
  28. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/entities/provider_values.sql +0 -0
  29. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/entities/providers.sql +0 -0
  30. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/business_outcome.sql +0 -0
  31. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/evaluations_for_execution.sql +0 -0
  32. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/events_for_execution.sql +0 -0
  33. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/execution_detail.sql +0 -0
  34. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/execution_population.sql +0 -0
  35. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/execution_timeline.sql +0 -0
  36. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/links_for_execution.sql +0 -0
  37. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/outcomes_for_execution.sql +0 -0
  38. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/product_goal.sql +0 -0
  39. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/execution/runtime_outcome.sql +0 -0
  40. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/failures/failure_patterns.sql +0 -0
  41. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/overview/cost_summary.sql +0 -0
  42. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/overview/execution_health.sql +0 -0
  43. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/overview/performance.sql +0 -0
  44. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/overview/product_goals.sql +0 -0
  45. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/overview/success_metrics.sql +0 -0
  46. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/paths/loops.sql +0 -0
  47. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/paths/path_frequency.sql +0 -0
  48. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/capabilities.sql +0 -0
  49. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/evaluations_count.sql +0 -0
  50. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/events_capabilities.sql +0 -0
  51. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_completed.sql +0 -0
  52. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_end_date.sql +0 -0
  53. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_failed.sql +0 -0
  54. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_has_failure.sql +0 -0
  55. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_provider.sql +0 -0
  56. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_running.sql +0 -0
  57. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/filter_start_date.sql +0 -0
  58. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/metadata.sql +0 -0
  59. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/queries/shared/outcomes_count.sql +0 -0
  60. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/read_model.py +0 -0
  61. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/repository/__init__.py +0 -0
  62. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/repository/analytics_repository.py +0 -0
  63. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/repository/backend.py +0 -0
  64. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/repository/sql_loader.py +0 -0
  65. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/repository/state.py +0 -0
  66. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/runtime.py +0 -0
  67. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/schema/analytics_tables.sql +0 -0
  68. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/schema.py +0 -0
  69. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/analytics/serving.py +0 -0
  70. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/api.py +0 -0
  71. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/auth.py +0 -0
  72. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/config.py +0 -0
  73. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/__init__.py +0 -0
  74. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/app.py +0 -0
  75. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/static/assets/index-B2TO5dg7.css +0 -0
  76. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/dashboard/static/assets/witdem-mark-purple-B7xvtfh0.png +0 -0
  77. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/elt/__init__.py +0 -0
  78. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/elt/publisher.py +0 -0
  79. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/elt/worker.py +0 -0
  80. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/elt/workspace/pipelines/normalize.pipeline.json +0 -0
  81. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/evaluation_campaigns.py +0 -0
  82. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/__init__.py +0 -0
  83. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/corpus.py +0 -0
  84. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/correlate.py +0 -0
  85. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/otlp_http.py +0 -0
  86. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/raw_store.py +0 -0
  87. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/sdk_ingest.py +0 -0
  88. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/ingest/sdk_store.py +0 -0
  89. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/__init__.py +0 -0
  90. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/__init__.py +0 -0
  91. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/claude.py +0 -0
  92. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/langchain.py +0 -0
  93. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/langgraph.py +0 -0
  94. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/openai_agents.py +0 -0
  95. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/adapters/otel.py +0 -0
  96. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/mapping.py +0 -0
  97. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/models/__init__.py +0 -0
  98. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/models/normalized_operation.py +0 -0
  99. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/models/normalized_span.py +0 -0
  100. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/normalizers/__init__.py +0 -0
  101. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/normalizers/genai.py +0 -0
  102. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/normalizers/openinference.py +0 -0
  103. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/integrations/normalizers/otel.py +0 -0
  104. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/lifecycle.py +0 -0
  105. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/pricing/__init__.py +0 -0
  106. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/pricing/catalog.yaml +0 -0
  107. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/pricing/sources.yaml +0 -0
  108. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/pricing/update.py +0 -0
  109. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/protocol.py +0 -0
  110. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/py.typed +0 -0
  111. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/retention.py +0 -0
  112. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/telemetry/__init__.py +0 -0
  113. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/telemetry/otel.py +0 -0
  114. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/update.py +0 -0
  115. {witdem_analytics-0.2.1 → witdem_analytics-0.2.2}/src/witdem/workflows.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: witdem-analytics
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Runtime analytics for agent applications using OpenTelemetry, with optional business semantics through the Witdem SDK.
5
5
  License-File: LICENSE
6
6
  Classifier: Programming Language :: Python :: 3
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "witdem-analytics"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Runtime analytics for agent applications using OpenTelemetry, with optional business semantics through the Witdem SDK."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10,<3.14"
@@ -9,7 +9,7 @@ from typing import Any, Literal
9
9
 
10
10
  from witdem.analytics.core import Operation
11
11
 
12
- OPERATION_TAXONOMY_VERSION = "1"
12
+ OPERATION_TAXONOMY_VERSION = "2"
13
13
  MEASUREMENT_REGISTRY_VERSION = "1"
14
14
 
15
15
  OperationFamily = str
@@ -214,8 +214,16 @@ VALID_INTERFACES = frozenset(
214
214
  "mcp", "library", "local", "external_api", "browser", "human", "unknown",
215
215
  }
216
216
  )
217
- VALID_ROLES = frozenset({"application", "model", "tool", "agent", "evaluator", "guardrail", "system", "human"})
217
+ VALID_ROLES = frozenset(
218
+ {"application", "model", "tool", "agent", "evaluator", "guardrail", "system", "human", "control"}
219
+ )
218
220
  VALID_MODALITIES = frozenset({"text", "structured", "document", "vector", "image", "audio", "video"})
221
+ VALID_ENTITY_KINDS = frozenset({"execution", "operation", "business_event"})
222
+ VALID_PLANES = frozenset({"control", "work", "business"})
223
+
224
+ _CONTROL_FAMILIES = frozenset({"orchestration", "agent_control"})
225
+ _CONTROL_MCP_TYPES = frozenset({"mcp_connection", "mcp_server", "mcp_capability_discovery"})
226
+ _MODEL_APPLICABLE_FAMILIES = frozenset({"inference", "media"})
219
227
 
220
228
 
221
229
  @dataclass(frozen=True, slots=True)
@@ -500,6 +508,16 @@ def operation_identity(operation: Operation) -> dict[str, Any]:
500
508
  ),
501
509
  None,
502
510
  )
511
+ explicit_entity_kind = str(attributes.get("witdem.entity.kind") or "").strip().casefold()
512
+ execution_name = str(attributes.get("witdem.execution.name") or "").strip()
513
+ entity_kind = (
514
+ explicit_entity_kind
515
+ if explicit_entity_kind in VALID_ENTITY_KINDS
516
+ else "execution"
517
+ if operation.parent_span_id is None and execution_name
518
+ else "operation"
519
+ )
520
+ runtime_kind = str(attributes.get("witdem.runtime.kind") or attributes.get("runtime.kind") or "").strip().casefold()
503
521
  operation_type = (
504
522
  explicit_type
505
523
  or OTEL_OPERATION_TYPES.get(otel_name)
@@ -508,7 +526,11 @@ def operation_identity(operation: Operation) -> dict[str, Any]:
508
526
  or _bounded_metadata_type(operation)
509
527
  )
510
528
  if not operation_type:
511
- operation_type = {
529
+ operation_type = ({
530
+ "workflow": "workflow",
531
+ "pipeline": "workflow",
532
+ "agent": "agent",
533
+ }.get(runtime_kind) if entity_kind == "execution" else None) or {
512
534
  "workflow": "workflow",
513
535
  "pipeline": "workflow",
514
536
  "agent": "agent",
@@ -530,16 +552,39 @@ def operation_identity(operation: Operation) -> dict[str, Any]:
530
552
  if family == "orchestration"
531
553
  else "local"
532
554
  )
533
- role = str(attributes.get("witdem.operation.role") or "application").strip().casefold()
555
+ explicit_plane = str(attributes.get("witdem.operation.plane") or "").strip().casefold()
556
+ plane = (
557
+ None
558
+ if entity_kind == "execution"
559
+ else explicit_plane
560
+ if explicit_plane in VALID_PLANES
561
+ else "control"
562
+ if family in _CONTROL_FAMILIES or operation_type in _CONTROL_MCP_TYPES
563
+ else "work"
564
+ )
565
+ role = str(
566
+ attributes.get("witdem.operation.role")
567
+ or ("control" if plane == "control" else "application")
568
+ ).strip().casefold()
534
569
  if role not in VALID_ROLES:
535
570
  role = "application"
571
+ model_reported = any(
572
+ attributes.get(key)
573
+ for key in ("gen_ai.response.model", "gen_ai.request.model", "model")
574
+ )
575
+ model_applicability = (
576
+ "applicable" if model_reported or family in _MODEL_APPLICABLE_FAMILIES else "not_applicable"
577
+ )
536
578
  return {
537
579
  "taxonomy_version": OPERATION_TAXONOMY_VERSION,
580
+ "entity_kind": entity_kind,
581
+ "plane": plane,
538
582
  "family": family,
539
583
  "type": operation_type,
540
584
  "subtype": str(attributes.get("witdem.operation.subtype") or otel_name or oi_kind or operation.name),
541
585
  "interface": interface,
542
586
  "role": role,
587
+ "model_applicability": model_applicability,
543
588
  "input_modalities": [
544
589
  item for item in _strings(attributes.get("witdem.operation.input_modalities")) if item in VALID_MODALITIES
545
590
  ],
@@ -424,7 +424,7 @@ def _workflow_compile(args: argparse.Namespace) -> None:
424
424
  raise SystemExit(1)
425
425
 
426
426
 
427
- def _workflow_rebuild(args: argparse.Namespace) -> None:
427
+ def _rebuild_serving_data(args: argparse.Namespace) -> tuple[dict[str, Any], dict[str, int]]:
428
428
  from witdem.dashboard.service import materialize_workflow_projections
429
429
  from witdem.elt.worker import run_pending
430
430
  from witdem.ingest import corpus
@@ -435,9 +435,33 @@ def _workflow_rebuild(args: argparse.Namespace) -> None:
435
435
  with corpus.maintenance_lock(timeout=60.0):
436
436
  transform = run_pending(rebuild=True, maintenance_lock_held=True)
437
437
  projections = materialize_workflow_projections(config.database)
438
+ return transform, projections
439
+
440
+
441
+ def _workflow_rebuild(args: argparse.Namespace) -> None:
442
+ transform, projections = _rebuild_serving_data(args)
438
443
  print(json.dumps({"status": "ok", "transform": transform, "projections": projections}, indent=2))
439
444
 
440
445
 
446
+ def _taxonomy_reprocess(args: argparse.Namespace) -> None:
447
+ from witdem.analytics.operations import MEASUREMENT_REGISTRY_VERSION, OPERATION_TAXONOMY_VERSION
448
+
449
+ transform, projections = _rebuild_serving_data(args)
450
+ print(
451
+ json.dumps(
452
+ {
453
+ "status": "ok",
454
+ "operation_taxonomy_version": OPERATION_TAXONOMY_VERSION,
455
+ "measurement_registry_version": MEASUREMENT_REGISTRY_VERSION,
456
+ "raw_telemetry": "preserved",
457
+ "transform": transform,
458
+ "projections": projections,
459
+ },
460
+ indent=2,
461
+ )
462
+ )
463
+
464
+
441
465
  def _eval_validate(args: argparse.Namespace) -> None:
442
466
  from witdem.evaluation_campaigns import validate_jsonl
443
467
 
@@ -698,6 +722,15 @@ def build_parser() -> argparse.ArgumentParser:
698
722
  workflow_rebuild.add_argument("--db")
699
723
  workflow_rebuild.add_argument("--data-dir")
700
724
  workflow_rebuild.set_defaults(func=_workflow_rebuild)
725
+ taxonomy = commands.add_parser("taxonomy", help="inspect or reprocess operation taxonomy facts")
726
+ taxonomy_commands = taxonomy.add_subparsers(dest="taxonomy_command", required=True)
727
+ taxonomy_reprocess = taxonomy_commands.add_parser(
728
+ "reprocess",
729
+ help="rebuild derived operation facts from preserved raw telemetry",
730
+ )
731
+ taxonomy_reprocess.add_argument("--db")
732
+ taxonomy_reprocess.add_argument("--data-dir")
733
+ taxonomy_reprocess.set_defaults(func=_taxonomy_reprocess)
701
734
  evaluations = commands.add_parser("eval", help="validate or import offline evaluation campaigns")
702
735
  evaluation_commands = evaluations.add_subparsers(dest="evaluation_command", required=True)
703
736
  evaluation_validate = evaluation_commands.add_parser("validate", help="validate campaign JSONL without writes")
@@ -89,7 +89,10 @@ def metadata(repo: AnalyticsRepository) -> dict[str, Any]:
89
89
  def overview(repo: AnalyticsRepository, filters: FilterState) -> dict[str, Any]:
90
90
  with repo._overview_read_session():
91
91
  snapshot = repo.get_overview_snapshot(filters)
92
- operation_facts, operation_measurements = repo.operation_health_facts()
92
+ all_operation_facts, all_operation_measurements = repo.operation_health_facts()
93
+ operation_facts, operation_measurements = _operation_profile_inputs(
94
+ all_operation_facts, all_operation_measurements
95
+ )
93
96
  goals = snapshot.goals
94
97
  return cast(
95
98
  dict[str, Any],
@@ -116,7 +119,7 @@ def overview(repo: AnalyticsRepository, filters: FilterState) -> dict[str, Any]:
116
119
  "goal_trend": snapshot.goal_trend,
117
120
  "goal_portfolio": snapshot.goal_portfolio,
118
121
  "assurance_summary": snapshot.assurance_summary,
119
- "operation_health": _operation_summary(operation_facts, operation_measurements),
122
+ "operation_health": _operation_summary(all_operation_facts, all_operation_measurements),
120
123
  "operation_measurement_coverage": _measurement_coverage(operation_measurements),
121
124
  "operation_measurement_alerts": _measurement_alerts(operation_facts, operation_measurements),
122
125
  "paths": [],
@@ -192,7 +195,8 @@ def run_detail(repo: AnalyticsRepository, execution_id: str) -> dict[str, Any] |
192
195
  projection = repo.workflow_projection(execution_id) if workflow is not None else None
193
196
  if projection is None and workflow is not None:
194
197
  projection = project_execution(workflow, execution=summary, graph=graph)
195
- operation_facts, measurements = repo.execution_operation_facts(execution_id)
198
+ all_operation_facts, all_measurements = repo.execution_operation_facts(execution_id)
199
+ operation_facts, measurements = _operation_profile_inputs(all_operation_facts, all_measurements)
196
200
  evaluation_results = []
197
201
  for record in semantic_records:
198
202
  if str(record.get("kind") or "").casefold() != "evaluation":
@@ -207,7 +211,7 @@ def run_detail(repo: AnalyticsRepository, execution_id: str) -> dict[str, Any] |
207
211
  "graph": graph,
208
212
  "semantic_records": semantic_records,
209
213
  "workflow_replay": projection,
210
- "operation_summary": _operation_summary(operation_facts, measurements),
214
+ "operation_summary": _operation_summary(all_operation_facts, all_measurements),
211
215
  "measurements": measurements,
212
216
  "measurement_coverage": _measurement_coverage(measurements),
213
217
  "evaluation_results": evaluation_results,
@@ -343,11 +347,14 @@ def _operation_facts(
343
347
  "template_hash": template_hash,
344
348
  "node_id": assigned_node_id,
345
349
  "taxonomy_version": identity["taxonomy_version"],
350
+ "entity_kind": identity["entity_kind"],
351
+ "plane": identity["plane"],
346
352
  "family": identity["family"],
347
353
  "operation_type": identity["type"],
348
354
  "subtype": identity["subtype"],
349
355
  "interface": identity["interface"],
350
356
  "role": identity["role"],
357
+ "model_applicability": identity["model_applicability"],
351
358
  "input_modalities": identity["input_modalities"],
352
359
  "output_modalities": identity["output_modalities"],
353
360
  "provider_id": _explicit_attribute(attributes, "gen_ai.provider.name", "provider"),
@@ -750,13 +757,14 @@ def workflow_operations(repo: AnalyticsRepository, workflow_id: str) -> dict[str
750
757
  definitions = {**_persisted_definitions(repo), **load_registry().definitions}
751
758
  if workflow_id not in definitions:
752
759
  return None
753
- operations, measurements = repo.workflow_operation_facts(workflow_id)
760
+ all_operations, all_measurements = repo.workflow_operation_facts(workflow_id)
761
+ operations, measurements = _operation_profile_inputs(all_operations, all_measurements)
754
762
  return cast(
755
763
  dict[str, Any],
756
764
  jsonable_encoder(
757
765
  {
758
766
  "workflow_id": workflow_id,
759
- "summary": _operation_summary(operations, measurements),
767
+ "summary": _operation_summary(all_operations, all_measurements),
760
768
  "measurement_coverage": _measurement_coverage(measurements),
761
769
  "operations": operations,
762
770
  "measurements": measurements,
@@ -815,18 +823,48 @@ def evaluation_campaign(repo: AnalyticsRepository, campaign_id: str) -> dict[str
815
823
  return repo.evaluation_campaign(campaign_id)
816
824
 
817
825
 
826
+ def _operation_profile_inputs(
827
+ operations: list[dict[str, Any]], measurements: list[dict[str, Any]]
828
+ ) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]:
829
+ """Exclude execution containers while retaining every actual operation."""
830
+
831
+ profile_operations = [
832
+ operation for operation in operations if str(operation.get("entity_kind") or "operation") != "execution"
833
+ ]
834
+ operation_ids = {str(operation.get("operation_id") or "") for operation in profile_operations}
835
+ return profile_operations, [
836
+ measurement
837
+ for measurement in measurements
838
+ if str(measurement.get("operation_id") or "") in operation_ids
839
+ ]
840
+
841
+
818
842
  def _operation_summary(operations: list[dict[str, Any]], measurements: list[dict[str, Any]]) -> dict[str, Any]:
843
+ execution_containers = sum(
844
+ str(operation.get("entity_kind") or "operation") == "execution" for operation in operations
845
+ )
846
+ operations, measurements = _operation_profile_inputs(operations, measurements)
819
847
  measured_by_operation: dict[str, list[dict[str, Any]]] = defaultdict(list)
820
848
  for measurement in measurements:
821
849
  measured_by_operation[str(measurement.get("operation_id") or "")].append(measurement)
850
+ operations_by_parent: dict[str, list[dict[str, Any]]] = defaultdict(list)
851
+ for operation in operations:
852
+ parent_id = str(operation.get("parent_operation_id") or "")
853
+ if parent_id:
854
+ operations_by_parent[parent_id].append(operation)
822
855
  groups: dict[str, dict[str, Any]] = {}
823
856
  for operation in operations:
824
857
  operation_type = str(operation.get("operation_type") or "unknown")
858
+ family = str(operation.get("family") or "custom")
859
+ plane = operation.get("plane") or (
860
+ "control" if family in {"orchestration", "agent_control"} else "work"
861
+ )
825
862
  bucket = groups.setdefault(
826
863
  operation_type,
827
864
  {
828
865
  "type": operation_type,
829
- "family": operation.get("family"),
866
+ "family": family,
867
+ "plane": plane,
830
868
  "operations": 0,
831
869
  "failed": 0,
832
870
  "active_seconds": 0.0,
@@ -835,12 +873,16 @@ def _operation_summary(operations: list[dict[str, Any]], measurements: list[dict
835
873
  "providers": set(),
836
874
  "models": set(),
837
875
  "implementations": set(),
876
+ "model_applicability": "not_applicable",
877
+ "linked_children": {},
838
878
  "measurements": defaultdict(float),
839
879
  },
840
880
  )
841
881
  bucket["operations"] += 1
842
882
  bucket["failed"] += int(str(operation.get("status") or "").casefold() in {"error", "failed"})
843
883
  bucket["active_seconds"] += float(operation.get("duration_seconds") or 0.0)
884
+ if operation.get("model_applicability") == "applicable":
885
+ bucket["model_applicability"] = "applicable"
844
886
  for key, target in (
845
887
  ("role", "roles"),
846
888
  ("interface", "interfaces"),
@@ -850,11 +892,41 @@ def _operation_summary(operations: list[dict[str, Any]], measurements: list[dict
850
892
  ):
851
893
  if operation.get(key):
852
894
  bucket[target].add(str(operation[key]))
895
+ for child in operations_by_parent.get(str(operation.get("operation_id") or ""), []):
896
+ child_type = str(child.get("operation_type") or "unknown")
897
+ child_bucket = bucket["linked_children"].setdefault(
898
+ child_type,
899
+ {
900
+ "type": child_type,
901
+ "family": child.get("family"),
902
+ "operations": 0,
903
+ "providers": set(),
904
+ "models": set(),
905
+ "implementations": set(),
906
+ },
907
+ )
908
+ child_bucket["operations"] += 1
909
+ for key, target in (
910
+ ("provider_id", "providers"),
911
+ ("model_id", "models"),
912
+ ("implementation_id", "implementations"),
913
+ ):
914
+ if child.get(key):
915
+ child_bucket[target].add(str(child[key]))
853
916
  for measurement in measured_by_operation.get(str(operation.get("operation_id") or ""), []):
854
917
  if measurement.get("measurement_status") == "measured" and measurement.get("value") is not None:
855
918
  bucket["measurements"][str(measurement["measurement_key"])] += float(measurement["value"])
856
919
  items = []
857
920
  for bucket in groups.values():
921
+ linked_children = [
922
+ {
923
+ **child,
924
+ "providers": sorted(child["providers"]),
925
+ "models": sorted(child["models"]),
926
+ "implementations": sorted(child["implementations"]),
927
+ }
928
+ for child in bucket.pop("linked_children").values()
929
+ ]
858
930
  items.append(
859
931
  {
860
932
  **bucket,
@@ -863,11 +935,13 @@ def _operation_summary(operations: list[dict[str, Any]], measurements: list[dict
863
935
  "providers": sorted(bucket["providers"]),
864
936
  "models": sorted(bucket["models"]),
865
937
  "implementations": sorted(bucket["implementations"]),
938
+ "linked_children": sorted(linked_children, key=lambda child: str(child["type"])),
866
939
  "measurements": dict(sorted(bucket["measurements"].items())),
867
940
  }
868
941
  )
869
942
  return {
870
943
  "total_operations": len(operations),
944
+ "execution_containers": execution_containers,
871
945
  "failed_operations": sum(
872
946
  int(str(item.get("status") or "").casefold() in {"error", "failed"}) for item in operations
873
947
  ),
@@ -889,6 +963,7 @@ def _measurement_coverage(measurements: list[dict[str, Any]]) -> dict[str, Any]:
889
963
 
890
964
 
891
965
  def _measurement_alerts(operations: list[dict[str, Any]], measurements: list[dict[str, Any]]) -> list[dict[str, Any]]:
966
+ operations, measurements = _operation_profile_inputs(operations, measurements)
892
967
  operation_map = {str(item.get("operation_id") or ""): item for item in operations}
893
968
  groups: dict[tuple[str, str], dict[str, Any]] = {}
894
969
  for measurement in measurements:
@@ -1,4 +1,4 @@
1
- import{g as rw,t as nw,r as iw,a as aw,j as ow}from"./index-BslxSAMa.js";var ph=function(t,e){return ph=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ph(t,e)};function J(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ph(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Fv=12,sw="sans-serif",sn=Fv+"px "+sw,uw=20,lw=100,fw="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function hw(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-uw)/lw;e[n]=i}return e}var vw=hw(fw),We={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var t,e;return function(r,n){if(!t){var i=We.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||sn),t.measureText(r);r=r||"",n=n||sn;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Fv,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=vw[r[u]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n},getTime:function(){return Date.now?Date.now():+new Date}};function ky(t){for(var e in We)We.hasOwnProperty(e)&&t[e]&&(We[e]=t[e])}var By=hr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),Ny=hr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),ea=Object.prototype.toString,ju=Array.prototype,cw=ju.forEach,dw=ju.filter,zv=ju.slice,pw=ju.map,_d=(function(){}).constructor,No=_d?_d.prototype:null,Gv="__proto__",Nl=2311,gw=Math.pow(2,53)-1;function Hv(){return Nl>=gw&&(Nl=0),Nl++}function Qu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function ie(t){if(t==null||typeof t!="object")return t;var e=t,r=ea.call(t);if(r==="[object Array]"){if(!Bi(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=ie(t[n])}}else if(Ny[r]){if(!Bi(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!By[r]&&!Bi(t)&&!Wi(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==Gv&&(e[o]=ie(t[o]))}return e}function he(t,e,r){if(!$(e)||!$(t))return r?ie(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==Gv){var i=t[n],a=e[n];$(a)&&$(i)&&!H(a)&&!H(i)&&!Wi(a)&&!Wi(i)&&!gh(a)&&!gh(i)&&!Bi(a)&&!Bi(i)?he(i,a,r):(r||!(n in t))&&(t[n]=ie(e[n]))}return t}function mw(t,e){for(var r=t[0],n=1,i=t.length;n<i;n++)r=he(r,t[n],e);return r}function k(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==Gv&&(t[r]=e[r]);return t}function Fy(t,e,r){t=t||{};for(var n=0;n<r.length;n++){var i=r[n];t[i]=e[i]}return t}function de(t,e,r){for(var n=Te(e),i=0,a=n.length;i<a;i++){var o=n[i];(r?e[o]!=null:t[o]==null)&&(t[o]=e[o])}return t}var yw=We.createCanvas;function ue(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function Vv(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function Nt(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a])}else de(t,e,r)}function ft(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function A(t,e,r){if(t&&e)if(t.forEach&&t.forEach===cw)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function q(t,e,r){if(!t)return[];if(!e)return Ju(t);if(t.map&&t.map===pw)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function hr(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function Le(t,e,r){if(!t)return[];if(!e)return Ju(t);if(t.filter&&t.filter===dw)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function zy(t,e,r){if(t&&e){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}}function Te(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function _w(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(zv.call(arguments)))}}var _e=No&&Q(No.bind)?No.call.bind(No.bind):_w;function Ie(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(zv.call(arguments)))}}function H(t){return Array.isArray?Array.isArray(t):ea.call(t)==="[object Array]"}function Q(t){return typeof t=="function"}function W(t){return typeof t=="string"}function tu(t){return ea.call(t)==="[object String]"}function Se(t){return typeof t=="number"}function $(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function gh(t){return!!By[ea.call(t)]}function ht(t){return!!Ny[ea.call(t)]}function Wi(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function bo(t){return t.colorStops!=null}function Gy(t){return t.image!=null}function Sw(t){return ea.call(t)==="[object RegExp]"}function Yi(t){return t!==t}function to(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function X(t,e){return t??e}function en(t,e,r){return t??e??r}function Ju(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return zv.apply(t,e)}function el(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function vr(t,e){if(!t)throw new Error(e)}function Wt(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Hy="__ec_primitive__";function ru(t){t[Hy]=!0}function Bi(t){return t[Hy]}var bw=(function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Te(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t})(),Vy=typeof Map=="function";function ww(){return Vy?new Map:new bw}var Uy=(function(){function t(e){var r=H(e);this.data=ww();var n=this;e instanceof t?e.each(i):e&&A(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return Vy?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t})();function j(t){return new Uy(t)}function Wy(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function wo(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&k(r,e),r}function Uv(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Qe(t,e){return t.hasOwnProperty(e)}function Ye(){}var Yy=180/Math.PI,Tw=Number.EPSILON||Math.pow(2,-52);const xw=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:Tw,HashMap:Uy,RADIAN_TO_DEGREE:Yy,assert:vr,assignProps:Fy,bind:_e,clone:ie,concatArray:Wy,createCanvas:yw,createHashMap:j,createObject:wo,curry:Ie,defaults:de,disableUserSelect:Uv,each:A,eqNaN:Yi,extend:k,filter:Le,find:zy,guid:Hv,hasOwn:Qe,indexOf:ue,inherits:Vv,isArray:H,isArrayLike:ft,isBuiltInObject:gh,isDom:Wi,isFunction:Q,isGradientObject:bo,isImagePatternObject:Gy,isNumber:Se,isObject:$,isPrimitive:Bi,isRegExp:Sw,isString:W,isStringSafe:tu,isTypedArray:ht,keys:Te,logError:Qu,map:q,merge:he,mergeAll:mw,mixin:Nt,noop:Ye,normalizeCssArray:el,reduce:hr,retrieve:to,retrieve2:X,retrieve3:en,setAsPrimitive:ru,slice:Ju,trim:Wt},Symbol.toStringTag,{value:"Module"}));var Cw=(function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t})(),Dw=(function(){function t(){this.browser=new Cw,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t})(),ne=new Dw;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ne.wxa=!0,ne.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ne.worker=!0:!ne.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ne.node=!0,ne.svgSupported=!0):Mw(navigator.userAgent,ne);function Mw(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var u=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in u||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in u)&&!("OTransition"in u),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var Aw=".",mn="___EC__COMPONENT__CONTAINER___",Xy="___EC__EXTENDED_CLASS___";function ar(t){var e={main:"",sub:""};if(t){var r=t.split(Aw);e.main=r[0]||"",e.sub=r[1]||""}return e}function Lw(t){vr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Iw(t){return!!(t&&t[Xy])}function Wv(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return Pw(n)?i=(function(a){J(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(r.$constructor||n).apply(this,arguments)},Vv(i,this)),k(i.prototype,r),i[Xy]=!0,i.extend=this.extend,i.superCall=Ow,i.superApply=kw,i.superClass=n,i}}function Pw(t){return Q(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function qy(t,e){t.extend=e.extend}var Rw=Math.round(Math.random()*10);function Ew(t){var e=["__\0is_clz",Rw++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function Ow(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function kw(t,e,r){return this.superClass.prototype[e].apply(t,r)}function tl(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){Lw(i),n.prototype.type=i;var a=ar(i);if(!a.sub)e[a.main]=n;else if(a.sub!==mn){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[mn]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=ar(n),a=[],o=e[i.main];return o&&o[mn]?A(o,function(s,u){u!==mn&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=ar(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return A(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=ar(n),a=e[i.main];return a&&a[mn]};function r(n){var i=e[n.main];return(!i||!i[mn])&&(i=e[n.main]={},i[mn]=!0),i}}function ro(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var u=t[s][1];if(!(i&&ue(i,u)>=0||a&&ue(a,u)<0)){var l=n.getShallow(u,e);l!=null&&(o[t[s][0]]=l)}}return o}}var Bw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Nw=ro(Bw),Fw=(function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return Nw(this,e,r)},t})();var mh=function(t,e){return mh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},mh(t,e)};function be(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var $y=(function(){function t(e){this.value=e}return t})(),zw=(function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new $y(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t})(),Xi=(function(){function t(e){this._list=new zw,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new $y(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t})(),yh=new Xi(50);function Gw(t){if(typeof t=="string"){var e=yh.get(t);return e&&e.image}else return t}function Zy(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=yh.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!rl(e)&&a.pending.push(o)):(e=We.loadImage(t,Sd,Sd),e.__zrImageSrc=t,yh.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function Sd(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function rl(t){return t&&t.width&&t.height}function Et(){return[1,0,0,1,0,0]}function ui(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function To(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function $n(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],u=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t}function nu(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function nl(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],u=e[3],l=e[5],f=Math.sin(r),h=Math.cos(r);return t[0]=i*h+s*f,t[1]=-i*f+s*h,t[2]=a*h+u*f,t[3]=-a*f+h*u,t[4]=h*(o-n[0])+f*(l-n[1])+n[0],t[5]=h*(l-n[1])-f*(o-n[0])+n[1],t}function Ky(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function cn(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],u=r*o-a*n;return u?(u=1/u,t[0]=o*u,t[1]=-a*u,t[2]=-n*u,t[3]=r*u,t[4]=(n*s-o*i)*u,t[5]=(a*i-r*s)*u,t):null}function Hw(t){var e=Et();return To(e,t),e}const Vw=Object.freeze(Object.defineProperty({__proto__:null,clone:Hw,copy:To,create:Et,identity:ui,invert:cn,mul:$n,rotate:nl,scale:Ky,translate:nu},Symbol.toStringTag,{value:"Module"}));function li(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function Uw(t,e){return t[0]=e[0],t[1]=e[1],t}function jy(t){return[t[0],t[1]]}function Rs(t,e,r){return t[0]=e,t[1]=r,t}function _h(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Ww(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t}function Qy(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Yv(t){return Math.sqrt(Xv(t))}var Yw=Yv;function Xv(t){return t[0]*t[0]+t[1]*t[1]}var Xw=Xv;function qw(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function $w(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function Zw(t,e){return t[0]*e[0]+t[1]*e[1]}function Es(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Jy(t,e){var r=Yv(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function iu(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var au=iu;function e0(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Zn=e0;function Kw(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Os(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function ut(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function Zr(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Kr(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}const jw=Object.freeze(Object.defineProperty({__proto__:null,add:_h,applyTransform:ut,clone:jy,copy:Uw,create:li,dist:au,distSquare:Zn,distance:iu,distanceSquare:e0,div:$w,dot:Zw,len:Yv,lenSquare:Xv,length:Yw,lengthSquare:Xw,lerp:Os,max:Kr,min:Zr,mul:qw,negate:Kw,normalize:Jy,scale:Es,scaleAndAdd:Ww,set:Rs,sub:Qy},Symbol.toStringTag,{value:"Module"}));var te=(function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t})(),Un=Math.min,Ri=Math.max,Sh=Math.abs,bd=["x","y"],Qw=["width","height"],yn=new te,_n=new te,Sn=new te,bn=new te,gt=t0(),ka=gt.minTv,bh=gt.maxTv,Wa=[0,0],Z=(function(){function t(e,r,n,i){Fl(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Un(e.x,this.x),n=Un(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ri(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ri(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){return Jw(Et(),this,e)},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=Fl(eT,e.x,e.y,e.width,e.height)),r instanceof t||(r=Fl(tT,r.x,r.y,r.width,r.height));var s=!!n;gt.reset(i,s);var u=gt.touchThreshold,l=e.x+u,f=e.x+e.width-u,h=e.y+u,c=e.y+e.height-u,v=r.x+u,d=r.x+r.width-u,p=r.y+u,g=r.y+r.height-u;if(l>f||h>c||v>d||p>g)return!1;var m=!(f<v||d<l||c<p||g<h);return(s||a)&&(Wa[0]=1/0,Wa[1]=0,Td(l,f,v,d,0,s,a,o),Td(h,c,p,g,1,s,a,o),s&&te.copy(n,m?gt.useDir?gt.dirMinTv:ka:bh)),m},t.contain=function(e,r,n){return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){wd(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e?e.x:0,e?e.y:0,e?e.width:0,e?e.height:0)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&wd(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}yn.x=Sn.x=r.x,yn.y=bn.y=r.y,_n.x=bn.x=r.x+r.width,_n.y=Sn.y=r.y+r.height,yn.transform(n),bn.transform(n),_n.transform(n),Sn.transform(n),e.x=Un(yn.x,_n.x,Sn.x,bn.x),e.y=Un(yn.y,_n.y,Sn.y,bn.y);var u=Ri(yn.x,_n.x,Sn.x,bn.x),l=Ri(yn.y,_n.y,Sn.y,bn.y);e.width=u-e.x,e.height=l-e.y},t.calculateTransform=function(e,r,n){var i=n.width/r.width,a=n.height/r.height;return e=ui(e||[]),nu(e,e,Rs(zl,-r.x,-r.y)),Ky(e,e,Rs(zl,i,a)),nu(e,e,Rs(zl,n.x,n.y)),e},t})();Z.create;var Fl=Z.set,wd=Z.copy,Jw=Z.calculateTransform;Z.applyTransform;Z.contain;var eT=new Z(0,0,0,0),tT=new Z(0,0,0,0),zl=[];function Td(t,e,r,n,i,a,o,s){var u=Sh(e-r),l=Sh(n-t),f=Un(u,l),h=bd[i],c=bd[1-i],v=Qw[i];e<r||n<t?u<l?(a&&(bh[h]=-u),s&&(o[h]=e,o[v]=0)):(a&&(bh[h]=l),s&&(o[h]=t,o[v]=0)):(o&&(o[h]=Ri(t,r),o[v]=Un(e,n)-o[h]),a&&(f<Wa[0]||gt.useDir)&&(Wa[0]=Un(f,Wa[0]),(u<l||!gt.bidirectional)&&(ka[h]=u,ka[c]=0,gt.useDir&&gt.calcDirMTV()),(u>=l||!gt.bidirectional)&&(ka[h]=-l,ka[c]=0,gt.useDir&&gt.calcDirMTV())))}function t0(){var t=0,e=new te,r=new te,n={minTv:new te,maxTv:new te,useDir:!1,dirMinTv:new te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Ri(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,u=Math.sin(t),l=Math.cos(t),f=u*a.y+l*a.x;if(i(f)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*l/f,r.y=s*u/f,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return Sh(a)<1e-10}return n}function sr(t){Fo||(Fo=new Xi(100)),t=t||sn;var e=Fo.get(t);return e||(e={font:t,strWidthCache:new Xi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:We.measureText("国",t).width,asciiCharWidth:We.measureText("a",t).width},Fo.put(t,e)),e}var Fo;function rT(t){if(!(Gl>=xd)){t=t||sn;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=We.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Gl=xd:i>2&&Gl++,e}}var Gl=0,xd=5;function r0(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=rT(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function ur(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=We.measureText(e,t.font).width,r.put(e,n)),n}function Cd(t,e,r,n){var i=ur(sr(e),t),a=il(e),o=qi(0,i,r),s=Kn(0,a,n),u=new Z(o,s,i,a);return u}function n0(t,e,r,n){var i=((t||"")+"").split(`
1
+ import{g as rw,t as nw,r as iw,a as aw,j as ow}from"./index-BBNwEw42.js";var ph=function(t,e){return ph=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ph(t,e)};function J(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ph(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Fv=12,sw="sans-serif",sn=Fv+"px "+sw,uw=20,lw=100,fw="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function hw(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-uw)/lw;e[n]=i}return e}var vw=hw(fw),We={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var t,e;return function(r,n){if(!t){var i=We.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||sn),t.measureText(r);r=r||"",n=n||sn;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Fv,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=vw[r[u]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n},getTime:function(){return Date.now?Date.now():+new Date}};function ky(t){for(var e in We)We.hasOwnProperty(e)&&t[e]&&(We[e]=t[e])}var By=hr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),Ny=hr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),ea=Object.prototype.toString,ju=Array.prototype,cw=ju.forEach,dw=ju.filter,zv=ju.slice,pw=ju.map,_d=(function(){}).constructor,No=_d?_d.prototype:null,Gv="__proto__",Nl=2311,gw=Math.pow(2,53)-1;function Hv(){return Nl>=gw&&(Nl=0),Nl++}function Qu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function ie(t){if(t==null||typeof t!="object")return t;var e=t,r=ea.call(t);if(r==="[object Array]"){if(!Bi(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=ie(t[n])}}else if(Ny[r]){if(!Bi(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!By[r]&&!Bi(t)&&!Wi(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==Gv&&(e[o]=ie(t[o]))}return e}function he(t,e,r){if(!$(e)||!$(t))return r?ie(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==Gv){var i=t[n],a=e[n];$(a)&&$(i)&&!H(a)&&!H(i)&&!Wi(a)&&!Wi(i)&&!gh(a)&&!gh(i)&&!Bi(a)&&!Bi(i)?he(i,a,r):(r||!(n in t))&&(t[n]=ie(e[n]))}return t}function mw(t,e){for(var r=t[0],n=1,i=t.length;n<i;n++)r=he(r,t[n],e);return r}function k(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==Gv&&(t[r]=e[r]);return t}function Fy(t,e,r){t=t||{};for(var n=0;n<r.length;n++){var i=r[n];t[i]=e[i]}return t}function de(t,e,r){for(var n=Te(e),i=0,a=n.length;i<a;i++){var o=n[i];(r?e[o]!=null:t[o]==null)&&(t[o]=e[o])}return t}var yw=We.createCanvas;function ue(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function Vv(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function Nt(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a])}else de(t,e,r)}function ft(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function A(t,e,r){if(t&&e)if(t.forEach&&t.forEach===cw)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function q(t,e,r){if(!t)return[];if(!e)return Ju(t);if(t.map&&t.map===pw)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function hr(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function Le(t,e,r){if(!t)return[];if(!e)return Ju(t);if(t.filter&&t.filter===dw)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function zy(t,e,r){if(t&&e){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}}function Te(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function _w(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(zv.call(arguments)))}}var _e=No&&Q(No.bind)?No.call.bind(No.bind):_w;function Ie(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(zv.call(arguments)))}}function H(t){return Array.isArray?Array.isArray(t):ea.call(t)==="[object Array]"}function Q(t){return typeof t=="function"}function W(t){return typeof t=="string"}function tu(t){return ea.call(t)==="[object String]"}function Se(t){return typeof t=="number"}function $(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function gh(t){return!!By[ea.call(t)]}function ht(t){return!!Ny[ea.call(t)]}function Wi(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function bo(t){return t.colorStops!=null}function Gy(t){return t.image!=null}function Sw(t){return ea.call(t)==="[object RegExp]"}function Yi(t){return t!==t}function to(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function X(t,e){return t??e}function en(t,e,r){return t??e??r}function Ju(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return zv.apply(t,e)}function el(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function vr(t,e){if(!t)throw new Error(e)}function Wt(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Hy="__ec_primitive__";function ru(t){t[Hy]=!0}function Bi(t){return t[Hy]}var bw=(function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Te(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t})(),Vy=typeof Map=="function";function ww(){return Vy?new Map:new bw}var Uy=(function(){function t(e){var r=H(e);this.data=ww();var n=this;e instanceof t?e.each(i):e&&A(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return Vy?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t})();function j(t){return new Uy(t)}function Wy(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function wo(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&k(r,e),r}function Uv(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Qe(t,e){return t.hasOwnProperty(e)}function Ye(){}var Yy=180/Math.PI,Tw=Number.EPSILON||Math.pow(2,-52);const xw=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:Tw,HashMap:Uy,RADIAN_TO_DEGREE:Yy,assert:vr,assignProps:Fy,bind:_e,clone:ie,concatArray:Wy,createCanvas:yw,createHashMap:j,createObject:wo,curry:Ie,defaults:de,disableUserSelect:Uv,each:A,eqNaN:Yi,extend:k,filter:Le,find:zy,guid:Hv,hasOwn:Qe,indexOf:ue,inherits:Vv,isArray:H,isArrayLike:ft,isBuiltInObject:gh,isDom:Wi,isFunction:Q,isGradientObject:bo,isImagePatternObject:Gy,isNumber:Se,isObject:$,isPrimitive:Bi,isRegExp:Sw,isString:W,isStringSafe:tu,isTypedArray:ht,keys:Te,logError:Qu,map:q,merge:he,mergeAll:mw,mixin:Nt,noop:Ye,normalizeCssArray:el,reduce:hr,retrieve:to,retrieve2:X,retrieve3:en,setAsPrimitive:ru,slice:Ju,trim:Wt},Symbol.toStringTag,{value:"Module"}));var Cw=(function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t})(),Dw=(function(){function t(){this.browser=new Cw,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t})(),ne=new Dw;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ne.wxa=!0,ne.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ne.worker=!0:!ne.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ne.node=!0,ne.svgSupported=!0):Mw(navigator.userAgent,ne);function Mw(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var u=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in u||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in u)&&!("OTransition"in u),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var Aw=".",mn="___EC__COMPONENT__CONTAINER___",Xy="___EC__EXTENDED_CLASS___";function ar(t){var e={main:"",sub:""};if(t){var r=t.split(Aw);e.main=r[0]||"",e.sub=r[1]||""}return e}function Lw(t){vr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Iw(t){return!!(t&&t[Xy])}function Wv(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return Pw(n)?i=(function(a){J(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(r.$constructor||n).apply(this,arguments)},Vv(i,this)),k(i.prototype,r),i[Xy]=!0,i.extend=this.extend,i.superCall=Ow,i.superApply=kw,i.superClass=n,i}}function Pw(t){return Q(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function qy(t,e){t.extend=e.extend}var Rw=Math.round(Math.random()*10);function Ew(t){var e=["__\0is_clz",Rw++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function Ow(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function kw(t,e,r){return this.superClass.prototype[e].apply(t,r)}function tl(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){Lw(i),n.prototype.type=i;var a=ar(i);if(!a.sub)e[a.main]=n;else if(a.sub!==mn){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[mn]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=ar(n),a=[],o=e[i.main];return o&&o[mn]?A(o,function(s,u){u!==mn&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=ar(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return A(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=ar(n),a=e[i.main];return a&&a[mn]};function r(n){var i=e[n.main];return(!i||!i[mn])&&(i=e[n.main]={},i[mn]=!0),i}}function ro(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var u=t[s][1];if(!(i&&ue(i,u)>=0||a&&ue(a,u)<0)){var l=n.getShallow(u,e);l!=null&&(o[t[s][0]]=l)}}return o}}var Bw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Nw=ro(Bw),Fw=(function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return Nw(this,e,r)},t})();var mh=function(t,e){return mh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},mh(t,e)};function be(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var $y=(function(){function t(e){this.value=e}return t})(),zw=(function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new $y(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t})(),Xi=(function(){function t(e){this._list=new zw,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new $y(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t})(),yh=new Xi(50);function Gw(t){if(typeof t=="string"){var e=yh.get(t);return e&&e.image}else return t}function Zy(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=yh.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!rl(e)&&a.pending.push(o)):(e=We.loadImage(t,Sd,Sd),e.__zrImageSrc=t,yh.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function Sd(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function rl(t){return t&&t.width&&t.height}function Et(){return[1,0,0,1,0,0]}function ui(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function To(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function $n(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],u=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t}function nu(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function nl(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],u=e[3],l=e[5],f=Math.sin(r),h=Math.cos(r);return t[0]=i*h+s*f,t[1]=-i*f+s*h,t[2]=a*h+u*f,t[3]=-a*f+h*u,t[4]=h*(o-n[0])+f*(l-n[1])+n[0],t[5]=h*(l-n[1])-f*(o-n[0])+n[1],t}function Ky(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function cn(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],u=r*o-a*n;return u?(u=1/u,t[0]=o*u,t[1]=-a*u,t[2]=-n*u,t[3]=r*u,t[4]=(n*s-o*i)*u,t[5]=(a*i-r*s)*u,t):null}function Hw(t){var e=Et();return To(e,t),e}const Vw=Object.freeze(Object.defineProperty({__proto__:null,clone:Hw,copy:To,create:Et,identity:ui,invert:cn,mul:$n,rotate:nl,scale:Ky,translate:nu},Symbol.toStringTag,{value:"Module"}));function li(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function Uw(t,e){return t[0]=e[0],t[1]=e[1],t}function jy(t){return[t[0],t[1]]}function Rs(t,e,r){return t[0]=e,t[1]=r,t}function _h(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Ww(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t}function Qy(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Yv(t){return Math.sqrt(Xv(t))}var Yw=Yv;function Xv(t){return t[0]*t[0]+t[1]*t[1]}var Xw=Xv;function qw(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function $w(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function Zw(t,e){return t[0]*e[0]+t[1]*e[1]}function Es(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Jy(t,e){var r=Yv(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function iu(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var au=iu;function e0(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Zn=e0;function Kw(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Os(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function ut(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function Zr(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Kr(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}const jw=Object.freeze(Object.defineProperty({__proto__:null,add:_h,applyTransform:ut,clone:jy,copy:Uw,create:li,dist:au,distSquare:Zn,distance:iu,distanceSquare:e0,div:$w,dot:Zw,len:Yv,lenSquare:Xv,length:Yw,lengthSquare:Xw,lerp:Os,max:Kr,min:Zr,mul:qw,negate:Kw,normalize:Jy,scale:Es,scaleAndAdd:Ww,set:Rs,sub:Qy},Symbol.toStringTag,{value:"Module"}));var te=(function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t})(),Un=Math.min,Ri=Math.max,Sh=Math.abs,bd=["x","y"],Qw=["width","height"],yn=new te,_n=new te,Sn=new te,bn=new te,gt=t0(),ka=gt.minTv,bh=gt.maxTv,Wa=[0,0],Z=(function(){function t(e,r,n,i){Fl(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Un(e.x,this.x),n=Un(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ri(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ri(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){return Jw(Et(),this,e)},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=Fl(eT,e.x,e.y,e.width,e.height)),r instanceof t||(r=Fl(tT,r.x,r.y,r.width,r.height));var s=!!n;gt.reset(i,s);var u=gt.touchThreshold,l=e.x+u,f=e.x+e.width-u,h=e.y+u,c=e.y+e.height-u,v=r.x+u,d=r.x+r.width-u,p=r.y+u,g=r.y+r.height-u;if(l>f||h>c||v>d||p>g)return!1;var m=!(f<v||d<l||c<p||g<h);return(s||a)&&(Wa[0]=1/0,Wa[1]=0,Td(l,f,v,d,0,s,a,o),Td(h,c,p,g,1,s,a,o),s&&te.copy(n,m?gt.useDir?gt.dirMinTv:ka:bh)),m},t.contain=function(e,r,n){return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){wd(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e?e.x:0,e?e.y:0,e?e.width:0,e?e.height:0)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&wd(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}yn.x=Sn.x=r.x,yn.y=bn.y=r.y,_n.x=bn.x=r.x+r.width,_n.y=Sn.y=r.y+r.height,yn.transform(n),bn.transform(n),_n.transform(n),Sn.transform(n),e.x=Un(yn.x,_n.x,Sn.x,bn.x),e.y=Un(yn.y,_n.y,Sn.y,bn.y);var u=Ri(yn.x,_n.x,Sn.x,bn.x),l=Ri(yn.y,_n.y,Sn.y,bn.y);e.width=u-e.x,e.height=l-e.y},t.calculateTransform=function(e,r,n){var i=n.width/r.width,a=n.height/r.height;return e=ui(e||[]),nu(e,e,Rs(zl,-r.x,-r.y)),Ky(e,e,Rs(zl,i,a)),nu(e,e,Rs(zl,n.x,n.y)),e},t})();Z.create;var Fl=Z.set,wd=Z.copy,Jw=Z.calculateTransform;Z.applyTransform;Z.contain;var eT=new Z(0,0,0,0),tT=new Z(0,0,0,0),zl=[];function Td(t,e,r,n,i,a,o,s){var u=Sh(e-r),l=Sh(n-t),f=Un(u,l),h=bd[i],c=bd[1-i],v=Qw[i];e<r||n<t?u<l?(a&&(bh[h]=-u),s&&(o[h]=e,o[v]=0)):(a&&(bh[h]=l),s&&(o[h]=t,o[v]=0)):(o&&(o[h]=Ri(t,r),o[v]=Un(e,n)-o[h]),a&&(f<Wa[0]||gt.useDir)&&(Wa[0]=Un(f,Wa[0]),(u<l||!gt.bidirectional)&&(ka[h]=u,ka[c]=0,gt.useDir&&gt.calcDirMTV()),(u>=l||!gt.bidirectional)&&(ka[h]=-l,ka[c]=0,gt.useDir&&gt.calcDirMTV())))}function t0(){var t=0,e=new te,r=new te,n={minTv:new te,maxTv:new te,useDir:!1,dirMinTv:new te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Ri(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,u=Math.sin(t),l=Math.cos(t),f=u*a.y+l*a.x;if(i(f)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*l/f,r.y=s*u/f,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return Sh(a)<1e-10}return n}function sr(t){Fo||(Fo=new Xi(100)),t=t||sn;var e=Fo.get(t);return e||(e={font:t,strWidthCache:new Xi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:We.measureText("国",t).width,asciiCharWidth:We.measureText("a",t).width},Fo.put(t,e)),e}var Fo;function rT(t){if(!(Gl>=xd)){t=t||sn;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=We.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Gl=xd:i>2&&Gl++,e}}var Gl=0,xd=5;function r0(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=rT(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function ur(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=We.measureText(e,t.font).width,r.put(e,n)),n}function Cd(t,e,r,n){var i=ur(sr(e),t),a=il(e),o=qi(0,i,r),s=Kn(0,a,n),u=new Z(o,s,i,a);return u}function n0(t,e,r,n){var i=((t||"")+"").split(`
2
2
  `),a=i.length;if(a===1)return Cd(i[0],e,r,n);for(var o=new Z(0,0,0,0),s=0;s<i.length;s++){var u=Cd(i[s],e,r,n);s===0?o.copy(u):o.union(u)}return o}function qi(t,e,r,n){return r==="right"?n?t+=e:t-=e:r==="center"&&(n?t+=e/2:t-=e/2),t}function Kn(t,e,r,n){return r==="middle"?n?t+=e/2:t-=e/2:r==="bottom"&&(n?t+=e:t-=e),t}function il(t){return sr(t).stWideCharWidth}function ti(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ou(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,u=r.x,l=r.y,f="left",h="top";if(n instanceof Array)u+=ti(n[0],r.width),l+=ti(n[1],r.height),f=null,h=null;else switch(n){case"left":u-=i,l+=s,f="right",h="middle";break;case"right":u+=i+o,l+=s,h="middle";break;case"top":u+=o/2,l-=i,f="center",h="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=i,l+=s,h="middle";break;case"insideRight":u+=o-i,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",h="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,h="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",h="bottom";break}return t=t||{},t.x=u,t.y=l,t.align=f,t.verticalAlign=h,t}var Hl=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function nT(t,e,r,n,i){var a={};return i0(a,t,e,r,n,i),a.text}function i0(t,e,r,n,i,a){if(!r){t.text="",t.isTruncated=!1;return}var o=(e+"").split(`
3
3
  `);a=a0(r,n,i,a);for(var s=!1,u={},l=0,f=o.length;l<f;l++)o0(u,o[l],a),o[l]=u.textLine,s=s||u.isTruncated;t.text=o.join(`
4
4
  `),t.isTruncated=s}function a0(t,e,r,n){n=n||{};var i=k({},n);r=X(r,"..."),i.maxIterations=X(n.maxIterations,2);var a=i.minChar=X(n.minChar,0),o=i.fontMeasureInfo=sr(e),s=o.asciiCharWidth;i.placeholder=X(n.placeholder,"");for(var u=t=Math.max(0,t-1),l=0;l<a&&u>=s;l++)u-=s;var f=ur(o,r);return f>u&&(r="",f=0),u=t-f,i.ellipsis=r,i.ellipsisWidth=f,i.contentWidth=u,i.containerWidth=t,i}function o0(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=ur(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var u=s===0?iT(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,u),o=ur(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function iT(t,e,r){for(var n=0,i=0,a=t.length;i<a&&n<e;i++)n+=r0(r,t.charCodeAt(i));return i}function aT(t,e,r,n){var i=qv(t),a=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,u=o?o[0]+o[2]:0,l=e.font,f=a==="truncate",h=il(l),c=X(e.lineHeight,h),v=e.lineOverflow==="truncate",d=!1,p=e.width;p==null&&r!=null&&(p=r-s);var g=e.height;g==null&&n!=null&&(g=n-u);var m;p!=null&&(a==="break"||a==="breakAll")?m=i?s0(i,e.font,p,a==="breakAll",0).lines:[]:m=i?i.split(`