Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
feat(graph): add rich element rendering system
Zohaib Hassnainc964e11d38f4
diff --git a/semantica-explorer/src/store/graphStore.ts b/semantica-explorer/src/store/graphStore.tsindex 1bb0c38e..1d74c163 100644--- a/semantica-explorer/src/store/graphStore.ts+++ b/semantica-explorer/src/store/graphStore.ts@@ -1,4 +1,11 @@import Graph from "graphology";+import type {+ GraphArrowVisibilityPolicy,+ GraphBadgeKind,+ GraphEdgeVariant,+ GraphLabelVisibilityPolicy,+ GraphNodeShapeVariant,+} from "../workspaces/GraphWorkspace/graphTheme";export const graph = new Graph({@@ -26,6 +33,13 @@ export interface NodeAttributes {strokeColor?: string;borderColor?: string;borderSize?: number;+ nodeVariant?: GraphNodeShapeVariant;+ nodeShapeVariant?: GraphNodeShapeVariant;+ badgeKind?: GraphBadgeKind;+ badgeCount?: number;+ ringColor?: string;+ haloColor?: string;+ labelVisibilityPolicy?: GraphLabelVisibilityPolicy;highlighted?: boolean;nodeType: string;@@ -47,6 +61,12 @@ export interface EdgeAttributes {edgeFamily?: "line" | "parallel" | "bidirectional" | "path";isBidirectional?: boolean;curveGroup?: string | null;+ edgeVariant?: GraphEdgeVariant;+ arrowVisibilityPolicy?: GraphArrowVisibilityPolicy;+ relationshipStrength?: number;+ isParallelPair?: boolean;+ parallelIndex?: number;+ parallelCount?: number;edgeType: string;diff --git a/semantica-explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx b/semantica-explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsxindex 1f95aa34..5a946db7 100644--- a/semantica-explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx+++ b/semantica-explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx@@ -14,11 +14,17 @@ import { createViewModeSwitchBehavior } from "./behaviors/viewModeSwitchBehaviorimport {GRAPH_THEME,getZoomTier,+ type GraphArrowVisibilityPolicy,+ type GraphBadgeKind,+ type GraphEdgeVariant,type GraphEdgeVisualState,+ type GraphLabelVisibilityPolicy,+ type GraphNodeShapeVariant,type GraphNodeVisualState,type GraphTheme,type GraphZoomTier,withAlpha,+ zoomTierAtLeast,} from "./graphTheme";import type { GraphCameraState, GraphInteractionState, GraphLayoutStatus, GraphViewMode } from "./types";import type { GraphPluginRuntime } from "./plugins";@@ -71,6 +77,37 @@ const FOCUS_RING_CAPACITY = GRAPH_THEME.focus.ringCapacity;const FOCUS_RING_GAP = GRAPH_THEME.focus.ringGap;const FOCUS_PRIMARY_LABELS = GRAPH_THEME.focus.primaryLabels;+type ResolvedNodeStyle = {+ color: string;+ size: number;+ forceLabel: boolean;+ label: string;+ zIndex: number;+ hidden: boolean;+ borderColor: string;+ borderSize: number;+ nodeVariant: GraphNodeShapeVariant;+ badgeKind?: GraphBadgeKind;+ badgeCount?: number;+ showBadge: boolean;+ showRing: boolean;+ ringColor?: string;+ showHalo: boolean;+ haloColor: string;+};++type ResolvedEdgeStyle = {+ hidden: boolean;+ type?: "line" | "arrow";+ color?: string;+ size?: number;+ zIndex: number;+ edgeVariant: GraphEdgeVariant;+ arrowVisibilityPolicy: GraphArrowVisibilityPolicy;+ curveStrength: number;+ drawCurvedOverlay: boolean;+};+function buildPathEdgeSet(path: string[]): Set<string> {const edgeIds = new Set<string>();for (let index = 0; index < path.length - 1; index += 1) {@@ -217,21 +254,126 @@ function resolveEdgeVisualState(return "default";}-function resolveNodeStyle(+function resolveNodeVariant(state: GraphNodeVisualState, attrs: NodeAttributes): GraphNodeShapeVariant {+ if (state === "selected") {+ return "selected";+ }++ return attrs.nodeShapeVariant || attrs.nodeVariant || "default";+}++function resolveEdgeVariant(state: GraphEdgeVisualState, attrs: EdgeAttributes): GraphEdgeVariant {+ if (state === "path") {+ return "pathSignal";+ }++ if (attrs.edgeVariant) {+ return attrs.edgeVariant;+ }++ if (attrs.isBidirectional) {+ return "bidirectionalCurve";+ }++ if (attrs.arrowVisibilityPolicy === "contextual") {+ return "directional";+ }++ return "line";+}++function shouldForceNodeLabel(theme: GraphTheme,zoomTier: GraphZoomTier,state: GraphNodeVisualState,attrs: NodeAttributes,- label: string,+ labelPriority: number,+): boolean {+ const tierConfig = theme.zoomTiers[zoomTier];+ const forceVisibleState = theme.labels.forceVisibleStates.includes(state);+ const policy = attrs.labelVisibilityPolicy || "priority";++ if (forceVisibleState || theme.nodes.states[state].forceLabel) {+ return true;+ }++ switch (policy as GraphLabelVisibilityPolicy) {+ case "always":+ return true;+ case "local":+ return zoomTier !== "overview" && state !== "default" && state !== "muted" && state !== "inactive";+ case "priority":+ return labelPriority >= tierConfig.labelThreshold;+ case "none":+ default:+ return false;+ }+}++function resolveNodeBorderColor(+ theme: GraphTheme,+ state: GraphNodeVisualState,+ variant: GraphNodeShapeVariant,+ attrs: NodeAttributes,+ baseColor: string,) {+ if (state === "selected" || variant === "selected") {+ return attrs.ringColor || theme.nodes.selectedRing.color;+ }+ if (state === "hovered") {+ return theme.palette.accent.hovered;+ }+ if (state === "path") {+ return theme.palette.accent.path;+ }+ if (state === "muted" || state === "inactive") {+ return withAlpha(attrs.strokeColor || attrs.borderColor || theme.palette.background.nodeBorder, 0.7);+ }++ if (variant === "temporal") {+ return theme.palette.accent.temporal;+ }+ if (variant === "provenance") {+ return theme.palette.accent.provenance;+ }+ if (variant === "inferred") {+ return theme.palette.accent.inferred;+ }++ return attrs.strokeColor || attrs.borderColor || theme.palette.background.nodeBorder || baseColor;+}++function resolveNodeElementStyle(+ theme: GraphTheme,+ zoomTier: GraphZoomTier,+ state: GraphNodeVisualState,+ attrs: NodeAttributes,+ label: string,+): ResolvedNodeStyle {const tierConfig = theme.zoomTiers[zoomTier];const stateConfig = theme.nodes.states[state];+ const nodeVariant = resolveNodeVariant(state, attrs);+ const variantConfig = theme.nodes.variants[nodeVariant];const baseSize = Number(attrs.baseSize || attrs.size || 4);const labelPriority = Number(attrs.labelPriority ?? 0);- const forceVisibleState = theme.labels.forceVisibleStates.includes(state);const color = resolveNodeColor(theme, state, attrs, attrs.color);- const sizeMultiplier = state === "default" ? tierConfig.nodeScale : stateConfig.sizeMultiplier;- const forceLabel = forceVisibleState || stateConfig.forceLabel || labelPriority >= tierConfig.labelThreshold;+ const sizeMultiplier = (state === "default" ? tierConfig.nodeScale : stateConfig.sizeMultiplier) * variantConfig.sizeMultiplier;+ const forceLabel = shouldForceNodeLabel(theme, zoomTier, state, attrs, labelPriority);+ const badgeKind = attrs.badgeKind || variantConfig.badgeKind;+ const forceVisibleState = theme.labels.forceVisibleStates.includes(state);+ const showBadge = Boolean(+ badgeKind+ && (forceVisibleState || (tierConfig.showBadges && zoomTierAtLeast(zoomTier, variantConfig.badgeVisibleFrom)))+ && state !== "muted"+ && state !== "inactive",+ );+ const showRing = state === "selected" && zoomTierAtLeast(zoomTier, theme.nodes.selectedRing.visibleFrom);+ const showHalo = state === "hovered" || state === "selected" || state === "path";+ const strokeBase = state === "muted" || state === "inactive"+ ? theme.nodes.strokeHierarchy[zoomTier].muted+ : forceVisibleState+ ? theme.nodes.strokeHierarchy[zoomTier].emphasis+ : theme.nodes.strokeHierarchy[zoomTier].base;return {color,@@ -240,8 +382,19 @@ function resolveNodeStyle(label: forceLabel ? label : "",zIndex: forceLabel && stateConfig.zIndex === 0 ? 1 : stateConfig.zIndex,hidden: false,- borderColor: attrs.strokeColor || attrs.borderColor || theme.palette.background.nodeBorder,- borderSize: attrs.borderSize,+ borderColor: resolveNodeBorderColor(theme, state, nodeVariant, attrs, color),+ borderSize: Math.max(+ 0.4,+ Number(attrs.borderSize ?? 0.85) + strokeBase + stateConfig.borderBoost + variantConfig.borderBoost - 0.8,+ ),+ nodeVariant,+ badgeKind,+ badgeCount: attrs.badgeCount,+ showBadge,+ showRing,+ ringColor: attrs.ringColor || theme.nodes.selectedRing.color,+ showHalo,+ haloColor: attrs.haloColor || attrs.glowColor || withAlpha(color, theme.overlays.hoverGlowAlpha + variantConfig.haloBoost),};}@@ -249,54 +402,70 @@ function resolveEdgeType(theme: GraphTheme,zoomTier: GraphZoomTier,state: GraphEdgeVisualState,+ variant: GraphEdgeVariant,attrs: EdgeAttributes,-) {- if (theme.edges.states[state].forceArrow) {+): "line" | "arrow" {+ const variantConfig = theme.edges.variants[variant];++ if (theme.edges.states[state].forceArrow || variantConfig.arrowPolicy === "always") {return "arrow";}- if (state === "neighbor") {- return zoomTier === "inspection" || Boolean(attrs.isBidirectional) ? "arrow" : "line";+ if (variantConfig.arrowPolicy === "contextual" && theme.zoomTiers[zoomTier].showContextualArrows) {+ return "arrow";}if (state !== "default") {- return attrs.type || "line";+ return (attrs.type as "line" | "arrow" | undefined) || variantConfig.baseType;}- return Number(attrs.visualPriority ?? 0) >= theme.zoomTiers[zoomTier].arrowPriorityThreshold || Boolean(attrs.isBidirectional)+ return Number(attrs.visualPriority ?? 0) >= theme.zoomTiers[zoomTier].arrowPriorityThreshold && theme.zoomTiers[zoomTier].showContextualArrows? "arrow": "line";}-function resolveEdgeStyle(+function resolveEdgeElementStyle(theme: GraphTheme,zoomTier: GraphZoomTier,state: GraphEdgeVisualState,attrs: EdgeAttributes,-) {+): ResolvedEdgeStyle {const tierConfig = theme.zoomTiers[zoomTier];const stateConfig = theme.edges.states[state];+ const edgeVariant = resolveEdgeVariant(state, attrs);+ const variantConfig = theme.edges.variants[edgeVariant];const baseSize = Number(attrs.baseSize || attrs.size || 0.9);const visualPriority = Number(attrs.visualPriority ?? 0);const belowPriorityThreshold = state === "default"&& visualPriority < tierConfig.edgePriorityThreshold- && !attrs.isBidirectional;+ && edgeVariant === "line";if (stateConfig.hide || belowPriorityThreshold) {return {hidden: true,zIndex: 0,+ edgeVariant,+ arrowVisibilityPolicy: variantConfig.arrowPolicy,+ curveStrength: variantConfig.curveStrength,+ drawCurvedOverlay: false,};}- const sizeMultiplier = state === "default" ? tierConfig.edgeSizeScale : stateConfig.sizeMultiplier;+ const sizeMultiplier = (state === "default" ? tierConfig.edgeSizeScale : stateConfig.sizeMultiplier) * variantConfig.sizeMultiplier;+ const drawCurvedOverlay = tierConfig.showCurves+ && (edgeVariant === "bidirectionalCurve" || edgeVariant === "parallelCurve" || edgeVariant === "pathSignal")+ && zoomTier !== "overview";return {hidden: false,- type: resolveEdgeType(theme, zoomTier, state, attrs),+ type: resolveEdgeType(theme, zoomTier, state, edgeVariant, attrs),color: resolveEdgeColor(theme, state, attrs, attrs.color),size: Math.max(baseSize * sizeMultiplier, stateConfig.minSize),zIndex: stateConfig.zIndex,+ edgeVariant,+ arrowVisibilityPolicy: variantConfig.arrowPolicy,+ curveStrength: variantConfig.curveStrength,+ drawCurvedOverlay,};}@@ -320,7 +489,7 @@ function createFocusedGraph(nodeId: string, activePath: string[]): Graph<NodeAtt};const selectedAttrs = graph.getNodeAttributes(nodeId) as NodeAttributes;- const selectedState = resolveNodeStyle(GRAPH_THEME, "inspection", "selected", selectedAttrs, selectedAttrs.label);+ const selectedState = resolveNodeElementStyle(GRAPH_THEME, "inspection", "selected", selectedAttrs, selectedAttrs.label);addNode(nodeId, {...selectedAttrs,x: 0,@@ -345,7 +514,7 @@ function createFocusedGraph(nodeId: string, activePath: string[]): Graph<NodeAtt: labelledNeighborIds.has(neighborId)? "neighbor": "default";- const style = resolveNodeStyle(+ const style = resolveNodeElementStyle(GRAPH_THEME,"inspection",visualState,@@ -379,7 +548,7 @@ function createFocusedGraph(nodeId: string, activePath: string[]): Graph<NodeAtt: source === nodeId || target === nodeId? "selected": "neighbor";- const style = resolveEdgeStyle(GRAPH_THEME, "inspection", state, attrs);+ const style = resolveEdgeElementStyle(GRAPH_THEME, "inspection", state, attrs);focused.mergeDirectedEdge(source, target, {...attrs,type: style.type,@@ -392,6 +561,120 @@ function createFocusedGraph(nodeId: string, activePath: string[]): Graph<NodeAttreturn focused;}+function drawGlowHalo(+ context: CanvasRenderingContext2D,+ x: number,+ y: number,+ radius: number,+ color: string,+) {+ const gradient = context.createRadialGradient(x, y, 0, x, y, radius);+ gradient.addColorStop(0, color);+ gradient.addColorStop(1, "rgba(0,0,0,0)");+ context.fillStyle = gradient;+ context.beginPath();+ context.arc(x, y, radius, 0, Math.PI * 2);+ context.fill();+}++function drawNodeRing(+ context: CanvasRenderingContext2D,+ x: number,+ y: number,+ radius: number,+ color: string,+ width: number,+ glowAlpha: number,+) {+ context.strokeStyle = withAlpha(color, glowAlpha);+ context.lineWidth = width * 2.4;+ context.beginPath();+ context.arc(x, y, radius + width * 1.9, 0, Math.PI * 2);+ context.stroke();++ context.strokeStyle = color;+ context.lineWidth = width;+ context.beginPath();+ context.arc(x, y, radius + width * 1.45, 0, Math.PI * 2);+ context.stroke();+}++function drawNodeBadge(+ context: CanvasRenderingContext2D,+ x: number,+ y: number,+ nodeRadius: number,+ badgeKind: GraphBadgeKind,+ badgeCount: number | undefined,+) {+ const badgeTheme = GRAPH_THEME.nodes.badges[badgeKind];+ const radius = GRAPH_THEME.nodes.badge.radius;+ const offset = GRAPH_THEME.nodes.badge.offset;+ const badgeX = x + Math.max(nodeRadius * 0.62, radius + offset);+ const badgeY = y - Math.max(nodeRadius * 0.62, radius + offset);++ drawGlowHalo(+ context,+ badgeX,+ badgeY,+ GRAPH_THEME.overlays.badgeGlowRadius,+ withAlpha(badgeTheme.color, GRAPH_THEME.nodes.badge.glowAlpha),+ );++ context.fillStyle = badgeTheme.color;+ context.beginPath();+ context.arc(badgeX, badgeY, radius, 0, Math.PI * 2);+ context.fill();++ context.strokeStyle = GRAPH_THEME.nodes.badge.stroke;+ context.lineWidth = 1;+ context.beginPath();+ context.arc(badgeX, badgeY, radius, 0, Math.PI * 2);+ context.stroke();++ context.fillStyle = GRAPH_THEME.nodes.badge.textColor;+ context.font = `700 ${GRAPH_THEME.nodes.badge.fontSize}px Inter, system-ui, sans-serif`;+ context.textAlign = "center";+ context.textBaseline = "middle";+ const label = badgeKind === "provenance" && badgeCount && badgeCount > 1+ ? String(Math.min(9, badgeCount))+ : badgeTheme.label;+ context.fillText(label, badgeX, badgeY + 0.5);+}++function drawCurvedEdge(+ context: CanvasRenderingContext2D,+ source: { x: number; y: number },+ target: { x: number; y: number },+ color: string,+ width: number,+ curvature: number,+ glowAlpha: number,+) {+ const dx = target.x - source.x;+ const dy = target.y - source.y;+ const length = Math.max(Math.hypot(dx, dy), 1);+ const nx = -dy / length;+ const ny = dx / length;+ const curveOffset = length * curvature;+ const controlX = (source.x + target.x) / 2 + nx * curveOffset;+ const controlY = (source.y + target.y) / 2 + ny * curveOffset;++ context.strokeStyle = withAlpha(color, glowAlpha);+ context.lineWidth = width + GRAPH_THEME.overlays.curveGlowWidth;+ context.beginPath();+ context.moveTo(source.x, source.y);+ context.quadraticCurveTo(controlX, controlY, target.x, target.y);+ context.stroke();++ context.strokeStyle = color;+ context.lineWidth = width;+ context.beginPath();+ context.moveTo(source.x, source.y);+ context.quadraticCurveTo(controlX, controlY, target.x, target.y);+ context.stroke();+}+function applySceneState(sigma: Sigma,interactionState: GraphInteractionState,@@ -405,7 +688,7 @@ function applySceneState(sigma.setSetting("nodeReducer", (node, data) => {const attrs = data as NodeAttributes;const state = resolveNodeVisualState(node, hoveredNodeId, selectedNodeId, focusIds, pathNodeIds);- const style = resolveNodeStyle(GRAPH_THEME, zoomTier, state, attrs, data.label);+ const style = resolveNodeElementStyle(GRAPH_THEME, zoomTier, state, attrs, data.label);return {...data,@@ -424,7 +707,7 @@ function applySceneState(const attrs = data as EdgeAttributes;const [source, target] = graph.extremities(edge);const state = resolveEdgeVisualState(source, target, hoveredNodeId, selectedNodeId, focusIds, pathEdgeIds);- const style = resolveEdgeStyle(GRAPH_THEME, zoomTier, state, attrs);+ const style = resolveEdgeElementStyle(GRAPH_THEME, zoomTier, state, attrs);return {...data,@@ -729,33 +1012,103 @@ export const GraphCanvas = forwardRef<GraphCanvasHandle, GraphCanvasProps>(context.clearRect(0, 0, rect.width, rect.height);const primaryNodeId = interactionState.hoveredNodeId || interactionState.selectedNodeId;- const nodesToGlow = new Set<string>([- ...interactionState.activePath,+ const focusIds = primaryNodeId && graph.hasNode(primaryNodeId) ? buildFocusSet(primaryNodeId) : new Set<string>();+ const pathNodeIds = new Set(interactionState.activePath);+ const edgePairs = buildPathEdgeSet(interactionState.activePath);+ const nodesToDecorate = new Set<string>([+ ...focusIds,+ ...pathNodeIds,...(primaryNodeId ? [primaryNodeId] : []),]);- const edgePairs = buildPathEdgeSet(interactionState.activePath);const now = performance.now() / 1000;- nodesToGlow.forEach((nodeId) => {+ nodesToDecorate.forEach((nodeId) => {const displayData = sigma.getNodeDisplayData(nodeId);if (!displayData) return;+ const attrs = graph.getNodeAttributes(nodeId) as NodeAttributes;+ const state = resolveNodeVisualState(nodeId, interactionState.hoveredNodeId, interactionState.selectedNodeId, focusIds, pathNodeIds);+ const style = resolveNodeElementStyle(GRAPH_THEME, interactionState.zoomTier, state, attrs, attrs.label);const point = sigma.graphToViewport({ x: displayData.x, y: displayData.y });- const glowColor = nodeId === primaryNodeId- ? withAlpha(GRAPH_THEME.palette.accent.hovered, GRAPH_THEME.overlays.hoverGlowAlpha)- : withAlpha(GRAPH_THEME.palette.accent.path, GRAPH_THEME.overlays.pathGlowAlpha);- const radius = Math.max(- displayData.size * GRAPH_THEME.overlays.glowRadiusMultiplier,- GRAPH_THEME.overlays.minGlowRadius,- );- const gradient = context.createRadialGradient(point.x, point.y, 0, point.x, point.y, radius);- gradient.addColorStop(0, glowColor);- gradient.addColorStop(1, "rgba(0,0,0,0)");- context.fillStyle = gradient;- context.beginPath();- context.arc(point.x, point.y, radius, 0, Math.PI * 2);- context.fill();+ if (style.showHalo) {+ const radius = Math.max(+ displayData.size * GRAPH_THEME.overlays.glowRadiusMultiplier * (style.nodeVariant === "selected" ? 1.08 : 1),+ GRAPH_THEME.overlays.minGlowRadius,+ );+ drawGlowHalo(+ context,+ point.x,+ point.y,+ radius,+ withAlpha(+ style.haloColor,+ nodeId === primaryNodeId ? GRAPH_THEME.overlays.hoverGlowAlpha : GRAPH_THEME.overlays.pathGlowAlpha,+ ),+ );+ }++ if (style.showRing) {+ drawNodeRing(+ context,+ point.x,+ point.y,+ displayData.size,+ style.ringColor || GRAPH_THEME.nodes.selectedRing.color,+ GRAPH_THEME.nodes.selectedRing.width,+ GRAPH_THEME.nodes.selectedRing.glowAlpha,+ );+ }++ if (style.showBadge && style.badgeKind) {+ drawNodeBadge(context, point.x, point.y, displayData.size, style.badgeKind, style.badgeCount);+ }});+ if (GRAPH_THEME.zoomTiers[interactionState.zoomTier].showCurves && primaryNodeId) {+ const drawnPairs = new Set<string>();+ focusIds.forEach((sourceId) => {+ focusIds.forEach((targetId) => {+ if (sourceId >= targetId) {+ return;+ }+ if (!graph.hasDirectedEdge(sourceId, targetId) || !graph.hasDirectedEdge(targetId, sourceId)) {+ return;+ }++ const pairKey = [sourceId, targetId].sort().join("::");+ if (drawnPairs.has(pairKey)) {+ return;+ }+ drawnPairs.add(pairKey);++ const sourceData = sigma.getNodeDisplayData(sourceId);+ const targetData = sigma.getNodeDisplayData(targetId);+ if (!sourceData || !targetData) {+ return;+ }++ const attrs = graph.getDirectedEdgeAttributes(sourceId, targetId) as EdgeAttributes;+ const state: GraphEdgeVisualState =+ sourceId === primaryNodeId || targetId === primaryNodeId+ ? interactionState.hoveredNodeId ? "hovered" : "selected"+ : "neighbor";+ const style = resolveEdgeElementStyle(GRAPH_THEME, interactionState.zoomTier, state, attrs);+ if (!style.drawCurvedOverlay || !style.color || !style.size) {+ return;+ }++ drawCurvedEdge(+ context,+ sigma.graphToViewport({ x: sourceData.x, y: sourceData.y }),+ sigma.graphToViewport({ x: targetData.x, y: targetData.y }),+ style.color,+ Math.max(style.size, GRAPH_THEME.overlays.curveLineWidth),+ style.curveStrength,+ GRAPH_THEME.edges.variants.bidirectionalCurve.glowAlpha,+ );+ });+ });+ }+if (interactionState.activePath.length > 1) {for (let index = 0; index < interactionState.activePath.length - 1; index += 1) {const sourceId = interactionState.activePath[index];@@ -766,6 +1119,26 @@ export const GraphCanvas = forwardRef<GraphCanvasHandle, GraphCanvasProps>(if (!sourceData || !targetData) continue;const source = sigma.graphToViewport({ x: sourceData.x, y: sourceData.y });const target = sigma.graphToViewport({ x: targetData.x, y: targetData.y });+ const attrs = graph.hasDirectedEdge(sourceId, targetId)+ ? (graph.getDirectedEdgeAttributes(sourceId, targetId) as EdgeAttributes)+ : ({+ baseColor: GRAPH_THEME.palette.accent.path,+ baseSize: 1.2,+ edgeVariant: "pathSignal",+ arrowVisibilityPolicy: "always",+ } as EdgeAttributes);+ const pathStyle = resolveEdgeElementStyle(GRAPH_THEME, interactionState.zoomTier, "path", attrs);+ if (pathStyle.color && pathStyle.size) {+ drawCurvedEdge(+ context,+ source,+ target,+ pathStyle.color,+ Math.max(pathStyle.size, GRAPH_THEME.overlays.curveLineWidth + 0.4),+ pathStyle.curveStrength || GRAPH_THEME.edges.variants.pathSignal.curveStrength,+ GRAPH_THEME.edges.variants.pathSignal.glowAlpha,+ );+ }const t = ((now * 0.22) + index * 0.17) % 1;const x = source.x + (target.x - source.x) * t;const y = source.y + (target.y - source.y) * t;diff --git a/semantica-explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx b/semantica-explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsxindex 6ee2c89d..9dbaef59 100644--- a/semantica-explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx+++ b/semantica-explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx@@ -1,6 +1,7 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { batchMergeEdges, batchMergeNodes, graph } from "../../store/graphStore";+import type { EdgeAttributes, NodeAttributes } from "../../store/graphStore";import { GraphCanvas } from "./GraphCanvas";import type { GraphCanvasHandle, GraphViewMode } from "./GraphCanvas";import { TimelinePanel } from "./TimelinePanel";@@ -49,6 +50,8 @@ type TemporalBounds = {max?: string | null;};+const PROVENANCE_KEYS = ["source", "source_url", "pmid", "pmids", "evidence", "provenance", "confidence"] as const;+function useDebounce<T>(value: T, delay: number): T {const [debouncedValue, setDebouncedValue] = useState<T>(value);useEffect(() => {@@ -279,12 +282,95 @@ function LoadingOverlay({}function sourceAttribution(properties: Record<string, unknown>) {- const keys = ["source", "source_url", "pmid", "pmids", "evidence", "provenance", "confidence"];- return keys+ return PROVENANCE_KEYS.filter((key) => key in properties).map((key) => ({ key, value: properties[key] }));}+function getProvenanceCount(properties: Record<string, unknown>) {+ return PROVENANCE_KEYS.reduce(+ (count, key) => (properties[key] !== undefined && properties[key] !== null ? count + 1 : count),+ 0,+ );+}++function buildRealtimeNodeAttributes(payload: {+ id: string;+ type?: string;+ properties?: Record<string, unknown>;+}): NodeAttributes {+ const properties = payload.properties || {};+ const label = String(properties.content || payload.id);+ const baseColor = GRAPH_THEME.palette.accent.path;+ const hasTemporalBounds = Boolean(properties.valid_from || properties.valid_until);+ const provenanceCount = getProvenanceCount(properties);++ return {+ label,+ x: Number(properties.x ?? Math.random() * 1000 - 500),+ y: Number(properties.y ?? Math.random() * 1000 - 500),+ nodeType: payload.type || "inferred",+ content: label,+ valid_from: (properties.valid_from as string | null | undefined) ?? null,+ valid_until: (properties.valid_until as string | null | undefined) ?? null,+ properties,+ size: 8,+ baseSize: 8,+ semanticGroup: payload.type || "inferred",+ color: baseColor,+ baseColor,+ mutedColor: withAlpha(baseColor, GRAPH_THEME.nodes.mutedAlpha),+ glowColor: withAlpha(baseColor, 0.36),+ visualPriority: 0.82,+ labelPriority: 0.82,+ strokeColor: GRAPH_THEME.palette.background.nodeBorder,+ borderColor: GRAPH_THEME.palette.background.nodeBorder,+ borderSize: 0.85,+ nodeVariant: "inferred",+ nodeShapeVariant: "inferred",+ badgeKind: hasTemporalBounds ? "temporal" : provenanceCount > 0 ? "provenance" : "inferred",+ badgeCount: provenanceCount || undefined,+ ringColor: GRAPH_THEME.nodes.selectedRing.color,+ haloColor: withAlpha(baseColor, 0.42),+ labelVisibilityPolicy: "local",+ };+}++function buildRealtimeEdgeAttributes(payload: {+ source_id: string;+ target_id: string;+ type?: string;+ weight?: number;+ properties?: Record<string, unknown>;+}): EdgeAttributes {+ const properties = payload.properties || {};+ const isInferred = Boolean(properties.inferred);+ const isBidirectional = graph.hasDirectedEdge(payload.target_id, payload.source_id);+ const baseColor = isInferred ? GRAPH_THEME.palette.accent.path : GRAPH_THEME.palette.muted.edgeStructure;++ return {+ weight: Number(payload.weight ?? 1),+ edgeType: payload.type || "related_to",+ properties,+ size: 1,+ baseSize: 1,+ color: baseColor,+ baseColor,+ mutedColor: GRAPH_THEME.palette.muted.edgeOverview,+ visualPriority: isInferred ? 0.95 : 0.5,+ isBidirectional,+ edgeFamily: isInferred ? "path" : isBidirectional ? "bidirectional" : "line",+ curveGroup: isBidirectional ? [payload.source_id, payload.target_id].sort().join("::") : null,+ type: "line",+ edgeVariant: isInferred ? "pathSignal" : isBidirectional ? "bidirectionalCurve" : "directional",+ arrowVisibilityPolicy: isInferred ? "always" : "contextual",+ relationshipStrength: isInferred ? 0.95 : 0.52,+ isParallelPair: false,+ parallelIndex: 0,+ parallelCount: 1,+ };+}+function buildSelectedNodeState(nodeId: string): GraphSelectedNodeState | null {if (!nodeId || !graph.hasNode(nodeId)) {return null;@@ -837,28 +923,7 @@ export function GraphWorkspace() {batchMergeNodes([{id: payload.id,- attributes: {- label: payload.properties?.content || payload.id,- x: Number(payload.properties?.x ?? Math.random() * 1000 - 500),- y: Number(payload.properties?.y ?? Math.random() * 1000 - 500),- nodeType: payload.type,- content: payload.properties?.content || payload.id,- valid_from: payload.properties?.valid_from ?? null,- valid_until: payload.properties?.valid_until ?? null,- properties: payload.properties || {},- size: 8,- baseSize: 8,- semanticGroup: payload.type || "inferred",- color: GRAPH_THEME.palette.accent.path,- baseColor: GRAPH_THEME.palette.accent.path,- mutedColor: withAlpha(GRAPH_THEME.palette.accent.path, GRAPH_THEME.nodes.mutedAlpha),- glowColor: withAlpha(GRAPH_THEME.palette.accent.path, 0.36),- visualPriority: 0.82,- labelPriority: 0.82,- strokeColor: GRAPH_THEME.palette.background.nodeBorder,- borderColor: GRAPH_THEME.palette.background.nodeBorder,- borderSize: 0.85,- },+ attributes: buildRealtimeNodeAttributes(payload),},]);canvasRef.current?.getSigma()?.refresh();@@ -868,27 +933,7 @@ export function GraphWorkspace() {{source: payload.source_id,target: payload.target_id,- attributes: {- weight: Number(payload.weight ?? 1),- edgeType: payload.type,- properties: payload.properties || {},- size: 1,- baseSize: 1,- color: payload.properties?.inferred ? GRAPH_THEME.palette.accent.path : GRAPH_THEME.palette.muted.edgeStructure,- baseColor: payload.properties?.inferred ? GRAPH_THEME.palette.accent.path : GRAPH_THEME.palette.muted.edgeStructure,- mutedColor: GRAPH_THEME.palette.muted.edgeOverview,- visualPriority: payload.properties?.inferred ? 0.95 : 0.5,- isBidirectional: graph.hasDirectedEdge(payload.target_id, payload.source_id),- edgeFamily: payload.properties?.inferred- ? "path"- : graph.hasDirectedEdge(payload.target_id, payload.source_id)- ? "bidirectional"- : "line",- curveGroup: graph.hasDirectedEdge(payload.target_id, payload.source_id)- ? [payload.source_id, payload.target_id].sort().join("::")- : null,- type: payload.properties?.inferred ? "arrow" : "line",- },+ attributes: buildRealtimeEdgeAttributes(payload),},]);canvasRef.current?.getSigma()?.refresh();diff --git a/semantica-explorer/src/workspaces/GraphWorkspace/graphTheme.ts b/semantica-explorer/src/workspaces/GraphWorkspace/graphTheme.tsindex 7bc55998..0e4e5c72 100644--- a/semantica-explorer/src/workspaces/GraphWorkspace/graphTheme.ts+++ b/semantica-explorer/src/workspaces/GraphWorkspace/graphTheme.ts@@ -1,6 +1,14 @@export type GraphZoomTier = "overview" | "structure" | "inspection";export type GraphNodeVisualState = "default" | "hovered" | "selected" | "neighbor" | "path" | "inactive" | "muted";export type GraphEdgeVisualState = "default" | "hovered" | "selected" | "neighbor" | "path" | "inactive" | "muted";+export type GraphNodeShapeVariant = "default" | "temporal" | "inferred" | "provenance" | "selected";+export type GraphEdgeVariant = "line" | "directional" | "bidirectionalCurve" | "parallelCurve" | "pathSignal";+export type GraphArrowVisibilityPolicy = "hidden" | "contextual" | "always";+export type GraphLabelVisibilityPolicy = "none" | "priority" | "local" | "always";+export type GraphBadgeKind = "inferred" | "temporal" | "provenance";++type GraphNodeColorMode = "base" | "selected" | "hovered" | "path" | "muted";+type GraphEdgeColorMode = "overview" | "structure" | "inspection" | "hover" | "path" | "focus" | "muted";export interface GraphTheme {palette: {@@ -9,6 +17,9 @@ export interface GraphTheme {selected: string;hovered: string;path: string;+ temporal: string;+ provenance: string;+ inferred: string;};muted: {fallback: string;@@ -36,30 +47,75 @@ export interface GraphTheme {edgePriorityThreshold: number;arrowPriorityThreshold: number;edgeSizeScale: number;+ showBadges: boolean;+ showCurves: boolean;+ showContextualArrows: boolean;}>;labels: {forceVisibleStates: readonly GraphNodeVisualState[];+ policies: Record<GraphLabelVisibilityPolicy, {+ minZoomTier: GraphZoomTier;+ }>;};nodes: {backgroundScale: number;mutedAlpha: number;+ strokeHierarchy: Record<GraphZoomTier, {+ base: number;+ emphasis: number;+ muted: number;+ }>;states: Record<GraphNodeVisualState, {- color: "base" | "selected" | "hovered" | "path" | "muted";+ color: GraphNodeColorMode;sizeMultiplier: number;minSize: number;forceLabel: boolean;zIndex: number;+ borderBoost: number;+ }>;+ variants: Record<GraphNodeShapeVariant, {+ sizeMultiplier: number;+ borderBoost: number;+ haloBoost: number;+ badgeKind?: GraphBadgeKind;+ badgeVisibleFrom: GraphZoomTier;}>;+ selectedRing: {+ color: string;+ width: number;+ glowAlpha: number;+ visibleFrom: GraphZoomTier;+ };+ badges: Record<GraphBadgeKind, {+ color: string;+ label: string;+ }>;+ badge: {+ radius: number;+ offset: number;+ fontSize: number;+ textColor: string;+ background: string;+ stroke: string;+ glowAlpha: number;+ };};edges: {states: Record<GraphEdgeVisualState, {- color: "overview" | "structure" | "inspection" | "hover" | "path" | "focus" | "muted";+ color: GraphEdgeColorMode;sizeMultiplier: number;minSize: number;zIndex: number;forceArrow: boolean;hide: boolean;}>;+ variants: Record<GraphEdgeVariant, {+ baseType: "line" | "arrow";+ arrowPolicy: GraphArrowVisibilityPolicy;+ curveStrength: number;+ sizeMultiplier: number;+ glowAlpha: number;+ }>;};overlays: {hoverGlowAlpha: number;@@ -67,6 +123,9 @@ export interface GraphTheme {glowRadiusMultiplier: number;minGlowRadius: number;pulseRadius: number;+ curveLineWidth: number;+ curveGlowWidth: number;+ badgeGlowRadius: number;};focus: {maxNeighbors: number;@@ -95,6 +154,9 @@ export const GRAPH_THEME: GraphTheme = {selected: "#FFC857",hovered: "#7FE0FF",path: "#FFB870",+ temporal: "#6DD6FF",+ provenance: "#A98CFF",+ inferred: "#FF9A61",},muted: {fallback: "rgba(130, 145, 165, 0.12)",@@ -123,6 +185,9 @@ export const GRAPH_THEME: GraphTheme = {edgePriorityThreshold: 0.72,arrowPriorityThreshold: Number.POSITIVE_INFINITY,edgeSizeScale: 0.72,+ showBadges: false,+ showCurves: false,+ showContextualArrows: false,},structure: {maxRatio: 1.2,@@ -132,6 +197,9 @@ export const GRAPH_THEME: GraphTheme = {edgePriorityThreshold: 0.4,arrowPriorityThreshold: 0.75,edgeSizeScale: 0.92,+ showBadges: true,+ showCurves: true,+ showContextualArrows: true,},inspection: {maxRatio: 0.5,@@ -141,22 +209,63 @@ export const GRAPH_THEME: GraphTheme = {edgePriorityThreshold: 0,arrowPriorityThreshold: 0.58,edgeSizeScale: 1.04,+ showBadges: true,+ showCurves: true,+ showContextualArrows: true,},},labels: {forceVisibleStates: ["hovered", "selected", "neighbor", "path"],+ policies: {+ none: { minZoomTier: "inspection" },+ priority: { minZoomTier: "overview" },+ local: { minZoomTier: "structure" },+ always: { minZoomTier: "overview" },+ },},nodes: {backgroundScale: 0.52,mutedAlpha: 0.12,+ strokeHierarchy: {+ overview: { base: 0.8, emphasis: 1.2, muted: 0.45 },+ structure: { base: 1.05, emphasis: 1.45, muted: 0.55 },+ inspection: { base: 1.2, emphasis: 1.7, muted: 0.6 },+ },states: {- default: { color: "base", sizeMultiplier: 1, minSize: 1.45, forceLabel: false, zIndex: 0 },- hovered: { color: "hovered", sizeMultiplier: 1.34, minSize: 16, forceLabel: true, zIndex: 4 },- selected: { color: "selected", sizeMultiplier: 1.18, minSize: 12, forceLabel: true, zIndex: 3 },- neighbor: { color: "base", sizeMultiplier: 1.08, minSize: 7.2, forceLabel: true, zIndex: 2 },- path: { color: "path", sizeMultiplier: 1.08, minSize: 7.2, forceLabel: true, zIndex: 2 },- inactive: { color: "muted", sizeMultiplier: 0.52, minSize: 0.8, forceLabel: false, zIndex: 0 },- muted: { color: "muted", sizeMultiplier: 0.52, minSize: 0.8, forceLabel: false, zIndex: 0 },+ default: { color: "base", sizeMultiplier: 1, minSize: 1.45, forceLabel: false, zIndex: 0, borderBoost: 0 },+ hovered: { color: "hovered", sizeMultiplier: 1.34, minSize: 16, forceLabel: true, zIndex: 4, borderBoost: 0.5 },+ selected: { color: "selected", sizeMultiplier: 1.18, minSize: 12, forceLabel: true, zIndex: 3, borderBoost: 0.42 },+ neighbor: { color: "base", sizeMultiplier: 1.08, minSize: 7.2, forceLabel: true, zIndex: 2, borderBoost: 0.18 },+ path: { color: "path", sizeMultiplier: 1.08, minSize: 7.2, forceLabel: true, zIndex: 2, borderBoost: 0.24 },+ inactive: { color: "muted", sizeMultiplier: 0.52, minSize: 0.8, forceLabel: false, zIndex: 0, borderBoost: -0.15 },+ muted: { color: "muted", sizeMultiplier: 0.52, minSize: 0.8, forceLabel: false, zIndex: 0, borderBoost: -0.15 },+ },+ variants: {+ default: { sizeMultiplier: 1, borderBoost: 0, haloBoost: 0, badgeVisibleFrom: "inspection" },+ temporal: { sizeMultiplier: 1.02, borderBoost: 0.12, haloBoost: 0.1, badgeKind: "temporal", badgeVisibleFrom: "structure" },+ inferred: { sizeMultiplier: 1.05, borderBoost: 0.16, haloBoost: 0.14, badgeKind: "inferred", badgeVisibleFrom: "structure" },+ provenance: { sizeMultiplier: 1.03, borderBoost: 0.14, haloBoost: 0.12, badgeKind: "provenance", badgeVisibleFrom: "structure" },+ selected: { sizeMultiplier: 1.06, borderBoost: 0.22, haloBoost: 0.16, badgeVisibleFrom: "overview" },+ },+ selectedRing: {+ color: "#FFC857",+ width: 2.4,+ glowAlpha: 0.38,+ visibleFrom: "inspection",+ },+ badges: {+ inferred: { color: "#FF9A61", label: "I" },+ temporal: { color: "#6DD6FF", label: "T" },+ provenance: { color: "#A98CFF", label: "P" },+ },+ badge: {+ radius: 7,+ offset: 3,+ fontSize: 8,+ textColor: "#08111d",+ background: "rgba(8, 17, 29, 0.9)",+ stroke: "rgba(255,255,255,0.2)",+ glowAlpha: 0.34,},},edges: {@@ -169,6 +278,13 @@ export const GRAPH_THEME: GraphTheme = {inactive: { color: "muted", sizeMultiplier: 1, minSize: 0.45, zIndex: 0, forceArrow: false, hide: true },muted: { color: "muted", sizeMultiplier: 1, minSize: 0.45, zIndex: 0, forceArrow: false, hide: true },},+ variants: {+ line: { baseType: "line", arrowPolicy: "hidden", curveStrength: 0, sizeMultiplier: 1, glowAlpha: 0 },+ directional: { baseType: "line", arrowPolicy: "contextual", curveStrength: 0, sizeMultiplier: 1.04, glowAlpha: 0.08 },+ bidirectionalCurve: { baseType: "line", arrowPolicy: "contextual", curveStrength: 0.18, sizeMultiplier: 1.08, glowAlpha: 0.1 },+ parallelCurve: { baseType: "line", arrowPolicy: "contextual", curveStrength: 0.24, sizeMultiplier: 1.1, glowAlpha: 0.12 },+ pathSignal: { baseType: "arrow", arrowPolicy: "always", curveStrength: 0.16, sizeMultiplier: 1.18, glowAlpha: 0.2 },+ },},overlays: {hoverGlowAlpha: 0.26,@@ -176,6 +292,9 @@ export const GRAPH_THEME: GraphTheme = {glowRadiusMultiplier: 4.8,minGlowRadius: 16,pulseRadius: 11,+ curveLineWidth: 1.7,+ curveGlowWidth: 6,+ badgeGlowRadius: 14,},focus: {maxNeighbors: 16,@@ -188,6 +307,8 @@ export const GRAPH_THEME: GraphTheme = {},};+const ZOOM_TIER_ORDER: GraphZoomTier[] = ["overview", "structure", "inspection"];+export function hashString(value: string): number {let hash = 0;for (let index = 0; index < value.length; index += 1) {@@ -262,3 +383,7 @@ export function getZoomTier(ratio: number): GraphZoomTier {}return "overview";}++export function zoomTierAtLeast(current: GraphZoomTier, minimum: GraphZoomTier): boolean {+ return ZOOM_TIER_ORDER.indexOf(current) >= ZOOM_TIER_ORDER.indexOf(minimum);+}diff --git a/semantica-explorer/src/workspaces/GraphWorkspace/useLoadGraph.ts b/semantica-explorer/src/workspaces/GraphWorkspace/useLoadGraph.tsindex 16ed5381..bfba06b4 100644--- a/semantica-explorer/src/workspaces/GraphWorkspace/useLoadGraph.ts+++ b/semantica-explorer/src/workspaces/GraphWorkspace/useLoadGraph.ts@@ -1,7 +1,17 @@import { useQuery, useQueryClient } from "@tanstack/react-query";import { batchMergeEdges, batchMergeNodes, clearGraph } from "../../store/graphStore";import type { EdgeAttributes, NodeAttributes } from "../../store/graphStore";-import { GRAPH_THEME, clamp, darkenHex, hashString, withAlpha } from "./graphTheme";+import {+ GRAPH_THEME,+ clamp,+ darkenHex,+ hashString,+ withAlpha,+ type GraphBadgeKind,+ type GraphEdgeVariant,+ type GraphLabelVisibilityPolicy,+ type GraphNodeShapeVariant,+} from "./graphTheme";const SEMANTIC_COLOR_FIELDS = ["community",@@ -15,6 +25,8 @@ const SEMANTIC_COLOR_FIELDS = ["nodeType",] as const;+const PROVENANCE_KEYS = ["source", "source_url", "pmid", "pmids", "evidence", "provenance", "confidence"] as const;+function getSemanticFieldValue(attributes: NodeAttributes, field: (typeof SEMANTIC_COLOR_FIELDS)[number]): string | null {if (field === "nodeType") {const value = attributes.nodeType;@@ -98,6 +110,87 @@ function structuralColorKey(nodeId: string, attributes: NodeAttributes): stringreturn `${attributes.nodeType || "entity"}:${shard}`;}+function getProvenanceCount(properties: Record<string, unknown>): number {+ return PROVENANCE_KEYS.reduce(+ (count, key) => (properties[key] !== undefined && properties[key] !== null ? count + 1 : count),+ 0,+ );+}++function resolveNodeVariantMetadata(+ baseColor: string,+ sizeRatio: number,+ hasTemporalBounds: boolean,+ provenanceCount: number,+): Pick<+ NodeAttributes,+ "nodeVariant" | "nodeShapeVariant" | "badgeKind" | "badgeCount" | "ringColor" | "haloColor" | "labelVisibilityPolicy"+> {+ let nodeShapeVariant: GraphNodeShapeVariant = "default";+ let badgeKind: GraphBadgeKind | undefined;+ let badgeCount: number | undefined;++ if (hasTemporalBounds) {+ nodeShapeVariant = "temporal";+ badgeKind = "temporal";+ } else if (provenanceCount > 0) {+ nodeShapeVariant = "provenance";+ badgeKind = "provenance";+ badgeCount = provenanceCount;+ }++ let labelVisibilityPolicy: GraphLabelVisibilityPolicy = "none";+ if (sizeRatio >= 0.86) {+ labelVisibilityPolicy = "always";+ } else if (badgeKind) {+ labelVisibilityPolicy = "local";+ } else if (sizeRatio >= 0.56) {+ labelVisibilityPolicy = "priority";+ }++ return {+ nodeVariant: nodeShapeVariant,+ nodeShapeVariant,+ badgeKind,+ badgeCount,+ ringColor: GRAPH_THEME.nodes.selectedRing.color,+ haloColor: withAlpha(baseColor, 0.38),+ labelVisibilityPolicy,+ };+}++function resolveEdgeVariantMetadata(+ edge: ApiEdge,+ sourcePriority: number,+ targetPriority: number,+ isBidirectional: boolean,+): Pick<+ EdgeAttributes,+ "edgeVariant" | "arrowVisibilityPolicy" | "relationshipStrength" | "isParallelPair" | "parallelIndex" | "parallelCount"+> {+ const relationshipStrength = clamp(+ 0.12,+ 0.18 + Math.log(Math.max(Number(edge.weight) || 1, 1)) / Math.log(12),+ 1,+ );++ let edgeVariant: GraphEdgeVariant = "line";+ if (isBidirectional) {+ edgeVariant = "bidirectionalCurve";+ } else if (Math.max(sourcePriority, targetPriority, relationshipStrength) >= 0.58) {+ edgeVariant = "directional";+ }++ return {+ edgeVariant,+ arrowVisibilityPolicy: edgeVariant === "line" ? "hidden" : "contextual",+ relationshipStrength,+ isParallelPair: false,+ parallelIndex: 0,+ parallelCount: 1,+ };+}+interface ApiNode {id: string;type: string;@@ -344,6 +437,8 @@ export function useLoadGraph(options: UseLoadGraphOptions = {}) {const baseColor = GRAPH_THEME.palette.semantic[colorIndex];const sizeRatio = nodePriorityById.get(id) ?? 0;const dynamicSize = clamp(2.6, 2.6 + 12.4 * sizeRatio, 15.8);+ const hasTemporalBounds = Boolean(attributes.valid_from || attributes.valid_until);+ const provenanceCount = getProvenanceCount(attributes.properties ?? {});return {id,attributes: {@@ -360,36 +455,41 @@ export function useLoadGraph(options: UseLoadGraphOptions = {}) {strokeColor: darkenHex(baseColor, 112),borderColor: darkenHex(baseColor, 112),borderSize: 0.85,+ ...resolveNodeVariantMetadata(baseColor, sizeRatio, hasTemporalBounds, provenanceCount),} as NodeAttributes,};});const edgeKeys = new Set(fetchedEdges.map((edge) => `${edge.source}::${edge.target}`));- const edgesToMerge = fetchedEdges.map((edge) => ({- source: edge.source,- target: edge.target,- attributes: {- weight: edge.weight,- edgeType: edge.type,- properties: edge.properties,- size: clamp(0.45, 0.5 + Math.sqrt(Math.max(Number(edge.weight) || 1, 1)) * 0.38, 1.8),- baseSize: clamp(0.45, 0.5 + Math.sqrt(Math.max(Number(edge.weight) || 1, 1)) * 0.38, 1.8),- color: GRAPH_THEME.palette.muted.edgeStructure,- baseColor: GRAPH_THEME.palette.muted.edgeStructure,- mutedColor: GRAPH_THEME.palette.muted.edgeOverview,- visualPriority: Math.max(- nodePriorityById.get(edge.source) ?? 0,- nodePriorityById.get(edge.target) ?? 0,- ),- isBidirectional: edgeKeys.has(`${edge.target}::${edge.source}`),- edgeFamily: edgeKeys.has(`${edge.target}::${edge.source}`) ? "bidirectional" : "line",- curveGroup: edgeKeys.has(`${edge.target}::${edge.source}`)- ? [edge.source, edge.target].sort().join("::")- : null,- type: "line",- } as EdgeAttributes,- }));+ const edgesToMerge = fetchedEdges.map((edge) => {+ const sourcePriority = nodePriorityById.get(edge.source) ?? 0;+ const targetPriority = nodePriorityById.get(edge.target) ?? 0;+ const isBidirectional = edgeKeys.has(`${edge.target}::${edge.source}`);++ return {+ source: edge.source,+ target: edge.target,+ attributes: {+ weight: edge.weight,+ edgeType: edge.type,+ properties: edge.properties,+ size: clamp(0.45, 0.5 + Math.sqrt(Math.max(Number(edge.weight) || 1, 1)) * 0.38, 1.8),+ baseSize: clamp(0.45, 0.5 + Math.sqrt(Math.max(Number(edge.weight) || 1, 1)) * 0.38, 1.8),+ color: GRAPH_THEME.palette.muted.edgeStructure,+ baseColor: GRAPH_THEME.palette.muted.edgeStructure,+ mutedColor: GRAPH_THEME.palette.muted.edgeOverview,+ visualPriority: Math.max(sourcePriority, targetPriority),+ isBidirectional,+ edgeFamily: isBidirectional ? "bidirectional" : "line",+ curveGroup: isBidirectional+ ? [edge.source, edge.target].sort().join("::")+ : null,+ type: "line",+ ...resolveEdgeVariantMetadata(edge, sourcePriority, targetPriority, isBidirectional),+ } as EdgeAttributes,+ };+ });onProgress?.({phase: "rendering",diff --git a/semantica/static/assets/DecisionWorkspace-CktNCxAs.js b/semantica/static/assets/DecisionWorkspace-mGJIv1Kf.jssimilarity index 97%rename from semantica/static/assets/DecisionWorkspace-CktNCxAs.jsrename to semantica/static/assets/DecisionWorkspace-mGJIv1Kf.jsindex 069ef518..0551979f 100644--- a/semantica/static/assets/DecisionWorkspace-CktNCxAs.js+++ b/semantica/static/assets/DecisionWorkspace-mGJIv1Kf.js@@ -1,4 +1,4 @@-import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{i as r}from"./index-BaPyswgU.js";var i=r(),a=t(e(),1),o=n(),s=`+import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{i as r}from"./index-Ba72GzGt.js";var i=r(),a=t(e(),1),o=n(),s=`.glass-panel {background: linear-gradient(135deg, rgba(13,17,23,0.75), rgba(22,27,34,0.6));backdrop-filter: blur(16px) saturate(1.2);diff --git a/semantica/static/assets/DiffMergeWorkspace-DPjvufaw.js b/semantica/static/assets/DiffMergeWorkspace-QlDjz0gB.jssimilarity index 98%rename from semantica/static/assets/DiffMergeWorkspace-DPjvufaw.jsrename to semantica/static/assets/DiffMergeWorkspace-QlDjz0gB.jsindex 46a52bf8..57a53920 100644--- a/semantica/static/assets/DiffMergeWorkspace-DPjvufaw.js+++ b/semantica/static/assets/DiffMergeWorkspace-QlDjz0gB.js@@ -1,4 +1,4 @@-import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{i as r}from"./index-BaPyswgU.js";var i=r(),a=t(e(),1),o=n(),s=`+import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{i as r}from"./index-Ba72GzGt.js";var i=r(),a=t(e(),1),o=n(),s=`.glass-panel {background: linear-gradient(135deg, rgba(13,17,23,0.75), rgba(22,27,34,0.6));backdrop-filter: blur(16px) saturate(1.2);diff --git a/semantica/static/assets/GraphWorkspace-ByOhZMi1.js b/semantica/static/assets/GraphWorkspace-ByOhZMi1.jsnew file mode 100644index 00000000..00165388--- /dev/null+++ b/semantica/static/assets/GraphWorkspace-ByOhZMi1.js@@ -0,0 +1,519 @@+import{a as e,n as t,o as n,r,t as i}from"./jsx-runtime-B3dmMxJS.js";import{t as a}from"./useQuery-BCnvbVXe.js";import{i as o,n as s}from"./index-Ba72GzGt.js";var c=r(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),l=n(t(),1),u=o(),d=c();function f(){let e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(let n in arguments[t])e[n]=arguments[t][n];return e}var p=f;typeof Object.assign==`function`&&(p=Object.assign);function m(e,t,n,r){let i=e._nodes.get(t),a=null;return i&&(a=r===`mixed`?i.out&&i.out[n]||i.undirected&&i.undirected[n]:r===`directed`?i.out&&i.out[n]:i.undirected&&i.undirected[n]),a}function h(e){return typeof e==`object`&&!!e}function g(e){let t;for(t in e)return!1;return!0}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function v(e,t,n){let r={enumerable:!0,configurable:!0};typeof n==`function`?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function y(e){return!(!h(e)||e.attributes&&!Array.isArray(e.attributes))}function b(){let e=Math.floor(Math.random()*256)&255;return()=>e++}function x(){let e=arguments,t=null,n=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(r=t.next(),r.done){t=null;continue}break}while(!0);return r}}}function S(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}var C=class extends Error{constructor(e){super(),this.name=`GraphError`,this.message=e}},w=class e extends C{constructor(t){super(t),this.name=`InvalidArgumentsGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},T=class e extends C{constructor(t){super(t),this.name=`NotFoundGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},E=class e extends C{constructor(t){super(t),this.name=`UsageGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}};function D(e,t){this.key=e,this.attributes=t,this.clear()}D.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function O(e,t){this.key=e,this.attributes=t,this.clear()}O.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function ee(e,t){this.key=e,this.attributes=t,this.clear()}ee.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function k(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}k.prototype.attach=function(){let e=`out`,t=`in`;this.undirected&&(e=t=`undirected`);let n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)},k.prototype.attachMulti=function(){let e=`out`,t=`in`,n=this.source.key,r=this.target.key;this.undirected&&(e=t=`undirected`);let i=this.source[e],a=i[r];if(a===void 0){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}a.previous=this,this.next=a,i[r]=this,this.target[t][n]=this},k.prototype.detach=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),delete this.source[n][t],delete this.target[r][e]},k.prototype.detachMulti=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};var A=0,j=1,M=2,N=3;function P(e,t,n,r,i,a,o){let s,c,l,u;if(r=``+r,n===A){if(s=e._nodes.get(r),!s)throw new T(`Graph.${t}: could not find the "${r}" node in the graph.`);l=i,u=a}else if(n===N){if(i=``+i,c=e._edges.get(i),!c)throw new T(`Graph.${t}: could not find the "${i}" edge in the graph.`);let n=c.source.key,d=c.target.key;if(r===n)s=c.target;else if(r===d)s=c.source;else throw new T(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${n}, ${d}).`);l=a,u=o}else{if(c=e._edges.get(r),!c)throw new T(`Graph.${t}: could not find the "${r}" edge in the graph.`);s=n===j?c.source:c.target,l=i,u=a}return[s,l,u]}function te(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return a.attributes[o]}}function F(e,t,n){e.prototype[t]=function(e,r){let[i]=P(this,t,n,e,r);return i.attributes}}function I(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return a.attributes.hasOwnProperty(o)}}function ne(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=P(this,t,n,e,r,i,a);return o.attributes[s]=c,this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function re(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=P(this,t,n,e,r,i,a);if(typeof c!=`function`)throw new w(`Graph.${t}: updater should be a function.`);let l=o.attributes;return l[s]=c(l[s]),this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function ie(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return delete a.attributes[o],this.emit(`nodeAttributesUpdated`,{key:a.key,type:`remove`,attributes:a.attributes,name:o}),this}}function ae(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(!h(o))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return a.attributes=o,this.emit(`nodeAttributesUpdated`,{key:a.key,type:`replace`,attributes:a.attributes}),this}}function oe(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(!h(o))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return p(a.attributes,o),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`merge`,attributes:a.attributes,data:o}),this}}function se(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(typeof o!=`function`)throw new w(`Graph.${t}: provided updater is not a function.`);return a.attributes=o(a.attributes),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`update`,attributes:a.attributes}),this}}var ce=[{name:e=>`get${e}Attribute`,attacher:te},{name:e=>`get${e}Attributes`,attacher:F},{name:e=>`has${e}Attribute`,attacher:I},{name:e=>`set${e}Attribute`,attacher:ne},{name:e=>`update${e}Attribute`,attacher:re},{name:e=>`remove${e}Attribute`,attacher:ie},{name:e=>`replace${e}Attributes`,attacher:ae},{name:e=>`merge${e}Attributes`,attacher:oe},{name:e=>`update${e}Attributes`,attacher:se}];function L(e){ce.forEach(function({name:t,attacher:n}){n(e,t(`Node`),A),n(e,t(`Source`),j),n(e,t(`Target`),M),n(e,t(`Opposite`),N)})}function R(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes[r]}}function le(e,t,n){e.prototype[t]=function(e){let r;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let i=``+e,a=``+arguments[1];if(r=m(this,i,a,n),!r)throw new T(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,r=this._edges.get(e),!r)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function z(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes.hasOwnProperty(r)}}function B(e,t,n){e.prototype[t]=function(e,r,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=arguments[3],a=m(this,o,s,n),!a)throw new T(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]=i,this.emit(`edgeAttributesUpdated`,{key:a.key,type:`set`,attributes:a.attributes,name:r}),this}}function V(e,t,n){e.prototype[t]=function(e,r,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=arguments[3],a=m(this,o,s,n),!a)throw new T(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof i!=`function`)throw new w(`Graph.${t}: updater should be a function.`);return a.attributes[r]=i(a.attributes[r]),this.emit(`edgeAttributesUpdated`,{key:a.key,type:`set`,attributes:a.attributes,name:r}),this}}function ue(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete i.attributes[r],this.emit(`edgeAttributesUpdated`,{key:i.key,type:`remove`,attributes:i.attributes,name:r}),this}}function de(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!h(r))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return i.attributes=r,this.emit(`edgeAttributesUpdated`,{key:i.key,type:`replace`,attributes:i.attributes}),this}}function fe(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!h(r))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return p(i.attributes,r),this.emit(`edgeAttributesUpdated`,{key:i.key,type:`merge`,attributes:i.attributes,data:r}),this}}function pe(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof r!=`function`)throw new w(`Graph.${t}: provided updater is not a function.`);return i.attributes=r(i.attributes),this.emit(`edgeAttributesUpdated`,{key:i.key,type:`update`,attributes:i.attributes}),this}}var me=[{name:e=>`get${e}Attribute`,attacher:R},{name:e=>`get${e}Attributes`,attacher:le},{name:e=>`has${e}Attribute`,attacher:z},{name:e=>`set${e}Attribute`,attacher:B},{name:e=>`update${e}Attribute`,attacher:V},{name:e=>`remove${e}Attribute`,attacher:ue},{name:e=>`replace${e}Attributes`,attacher:de},{name:e=>`merge${e}Attributes`,attacher:fe},{name:e=>`update${e}Attributes`,attacher:pe}];function he(e){me.forEach(function({name:t,attacher:n}){n(e,t(`Edge`),`mixed`),n(e,t(`DirectedEdge`),`directed`),n(e,t(`UndirectedEdge`),`undirected`)})}var ge=[{name:`edges`,type:`mixed`},{name:`inEdges`,type:`directed`,direction:`in`},{name:`outEdges`,type:`directed`,direction:`out`},{name:`inboundEdges`,type:`mixed`,direction:`in`},{name:`outboundEdges`,type:`mixed`,direction:`out`},{name:`directedEdges`,type:`directed`},{name:`undirectedEdges`,type:`undirected`}];function _e(e,t,n,r){let i=!1;for(let a in t){if(a===r)continue;let o=t[a];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function ve(e,t,n,r){let i,a,o,s=!1;for(let c in t)if(c!==r){i=t[c];do{if(a=i.source,o=i.target,s=n(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}}function ye(e,t){let n=Object.keys(e),r=n.length,i,a=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(a>=r)return{done:!0};let o=n[a++];if(o===t){i=void 0;continue}i=e[o]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function be(e,t,n,r){let i=t[n];if(!i)return;let a=i.source,o=i.target;if(r(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected)&&e)return i.key}function xe(e,t,n,r){let i=t[n];if(!i)return;let a=!1;do{if(a=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&a)return i.key;i=i.next}while(i!==void 0)}function Se(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};let e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function Ce(e,t){if(e.size===0)return[];if(t===`mixed`||t===e.type)return Array.from(e._edges.keys());let n=t===`undirected`?e.undirectedSize:e.directedSize,r=Array(n),i=t===`undirected`,a=e._edges.values(),o=0,s,c;for(;s=a.next(),s.done!==!0;)c=s.value,c.undirected===i&&(r[o++]=c.key);return r}function we(e,t,n,r){if(t.size===0)return;let i=n!==`mixed`&&n!==t.type,a=n===`undirected`,o,s,c=!1,l=t._edges.values();for(;o=l.next(),o.done!==!0;){if(s=o.value,i&&s.undirected!==a)continue;let{key:t,attributes:n,source:l,target:u}=s;if(c=r(t,n,l.key,u.key,l.attributes,u.attributes,s.undirected),e&&c)return t}}function Te(e,t){if(e.size===0)return S();let n=t!==`mixed`&&t!==e.type,r=t===`undirected`,i=e._edges.values();return{[Symbol.iterator](){return this},next(){let e,t;for(;;){if(e=i.next(),e.done)return e;if(t=e.value,!(n&&t.undirected!==r))break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}}}function Ee(e,t,n,r,i,a){let o=t?ve:_e,s;if(n!==`undirected`&&(r!==`out`&&(s=o(e,i.in,a),e&&s)||r!==`in`&&(s=o(e,i.out,a,r?void 0:i.key),e&&s))||n!==`directed`&&(s=o(e,i.undirected,a),e&&s))return s}function De(e,t,n,r){let i=[];return Ee(!1,e,t,n,r,function(e){i.push(e)}),i}function Oe(e,t,n){let r=S();return e!==`undirected`&&(t!==`out`&&n.in!==void 0&&(r=x(r,ye(n.in))),t!==`in`&&n.out!==void 0&&(r=x(r,ye(n.out,t?void 0:n.key)))),e!==`directed`&&n.undirected!==void 0&&(r=x(r,ye(n.undirected))),r}function ke(e,t,n,r,i,a,o){let s=n?xe:be,c;if(t!==`undirected`&&(i.in!==void 0&&r!==`out`&&(c=s(e,i.in,a,o),e&&c)||i.out!==void 0&&r!==`in`&&(r||i.key!==a)&&(c=s(e,i.out,a,o),e&&c))||t!==`directed`&&i.undirected!==void 0&&(c=s(e,i.undirected,a,o),e&&c))return c}function Ae(e,t,n,r,i){let a=[];return ke(!1,e,t,n,r,i,function(e){a.push(e)}),a}function eee(e,t,n,r){let i=S();return e!==`undirected`&&(n.in!==void 0&&t!==`out`&&r in n.in&&(i=x(i,Se(n.in,r))),n.out!==void 0&&t!==`in`&&r in n.out&&(t||n.key!==r)&&(i=x(i,Se(n.out,r)))),e!==`directed`&&n.undirected!==void 0&&r in n.undirected&&(i=x(i,Se(n.undirected,r))),i}function je(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];if(!arguments.length)return Ce(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${n}: could not find the "${e}" node in the graph.`);return De(this.multi,r===`mixed`?this.type:r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let a=this._nodes.get(e);if(!a)throw new T(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${n}: could not find the "${t}" target node in the graph.`);return Ae(r,this.multi,i,a,t)}throw new w(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Me(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(!(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)){if(arguments.length===1)return n=e,we(!1,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Ee(!1,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return ke(!1,r,this.multi,i,o,t,n)}throw new w(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n;if(e.length===0){let i=0;r!==`directed`&&(i+=this.undirectedSize),r!==`undirected`&&(i+=this.directedSize),n=Array(i);let a=0;e.push((e,r,i,o,s,c,l)=>{n[a++]=t(e,r,i,o,s,c,l)})}else n=[],e.push((e,r,i,a,o,s,c)=>{n.push(t(e,r,i,a,o,s,c))});return this[a].apply(this,e),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((e,r,i,a,o,s,c)=>{t(e,r,i,a,o,s,c)&&n.push(e)}),this[a].apply(this,e),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let e=Array.prototype.slice.call(arguments);if(e.length<2||e.length>4)throw new w(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${e.length}).`);if(typeof e[e.length-1]==`function`&&typeof e[e.length-2]!=`function`)throw new w(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let t,n;e.length===2?(t=e[0],n=e[1],e=[]):e.length===3?(t=e[1],n=e[2],e=[e[0]]):e.length===4&&(t=e[2],n=e[3],e=[e[0],e[1]]);let r=n;return e.push((e,n,i,a,o,s,c)=>{r=t(r,e,n,i,a,o,s,c)}),this[a].apply(this,e),r}}function Ne(e,t){let{name:n,type:r,direction:i}=t,a=`find`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return!1;if(arguments.length===1)return n=e,we(!0,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Ee(!0,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return ke(!0,r,this.multi,i,o,t,n)}throw new w(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};let o=`some`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>t(e,n,r,i,a,o,s)),!!this[a].apply(this,e)};let s=`every`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>!t(e,n,r,i,a,o,s)),!this[a].apply(this,e)}}function Pe(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return S();if(!arguments.length)return Te(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Oe(r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return eee(r,i,n,t)}throw new w(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Fe(e){ge.forEach(t=>{je(e,t),Me(e,t),Ne(e,t),Pe(e,t)})}var tee=[{name:`neighbors`,type:`mixed`},{name:`inNeighbors`,type:`directed`,direction:`in`},{name:`outNeighbors`,type:`directed`,direction:`out`},{name:`inboundNeighbors`,type:`mixed`,direction:`in`},{name:`outboundNeighbors`,type:`mixed`,direction:`out`},{name:`directedNeighbors`,type:`directed`},{name:`undirectedNeighbors`,type:`undirected`}];function Ie(){this.A=null,this.B=null}Ie.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)},Ie.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function Le(e,t,n,r,i){for(let a in r){let o=r[a],s=o.source,c=o.target,l=s===n?c:s;if(t&&t.has(l.key))continue;let u=i(l.key,l.attributes);if(e&&u)return l.key}}function Re(e,t,n,r,i){if(t!==`mixed`){if(t===`undirected`)return Le(e,null,r,r.undirected,i);if(typeof n==`string`)return Le(e,null,r,r[n],i)}let a=new Ie,o;if(t!==`undirected`){if(n!==`out`){if(o=Le(e,null,r,r.in,i),e&&o)return o;a.wrap(r.in)}if(n!==`in`){if(o=Le(e,a,r,r.out,i),e&&o)return o;a.wrap(r.out)}}if(t!==`directed`&&(o=Le(e,a,r,r.undirected,i),e&&o))return o}function ze(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Object.keys(n.undirected);if(typeof t==`string`)return Object.keys(n[t])}let r=[];return Re(!1,e,t,n,function(e){r.push(e)}),r}function Be(e,t,n){let r=Object.keys(n),i=r.length,a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=i)return e&&e.wrap(n),{done:!0};let s=n[r[a++]],c=s.source,l=s.target;if(o=c===t?l:c,e&&e.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function nee(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Be(null,n,n.undirected);if(typeof t==`string`)return Be(null,n,n[t])}let r=S(),i=new Ie;return e!==`undirected`&&(t!==`out`&&(r=x(r,Be(i,n,n.in))),t!==`in`&&(r=x(r,Be(i,n,n.out)))),e!==`directed`&&(r=x(r,Be(i,n,n.undirected))),r}function Ve(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${n}: could not find the "${e}" node in the graph.`);return ze(r===`mixed`?this.type:r,i,t)}}function He(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);Re(!1,r===`mixed`?this.type:r,i,n,t)};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(e,t){let n=[];return this[a](e,(e,r)=>{n.push(t(e,r))}),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){let n=[];return this[a](e,(e,r)=>{t(e,r)&&n.push(e)}),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(e,t,n){if(arguments.length<3)throw new w(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let r=n;return this[a](e,(e,n)=>{r=t(r,e,n)}),r}}function Ue(e,t){let{name:n,type:r,direction:i}=t,a=n[0].toUpperCase()+n.slice(1,-1),o=`find`+a;e.prototype[o]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new T(`Graph.${o}: could not find the "${e}" node in the graph.`);return Re(!0,r===`mixed`?this.type:r,i,n,t)};let s=`some`+a;e.prototype[s]=function(e,t){return!!this[o](e,t)};let c=`every`+a;e.prototype[c]=function(e,t){return!this[o](e,(e,n)=>!t(e,n))}}function We(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return S();e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return nee(r===`mixed`?this.type:r,i,t)}}function Ge(e){tee.forEach(t=>{Ve(e,t),He(e,t),Ue(e,t),We(e,t)})}function Ke(e,t,n,r,i){let a=r._nodes.values(),o=r.type,s,c,l,u,d,f,p;for(;s=a.next(),s.done!==!0;){let r=!1;if(c=s.value,o!==`undirected`)for(l in u=c.out,u){d=u[l];do{if(f=d.target,r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}if(o!==`directed`){for(l in u=c.undirected,u)if(!(t&&c.key>l)){d=u[l];do{if(f=d.target,f.key!==l&&(f=d.source),r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}}if(n&&!r&&(p=i(c.key,null,c.attributes,null,null,null,null),e&&p))return null}}function qe(e,t){let n={key:e};return g(t.attributes)||(n.attributes=p({},t.attributes)),n}function Je(e,t,n){let r={key:t,source:n.source.key,target:n.target.key};return g(n.attributes)||(r.attributes=p({},n.attributes)),e===`mixed`&&n.undirected&&(r.undirected=!0),r}function Ye(e){if(!h(e))throw new w(`Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.`);if(!(`key`in e))throw new w(`Graph.import: serialized node is missing its key.`);if(`attributes`in e&&(!h(e.attributes)||e.attributes===null))throw new w(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`)}function Xe(e){if(!h(e))throw new w(`Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.`);if(!(`source`in e))throw new w(`Graph.import: serialized edge is missing its source.`);if(!(`target`in e))throw new w(`Graph.import: serialized edge is missing its target.`);if(`attributes`in e&&(!h(e.attributes)||e.attributes===null))throw new w(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`);if(`undirected`in e&&typeof e.undirected!=`boolean`)throw new w(`Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.`)}var Ze=b(),Qe=new Set([`directed`,`undirected`,`mixed`]),$e=new Set([`domain`,`_events`,`_eventsCount`,`_maxListeners`]),et=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:`directed`},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:`undirected`},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:`directed`},{name:e=>`${e}UndirectedEdgeWithKey`,type:`undirected`}],tt={allowSelfLoops:!0,multi:!1,type:`mixed`};function nt(e,t,n){if(n&&!h(n))throw new w(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=``+t,n||={},e._nodes.has(t))throw new E(`Graph.addNode: the "${t}" node already exist in the graph.`);let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function rt(e,t,n){let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function it(e,t,n,r,i,a,o,s){if(!r&&e.type===`undirected`)throw new E(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new E(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!h(s))throw new w(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);if(a=``+a,o=``+o,s||={},!e.allowSelfLoops&&a===o)throw new E(`Graph.${t}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let c=e._nodes.get(a),l=e._nodes.get(o);if(!c)throw new T(`Graph.${t}: source node "${a}" not found.`);if(!l)throw new T(`Graph.${t}: target node "${o}" not found.`);let u={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=``+i,e._edges.has(i))throw new E(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?c.undirected[o]!==void 0:c.out[o]!==void 0))throw new E(`Graph.${t}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);let d=new k(r,i,c,l,s);e._edges.set(i,d);let f=a===o;return r?(c.undirectedDegree++,l.undirectedDegree++,f&&(c.undirectedLoops++,e._undirectedSelfLoopCount++)):(c.outDegree++,l.inDegree++,f&&(c.directedLoops++,e._directedSelfLoopCount++)),e.multi?d.attachMulti():d.attach(),r?e._undirectedSize++:e._directedSize++,u.key=i,e.emit(`edgeAdded`,u),i}function at(e,t,n,r,i,a,o,s,c){if(!r&&e.type===`undirected`)throw new E(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new E(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(c){if(typeof s!=`function`)throw new w(`Graph.${t}: invalid updater function. Expecting a function but got "${s}"`)}else if(!h(s))throw new w(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`)}a=``+a,o=``+o;let l;if(c&&(l=s,s=void 0),!e.allowSelfLoops&&a===o)throw new E(`Graph.${t}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let u=e._nodes.get(a),d=e._nodes.get(o),f,m;if(!n&&(f=e._edges.get(i),f)){if((f.source.key!==a||f.target.key!==o)&&(!r||f.source.key!==o||f.target.key!==a))throw new E(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${a}" source & "${o}" target vs. ("${f.source.key}", "${f.target.key}").`);m=f}if(!m&&!e.multi&&u&&(m=r?u.undirected[o]:u.out[o]),m){let t=[m.key,!1,!1,!1];if(c?!l:!s)return t;if(c){let t=m.attributes;m.attributes=l(t),e.emit(`edgeAttributesUpdated`,{type:`replace`,key:m.key,attributes:m.attributes})}else p(m.attributes,s),e.emit(`edgeAttributesUpdated`,{type:`merge`,key:m.key,attributes:m.attributes,data:s});return t}s||={},c&&l&&(s=l(s));let g={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=``+i,e._edges.has(i))throw new E(`Graph.${t}: the "${i}" edge already exists in the graph.`);let _=!1,v=!1;u||(u=rt(e,a,{}),_=!0,a===o&&(d=u,v=!0)),d||(d=rt(e,o,{}),v=!0),f=new k(r,i,u,d,s),e._edges.set(i,f);let y=a===o;return r?(u.undirectedDegree++,d.undirectedDegree++,y&&(u.undirectedLoops++,e._undirectedSelfLoopCount++)):(u.outDegree++,d.inDegree++,y&&(u.directedLoops++,e._directedSelfLoopCount++)),e.multi?f.attachMulti():f.attach(),r?e._undirectedSize++:e._directedSize++,g.key=i,e.emit(`edgeAdded`,g),[i,!0,_,v]}function ot(e,t){e._edges.delete(t.key);let{source:n,target:r,attributes:i}=t,a=t.undirected,o=n===r;a?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),a?e._undirectedSize--:e._directedSize--,e.emit(`edgeDropped`,{key:t.key,attributes:i,source:n.key,target:r.key,undirected:a})}var st=class e extends d.EventEmitter{constructor(e){if(super(),e=p({},tt,e),typeof e.multi!=`boolean`)throw new w(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!Qe.has(e.type))throw new w(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!=`boolean`)throw new w(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);let t=e.type===`mixed`?D:e.type===`directed`?O:ee;_(this,`NodeDataClass`,t);let n=`geid_`+Ze()+`_`,r=0;_(this,`_attributes`,{}),_(this,`_nodes`,new Map),_(this,`_edges`,new Map),_(this,`_directedSize`,0),_(this,`_undirectedSize`,0),_(this,`_directedSelfLoopCount`,0),_(this,`_undirectedSelfLoopCount`,0),_(this,`_edgeKeyGenerator`,()=>{let e;do e=n+ r++;while(this._edges.has(e));return e}),_(this,`_options`,e),$e.forEach(e=>_(this,e,this[e])),v(this,`order`,()=>this._nodes.size),v(this,`size`,()=>this._edges.size),v(this,`directedSize`,()=>this._directedSize),v(this,`undirectedSize`,()=>this._undirectedSize),v(this,`selfLoopCount`,()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),v(this,`directedSelfLoopCount`,()=>this._directedSelfLoopCount),v(this,`undirectedSelfLoopCount`,()=>this._undirectedSelfLoopCount),v(this,`multi`,this._options.multi),v(this,`type`,this._options.type),v(this,`allowSelfLoops`,this._options.allowSelfLoops),v(this,`implementation`,()=>`graphology`)}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(``+e)}hasDirectedEdge(e,t){if(this.type===`undirected`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&!n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out.hasOwnProperty(t):!1}throw new w(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type===`directed`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(t):!1}throw new w(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){let t=``+e;return this._edges.has(t)}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out!==void 0&&n.out.hasOwnProperty(t)||n.undirected!==void 0&&n.undirected.hasOwnProperty(t):!1}throw new w(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type===`undirected`)return;if(e=``+e,t=``+t,this.multi)throw new E(`Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new T(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||void 0;if(r)return r.key}undirectedEdge(e,t){if(this.type===`directed`)return;if(e=``+e,t=``+t,this.multi)throw new E(`Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new T(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);let r=n.undirected&&n.undirected[t]||void 0;if(r)return r.key}edge(e,t){if(this.multi)throw new E(`Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.`);e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.edge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in||t in n.out}areOutNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.out}areInNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in}areUndirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`directed`?!1:t in n.undirected}areNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&(t in n.in||t in n.out)||this.type!==`directed`&&t in n.undirected}areInboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.in||this.type!==`directed`&&t in n.undirected}areOutboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.out||this.type!==`directed`&&t in n.undirected}inDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree}outDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree}directedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree}undirectedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree}inboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree),n}outboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.outDegree),n}degree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree,r+=t.directedLoops),n-r}outboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.outDegree,r+=t.directedLoops),n-r}degreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree,r+=t.directedLoops*2),n-r}source(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=``+e,t=``+t;let n=this._edges.get(t);if(!n)throw new T(`Graph.opposite: could not find the "${t}" edge in the graph.`);let r=n.source.key,i=n.target.key;if(e===r)return i;if(e===i)return r;throw new T(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${r}, ${i}).`)}hasExtremity(e,t){e=``+e,t=``+t;let n=this._edges.get(e);if(!n)throw new T(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return nt(this,e,t).key}mergeNode(e,t){if(t&&!h(t))throw new w(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=``+e,t||={};let n=this._nodes.get(e);return n?(t&&(p(n.attributes,t),this.emit(`nodeAttributesUpdated`,{type:`merge`,key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!=`function`)throw new w(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=``+e;let n=this._nodes.get(e);if(n){if(t){let r=n.attributes;n.attributes=t(r),this.emit(`nodeAttributesUpdated`,{type:`replace`,key:e,attributes:n.attributes})}return[e,!1]}let r=t?t({}):{};return n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:r}),[e,!0]}dropNode(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!==`undirected`){for(let e in t.out){n=t.out[e];do ot(this,n),n=n.next;while(n)}for(let e in t.in){n=t.in[e];do ot(this,n),n=n.next;while(n)}}if(this.type!==`directed`)for(let e in t.undirected){n=t.undirected[e];do ot(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit(`nodeDropped`,{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){let e=``+arguments[0],n=``+arguments[1];if(t=m(this,e,n,this.type),!t)throw new T(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=``+e,t=this._edges.get(e),!t)throw new T(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return ot(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new E(`Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new E(`Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);e=``+e,t=``+t;let n=m(this,e,t,`directed`);if(!n)throw new T(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return ot(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new E(`Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new E(`Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);let n=m(this,e,t,`undirected`);if(!n)throw new T(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return ot(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit(`cleared`)}clearEdges(){let e=this._nodes.values(),t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit(`edgesCleared`)}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!=`function`)throw new w(`Graph.updateAttribute: updater should be a function.`);let n=this._attributes[e];return this._attributes[e]=t(n),this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit(`attributesUpdated`,{type:`remove`,attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!h(e))throw new w(`Graph.replaceAttributes: provided attributes are not a plain object.`);return this._attributes=e,this.emit(`attributesUpdated`,{type:`replace`,attributes:this._attributes}),this}mergeAttributes(e){if(!h(e))throw new w(`Graph.mergeAttributes: provided attributes are not a plain object.`);return p(this._attributes,e),this.emit(`attributesUpdated`,{type:`merge`,attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!=`function`)throw new w(`Graph.updateAttributes: provided updater is not a function.`);return this._attributes=e(this._attributes),this.emit(`attributesUpdated`,{type:`update`,attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!=`function`)throw new w(`Graph.updateEachNodeAttributes: expecting an updater function.`);if(t&&!y(t))throw new w(`Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._nodes.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,i.attributes=e(i.key,i.attributes);this.emit(`eachNodeAttributesUpdated`,{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!=`function`)throw new w(`Graph.updateEachEdgeAttributes: expecting an updater function.`);if(t&&!y(t))throw new w(`Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._edges.values(),r,i,a,o;for(;r=n.next(),r.done!==!0;)i=r.value,a=i.source,o=i.target,i.attributes=e(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected);this.emit(`eachEdgeAttributesUpdated`,{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!=`function`)throw new w(`Graph.forEachAdjacencyEntry: expecting a callback.`);Ke(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new w(`Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.`);Ke(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=`function`)throw new w(`Graph.forEachAssymetricAdjacencyEntry: expecting a callback.`);Ke(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new w(`Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.`);Ke(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!=`function`)throw new w(`Graph.forEachNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)}findNode(e){if(typeof e!=`function`)throw new w(`Graph.findNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return r.key}mapNodes(e){if(typeof e!=`function`)throw new w(`Graph.mapNode: expecting a callback.`);let t=this._nodes.values(),n,r,i=Array(this.order),a=0;for(;n=t.next(),n.done!==!0;)r=n.value,i[a++]=e(r.key,r.attributes);return i}someNode(e){if(typeof e!=`function`)throw new w(`Graph.someNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return!0;return!1}everyNode(e){if(typeof e!=`function`)throw new w(`Graph.everyNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,!e(r.key,r.attributes))return!1;return!0}filterNodes(e){if(typeof e!=`function`)throw new w(`Graph.filterNodes: expecting a callback.`);let t=this._nodes.values(),n,r,i=[];for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)&&i.push(r.key);return i}reduceNodes(e,t){if(typeof e!=`function`)throw new w(`Graph.reduceNodes: expecting a callback.`);if(arguments.length<2)throw new w(`Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let n=t,r=this._nodes.values(),i,a;for(;i=r.next(),i.done!==!0;)a=i.value,n=e(n,a.key,a.attributes);return n}nodeEntries(){let e=this._nodes.values();return{[Symbol.iterator](){return this},next(){let t=e.next();if(t.done)return t;let n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){let e=Array(this._nodes.size),t=0;this._nodes.forEach((n,r)=>{e[t++]=qe(r,n)});let n=Array(this._edges.size);return t=0,this._edges.forEach((e,r)=>{n[t++]=Je(this.type,r,e)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(t,n=!1){if(t instanceof e)return t.forEachNode((e,t)=>{n?this.mergeNode(e,t):this.addNode(e,t)}),t.forEachEdge((e,t,r,i,a,o,s)=>{n?s?this.mergeUndirectedEdgeWithKey(e,r,i,t):this.mergeDirectedEdgeWithKey(e,r,i,t):s?this.addUndirectedEdgeWithKey(e,r,i,t):this.addDirectedEdgeWithKey(e,r,i,t)}),this;if(!h(t))throw new w(`Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.`);if(t.attributes){if(!h(t.attributes))throw new w(`Graph.import: invalid attributes. Expecting a plain object.`);n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,a,o,s;if(t.nodes){if(a=t.nodes,!Array.isArray(a))throw new w(`Graph.import: invalid nodes. Expecting an array.`);for(r=0,i=a.length;r<i;r++){o=a[r],Ye(o);let{key:e,attributes:t}=o;n?this.mergeNode(e,t):this.addNode(e,t)}}if(t.edges){let e=!1;if(this.type===`undirected`&&(e=!0),a=t.edges,!Array.isArray(a))throw new w(`Graph.import: invalid edges. Expecting an array.`);for(r=0,i=a.length;r<i;r++){s=a[r],Xe(s);let{source:t,target:i,attributes:o,undirected:c=e}=s,l;`key`in s?(l=n?c?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:c?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,l.call(this,s.key,t,i,o)):(l=n?c?this.mergeUndirectedEdge:this.mergeDirectedEdge:c?this.addUndirectedEdge:this.addDirectedEdge,l.call(this,t,i,o))}}return this}nullCopy(t){let n=new e(p({},this._options,t));return n.replaceAttributes(p({},this.getAttributes())),n}emptyCopy(e){let t=this.nullCopy(e);return this._nodes.forEach((e,n)=>{let r=p({},e.attributes);e=new t.NodeDataClass(n,r),t._nodes.set(n,e)}),t}copy(e){if(e||={},typeof e.type==`string`&&e.type!==this.type&&e.type!==`mixed`)throw new E(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi==`boolean`&&e.multi!==this.multi&&e.multi!==!0)throw new E(`Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.`);if(typeof e.allowSelfLoops==`boolean`&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new E(`Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.`);let t=this.emptyCopy(e),n=this._edges.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,it(t,`copy`,!1,i.undirected,i.key,i.source.key,i.target.key,p({},i.attributes));return t}toJSON(){return this.export()}toString(){return`[object Graph]`}inspect(){let e={};this._nodes.forEach((t,n)=>{e[n]=t.attributes});let t={},n={};this._edges.forEach((e,r)=>{let i=e.undirected?`--`:`->`,a=``,o=e.source.key,s=e.target.key,c;e.undirected&&o>s&&(c=o,o=s,s=c);let l=`(${o})${i}(${s})`;r.startsWith(`geid_`)?this.multi&&(n[l]===void 0?n[l]=0:n[l]++,a+=`${n[l]}. `):a+=`[${r}]: `,a+=l,t[a]=e.attributes});let r={};for(let e in this)this.hasOwnProperty(e)&&!$e.has(e)&&typeof this[e]!=`function`&&typeof e!=`symbol`&&(r[e]=this[e]);return r.attributes=this._attributes,r.nodes=e,r.edges=t,_(r,`constructor`,this.constructor),r}};typeof Symbol<`u`&&(st.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=st.prototype.inspect),et.forEach(e=>{[`add`,`merge`,`update`].forEach(t=>{let n=e.name(t),r=t===`add`?it:at;e.generateKey?st.prototype[n]=function(i,a,o){return r(this,n,!0,(e.type||this.type)===`undirected`,null,i,a,o,t===`update`)}:st.prototype[n]=function(i,a,o,s){return r(this,n,!1,(e.type||this.type)===`undirected`,i,a,o,s,t===`update`)}})}),L(st),he(st),Fe(st),Ge(st);var ct=class extends st{constructor(e){let t=p({type:`directed`},e);if(`multi`in t&&t.multi!==!1)throw new w(`DirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`directed`)throw new w(`DirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},lt=class extends st{constructor(e){let t=p({type:`undirected`},e);if(`multi`in t&&t.multi!==!1)throw new w(`UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`undirected`)throw new w(`UndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},ut=class extends st{constructor(e){let t=p({multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiGraph.from: inconsistent indication that the graph should be simple in given options!`);super(t)}},dt=class extends st{constructor(e){let t=p({type:`directed`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`directed`)throw new w(`MultiDirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},ft=class extends st{constructor(e){let t=p({type:`undirected`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`undirected`)throw new w(`MultiUndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}};function pt(e){e.from=function(t,n){let r=new e(p({},t.options,n));return r.import(t),r}}pt(st),pt(ct),pt(lt),pt(ut),pt(dt),pt(ft),st.Graph=st,st.DirectedGraph=ct,st.UndirectedGraph=lt,st.MultiGraph=ut,st.MultiDirectedGraph=dt,st.MultiUndirectedGraph=ft,st.InvalidArgumentsGraphError=w,st.NotFoundGraphError=T,st.UsageGraphError=E;var mt=new st({type:`directed`,multi:!1,allowSelfLoops:!1});function ht(e){for(let{id:t,attributes:n}of e)mt.mergeNode(t,n)}function gt(e){for(let{source:t,target:n,attributes:r}of e)mt.hasNode(t)&&mt.hasNode(n)&&mt.mergeDirectedEdge(t,n,r)}function _t(){mt.clear()}function vt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yt(e){var t=vt(e,`string`);return typeof t==`symbol`?t:t+``}function bt(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,yt(r.key),r)}}function St(e,t,n){return t&&xt(e.prototype,t),n&&xt(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Ct(e){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ct(e)}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wt=function(){return!!e})()}function ree(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Tt(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return ree(e)}function Et(e,t,n){return t=Ct(t),Tt(e,wt()?Reflect.construct(t,n||[],Ct(e).constructor):t.apply(e,n))}function Dt(e,t){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dt(e,t)}function Ot(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&Dt(e,t)}function kt(e){if(Array.isArray(e))return e}function At(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function jt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mt(e,t){if(e){if(typeof e==`string`)return jt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(e,t):void 0}}function Nt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pt(e,t){return kt(e)||At(e,t)||Mt(e,t)||Nt()}var Ft={black:`#000000`,silver:`#C0C0C0`,gray:`#808080`,grey:`#808080`,white:`#FFFFFF`,maroon:`#800000`,red:`#FF0000`,purple:`#800080`,fuchsia:`#FF00FF`,green:`#008000`,lime:`#00FF00`,olive:`#808000`,yellow:`#FFFF00`,navy:`#000080`,blue:`#0000FF`,teal:`#008080`,aqua:`#00FFFF`,darkblue:`#00008B`,mediumblue:`#0000CD`,darkgreen:`#006400`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,springgreen:`#00FF7F`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,rebeccapurple:`#663399`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,dimgrey:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,slategrey:`#708090`,lightslategray:`#778899`,lightslategrey:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370DB`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,palevioletred:`#DB7093`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`},It=new Int8Array(4),Lt=new Int32Array(It.buffer,0,1),Rt=new Float32Array(It.buffer,0,1),zt=/^\s*rgba?\s*\(/,Bt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Vt(e){var t=0,n=0,r=0,i=1;if(e[0]===`#`)e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(zt.test(e)){var a=e.match(Bt);a&&(t=+a[1],n=+a[2],r=+a[3],a[4]&&(i=+a[4]))}return{r:t,g:n,b:r,a:i}}var Ht={};for(var Ut in Ft)Ht[Ut]=Gt(Ft[Ut]),Ht[Ft[Ut]]=Ht[Ut];function Wt(e,t,n,r,i){return Lt[0]=r<<24|n<<16|t<<8|e,i&&(Lt[0]&=4278190079),Rt[0]}function Gt(e){if(e=e.toLowerCase(),Ht[e]!==void 0)return Ht[e];var t=Vt(e),n=t.r,r=t.g,i=t.b,a=t.a;a=a*255|0;var o=Wt(n,r,i,a,!0);return Ht[e]=o,o}var Kt={};function qt(e){if(Kt[e]!==void 0)return Kt[e];var t=Wt((e&16711680)>>>16,(e&65280)>>>8,e&255,255,!0);return Kt[e]=t,t}function Jt(e,t,n,r){return n+(t<<8)+(e<<16)}function Yt(e,t,n,r,i,a){var o=Math.floor(n/a*i),s=Math.floor(e.drawingBufferHeight/a-r/a*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(o,s,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var l=Pt(c,4);return[l[0],l[1],l[2],l[3]]}function H(e,t,n){return(t=yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xt(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zt(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Ct(e))!==null;);return e}function Qt(){return Qt=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Zt(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Qt.apply(null,arguments)}function $t(e,t,n,r){var i=Qt(Ct(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}function en(e){return e.normalized?1:e.size}function tn(e){var t=0;return e.forEach(function(e){return t+=en(e)}),t}function nn(e,t,n){var r=e===`VERTEX`?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw Error(`loadShader: error while creating the shader`);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(i);throw t.deleteShader(i),Error(`loadShader: error while compiling the shader:+${a}+${n}`)}return i}function rn(e,t){return nn(`VERTEX`,e,t)}function iee(e,t){return nn(`FRAGMENT`,e,t)}function aee(e,t){var n=e.createProgram();if(n===null)throw Error(`loadProgram: error while creating the program.`);var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS))throw e.deleteProgram(n),Error(`loadProgram: error while linking the program.`);return n}function an(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,a=e.fragmentShader;t.deleteShader(i),t.deleteShader(a),t.deleteProgram(r),t.deleteBuffer(n)}var on=`#define PICKING_MODE+`,sn=H(H(H(H(H(H(H(H({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),cn=function(){function e(t,n,r){bt(this,e),H(this,`array`,new Float32Array),H(this,`constantArray`,new Float32Array),H(this,`capacity`,0),H(this,`verticesCount`,0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES=`CONSTANT_ATTRIBUTES`in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA=`CONSTANT_DATA`in i?i.CONSTANT_DATA:[],this.isInstanced=`CONSTANT_ATTRIBUTES`in i,this.ATTRIBUTES_ITEMS_COUNT=tn(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=r,this.normalProgram=this.getProgramInfo(`normal`,t,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo(`pick`,t,on+i.VERTEX_SHADER_SOURCE,on+i.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var a=tn(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw Error(`Program: error while getting constant data (expected ${this.VERTICES} items, received ${this.CONSTANT_DATA.length} instead)`);this.constantArray=new Float32Array(this.CONSTANT_DATA.length*a);for(var o=0;o<this.CONSTANT_DATA.length;o++){var s=this.CONSTANT_DATA[o];if(s.length!==a)throw Error(`Program: error while getting constant data (one vector has ${s.length} items instead of ${a})`);for(var c=0;c<s.length;c++)this.constantArray[o*a+c]=s[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return St(e,[{key:`kill`,value:function(){an(this.normalProgram),this.pickProgram&&=(an(this.pickProgram),null)}},{key:`getProgramInfo`,value:function(e,t,n,r,i){var a=this.getDefinition(),o=t.createBuffer();if(o===null)throw Error(`Program: error while creating the WebGL buffer.`);var s=rn(t,n),c=iee(t,r),l=aee(t,[s,c]),u={};a.UNIFORMS.forEach(function(e){var n=t.getUniformLocation(l,e);n&&(u[e]=n)});var d={};a.ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)});var f;if(`CONSTANT_ATTRIBUTES`in a&&(a.CONSTANT_ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)}),f=t.createBuffer(),f===null))throw Error(`Program: error while creating the WebGL constant buffer.`);return{name:e,program:l,gl:t,frameBuffer:i,buffer:o,constantBuffer:f||{},uniformLocations:u,attributeLocations:d,isPicking:e===`pick`,vertexShader:s,fragmentShader:c}}},{key:`bindProgram`,value:function(e){var t=this,n=0,r=e.gl,i=e.buffer;this.isInstanced?(r.bindBuffer(r.ARRAY_BUFFER,e.constantBuffer),n=0,this.CONSTANT_ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!1)}),r.bufferData(r.ARRAY_BUFFER,this.constantArray,r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,e.buffer),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!0)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,i),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)),r.bindBuffer(r.ARRAY_BUFFER,null)}},{key:`unbindProgram`,value:function(e){var t=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!1)}),this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!0)})):this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e)})}},{key:`bindAttribute`,value:function(e,t,n,r){var i=sn[e.type];if(typeof i!=`number`)throw Error(`Program.bind: yet unsupported attribute type "${e.type}"`);var a=t.attributeLocations[e.name],o=t.gl;if(a!==-1){o.enableVertexAttribArray(a);var s=this.isInstanced?(r?this.ATTRIBUTES_ITEMS_COUNT:tn(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(o.vertexAttribPointer(a,e.size,e.type,e.normalized||!1,s,n),this.isInstanced&&r)if(o instanceof WebGL2RenderingContext)o.vertexAttribDivisor(a,1);else{var c=o.getExtension(`ANGLE_instanced_arrays`);c&&c.vertexAttribDivisorANGLE(a,1)}}return e.size*i}},{key:`unbindAttribute`,value:function(e,t,n){var r=t.attributeLocations[e.name],i=t.gl;if(r!==-1&&(i.disableVertexAttribArray(r),this.isInstanced&&n))if(i instanceof WebGL2RenderingContext)i.vertexAttribDivisor(r,0);else{var a=i.getExtension(`ANGLE_instanced_arrays`);a&&a.vertexAttribDivisorANGLE(r,0)}}},{key:`reallocate`,value:function(e){e!==this.capacity&&(this.capacity=e,this.verticesCount=this.VERTICES*e,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:`hasNothingToRender`,value:function(){return this.verticesCount===0}},{key:`renderProgram`,value:function(e,t){var n=t.gl,r=t.program;n.enable(n.BLEND),n.useProgram(r),this.setUniforms(e,t),this.drawWebGL(this.METHOD,t)}},{key:`render`,value:function(e){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,e.width*e.pixelRatio/e.downSizingRatio,e.height*e.pixelRatio/e.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(U(U({},e),{},{pixelRatio:e.pixelRatio/e.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,e.width*e.pixelRatio,e.height*e.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(e,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:`drawWebGL`,value:function(e,t){var n=t.gl,r=t.frameBuffer;if(n.bindFramebuffer(n.FRAMEBUFFER,r),!this.isInstanced)n.drawArrays(e,0,this.verticesCount);else if(n instanceof WebGL2RenderingContext)n.drawArraysInstanced(e,0,this.VERTICES,this.capacity);else{var i=n.getExtension(`ANGLE_instanced_arrays`);i&&i.drawArraysInstancedANGLE(e,0,this.VERTICES,this.capacity)}}}])}(),ln=function(e){function t(){return bt(this,t),Et(this,t,arguments)}return Ot(t,e),St(t,[{key:`kill`,value:function(){$t(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n){var r=t*this.STRIDE;if(n.hidden){for(var i=r+this.STRIDE;r<i;r++)this.array[r]=0;return}return this.processVisibleItem(qt(e),r,n)}}])}(cn),un=function(e){function t(){var e;bt(this,t);var n=[...arguments];return e=Et(this,t,[].concat(n)),H(e,`drawLabel`,void 0),e}return Ot(t,e),St(t,[{key:`kill`,value:function(){$t(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n,r,i){var a=t*this.STRIDE;if(i.hidden||n.hidden||r.hidden){for(var o=a+this.STRIDE;a<o;a++)this.array[a]=0;return}return this.processVisibleItem(qt(e),a,n,r,i)}}])}(cn);function dn(e,t){return function(){function n(r,i,a){bt(this,n),H(this,`drawLabel`,t),this.programs=e.map(function(e){return new e(r,i,a)})}return St(n,[{key:`reallocate`,value:function(e){this.programs.forEach(function(t){return t.reallocate(e)})}},{key:`process`,value:function(e,t,n,r,i){this.programs.forEach(function(a){return a.process(e,t,n,r,i)})}},{key:`render`,value:function(e){this.programs.forEach(function(t){return t.render(e)})}},{key:`kill`,value:function(){this.programs.forEach(function(e){return e.kill()})}}])}()}function fn(e,t,n,r,i){var a=i.edgeLabelSize,o=i.edgeLabelFont,s=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?t[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||`#000`:i.edgeLabelColor.color,l=t.label;if(l){e.fillStyle=c,e.font=`${s} ${a}px ${o}`;var u=n.size,d=r.size,f=n.x,p=n.y,m=r.x,h=r.y,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);if(!(b<u+d)){f+=v*u/b,p+=y*u/b,m-=v*d/b,h-=y*d/b,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);var x=e.measureText(l).width;if(x>b){var S=`…`;for(l+=S,x=e.measureText(l).width;x>b&&l.length>1;)l=l.slice(0,-2)+S,x=e.measureText(l).width;if(l.length<4)return}var C=v>0?y>0?Math.acos(v/b):Math.asin(y/b):y>0?Math.acos(v/b)+Math.PI:Math.asin(v/b)+Math.PI/2;e.save(),e.translate(g,_),e.rotate(C),e.fillText(l,-x/2,t.size/2+a),e.restore()}}}function pn(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,a=n.labelWeight;e.fillStyle=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||`#000`:n.labelColor.color,e.font=`${a} ${r}px ${i}`,e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function mn(e,t,n){var r=n.labelSize,i=n.labelFont;e.font=`${n.labelWeight} ${r}px ${i}`,e.fillStyle=`#FFF`,e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor=`#000`;var a=2;if(typeof t.label==`string`){var o=e.measureText(t.label).width,s=Math.round(o+5),c=Math.round(r+2*a),l=Math.max(t.size,r/2)+a,u=Math.asin(c/2/l),d=Math.sqrt(Math.abs(l**2-(c/2)**2));e.beginPath(),e.moveTo(t.x+d,t.y+c/2),e.lineTo(t.x+l+s,t.y+c/2),e.lineTo(t.x+l+s,t.y-c/2),e.lineTo(t.x+d,t.y-c/2),e.arc(t.x,t.y,l,u,-u),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+a,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,pn(e,t,n)}var hn=`+precision highp float;++varying vec4 v_color;+varying vec2 v_diffVector;+varying float v_radius;++uniform float u_correctionRatio;++const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);++void main(void) {+ float border = u_correctionRatio * 2.0;+ float dist = length(v_diffVector) - v_radius + border;++ // No antialiasing for picking mode:+ #ifdef PICKING_MODE+ if (dist > border)+ gl_FragColor = transparent;+ else+ gl_FragColor = v_color;++ #else+ float t = 0.0;+ if (dist > border)+ t = 1.0;+ else if (dist > 0.0)+ t = dist / border;++ gl_FragColor = mix(v_color, transparent, t);+ #endif+}+`,gn=`+attribute vec4 a_id;+attribute vec4 a_color;+attribute vec2 a_position;+attribute float a_size;+attribute float a_angle;++uniform mat3 u_matrix;+uniform float u_sizeRatio;+uniform float u_correctionRatio;++varying vec4 v_color;+varying vec2 v_diffVector;+varying float v_radius;+varying float v_border;++const float bias = 255.0 / 254.0;++void main() {+ float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;+ vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));+ vec2 position = a_position + diffVector;+ gl_Position = vec4(+ (u_matrix * vec3(position, 1)).xy,+ 0,+ 1+ );++ v_diffVector = diffVector;+ v_radius = size / 2.0;++ #ifdef PICKING_MODE+ // For picking mode, we use the ID as the color:+ v_color = a_id;+ #else+ // For normal mode, we use the color:+ v_color = a_color;+ #endif++ v_color.a *= bias;+}+`,_n=WebGLRenderingContext,vn=_n.UNSIGNED_BYTE,yn=_n.FLOAT,bn=[`u_sizeRatio`,`u_correctionRatio`,`u_matrix`],xn=function(e){function t(){return bt(this,t),Et(this,t,arguments)}return Ot(t,e),St(t,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:gn,FRAGMENT_SHADER_SOURCE:hn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:bn,ATTRIBUTES:[{name:`a_position`,size:2,type:yn},{name:`a_size`,size:1,type:yn},{name:`a_color`,size:4,type:vn,normalized:!0},{name:`a_id`,size:4,type:vn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_angle`,size:1,type:yn}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:`processVisibleItem`,value:function(e,t,n){var r=this.array,i=Gt(n.color);r[t++]=n.x,r[t++]=n.y,r[t++]=n.size,r[t++]=i,r[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_sizeRatio,a=r.u_correctionRatio,o=r.u_matrix;n.uniform1f(a,e.correctionRatio),n.uniform1f(i,e.sizeRatio),n.uniformMatrix3fv(o,!1,e.matrix)}}])}(ln);H(xn,`ANGLE_1`,0),H(xn,`ANGLE_2`,2*Math.PI/3),H(xn,`ANGLE_3`,4*Math.PI/3);var Sn=`+precision mediump float;++varying vec4 v_color;++void main(void) {+ gl_FragColor = v_color;+}+`,Cn=`+attribute vec2 a_position;+attribute vec2 a_normal;+attribute float a_radius;+attribute vec3 a_barycentric;++#ifdef PICKING_MODE+attribute vec4 a_id;+#else+attribute vec4 a_color;+#endif++uniform mat3 u_matrix;+uniform float u_sizeRatio;+uniform float u_correctionRatio;+uniform float u_minEdgeThickness;+uniform float u_lengthToThicknessRatio;+uniform float u_widenessToThicknessRatio;++varying vec4 v_color;++const float bias = 255.0 / 254.0;++void main() {+ float minThickness = u_minEdgeThickness;++ float normalLength = length(a_normal);+ vec2 unitNormal = a_normal / normalLength;++ // These first computations are taken from edge.vert.glsl and+ // edge.clamped.vert.glsl. Please read it to get better comments on what's+ // happening:+ float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);+ float webGLThickness = pixelsThickness * u_correctionRatio;+ float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;+ float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;++ float da = a_barycentric.x;+ float db = a_barycentric.y;+ float dc = a_barycentric.z;++ vec2 delta = vec2(+ da * (webGLNodeRadius * unitNormal.y)+ + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)+ + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),++ da * (-webGLNodeRadius * unitNormal.x)+ + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)+ + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)+ );++ vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;++ gl_Position = vec4(position, 0, 1);++ #ifdef PICKING_MODE+ // For picking mode, we use the ID as the color:+ v_color = a_id;+ #else+ // For normal mode, we use the color:+ v_color = a_color;+ #endif++ v_color.a *= bias;+}+`,wn=WebGLRenderingContext,Tn=wn.UNSIGNED_BYTE,En=wn.FLOAT,Dn=[`u_matrix`,`u_sizeRatio`,`u_correctionRatio`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`,`u_widenessToThicknessRatio`],On={extremity:`target`,lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function kn(e){var t=U(U({},On),e||{});return function(e){function n(){return bt(this,n),Et(this,n,arguments)}return Ot(n,e),St(n,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:Cn,FRAGMENT_SHADER_SOURCE:Sn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Dn,ATTRIBUTES:[{name:`a_position`,size:2,type:En},{name:`a_normal`,size:2,type:En},{name:`a_radius`,size:1,type:En},{name:`a_color`,size:4,type:Tn,normalized:!0},{name:`a_id`,size:4,type:Tn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_barycentric`,size:3,type:En}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:`processVisibleItem`,value:function(e,n,r,i,a){if(t.extremity===`source`){var o=[i,r];r=o[0],i=o[1]}var s=a.size||1,c=i.size||1,l=r.x,u=r.y,d=i.x,f=i.y,p=Gt(a.color),m=d-l,h=f-u,g=m*m+h*h,_=0,v=0;g&&(g=1/Math.sqrt(g),_=-h*g*s,v=m*g*s);var y=this.array;y[n++]=d,y[n++]=f,y[n++]=-_,y[n++]=-v,y[n++]=c,y[n++]=p,y[n++]=e}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_sizeRatio,s=i.u_correctionRatio,c=i.u_minEdgeThickness,l=i.u_lengthToThicknessRatio,u=i.u_widenessToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.sizeRatio),r.uniform1f(s,e.correctionRatio),r.uniform1f(c,e.minEdgeThickness),r.uniform1f(l,t.lengthToThicknessRatio),r.uniform1f(u,t.widenessToThicknessRatio)}}])}(un)}kn();var An=`+precision mediump float;++varying vec4 v_color;+varying vec2 v_normal;+varying float v_thickness;+varying float v_feather;++const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);++void main(void) {+ // We only handle antialiasing for normal mode:+ #ifdef PICKING_MODE+ gl_FragColor = v_color;+ #else+ float dist = length(v_normal) * v_thickness;++ float t = smoothstep(+ v_thickness - v_feather,+ v_thickness,+ dist+ );++ gl_FragColor = mix(v_color, transparent, t);+ #endif+}+`,jn=`+attribute vec4 a_id;+attribute vec4 a_color;+attribute vec2 a_normal;+attribute float a_normalCoef;+attribute vec2 a_positionStart;+attribute vec2 a_positionEnd;+attribute float a_positionCoef;+attribute float a_radius;+attribute float a_radiusCoef;++uniform mat3 u_matrix;+uniform float u_zoomRatio;+uniform float u_sizeRatio;+uniform float u_pixelRatio;+uniform float u_correctionRatio;+uniform float u_minEdgeThickness;+uniform float u_lengthToThicknessRatio;+uniform float u_feather;++varying vec4 v_color;+varying vec2 v_normal;+varying float v_thickness;+varying float v_feather;++const float bias = 255.0 / 254.0;++void main() {+ float minThickness = u_minEdgeThickness;++ float radius = a_radius * a_radiusCoef;+ vec2 normal = a_normal * a_normalCoef;+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;++ float normalLength = length(normal);+ vec2 unitNormal = normal / normalLength;++ // These first computations are taken from edge.vert.glsl. Please read it to+ // get better comments on what's happening:+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;++ // Here, we move the point to leave space for the arrow head:+ float direction = sign(radius);+ float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;++ vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);++ // Here is the proper position of the vertex+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);++ v_thickness = webGLThickness / u_zoomRatio;++ v_normal = unitNormal;++ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;++ #ifdef PICKING_MODE+ // For picking mode, we use the ID as the color:+ v_color = a_id;+ #else+ // For normal mode, we use the color:+ v_color = a_color;+ #endif++ v_color.a *= bias;+}+`,Mn=WebGLRenderingContext,Nn=Mn.UNSIGNED_BYTE,Pn=Mn.FLOAT,Fn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`],In={lengthToThicknessRatio:On.lengthToThicknessRatio};function Ln(e){var t=U(U({},In),e||{});return function(e){function n(){return bt(this,n),Et(this,n,arguments)}return Ot(n,e),St(n,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:jn,FRAGMENT_SHADER_SOURCE:An,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Fn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:Pn},{name:`a_positionEnd`,size:2,type:Pn},{name:`a_normal`,size:2,type:Pn},{name:`a_color`,size:4,type:Nn,normalized:!0},{name:`a_id`,size:4,type:Nn,normalized:!0},{name:`a_radius`,size:1,type:Pn}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:Pn},{name:`a_normalCoef`,size:1,type:Pn},{name:`a_radiusCoef`,size:1,type:Pn}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Gt(i.color),d=c-o,f=l-s,p=r.size||1,m=d*d+f*f,h=0,g=0;m&&(m=1/Math.sqrt(m),h=-f*m*a,g=d*m*a);var _=this.array;_[t++]=o,_[t++]=s,_[t++]=c,_[t++]=l,_[t++]=h,_[t++]=g,_[t++]=u,_[t++]=e,_[t++]=p}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_zoomRatio,s=i.u_feather,c=i.u_pixelRatio,l=i.u_correctionRatio,u=i.u_sizeRatio,d=i.u_minEdgeThickness,f=i.u_lengthToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.zoomRatio),r.uniform1f(u,e.sizeRatio),r.uniform1f(l,e.correctionRatio),r.uniform1f(c,e.pixelRatio),r.uniform1f(s,e.antiAliasingFeather),r.uniform1f(d,e.minEdgeThickness),r.uniform1f(f,t.lengthToThicknessRatio)}}])}(un)}Ln();function Rn(e){return dn([Ln(e),kn(e)])}var zn=Rn(),Bn=`+attribute vec4 a_id;+attribute vec4 a_color;+attribute vec2 a_normal;+attribute float a_normalCoef;+attribute vec2 a_positionStart;+attribute vec2 a_positionEnd;+attribute float a_positionCoef;++uniform mat3 u_matrix;+uniform float u_sizeRatio;+uniform float u_zoomRatio;+uniform float u_pixelRatio;+uniform float u_correctionRatio;+uniform float u_minEdgeThickness;+uniform float u_feather;++varying vec4 v_color;+varying vec2 v_normal;+varying float v_thickness;+varying float v_feather;++const float bias = 255.0 / 254.0;++void main() {+ float minThickness = u_minEdgeThickness;++ vec2 normal = a_normal * a_normalCoef;+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;++ float normalLength = length(normal);+ vec2 unitNormal = normal / normalLength;++ // We require edges to be at least "minThickness" pixels thick *on screen*+ // (so we need to compensate the size ratio):+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);++ // Then, we need to retrieve the normalized thickness of the edge in the WebGL+ // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction+ // ratio:+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;++ // Here is the proper position of the vertex+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);++ // For the fragment shader though, we need a thickness that takes the "magic"+ // correction ratio into account (as in webGLThickness), but so that the+ // antialiasing effect does not depend on the zoom level. So here's yet+ // another thickness version:+ v_thickness = webGLThickness / u_zoomRatio;++ v_normal = unitNormal;++ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;++ #ifdef PICKING_MODE+ // For picking mode, we use the ID as the color:+ v_color = a_id;+ #else+ // For normal mode, we use the color:+ v_color = a_color;+ #endif++ v_color.a *= bias;+}+`,Vn=WebGLRenderingContext,Hn=Vn.UNSIGNED_BYTE,Un=Vn.FLOAT,Wn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`],Gn=function(e){function t(){return bt(this,t),Et(this,t,arguments)}return Ot(t,e),St(t,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Bn,FRAGMENT_SHADER_SOURCE:An,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Wn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:Un},{name:`a_positionEnd`,size:2,type:Un},{name:`a_normal`,size:2,type:Un},{name:`a_color`,size:4,type:Hn,normalized:!0},{name:`a_id`,size:4,type:Hn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:Un},{name:`a_normalCoef`,size:1,type:Un}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Gt(i.color),d=c-o,f=l-s,p=d*d+f*f,m=0,h=0;p&&(p=1/Math.sqrt(p),m=-f*p*a,h=d*p*a);var g=this.array;g[t++]=o,g[t++]=s,g[t++]=c,g[t++]=l,g[t++]=m,g[t++]=h,g[t++]=u,g[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_matrix,a=r.u_zoomRatio,o=r.u_feather,s=r.u_pixelRatio,c=r.u_correctionRatio,l=r.u_sizeRatio,u=r.u_minEdgeThickness;n.uniformMatrix3fv(i,!1,e.matrix),n.uniform1f(a,e.zoomRatio),n.uniform1f(l,e.sizeRatio),n.uniform1f(c,e.correctionRatio),n.uniform1f(s,e.pixelRatio),n.uniform1f(o,e.antiAliasingFeather),n.uniform1f(u,e.minEdgeThickness)}}])}(un),Kn=function(e){function t(){var e;return bt(this,t),e=Et(this,t),e.rawEmitter=e,e}return Ot(t,e),St(t)}(d.EventEmitter),qn=r(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),Jn=n(qn()),Yn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Xn={easing:`quadraticInOut`,duration:150};function Zn(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Qn(e,t,n){return e[0]=t,e[4]=typeof n==`number`?n:t,e}function $n(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function er(e,t,n){return e[6]=t,e[7]=n,e}function tr(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],d=t[0],f=t[1],p=t[2],m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8];return e[0]=d*n+f*a+p*c,e[1]=d*r+f*o+p*l,e[2]=d*i+f*s+p*u,e[3]=m*n+h*a+g*c,e[4]=m*r+h*o+g*l,e[5]=m*i+h*s+g*u,e[6]=_*n+v*a+y*c,e[7]=_*r+v*o+y*l,e[8]=_*i+v*s+y*u,e}function nr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],a=e[3],o=e[4],s=e[6],c=e[7],l=t.x,u=t.y;return{x:l*r+u*a+s*n,y:l*i+u*o+c*n}}function rr(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function ir(e,t,n,r,i){var a=e.angle,o=e.ratio,s=e.x,c=e.y,l=t.width,u=t.height,d=Zn(),f=Math.min(l,u)-2*r,p=rr(t,n);return i?(tr(d,er(Zn(),s,c)),tr(d,Qn(Zn(),o)),tr(d,$n(Zn(),a)),tr(d,Qn(Zn(),l/f/2/p,u/f/2/p))):(tr(d,Qn(Zn(),f/l*2*p,f/u*2*p)),tr(d,$n(Zn(),-a)),tr(d,Qn(Zn(),1/o)),tr(d,er(Zn(),-s,-c))),d}function ar(e,t,n){var r=nr(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,a=r.y;return 1/Math.sqrt(i**2+a**2)/n.width}function or(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEachNode(function(e,a){var o=a.x,s=a.y;o<t&&(t=o),o>n&&(n=o),s<r&&(r=s),s>i&&(i=s)}),{x:[t,n],y:[r,i]}}function sr(e){if(!(0,Jn.default)(e))throw Error(`Sigma: invalid graph instance.`);e.forEachNode(function(e,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw Error(`Sigma: Coordinates of node ${e} are invalid. A node must have a numeric 'x' and 'y' attribute.`)})}function cr(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var a in n)r.setAttribute(a,n[a]);return r}function lr(){return window.devicePixelRatio===void 0?1:window.devicePixelRatio}function ur(e,t,n){return n.sort(function(e,n){var r=t(e)||0,i=t(n)||0;return r<i?-1:r>i?1:0})}function dr(e){var t=Pt(e.x,2),n=t[0],r=t[1],i=Pt(e.y,2),a=i[0],o=i[1],s=Math.max(r-n,o-a),c=(r+n)/2,l=(o+a)/2;(s===0||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(l)&&(l=0);var u=function(e){return{x:.5+(e.x-c)/s,y:.5+(e.y-l)/s}};return u.applyTo=function(e){e.x=.5+(e.x-c)/s,e.y=.5+(e.y-l)/s},u.inverse=function(e){return{x:c+s*(e.x-.5),y:l+s*(e.y-.5)}},u.ratio=s,u}function fr(e){"@babel/helpers - typeof";return fr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fr(e)}function pr(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(t){e[r+i]=t,i++})}}function mr(e){e||={};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t<n;t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];r&&Object.assign(e,r)}return e}var hr={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:`#999`,defaultNodeType:`circle`,defaultEdgeColor:`#ccc`,defaultEdgeType:`line`,labelFont:`Arial`,labelSize:14,labelWeight:`normal`,labelColor:{color:`#000`},edgeLabelFont:`Arial`,edgeLabelSize:14,edgeLabelWeight:`normal`,edgeLabelColor:{attribute:`color`},stagePadding:30,defaultDrawEdgeLabel:fn,defaultDrawNodeLabel:pn,defaultDrawNodeHover:mn,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:`screen`,autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},gr={circle:xn},_r={arrow:zn,line:Gn};function vr(e){if(typeof e.labelDensity!=`number`||e.labelDensity<0)throw Error("Settings: invalid `labelDensity`. Expecting a positive number.");var t=e.minCameraRatio,n=e.maxCameraRatio;if(typeof t==`number`&&typeof n==`number`&&n<t)throw Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function yr(e){var t=mr({},hr,e);return t.nodeProgramClasses=mr({},gr,t.nodeProgramClasses),t.edgeProgramClasses=mr({},_r,t.edgeProgramClasses),t}var br=1.5,xr=function(e){function t(){var e;return bt(this,t),e=Et(this,t),H(e,`x`,.5),H(e,`y`,.5),H(e,`angle`,0),H(e,`ratio`,1),H(e,`minRatio`,null),H(e,`maxRatio`,null),H(e,`enabledZooming`,!0),H(e,`enabledPanning`,!0),H(e,`enabledRotation`,!0),H(e,`clean`,null),H(e,`nextFrame`,null),H(e,`previousState`,null),H(e,`enabled`,!0),e.previousState=e.getState(),e}return Ot(t,e),St(t,[{key:`enable`,value:function(){return this.enabled=!0,this}},{key:`disable`,value:function(){return this.enabled=!1,this}},{key:`getState`,value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:`hasState`,value:function(e){return this.x===e.x&&this.y===e.y&&this.ratio===e.ratio&&this.angle===e.angle}},{key:`getPreviousState`,value:function(){var e=this.previousState;return e?{x:e.x,y:e.y,angle:e.angle,ratio:e.ratio}:null}},{key:`getBoundedRatio`,value:function(e){var t=e;return typeof this.minRatio==`number`&&(t=Math.max(t,this.minRatio)),typeof this.maxRatio==`number`&&(t=Math.min(t,this.maxRatio)),t}},{key:`validateState`,value:function(e){var t={};return this.enabledPanning&&typeof e.x==`number`&&(t.x=e.x),this.enabledPanning&&typeof e.y==`number`&&(t.y=e.y),this.enabledZooming&&typeof e.ratio==`number`&&(t.ratio=this.getBoundedRatio(e.ratio)),this.enabledRotation&&typeof e.angle==`number`&&(t.angle=e.angle),this.clean?this.clean(U(U({},this.getState()),t)):t}},{key:`isAnimated`,value:function(){return!!this.nextFrame}},{key:`setState`,value:function(e){if(!this.enabled)return this;this.previousState=this.getState();var t=this.validateState(e);return typeof t.x==`number`&&(this.x=t.x),typeof t.y==`number`&&(this.y=t.y),typeof t.ratio==`number`&&(this.ratio=t.ratio),typeof t.angle==`number`&&(this.angle=t.angle),this.hasState(this.previousState)||this.emit(`updated`,this.getState()),this}},{key:`updateState`,value:function(e){return this.setState(e(this.getState())),this}},{key:`animate`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!r)return new Promise(function(r){return t.animate(e,n,r)});if(this.enabled){var i=U(U({},Xn),n),a=this.validateState(e),o=typeof i.easing==`function`?i.easing:Yn[i.easing],s=Date.now(),c=this.getState(),l=function(){var e=(Date.now()-s)/i.duration;if(e>=1){t.nextFrame=null,t.setState(a),t.animationCallback&&=(t.animationCallback.call(null),void 0);return}var n=o(e),r={};typeof a.x==`number`&&(r.x=c.x+(a.x-c.x)*n),typeof a.y==`number`&&(r.y=c.y+(a.y-c.y)*n),t.enabledRotation&&typeof a.angle==`number`&&(r.angle=c.angle+(a.angle-c.angle)*n),typeof a.ratio==`number`&&(r.ratio=c.ratio+(a.ratio-c.ratio)*n),t.setState(r),t.nextFrame=requestAnimationFrame(l)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(l)):l(),this.animationCallback=r}}},{key:`animatedZoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||br)},e):this.animate({ratio:this.ratio/br})}},{key:`animatedUnzoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||br)},e):this.animate({ratio:this.ratio*br})}},{key:`animatedReset`,value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:`copy`,value:function(){return t.from(this.getState())}}],[{key:`from`,value:function(e){return new t().setState(e)}}])}(Kn);function Sr(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function Cr(e,t){var n=U(U({},Sr(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function wr(e){var t=`x`in e?e:U(U({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function Tr(e,t){return U(U({},Cr(e,t)),{},{delta:kr(e)})}var Er=2;function Dr(e){for(var t=[],n=0,r=Math.min(e.length,Er);n<r;n++)t.push(e[n]);return t}function Or(e,t,n){var r={touches:Dr(e.touches).map(function(e){return Sr(e,n)}),previousTouches:t.map(function(e){return Sr(e,n)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:e};return r}function kr(e){if(e.deltaY!==void 0)return e.deltaY*-3/360;if(e.detail!==void 0)return e.detail/-9;throw Error(`Captor: could not extract delta from event.`)}var Ar=function(e){function t(e,n){var r;return bt(this,t),r=Et(this,t),r.container=e,r.renderer=n,r}return Ot(t,e),St(t)}(Kn),jr=[`doubleClickTimeout`,`doubleClickZoomingDuration`,`doubleClickZoomingRatio`,`dragTimeout`,`draggedEventsTolerance`,`inertiaDuration`,`inertiaRatio`,`zoomDuration`,`zoomingRatio`].reduce(function(e,t){return U(U({},e),{},H({},t,hr[t]))},{}),Mr=function(e){function t(e,n){var r;return bt(this,t),r=Et(this,t,[e,n]),H(r,`enabled`,!0),H(r,`draggedEvents`,0),H(r,`downStartTime`,null),H(r,`lastMouseX`,null),H(r,`lastMouseY`,null),H(r,`isMouseDown`,!1),H(r,`isMoving`,!1),H(r,`movingTimeout`,null),H(r,`startCameraState`,null),H(r,`clicks`,0),H(r,`doubleClickTimeout`,null),H(r,`currentWheelDirection`,0),H(r,`settings`,jr),r.handleClick=r.handleClick.bind(r),r.handleRightClick=r.handleRightClick.bind(r),r.handleDown=r.handleDown.bind(r),r.handleUp=r.handleUp.bind(r),r.handleMove=r.handleMove.bind(r),r.handleWheel=r.handleWheel.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleEnter=r.handleEnter.bind(r),e.addEventListener(`click`,r.handleClick,{capture:!1}),e.addEventListener(`contextmenu`,r.handleRightClick,{capture:!1}),e.addEventListener(`mousedown`,r.handleDown,{capture:!1}),e.addEventListener(`wheel`,r.handleWheel,{capture:!1}),e.addEventListener(`mouseleave`,r.handleLeave,{capture:!1}),e.addEventListener(`mouseenter`,r.handleEnter,{capture:!1}),document.addEventListener(`mousemove`,r.handleMove,{capture:!1}),document.addEventListener(`mouseup`,r.handleUp,{capture:!1}),r}return Ot(t,e),St(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`click`,this.handleClick),e.removeEventListener(`contextmenu`,this.handleRightClick),e.removeEventListener(`mousedown`,this.handleDown),e.removeEventListener(`wheel`,this.handleWheel),e.removeEventListener(`mouseleave`,this.handleLeave),e.removeEventListener(`mouseenter`,this.handleEnter),document.removeEventListener(`mousemove`,this.handleMove),document.removeEventListener(`mouseup`,this.handleUp)}},{key:`handleClick`,value:function(e){var t=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout==`number`&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(e);setTimeout(function(){t.clicks=0,t.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit(`click`,Cr(e,this.container))}}},{key:`handleRightClick`,value:function(e){this.enabled&&this.emit(`rightClick`,Cr(e,this.container))}},{key:`handleDoubleClick`,value:function(e){if(this.enabled){e.preventDefault(),e.stopPropagation();var t=Cr(e,this.container);if(this.emit(`doubleClick`,t),!t.sigmaDefaultPrevented){var n=this.renderer.getCamera(),r=n.getBoundedRatio(n.getState().ratio/this.settings.doubleClickZoomingRatio);n.animate(this.renderer.getViewportZoomedState(Sr(e,this.container),r),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}}},{key:`handleDown`,value:function(e){if(this.enabled){if(e.button===0){this.startCameraState=this.renderer.getCamera().getState();var t=Sr(e,this.container),n=t.x,r=t.y;this.lastMouseX=n,this.lastMouseY=r,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit(`mousedown`,Cr(e,this.container))}}},{key:`handleUp`,value:function(e){var t=this;if(!(!this.enabled||!this.isMouseDown)){var n=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout==`number`&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var r=Sr(e,this.container),i=r.x,a=r.y,o=n.getState(),s=n.getPreviousState()||{x:0,y:0};this.isMoving?n.animate({x:o.x+this.settings.inertiaRatio*(o.x-s.x),y:o.y+this.settings.inertiaRatio*(o.y-s.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`}):(this.lastMouseX!==i||this.lastMouseY!==a)&&n.setState({x:o.x,y:o.y}),this.isMoving=!1,setTimeout(function(){var e=t.draggedEvents>0;t.draggedEvents=0,e&&t.renderer.getSetting(`hideEdgesOnMove`)&&t.renderer.refresh()},0),this.emit(`mouseup`,Cr(e,this.container))}}},{key:`handleMove`,value:function(e){var t=this;if(this.enabled){var n=Cr(e,this.container);if(this.emit(`mousemovebody`,n),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit(`mousemove`,n),!n.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout==`number`&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.movingTimeout=null,t.isMoving=!1},this.settings.dragTimeout);var r=this.renderer.getCamera(),i=Sr(e,this.container),a=i.x,o=i.y,s=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:a,y:o}),l=s.x-c.x,u=s.y-c.y,d=r.getState(),f=d.x+l,p=d.y+u;r.setState({x:f,y:p}),this.lastMouseX=a,this.lastMouseY=o,e.preventDefault(),e.stopPropagation()}}}},{key:`handleLeave`,value:function(e){this.emit(`mouseleave`,Cr(e,this.container))}},{key:`handleEnter`,value:function(e){this.emit(`mouseenter`,Cr(e,this.container))}},{key:`handleWheel`,value:function(e){var t=this,n=this.renderer.getCamera();if(!(!this.enabled||!n.enabledZooming)){var r=kr(e);if(r){var i=Tr(e,this.container);if(this.emit(`wheel`,i),i.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var a=n.getState().ratio,o=r>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,s=n.getBoundedRatio(a*o),c=r>0?1:-1,l=Date.now();a!==s&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===c&&this.lastWheelTriggerTime&&l-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(n.animate(this.renderer.getViewportZoomedState(Sr(e,this.container),s),{easing:`quadraticOut`,duration:this.settings.zoomDuration},function(){t.currentWheelDirection=0}),this.currentWheelDirection=c,this.lastWheelTriggerTime=l))}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(Ar),Nr=[`dragTimeout`,`inertiaDuration`,`inertiaRatio`,`doubleClickTimeout`,`doubleClickZoomingRatio`,`doubleClickZoomingDuration`,`tapMoveTolerance`].reduce(function(e,t){return U(U({},e),{},H({},t,hr[t]))},{}),Pr=function(e){function t(e,n){var r;return bt(this,t),r=Et(this,t,[e,n]),H(r,`enabled`,!0),H(r,`isMoving`,!1),H(r,`hasMoved`,!1),H(r,`touchMode`,0),H(r,`startTouchesPositions`,[]),H(r,`lastTouches`,[]),H(r,`lastTap`,null),H(r,`settings`,Nr),r.handleStart=r.handleStart.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleMove=r.handleMove.bind(r),e.addEventListener(`touchstart`,r.handleStart,{capture:!1}),e.addEventListener(`touchcancel`,r.handleLeave,{capture:!1}),document.addEventListener(`touchend`,r.handleLeave,{capture:!1,passive:!1}),document.addEventListener(`touchmove`,r.handleMove,{capture:!1,passive:!1}),r}return Ot(t,e),St(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`touchstart`,this.handleStart),e.removeEventListener(`touchcancel`,this.handleLeave),document.removeEventListener(`touchend`,this.handleLeave),document.removeEventListener(`touchmove`,this.handleMove)}},{key:`getDimensions`,value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:`handleStart`,value:function(e){var t=this;if(this.enabled){e.preventDefault();var n=Dr(e.touches);if(this.touchMode=n.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=n.map(function(e){return Sr(e,t.container)}),this.touchMode===2){var r=Pt(this.startTouchesPositions,2),i=r[0],a=i.x,o=i.y,s=r[1],c=s.x,l=s.y;this.startTouchesAngle=Math.atan2(l-o,c-a),this.startTouchesDistance=Math.sqrt((c-a)**2+(l-o)**2)}this.emit(`touchdown`,Or(e,this.lastTouches,this.container)),this.lastTouches=n,this.lastTouchesPositions=this.startTouchesPositions}}},{key:`handleLeave`,value:function(e){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(e.cancelable&&e.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(e.touches.length===1){this.handleStart(e),e.preventDefault();break}case 1:if(this.isMoving){var t=this.renderer.getCamera(),n=t.getState(),r=t.getPreviousState()||{x:0,y:0};t.animate({x:n.x+this.settings.inertiaRatio*(n.x-r.x),y:n.y+this.settings.inertiaRatio*(n.y-r.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit(`touchup`,Or(e,this.lastTouches,this.container)),!e.touches.length){var i=Sr(this.lastTouches[0],this.container),a=this.startTouchesPositions[0],o=(i.x-a.x)**2+(i.y-a.y)**2;if(!e.touches.length&&o<this.settings.tapMoveTolerance**2)if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var s=Or(e,this.lastTouches,this.container);if(this.emit(`doubletap`,s),this.lastTap=null,!s.sigmaDefaultPrevented){var c=this.renderer.getCamera(),l=c.getBoundedRatio(c.getState().ratio/this.settings.doubleClickZoomingRatio);c.animate(this.renderer.getViewportZoomedState(i,l),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}else{var u=Or(e,this.lastTouches,this.container);this.emit(`tap`,u),this.lastTap={time:Date.now(),position:u.touches[0]||u.previousTouches[0]}}}this.lastTouches=Dr(e.touches),this.startTouchesPositions=[]}}},{key:`handleMove`,value:function(e){var t=this;if(!(!this.enabled||!this.startTouchesPositions.length)){e.preventDefault();var n=Dr(e.touches),r=n.map(function(e){return Sr(e,t.container)}),i=this.lastTouches;this.lastTouches=n,this.lastTouchesPositions=r;var a=Or(e,i,this.container);if(this.emit(`touchmove`,a),!a.sigmaDefaultPrevented&&(this.hasMoved||=r.some(function(e,n){var r=t.startTouchesPositions[n];return r&&(e.x!==r.x||e.y!==r.y)}),this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.isMoving=!1},this.settings.dragTimeout);var o=this.renderer.getCamera(),s=this.startCameraState,c=this.renderer.getSetting(`stagePadding`);switch(this.touchMode){case 1:var l=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=l.x,d=l.y,f=this.renderer.viewportToFramedGraph(r[0]),p=f.x,m=f.y;o.setState({x:s.x+u-p,y:s.y+d-m});break;case 2:var h={x:.5,y:.5,angle:0,ratio:1},g=r[0],_=g.x,v=g.y,y=r[1],b=y.x,x=y.y,S=Math.atan2(x-v,b-_)-this.startTouchesAngle,C=Math.hypot(x-v,b-_)/this.startTouchesDistance,w=o.getBoundedRatio(s.ratio/C);h.ratio=w,h.angle=s.angle+S;var T=this.getDimensions(),E=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:s}),D=Math.min(T.width,T.height)-2*c,O=D/T.width,ee=D/T.height,k=w/D,A=_-D/2/O,j=v-D/2/ee,M=[A*Math.cos(-h.angle)-j*Math.sin(-h.angle),j*Math.cos(-h.angle)+A*Math.sin(-h.angle)];A=M[0],j=M[1],h.x=E.x-A*k,h.y=E.y+j*k,o.setState(h);break}}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(Ar);function Fr(e){if(Array.isArray(e))return jt(e)}function Ir(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Lr(){throw TypeError(`Invalid attempt to spread non-iterable instance.+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rr(e){return Fr(e)||Ir(e)||Mt(e)||Lr()}function zr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Br(e,t){if(e==null)return{};var n,r,i=zr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Vr=function(){function e(t,n){bt(this,e),this.key=t,this.size=n}return St(e,null,[{key:`compare`,value:function(e,t){return e.size>t.size?-1:e.size<t.size||e.key>t.key?1:-1}}])}(),Hr=function(){function e(){bt(this,e),H(this,`width`,0),H(this,`height`,0),H(this,`cellSize`,0),H(this,`columns`,0),H(this,`rows`,0),H(this,`cells`,{})}return St(e,[{key:`resizeAndClear`,value:function(e,t){this.width=e.width,this.height=e.height,this.cellSize=t,this.columns=Math.ceil(e.width/t),this.rows=Math.ceil(e.height/t),this.cells={}}},{key:`getIndex`,value:function(e){var t=Math.floor(e.x/this.cellSize);return Math.floor(e.y/this.cellSize)*this.columns+t}},{key:`add`,value:function(e,t,n){var r=new Vr(e,t),i=this.getIndex(n),a=this.cells[i];a||(a=[],this.cells[i]=a),a.push(r)}},{key:`organize`,value:function(){for(var e in this.cells)this.cells[e].sort(Vr.compare)}},{key:`getLabelsToDisplay`,value:function(e,t){var n=this.cellSize*this.cellSize,r=n/e/e*t/n,i=Math.ceil(r),a=[];for(var o in this.cells)for(var s=this.cells[o],c=0;c<Math.min(i,s.length);c++)a.push(s[c].key);return a}}])}();function oee(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,i=e.displayedNodeLabels,a=[];return t.forEachEdge(function(e,t,o,s){(o===n||s===n||r.has(o)||r.has(s)||i.has(o)&&i.has(s))&&a.push(e)}),a}var Ur=150,Wr=50,Gr=Object.prototype.hasOwnProperty;function Kr(e,t,n){if(!Gr.call(n,`x`)||!Gr.call(n,`y`))throw Error(`Sigma: could not find a valid position (x, y) for node "${t}". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?`);return n.color||=e.defaultNodeColor,!n.label&&n.label!==``&&(n.label=null),n.label!==void 0&&n.label!==null?n.label=``+n.label:n.label=null,n.size||=2,Gr.call(n,`hidden`)||(n.hidden=!1),Gr.call(n,`highlighted`)||(n.highlighted=!1),Gr.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultNodeType),n.zIndex||=0,n}function qr(e,t,n){return n.color||=e.defaultEdgeColor,n.label||=``,n.size||=.5,Gr.call(n,`hidden`)||(n.hidden=!1),Gr.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultEdgeType),n.zIndex||=0,n}var Jr=function(e){function t(e,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(bt(this,t),r=Et(this,t),H(r,`elements`,{}),H(r,`canvasContexts`,{}),H(r,`webGLContexts`,{}),H(r,`pickingLayers`,new Set),H(r,`textures`,{}),H(r,`frameBuffers`,{}),H(r,`activeListeners`,{}),H(r,`labelGrid`,new Hr),H(r,`nodeDataCache`,{}),H(r,`edgeDataCache`,{}),H(r,`nodeProgramIndex`,{}),H(r,`edgeProgramIndex`,{}),H(r,`nodesWithForcedLabels`,new Set),H(r,`edgesWithForcedLabels`,new Set),H(r,`nodeExtent`,{x:[0,1],y:[0,1]}),H(r,`nodeZExtent`,[1/0,-1/0]),H(r,`edgeZExtent`,[1/0,-1/0]),H(r,`matrix`,Zn()),H(r,`invMatrix`,Zn()),H(r,`correctionRatio`,1),H(r,`customBBox`,null),H(r,`normalizationFunction`,dr({x:[0,1],y:[0,1]})),H(r,`graphToViewportRatio`,1),H(r,`itemIDsIndex`,{}),H(r,`nodeIndices`,{}),H(r,`edgeIndices`,{}),H(r,`width`,0),H(r,`height`,0),H(r,`pixelRatio`,lr()),H(r,`pickingDownSizingRatio`,2*r.pixelRatio),H(r,`displayedNodeLabels`,new Set),H(r,`displayedEdgeLabels`,new Set),H(r,`highlightedNodes`,new Set),H(r,`hoveredNode`,null),H(r,`hoveredEdge`,null),H(r,`renderFrame`,null),H(r,`renderHighlightedNodesFrame`,null),H(r,`needToProcess`,!1),H(r,`checkEdgesEventsFrame`,null),H(r,`nodePrograms`,{}),H(r,`nodeHoverPrograms`,{}),H(r,`edgePrograms`,{}),r.settings=yr(i),vr(r.settings),sr(e),!(n instanceof HTMLElement))throw Error(`Sigma: container should be an html element.`);for(var a in r.graph=e,r.container=n,r.createWebGLContext(`edges`,{picking:i.enableEdgeEvents}),r.createCanvasContext(`edgeLabels`),r.createWebGLContext(`nodes`,{picking:!0}),r.createCanvasContext(`labels`),r.createCanvasContext(`hovers`),r.createWebGLContext(`hoverNodes`),r.createCanvasContext(`mouse`,{style:{touchAction:`none`,userSelect:`none`}}),r.resize(),r.settings.nodeProgramClasses)r.registerNodeProgram(a,r.settings.nodeProgramClasses[a],r.settings.nodeHoverProgramClasses[a]);for(var o in r.settings.edgeProgramClasses)r.registerEdgeProgram(o,r.settings.edgeProgramClasses[o]);return r.camera=new xr,r.bindCameraHandlers(),r.mouseCaptor=new Mr(r.elements.mouse,r),r.mouseCaptor.setSettings(r.settings),r.touchCaptor=new Pr(r.elements.mouse,r),r.touchCaptor.setSettings(r.settings),r.bindEventHandlers(),r.bindGraphHandlers(),r.handleSettingsUpdate(),r.refresh(),r}return Ot(t,e),St(t,[{key:`registerNodeProgram`,value:function(e,t,n){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new t(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(n||t)(this.webGLContexts.hoverNodes,null,this),this}},{key:`registerEdgeProgram`,value:function(e,t){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new t(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:`unregisterNodeProgram`,value:function(e){if(this.nodePrograms[e]){var t=this.nodePrograms,n=t[e],r=Br(t,[e].map(yt));n.kill(),this.nodePrograms=r}if(this.nodeHoverPrograms[e]){var i=this.nodeHoverPrograms,a=i[e],o=Br(i,[e].map(yt));a.kill(),this.nodePrograms=o}return this}},{key:`unregisterEdgeProgram`,value:function(e){if(this.edgePrograms[e]){var t=this.edgePrograms,n=t[e],r=Br(t,[e].map(yt));n.kill(),this.edgePrograms=r}return this}},{key:`resetWebGLTexture`,value:function(e){var t=this.webGLContexts[e],n=this.frameBuffers[e],r=this.textures[e];r&&t.deleteTexture(r);var i=t.createTexture();return t.bindFramebuffer(t.FRAMEBUFFER,n),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),this.textures[e]=i,this}},{key:`bindCameraHandlers`,value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on(`updated`,this.activeListeners.camera),this}},{key:`unbindCameraHandlers`,value:function(){return this.camera.removeListener(`updated`,this.activeListeners.camera),this}},{key:`getNodeAtPosition`,value:function(e){var t=e.x,n=e.y,r=Yt(this.webGLContexts.nodes,this.frameBuffers.nodes,t,n,this.pixelRatio,this.pickingDownSizingRatio),i=Jt.apply(void 0,Rr(r)),a=this.itemIDsIndex[i];return a&&a.type===`node`?a.id:null}},{key:`bindEventHandlers`,value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener(`resize`,this.activeListeners.handleResize),this.activeListeners.handleMove=function(t){var n=wr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}},i=e.getNodeAtPosition(n);if(i&&e.hoveredNode!==i&&!e.nodeDataCache[i].hidden){e.hoveredNode&&e.emit(`leaveNode`,U(U({},r),{},{node:e.hoveredNode})),e.hoveredNode=i,e.emit(`enterNode`,U(U({},r),{},{node:i})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(n)!==e.hoveredNode){var a=e.hoveredNode;e.hoveredNode=null,e.emit(`leaveNode`,U(U({},r),{},{node:a})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var o=e.hoveredNode?null:e.getEdgeAtPoint(r.event.x,r.event.y);o!==e.hoveredEdge&&(e.hoveredEdge&&e.emit(`leaveEdge`,U(U({},r),{},{edge:e.hoveredEdge})),o&&e.emit(`enterEdge`,U(U({},r),{},{edge:o})),e.hoveredEdge=o)}},this.activeListeners.handleMoveBody=function(t){var n=wr(t);e.emit(`moveBody`,{event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(t){var n=wr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.hoveredNode&&(e.emit(`leaveNode`,U(U({},r),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit(`leaveEdge`,U(U({},r),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit(`leaveStage`,U({},r))},this.activeListeners.handleEnter=function(t){var n=wr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.emit(`enterStage`,U({},r))};var t=function(t){return function(n){var r=wr(n),i={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},a=e.getNodeAtPosition(r);if(a)return e.emit(`${t}Node`,U(U({},i),{},{node:a}));if(e.settings.enableEdgeEvents){var o=e.getEdgeAtPoint(r.x,r.y);if(o)return e.emit(`${t}Edge`,U(U({},i),{},{edge:o}))}return e.emit(`${t}Stage`,i)}};return this.activeListeners.handleClick=t(`click`),this.activeListeners.handleRightClick=t(`rightClick`),this.activeListeners.handleDoubleClick=t(`doubleClick`),this.activeListeners.handleWheel=t(`wheel`),this.activeListeners.handleDown=t(`down`),this.activeListeners.handleUp=t(`up`),this.mouseCaptor.on(`mousemove`,this.activeListeners.handleMove),this.mouseCaptor.on(`mousemovebody`,this.activeListeners.handleMoveBody),this.mouseCaptor.on(`click`,this.activeListeners.handleClick),this.mouseCaptor.on(`rightClick`,this.activeListeners.handleRightClick),this.mouseCaptor.on(`doubleClick`,this.activeListeners.handleDoubleClick),this.mouseCaptor.on(`wheel`,this.activeListeners.handleWheel),this.mouseCaptor.on(`mousedown`,this.activeListeners.handleDown),this.mouseCaptor.on(`mouseup`,this.activeListeners.handleUp),this.mouseCaptor.on(`mouseleave`,this.activeListeners.handleLeave),this.mouseCaptor.on(`mouseenter`,this.activeListeners.handleEnter),this.touchCaptor.on(`touchdown`,this.activeListeners.handleDown),this.touchCaptor.on(`touchdown`,this.activeListeners.handleMove),this.touchCaptor.on(`touchup`,this.activeListeners.handleUp),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMove),this.touchCaptor.on(`tap`,this.activeListeners.handleClick),this.touchCaptor.on(`doubletap`,this.activeListeners.handleDoubleClick),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMoveBody),this}},{key:`bindGraphHandlers`,value:function(){var e=this,t=this.graph,n=new Set([`x`,`y`,`zIndex`,`type`]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(r){var i=r.hints?.attributes;e.graph.forEachNode(function(t){return e.updateNode(t)});var a=!i||i.some(function(e){return n.has(e)});e.refresh({partialGraph:{nodes:t.nodes()},skipIndexation:!a,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(n){var r=n.hints?.attributes;e.graph.forEachEdge(function(t){return e.updateEdge(t)});var i=r&&[`zIndex`,`type`].some(function(e){return r?.includes(e)});e.refresh({partialGraph:{edges:t.edges()},skipIndexation:!i,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(t){var n=t.key;e.addNode(n),e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(t){var n=t.key;e.removeNode(n),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(t){var n=t.key;e.addEdge(n),e.refresh({partialGraph:{edges:[n]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{edges:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(t){var n=t.key;e.removeEdge(n),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},t.on(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),t.on(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),t.on(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),t.on(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),t.on(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),t.on(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),t.on(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),t.on(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),t.on(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),t.on(`cleared`,this.activeListeners.clearGraphUpdate),this}},{key:`unbindGraphHandlers`,value:function(){var e=this.graph;e.removeListener(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),e.removeListener(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),e.removeListener(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),e.removeListener(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),e.removeListener(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),e.removeListener(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),e.removeListener(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),e.removeListener(`cleared`,this.activeListeners.clearGraphUpdate)}},{key:`getEdgeAtPoint`,value:function(e,t){var n=Yt(this.webGLContexts.edges,this.frameBuffers.edges,e,t,this.pixelRatio,this.pickingDownSizingRatio),r=Jt.apply(void 0,Rr(n)),i=this.itemIDsIndex[r];return i&&i.type===`edge`?i.id:null}},{key:`process`,value:function(){var e=this;this.emit(`beforeProcess`);var t=this.graph,n=this.settings,r=this.getDimensions();if(this.nodeExtent=or(this.graph),!this.settings.autoRescale){var i=r.width,a=r.height,o=this.nodeExtent,s=o.x,c=o.y;this.nodeExtent={x:[(s[0]+s[1])/2-i/2,(s[0]+s[1])/2+i/2],y:[(c[0]+c[1])/2-a/2,(c[0]+c[1])/2+a/2]}}this.normalizationFunction=dr(this.customBBox||this.nodeExtent);var l=ir(new xr().getState(),r,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(r,n.labelGridCellSize);for(var u={},d={},f={},p={},m=1,h=t.nodes(),g=0,_=h.length;g<_;g++){var v=h[g],y=this.nodeDataCache[v],b=t.getNodeAttributes(v);y.x=b.x,y.y=b.y,this.normalizationFunction.applyTo(y),typeof y.label==`string`&&!y.hidden&&this.labelGrid.add(v,y.size,this.framedGraphToViewport(y,{matrix:l})),u[y.type]=(u[y.type]||0)+1}for(var x in this.labelGrid.organize(),this.nodePrograms){if(!Gr.call(this.nodePrograms,x))throw Error(`Sigma: could not find a suitable program for node type "${x}"!`);this.nodePrograms[x].reallocate(u[x]||0),u[x]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(h=ur(this.nodeZExtent,function(t){return e.nodeDataCache[t].zIndex},h));for(var S=0,C=h.length;S<C;S++){var w=h[S];d[w]=m,p[d[w]]={type:`node`,id:w},m++;var T=this.nodeDataCache[w];this.addNodeToProgram(w,d[w],u[T.type]++)}for(var E={},D=t.edges(),O=0,ee=D.length;O<ee;O++){var k=D[O],A=this.edgeDataCache[k];E[A.type]=(E[A.type]||0)+1}for(var j in this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(D=ur(this.edgeZExtent,function(t){return e.edgeDataCache[t].zIndex},D)),this.edgePrograms){if(!Gr.call(this.edgePrograms,j))throw Error(`Sigma: could not find a suitable program for edge type "${j}"!`);this.edgePrograms[j].reallocate(E[j]||0),E[j]=0}for(var M=0,N=D.length;M<N;M++){var P=D[M];f[P]=m,p[f[P]]={type:`edge`,id:P},m++;var te=this.edgeDataCache[P];this.addEdgeToProgram(P,f[P],E[te.type]++)}return this.itemIDsIndex=p,this.nodeIndices=d,this.edgeIndices=f,this.emit(`afterProcess`),this}},{key:`handleSettingsUpdate`,value:function(e){var t=this,n=this.settings;if(this.camera.minRatio=n.minCameraRatio,this.camera.maxRatio=n.maxCameraRatio,this.camera.enabledZooming=n.enableCameraZooming,this.camera.enabledPanning=n.enableCameraPanning,this.camera.enabledRotation=n.enableCameraRotation,n.cameraPanBoundaries?this.camera.clean=function(e){return t.cleanCameraState(e,n.cameraPanBoundaries&&fr(n.cameraPanBoundaries)===`object`?n.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),e){if(e.edgeProgramClasses!==n.edgeProgramClasses){for(var r in n.edgeProgramClasses)n.edgeProgramClasses[r]!==e.edgeProgramClasses[r]&&this.registerEdgeProgram(r,n.edgeProgramClasses[r]);for(var i in e.edgeProgramClasses)n.edgeProgramClasses[i]||this.unregisterEdgeProgram(i)}if(e.nodeProgramClasses!==n.nodeProgramClasses||e.nodeHoverProgramClasses!==n.nodeHoverProgramClasses){for(var a in n.nodeProgramClasses)(n.nodeProgramClasses[a]!==e.nodeProgramClasses[a]||n.nodeHoverProgramClasses[a]!==e.nodeHoverProgramClasses[a])&&this.registerNodeProgram(a,n.nodeProgramClasses[a],n.nodeHoverProgramClasses[a]);for(var o in e.nodeProgramClasses)n.nodeProgramClasses[o]||this.unregisterNodeProgram(o)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:`cleanCameraState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.tolerance,r=n===void 0?0:n,i=t.boundaries,a=U({},e),o=i||this.nodeExtent,s=Pt(o.x,2),c=s[0],l=s[1],u=Pt(o.y,2),d=u[0],f=u[1],p=[this.graphToViewport({x:c,y:d},{cameraState:e}),this.graphToViewport({x:l,y:d},{cameraState:e}),this.graphToViewport({x:c,y:f},{cameraState:e}),this.graphToViewport({x:l,y:f},{cameraState:e})],m=1/0,h=-1/0,g=1/0,_=-1/0;p.forEach(function(e){var t=e.x,n=e.y;m=Math.min(m,t),h=Math.max(h,t),g=Math.min(g,n),_=Math.max(_,n)});var v=h-m,y=_-g,b=this.getDimensions(),x=b.width,S=b.height,C=0,w=0;if(v>=x?h<x-r?C=h-(x-r):m>r&&(C=m-r):h>x+r?C=h-(x+r):m<-r&&(C=m+r),y>=S?_<S-r?w=_-(S-r):g>r&&(w=g-r):_>S+r?w=_-(S+r):g<-r&&(w=g+r),C||w){var T=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),E=this.viewportToFramedGraph({x:C,y:w},{cameraState:e});C=E.x-T.x,w=E.y-T.y,a.x+=C,a.y+=w}return a}},{key:`renderLabels`,value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),t=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);pr(t,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var n=this.canvasContexts.labels,r=0,i=t.length;r<i;r++){var a=t[r],o=this.nodeDataCache[a];if(!this.displayedNodeLabels.has(a)&&!o.hidden){var s=this.framedGraphToViewport(o),c=s.x,l=s.y,u=this.scaleSize(o.size);if(!(!o.forceLabel&&u<this.settings.labelRenderedSizeThreshold)&&!(c<-Ur||c>this.width+Ur||l<-Wr||l>this.height+Wr)){this.displayedNodeLabels.add(a);var d=this.settings.defaultDrawNodeLabel;(this.nodePrograms[o.type]?.drawLabel||d)(n,U(U({key:a},o),{},{size:u,x:c,y:l}),this.settings)}}}return this}},{key:`renderEdgeLabels`,value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var t=oee({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});pr(t,this.edgesWithForcedLabels);for(var n=new Set,r=0,i=t.length;r<i;r++){var a=t[r],o=this.graph.extremities(a),s=this.nodeDataCache[o[0]],c=this.nodeDataCache[o[1]],l=this.edgeDataCache[a];if(!n.has(a)&&!(l.hidden||s.hidden||c.hidden)){var u=this.settings.defaultDrawEdgeLabel;(this.edgePrograms[l.type]?.drawLabel||u)(e,U(U({key:a},l),{},{size:this.scaleSize(l.size)}),U(U(U({key:o[0]},s),this.framedGraphToViewport(s)),{},{size:this.scaleSize(s.size)}),U(U(U({key:o[1]},c),this.framedGraphToViewport(c)),{},{size:this.scaleSize(c.size)}),this.settings),n.add(a)}}return this.displayedEdgeLabels=n,this}},{key:`renderHighlightedNodes`,value:function(){var e=this,t=this.canvasContexts.hovers;t.clearRect(0,0,this.width,this.height);var n=function(n){var r=e.nodeDataCache[n],i=e.framedGraphToViewport(r),a=i.x,o=i.y,s=e.scaleSize(r.size),c=e.settings.defaultDrawNodeHover;(e.nodePrograms[r.type]?.drawHover||c)(t,U(U({key:n},r),{},{size:s,x:a,y:o}),e.settings)},r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach(function(t){t!==e.hoveredNode&&r.push(t)}),r.forEach(function(e){return n(e)});var i={};for(var a in r.forEach(function(t){var n=e.nodeDataCache[t].type;i[n]=(i[n]||0)+1}),this.nodeHoverPrograms)this.nodeHoverPrograms[a].reallocate(i[a]||0),i[a]=0;r.forEach(function(t){var n=e.nodeDataCache[t];e.nodeHoverPrograms[n.type].process(0,i[n.type]++,n)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var o=this.getRenderParams();for(var s in this.nodeHoverPrograms)this.nodeHoverPrograms[s].render(o)}},{key:`scheduleHighlightedNodesRender`,value:function(){var e=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){e.renderHighlightedNodesFrame=null,e.renderHighlightedNodes(),e.renderEdgeLabels()}))}},{key:`render`,value:function(){var e=this;this.emit(`beforeRender`);var t=function(){return e.emit(`afterRender`),e};if(this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(t){return e.resetWebGLTexture(t)}),!this.graph.order)return t();var n=this.mouseCaptor,r=this.camera.isAnimated()||n.isMoving||n.draggedEvents||n.currentWheelDirection,i=this.camera.getState(),a=this.getDimensions(),o=this.getGraphDimensions(),s=this.getStagePadding();this.matrix=ir(i,a,o,s),this.invMatrix=ir(i,a,o,s,!0),this.correctionRatio=ar(this.matrix,i,a),this.graphToViewportRatio=this.getGraphToViewportRatio();var c=this.getRenderParams();for(var l in this.nodePrograms)this.nodePrograms[l].render(c);if(!this.settings.hideEdgesOnMove||!r)for(var u in this.edgePrograms)this.edgePrograms[u].render(c);return this.settings.hideLabelsOnMove&&r?t():(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes(),t())}},{key:`addNode`,value:function(e){var t=Object.assign({},this.graph.getNodeAttributes(e));this.settings.nodeReducer&&(t=this.settings.nodeReducer(e,t));var n=Kr(this.settings,e,t);this.nodeDataCache[e]=n,this.nodesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.nodesWithForcedLabels.add(e),this.highlightedNodes.delete(e),n.highlighted&&!n.hidden&&this.highlightedNodes.add(e),this.settings.zIndex&&(n.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=n.zIndex),n.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=n.zIndex))}},{key:`updateNode`,value:function(e){this.addNode(e);var t=this.nodeDataCache[e];this.normalizationFunction.applyTo(t)}},{key:`removeNode`,value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:`addEdge`,value:function(e){var t=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(t=this.settings.edgeReducer(e,t));var n=qr(this.settings,e,t);this.edgeDataCache[e]=n,this.edgesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(n.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=n.zIndex),n.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=n.zIndex))}},{key:`updateEdge`,value:function(e){this.addEdge(e)}},{key:`removeEdge`,value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:`clearNodeIndices`,value:function(){this.labelGrid=new Hr,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:`clearEdgeIndices`,value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:`clearIndices`,value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:`clearNodeState`,value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:`clearEdgeState`,value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:`clearState`,value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:`addNodeToProgram`,value:function(e,t,n){var r=this.nodeDataCache[e],i=this.nodePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for node type "${r.type}"!`);i.process(t,n,r),this.nodeProgramIndex[e]=n}},{key:`addEdgeToProgram`,value:function(e,t,n){var r=this.edgeDataCache[e],i=this.edgePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for edge type "${r.type}"!`);var a=this.graph.extremities(e),o=this.nodeDataCache[a[0]],s=this.nodeDataCache[a[1]];i.process(t,n,o,s,r),this.edgeProgramIndex[e]=n}},{key:`getRenderParams`,value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:`getStagePadding`,value:function(){var e=this.settings,t=e.stagePadding;return e.autoRescale&&t||0}},{key:`createLayer`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw Error(`Sigma: a layer named "${e}" already exists`);var r=cr(t,{position:`absolute`},{class:`sigma-${e}`});return n.style&&Object.assign(r.style,n.style),this.elements[e]=r,`beforeLayer`in n&&n.beforeLayer?this.elements[n.beforeLayer].before(r):`afterLayer`in n&&n.afterLayer?this.elements[n.afterLayer].after(r):this.container.appendChild(r),r}},{key:`createCanvas`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,`canvas`,t)}},{key:`createCanvasContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.createCanvas(e,t),r={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=n.getContext(`2d`,r),this}},{key:`createWebGLContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t?.canvas||this.createCanvas(e,t);t.hidden&&n.remove();var r=U({preserveDrawingBuffer:!1,antialias:!1},t),i=n.getContext(`webgl2`,r);i||=n.getContext(`webgl`,r),i||=n.getContext(`experimental-webgl`,r);var a=i;if(this.webGLContexts[e]=a,a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),t.picking){this.pickingLayers.add(e);var o=a.createFramebuffer();if(!o)throw Error(`Sigma: cannot create a new frame buffer for layer ${e}`);this.frameBuffers[e]=o}return a}},{key:`killLayer`,value:function(e){var t=this.elements[e];if(!t)throw Error(`Sigma: cannot kill layer ${e}, which does not exist`);if(this.webGLContexts[e]){var n;(n=this.webGLContexts[e].getExtension(`WEBGL_lose_context`))==null||n.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return t.remove(),delete this.elements[e],this}},{key:`getCamera`,value:function(){return this.camera}},{key:`setCamera`,value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:`getContainer`,value:function(){return this.container}},{key:`getGraph`,value:function(){return this.graph}},{key:`setGraph`,value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:`getMouseCaptor`,value:function(){return this.mouseCaptor}},{key:`getTouchCaptor`,value:function(){return this.touchCaptor}},{key:`getDimensions`,value:function(){return{width:this.width,height:this.height}}},{key:`getGraphDimensions`,value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:`getNodeDisplayData`,value:function(e){var t=this.nodeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getEdgeDisplayData`,value:function(e){var t=this.edgeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getNodeDisplayedLabels`,value:function(){return new Set(this.displayedNodeLabels)}},{key:`getEdgeDisplayedLabels`,value:function(){return new Set(this.displayedEdgeLabels)}},{key:`getSettings`,value:function(){return U({},this.settings)}},{key:`getSetting`,value:function(e){return this.settings[e]}},{key:`setSetting`,value:function(e,t){var n=U({},this.settings);return this.settings[e]=t,vr(this.settings),this.handleSettingsUpdate(n),this.scheduleRefresh(),this}},{key:`updateSetting`,value:function(e,t){return this.setSetting(e,t(this.settings[e])),this}},{key:`setSettings`,value:function(e){var t=U({},this.settings);return this.settings=U(U({},this.settings),e),vr(this.settings),this.handleSettingsUpdate(t),this.scheduleRefresh(),this}},{key:`resize`,value:function(e){var t=this.width,n=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=lr(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw Error(`Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw Error(`Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(!e&&t===this.width&&n===this.height)return this;for(var r in this.elements){var i=this.elements[r];i.style.width=this.width+`px`,i.style.height=this.height+`px`}for(var a in this.canvasContexts)this.elements[a].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[a].setAttribute(`height`,this.height*this.pixelRatio+`px`),this.pixelRatio!==1&&this.canvasContexts[a].scale(this.pixelRatio,this.pixelRatio);for(var o in this.webGLContexts){this.elements[o].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[o].setAttribute(`height`,this.height*this.pixelRatio+`px`);var s=this.webGLContexts[o];if(s.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(o)){var c=this.textures[o];c&&s.deleteTexture(c)}}return this.emit(`resize`),this}},{key:`clear`,value:function(){return this.emit(`beforeClear`),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit(`afterClear`),this}},{key:`refresh`,value:function(e){var t=this,n=e?.skipIndexation===void 0?!1:e?.skipIndexation,r=e?.schedule===void 0?!1:e.schedule,i=!e||!e.partialGraph;if(i)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(e){return t.addNode(e)}),this.graph.forEachEdge(function(e){return t.addEdge(e)});else{for(var a,o=e.partialGraph?.nodes||[],s=0,c=o?.length||0;s<c;s++){var l=o[s];if(this.updateNode(l),n){var u=this.nodeProgramIndex[l];if(u===void 0)throw Error(`Sigma: node "${l}" can't be repaint`);this.addNodeToProgram(l,this.nodeIndices[l],u)}}for(var d=(e==null||(a=e.partialGraph)==null?void 0:a.edges)||[],f=0,p=d.length;f<p;f++){var m=d[f];if(this.updateEdge(m),n){var h=this.edgeProgramIndex[m];if(h===void 0)throw Error(`Sigma: edge "${m}" can't be repaint`);this.addEdgeToProgram(m,this.edgeIndices[m],h)}}}return(i||!n)&&(this.needToProcess=!0),r?this.scheduleRender():this.render(),this}},{key:`scheduleRender`,value:function(){var e=this;return this.renderFrame||=requestAnimationFrame(function(){e.render()}),this}},{key:`scheduleRefresh`,value:function(e){return this.refresh(U(U({},e),{},{schedule:!0}))}},{key:`getViewportZoomedState`,value:function(e,t){var n=this.camera.getState(),r=n.ratio,i=n.angle,a=n.x,o=n.y,s=this.settings,c=s.minCameraRatio,l=s.maxCameraRatio;typeof l==`number`&&(t=Math.min(t,l)),typeof c==`number`&&(t=Math.max(t,c));var u=t/r,d={x:this.width/2,y:this.height/2},f=this.viewportToFramedGraph(e),p=this.viewportToFramedGraph(d);return{angle:i,x:(f.x-p.x)*(1-u)+a,y:(f.y-p.y)*(1-u)+o,ratio:t}}},{key:`viewRectangle`,value:function(){var e=this.viewportToFramedGraph({x:0,y:0}),t=this.viewportToFramedGraph({x:this.width,y:0}),n=this.viewportToFramedGraph({x:0,y:this.height});return{x1:e.x,y1:e.y,x2:t.x,y2:t.y,height:t.y-n.y}}},{key:`framedGraphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!!t.graphDimensions,r=nr(t.matrix?t.matrix:n?ir(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding()):this.matrix,e);return{x:(1+r.x)*this.width/2,y:(1-r.y)*this.height/2}}},{key:`viewportToFramedGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!t.graphDimensions,r=nr(t.matrix?t.matrix:n?ir(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding(),!0):this.invMatrix,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(r.x)&&(r.x=0),isNaN(r.y)&&(r.y=0),r}},{key:`viewportToGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,t))}},{key:`graphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),t)}},{key:`getGraphToViewportRatio`,value:function(){var e={x:0,y:0},t={x:1,y:1},n=Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),r=this.graphToViewport(e),i=this.graphToViewport(t);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)/n}},{key:`getBBox`,value:function(){return this.nodeExtent}},{key:`getCustomBBox`,value:function(){return this.customBBox}},{key:`setCustomBBox`,value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:`kill`,value:function(){this.emit(`kill`),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener(`resize`,this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.renderHighlightedNodesFrame&&=(cancelAnimationFrame(this.renderHighlightedNodesFrame),null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);for(var t in this.nodePrograms)this.nodePrograms[t].kill();for(var n in this.nodeHoverPrograms)this.nodeHoverPrograms[n].kill();for(var r in this.edgePrograms)this.edgePrograms[r].kill();for(var i in this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={},this.elements)this.killLayer(i);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:`scaleSize`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(t)*(this.getSetting(`itemSizesReference`)===`positions`?t*this.graphToViewportRatio:1)}},{key:`getCanvases`,value:function(){var e={};for(var t in this.elements)this.elements[t]instanceof HTMLCanvasElement&&(e[t]=this.elements[t]);return e}}])}(Kn),Yr=r(((e,t)=>{t.exports=function(){var e,t,n={};(function(){var e=0,t=1,r=2,i=3,a=4,o=5,s=6,c=7,l=8,u=9,d=0,f=1,p=2,m=0,h=1,g=2,_=3,v=4,y=5,b=6,x=7,S=8,C=3,w=10,T=3,E=9,D=10;n.exports=function(n,O,ee){var k,A,j,M,N,P,te,F,I,ne,re=O.length,ie=ee.length,ae=n.adjustSizes,oe=n.barnesHutTheta*n.barnesHutTheta,se,ce,L,R,le,z,B,V=[];for(j=0;j<re;j+=w)O[j+a]=O[j+r],O[j+o]=O[j+i],O[j+r]=0,O[j+i]=0;if(n.outboundAttractionDistribution){for(se=0,j=0;j<re;j+=w)se+=O[j+s];se/=re/w}if(n.barnesHutOptimize){var ue=1/0,de=-1/0,fe=1/0,pe=-1/0,me,he,ge;for(j=0;j<re;j+=w)ue=Math.min(ue,O[j+e]),de=Math.max(de,O[j+e]),fe=Math.min(fe,O[j+t]),pe=Math.max(pe,O[j+t]);var _e=de-ue,ve=pe-fe;for(_e>ve?(fe-=(_e-ve)/2,pe=fe+_e):(ue-=(ve-_e)/2,de=ue+ve),V[0+m]=-1,V[0+h]=(ue+de)/2,V[0+g]=(fe+pe)/2,V[0+_]=Math.max(de-ue,pe-fe),V[0+v]=-1,V[0+y]=-1,V[0+b]=0,V[0+x]=0,V[0+S]=0,k=1,j=0;j<re;j+=w)for(A=0,ge=C;;)if(V[A+y]>=0){me=O[j+e]<V[A+h]?O[j+t]<V[A+g]?V[A+y]:V[A+y]+E:O[j+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,V[A+x]=(V[A+x]*V[A+b]+O[j+e]*O[j+s])/(V[A+b]+O[j+s]),V[A+S]=(V[A+S]*V[A+b]+O[j+t]*O[j+s])/(V[A+b]+O[j+s]),V[A+b]+=O[j+s],A=me;continue}else if(V[A+m]<0){V[A+m]=j;break}else{if(V[A+y]=k*E,F=V[A+_]/2,I=V[A+y],V[I+m]=-1,V[I+h]=V[A+h]-F,V[I+g]=V[A+g]-F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]-F,V[I+g]=V[A+g]+F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]+F,V[I+g]=V[A+g]-F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]+F,V[I+g]=V[A+g]+F,V[I+_]=F,V[I+v]=V[A+v],V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,k+=4,me=O[V[A+m]+e]<V[A+h]?O[V[A+m]+t]<V[A+g]?V[A+y]:V[A+y]+E:O[V[A+m]+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,V[A+b]=O[V[A+m]+s],V[A+x]=O[V[A+m]+e],V[A+S]=O[V[A+m]+t],V[me+m]=V[A+m],V[A+m]=-1,he=O[j+e]<V[A+h]?O[j+t]<V[A+g]?V[A+y]:V[A+y]+E:O[j+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,me===he)if(ge--){A=me;continue}else{ge=C;break}V[he+m]=j;break}}if(n.barnesHutOptimize)for(ce=n.scalingRatio,j=0;j<re;j+=w)for(A=0;;)if(V[A+y]>=0)if(z=(O[j+e]-V[A+x])**2+(O[j+t]-V[A+S])**2,ne=V[A+_],4*ne*ne/z<oe){if(L=O[j+e]-V[A+x],R=O[j+t]-V[A+S],ae===!0?z>0?(B=ce*O[j+s]*V[A+b]/z,O[j+r]+=L*B,O[j+i]+=R*B):z<0&&(B=-ce*O[j+s]*V[A+b]/Math.sqrt(z),O[j+r]+=L*B,O[j+i]+=R*B):z>0&&(B=ce*O[j+s]*V[A+b]/z,O[j+r]+=L*B,O[j+i]+=R*B),A=V[A+v],A<0)break;continue}else{A=V[A+y];continue}else{if(P=V[A+m],P>=0&&P!==j&&(L=O[j+e]-O[P+e],R=O[j+t]-O[P+t],z=L*L+R*R,ae===!0?z>0?(B=ce*O[j+s]*O[P+s]/z,O[j+r]+=L*B,O[j+i]+=R*B):z<0&&(B=-ce*O[j+s]*O[P+s]/Math.sqrt(z),O[j+r]+=L*B,O[j+i]+=R*B):z>0&&(B=ce*O[j+s]*O[P+s]/z,O[j+r]+=L*B,O[j+i]+=R*B)),A=V[A+v],A<0)break;continue}else for(ce=n.scalingRatio,M=0;M<re;M+=w)for(N=0;N<M;N+=w)L=O[M+e]-O[N+e],R=O[M+t]-O[N+t],ae===!0?(z=Math.sqrt(L*L+R*R)-O[M+l]-O[N+l],z>0?(B=ce*O[M+s]*O[N+s]/z/z,O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B):z<0&&(B=100*ce*O[M+s]*O[N+s],O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B)):(z=Math.sqrt(L*L+R*R),z>0&&(B=ce*O[M+s]*O[N+s]/z/z,O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B));for(I=n.gravity/n.scalingRatio,ce=n.scalingRatio,j=0;j<re;j+=w)B=0,L=O[j+e],R=O[j+t],z=Math.sqrt(L**2+R**2),n.strongGravityMode?z>0&&(B=ce*O[j+s]*I):z>0&&(B=ce*O[j+s]*I/z),O[j+r]-=L*B,O[j+i]-=R*B;for(ce=1*(n.outboundAttractionDistribution?se:1),te=0;te<ie;te+=T)M=ee[te+d],N=ee[te+f],F=ee[te+p],le=F**+n.edgeWeightInfluence,L=O[M+e]-O[N+e],R=O[M+t]-O[N+t],ae===!0?(z=Math.sqrt(L*L+R*R)-O[M+l]-O[N+l],n.linLogMode?n.outboundAttractionDistribution?z>0&&(B=-ce*le*Math.log(1+z)/z/O[M+s]):z>0&&(B=-ce*le*Math.log(1+z)/z):n.outboundAttractionDistribution?z>0&&(B=-ce*le/O[M+s]):z>0&&(B=-ce*le)):(z=Math.sqrt(L**2+R**2),n.linLogMode?n.outboundAttractionDistribution?z>0&&(B=-ce*le*Math.log(1+z)/z/O[M+s]):z>0&&(B=-ce*le*Math.log(1+z)/z):n.outboundAttractionDistribution?(z=1,B=-ce*le/O[M+s]):(z=1,B=-ce*le)),z>0&&(O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B);var ye,be,xe,Se,Ce,we;if(ae===!0)for(j=0;j<re;j+=w)O[j+u]!==1&&(ye=Math.sqrt(O[j+r]**2+O[j+i]**2),ye>D&&(O[j+r]=O[j+r]*D/ye,O[j+i]=O[j+i]*D/ye),be=O[j+s]*Math.sqrt((O[j+a]-O[j+r])*(O[j+a]-O[j+r])+(O[j+o]-O[j+i])*(O[j+o]-O[j+i])),xe=Math.sqrt((O[j+a]+O[j+r])*(O[j+a]+O[j+r])+(O[j+o]+O[j+i])*(O[j+o]+O[j+i]))/2,Se=.1*Math.log(1+xe)/(1+Math.sqrt(be)),Ce=O[j+e]+O[j+r]*(Se/n.slowDown),O[j+e]=Ce,we=O[j+t]+O[j+i]*(Se/n.slowDown),O[j+t]=we);else for(j=0;j<re;j+=w)O[j+u]!==1&&(be=O[j+s]*Math.sqrt((O[j+a]-O[j+r])*(O[j+a]-O[j+r])+(O[j+o]-O[j+i])*(O[j+o]-O[j+i])),xe=Math.sqrt((O[j+a]+O[j+r])*(O[j+a]+O[j+r])+(O[j+o]+O[j+i])*(O[j+o]+O[j+i]))/2,Se=O[j+c]*Math.log(1+xe)/(1+Math.sqrt(be)),O[j+c]=Math.min(1,Math.sqrt(Se*(O[j+r]**2+O[j+i]**2)/(1+Math.sqrt(be)))),Ce=O[j+e]+O[j+r]*(Se/n.slowDown),O[j+e]=Ce,we=O[j+t]+O[j+i]*(Se/n.slowDown),O[j+t]=we);return{}}})();var r=n.exports;self.addEventListener(`message`,function(n){var i=n.data;e=new Float32Array(i.nodes),i.edges&&(t=new Float32Array(i.edges)),r(i.settings,e,t),self.postMessage({nodes:e.buffer},[e.buffer])})}})),Xr=r((e=>{function t(e){return typeof e!=`number`||isNaN(e)?1:e}function n(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getNodeAttributes(t))},n.fromEntry=function(e,t){return i(t)}):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createNodeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){return r(e(n,t.getNodeAttributes(n)))},n.fromEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a),n}function r(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getEdgeAttributes(t))},n.fromEntry=function(e,t){return i(t)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createEdgeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){var i=t.extremities(n);return r(e(n,t.getEdgeAttributes(n),i[0],i[1],t.getNodeAttributes(i[0]),t.getNodeAttributes(i[1]),t.isUndirected(n)))},n.fromEntry=function(t,n,i,a,o,s,c){return r(e(t,n,i,a,o,s,c))},n.fromPartialEntry=function(t,n,i,a){return r(e(t,n,i,a))},n.fromMinimalEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a,n.fromMinimalEntry=a),n}e.createNodeValueGetter=n,e.createEdgeValueGetter=r,e.createEdgeWeightGetter=function(e){return r(e,t)}})),Zr=r((e=>{var t=10,n=3;e.assign=function(e){e||={};var t=Array.prototype.slice.call(arguments).slice(1),n,r,i;for(n=0,i=t.length;n<i;n++)if(t[n])for(r in t[n])e[r]=t[n][r];return e},e.validateSettings=function(e){return`linLogMode`in e&&typeof e.linLogMode!=`boolean`?{message:"the `linLogMode` setting should be a boolean."}:`outboundAttractionDistribution`in e&&typeof e.outboundAttractionDistribution!=`boolean`?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:`adjustSizes`in e&&typeof e.adjustSizes!=`boolean`?{message:"the `adjustSizes` setting should be a boolean."}:`edgeWeightInfluence`in e&&typeof e.edgeWeightInfluence!=`number`?{message:"the `edgeWeightInfluence` setting should be a number."}:`scalingRatio`in e&&!(typeof e.scalingRatio==`number`&&e.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:`strongGravityMode`in e&&typeof e.strongGravityMode!=`boolean`?{message:"the `strongGravityMode` setting should be a boolean."}:`gravity`in e&&!(typeof e.gravity==`number`&&e.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:`slowDown`in e&&!(typeof e.slowDown==`number`||e.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:`barnesHutOptimize`in e&&typeof e.barnesHutOptimize!=`boolean`?{message:"the `barnesHutOptimize` setting should be a boolean."}:`barnesHutTheta`in e&&!(typeof e.barnesHutTheta==`number`&&e.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},e.graphToByteArrays=function(e,r){var i=e.order,a=e.size,o={},s,c=new Float32Array(i*t),l=new Float32Array(a*n);return s=0,e.forEachNode(function(e,n){o[e]=s,c[s]=n.x,c[s+1]=n.y,c[s+2]=0,c[s+3]=0,c[s+4]=0,c[s+5]=0,c[s+6]=1,c[s+7]=1,c[s+8]=n.size||1,c[s+9]=n.fixed?1:0,s+=t}),s=0,e.forEachEdge(function(e,t,i,a,u,d,f){var p=o[i],m=o[a],h=r(e,t,i,a,u,d,f);c[p+6]+=h,c[m+6]+=h,l[s]=p,l[s+1]=m,l[s+2]=h,s+=n}),{nodes:c,edges:l}},e.assignLayoutChanges=function(e,n,r){var i=0;e.updateEachNodeAttributes(function(e,a){return a.x=n[i],a.y=n[i+1],i+=t,r?r(e,a):a})},e.readGraphPositions=function(e,n){var r=0;e.forEachNode(function(e,i){n[r]=i.x,n[r+1]=i.y,r+=t})},e.collectLayoutChanges=function(e,n,r){for(var i=e.nodes(),a={},o=0,s=0,c=n.length;o<c;o+=t){if(r){var l=Object.assign({},e.getNodeAttributes(i[s]));l.x=n[o],l.y=n[o+1],l=r(i[s],l),a[i[s]]={x:l.x,y:l.y}}else a[i[s]]={x:n[o],y:n[o+1]};s++}return a},e.createWorker=function(e){var t=window.URL||window.webkitURL,n=e.toString(),r=t.createObjectURL(new Blob([`(`+n+`).call(this);`],{type:`text/javascript`})),i=new Worker(r);return t.revokeObjectURL(r),i}})),Qr=r(((e,t)=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}})),$r=n(r(((e,t)=>{var n=Yr(),r=qn(),i=Xr().createEdgeWeightGetter,a=Zr(),o=Qr();function s(e,t){if(t||={},!r(e))throw Error(`graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.`);var n=i(`getEdgeWeight`in t?t.getEdgeWeight:`weight`).fromEntry,s=a.assign({},o,t.settings),c=a.validateSettings(s);if(c)throw Error(`graphology-layout-forceatlas2/worker: `+c.message);this.worker=null,this.graph=e,this.settings=s,this.getEdgeWeight=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer=typeof t.outputReducer==`function`?t.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var l=void 0,u=this;this.handleGraphUpdate=function(){u.worker&&u.worker.terminate(),l&&clearTimeout(l),l=setTimeout(function(){l=void 0,u.spawnWorker()},0)},e.on(`nodeAdded`,this.handleGraphUpdate),e.on(`edgeAdded`,this.handleGraphUpdate),e.on(`nodeDropped`,this.handleGraphUpdate),e.on(`edgeDropped`,this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener(`message`,this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(e){if(this.running){var t=new Float32Array(e.data.nodes);a.assignLayoutChanges(this.graph,t,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,t),this.matrices.nodes=t,this.askForIterations()}},s.prototype.askForIterations=function(e){var t=this.matrices,n={settings:this.settings,nodes:t.nodes.buffer},r=[t.nodes.buffer];return e&&(n.edges=t.edges.buffer,r.push(t.edges.buffer)),this.worker.postMessage(n,r),this},s.prototype.start=function(){if(this.killed)throw Error(`graphology-layout-forceatlas2/worker.start: layout was killed.`);return this.running?this:(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0),this)},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener(`nodeAdded`,this.handleGraphUpdate),this.graph.removeListener(`edgeAdded`,this.handleGraphUpdate),this.graph.removeListener(`nodeDropped`,this.handleGraphUpdate),this.graph.removeListener(`edgeDropped`,this.handleGraphUpdate)},t.exports=s}))(),1),ei={id:`hover-activation`,attach:()=>{},detach:()=>{},onNodeEnter:(e,t)=>{e.setHoveredNodeId(t)},onNodeLeave:(e,t)=>{e.getInteractionState().hoveredNodeId===t&&e.setHoveredNodeId(null)}},ti={id:`click-selection`,attach:()=>{},detach:()=>{},onNodeClick:(e,t)=>{e.setHoveredNodeId(t),e.onNodeSelectionChange(t)},onStageClick:e=>{e.setHoveredNodeId(null),e.onNodeSelectionChange(``)}},ni={id:`focus-camera`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`focusNode`?(e.focusNodeInView(t.nodeId),!0):!1};function ri(){let e=``;return{id:`search-focus`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.focusedNodeId;if(!r||r===e){e=r;return}e=r,t.dispatchAction({type:`focusNode`,nodeId:r})}}}function ii(){let e=``;return{id:`path-highlight`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.activePath.join(`::`);r!==e&&(e=r,t.sigma.refresh())}}}var ai={id:`fit-view`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`fitView`?(e.fitCurrentView(),!0):!1};function oi(){let e=null;return{id:`view-mode-switch`,attach:()=>{},detach:()=>{e=null},onStateChange:(t,n)=>{if(n.viewMode!==e){if(e=n.viewMode,n.focusedNodeId){t.dispatchAction({type:`focusNode`,nodeId:n.focusedNodeId});return}t.dispatchAction({type:`fitView`})}}}}var W={palette:{semantic:[`#63E6FF`,`#30D4C7`,`#72A8FF`,`#8D7CFF`,`#C07CFF`,`#FF67D4`,`#FFB24D`,`#C5F55A`],accent:{selected:`#FFC857`,hovered:`#7FE0FF`,path:`#FFB870`,temporal:`#6DD6FF`,provenance:`#A98CFF`,inferred:`#FF9A61`},muted:{fallback:`rgba(130, 145, 165, 0.12)`,nodeAlpha:.12,edgeOverview:`rgba(116, 166, 255, 0.05)`,edgeStructure:`rgba(109, 164, 255, 0.11)`,edgeInspection:`rgba(146, 194, 255, 0.18)`,edgeFocus:`rgba(162, 184, 255, 0.34)`},background:{canvas:`#060B17`,shell:`rgba(6, 13, 24, 0.76)`,shellBorder:`rgba(112, 196, 255, 0.14)`,shellGlow:`rgba(53, 123, 255, 0.16)`,grid:`rgba(88, 166, 255, 0.038)`,vignette:`rgba(1, 4, 10, 0.82)`,nodeBorder:`#07111C`}},zoomTiers:{overview:{maxRatio:1/0,nodeScale:.9,labelThreshold:.985,labelBudget:18,edgePriorityThreshold:.72,arrowPriorityThreshold:1/0,edgeSizeScale:.72,showBadges:!1,showCurves:!1,showContextualArrows:!1},structure:{maxRatio:1.2,nodeScale:.98,labelThreshold:.88,labelBudget:36,edgePriorityThreshold:.4,arrowPriorityThreshold:.75,edgeSizeScale:.92,showBadges:!0,showCurves:!0,showContextualArrows:!0},inspection:{maxRatio:.5,nodeScale:1,labelThreshold:.7,labelBudget:80,edgePriorityThreshold:0,arrowPriorityThreshold:.58,edgeSizeScale:1.04,showBadges:!0,showCurves:!0,showContextualArrows:!0}},labels:{forceVisibleStates:[`hovered`,`selected`,`neighbor`,`path`],policies:{none:{minZoomTier:`inspection`},priority:{minZoomTier:`overview`},local:{minZoomTier:`structure`},always:{minZoomTier:`overview`}}},nodes:{backgroundScale:.52,mutedAlpha:.12,strokeHierarchy:{overview:{base:.8,emphasis:1.2,muted:.45},structure:{base:1.05,emphasis:1.45,muted:.55},inspection:{base:1.2,emphasis:1.7,muted:.6}},states:{default:{color:`base`,sizeMultiplier:1,minSize:1.45,forceLabel:!1,zIndex:0,borderBoost:0},hovered:{color:`hovered`,sizeMultiplier:1.34,minSize:16,forceLabel:!0,zIndex:4,borderBoost:.5},selected:{color:`selected`,sizeMultiplier:1.18,minSize:12,forceLabel:!0,zIndex:3,borderBoost:.42},neighbor:{color:`base`,sizeMultiplier:1.08,minSize:7.2,forceLabel:!0,zIndex:2,borderBoost:.18},path:{color:`path`,sizeMultiplier:1.08,minSize:7.2,forceLabel:!0,zIndex:2,borderBoost:.24},inactive:{color:`muted`,sizeMultiplier:.52,minSize:.8,forceLabel:!1,zIndex:0,borderBoost:-.15},muted:{color:`muted`,sizeMultiplier:.52,minSize:.8,forceLabel:!1,zIndex:0,borderBoost:-.15}},variants:{default:{sizeMultiplier:1,borderBoost:0,haloBoost:0,badgeVisibleFrom:`inspection`},temporal:{sizeMultiplier:1.02,borderBoost:.12,haloBoost:.1,badgeKind:`temporal`,badgeVisibleFrom:`structure`},inferred:{sizeMultiplier:1.05,borderBoost:.16,haloBoost:.14,badgeKind:`inferred`,badgeVisibleFrom:`structure`},provenance:{sizeMultiplier:1.03,borderBoost:.14,haloBoost:.12,badgeKind:`provenance`,badgeVisibleFrom:`structure`},selected:{sizeMultiplier:1.06,borderBoost:.22,haloBoost:.16,badgeVisibleFrom:`overview`}},selectedRing:{color:`#FFC857`,width:2.4,glowAlpha:.38,visibleFrom:`inspection`},badges:{inferred:{color:`#FF9A61`,label:`I`},temporal:{color:`#6DD6FF`,label:`T`},provenance:{color:`#A98CFF`,label:`P`}},badge:{radius:7,offset:3,fontSize:8,textColor:`#08111d`,background:`rgba(8, 17, 29, 0.9)`,stroke:`rgba(255,255,255,0.2)`,glowAlpha:.34}},edges:{states:{default:{color:`inspection`,sizeMultiplier:1,minSize:.72,zIndex:0,forceArrow:!1,hide:!1},hovered:{color:`hover`,sizeMultiplier:1.55,minSize:1.8,zIndex:3,forceArrow:!0,hide:!1},selected:{color:`hover`,sizeMultiplier:1.55,minSize:1.8,zIndex:3,forceArrow:!0,hide:!1},neighbor:{color:`focus`,sizeMultiplier:1.08,minSize:.95,zIndex:1,forceArrow:!1,hide:!1},path:{color:`path`,sizeMultiplier:1.7,minSize:2.2,zIndex:4,forceArrow:!0,hide:!1},inactive:{color:`muted`,sizeMultiplier:1,minSize:.45,zIndex:0,forceArrow:!1,hide:!0},muted:{color:`muted`,sizeMultiplier:1,minSize:.45,zIndex:0,forceArrow:!1,hide:!0}},variants:{line:{baseType:`line`,arrowPolicy:`hidden`,curveStrength:0,sizeMultiplier:1,glowAlpha:0},directional:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:0,sizeMultiplier:1.04,glowAlpha:.08},bidirectionalCurve:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:.18,sizeMultiplier:1.08,glowAlpha:.1},parallelCurve:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:.24,sizeMultiplier:1.1,glowAlpha:.12},pathSignal:{baseType:`arrow`,arrowPolicy:`always`,curveStrength:.16,sizeMultiplier:1.18,glowAlpha:.2}}},overlays:{hoverGlowAlpha:.26,pathGlowAlpha:.2,glowRadiusMultiplier:4.8,minGlowRadius:16,pulseRadius:11,curveLineWidth:1.7,curveGlowWidth:6,badgeGlowRadius:14},focus:{maxNeighbors:16,ringCapacity:6,ringGap:250,primaryLabels:6},motion:{cameraMs:380}},si=[`overview`,`structure`,`inspection`];function ci(e){let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function li(e,t,n){return Math.min(n,Math.max(e,t))}function ui(e,t){if(!e)return`rgba(130, 145, 165, ${t})`;if(e.startsWith(`#`)){let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length===6)return`rgba(${Number.parseInt(r.slice(0,2),16)}, ${Number.parseInt(r.slice(2,4),16)}, ${Number.parseInt(r.slice(4,6),16)}, ${t})`}return e.startsWith(`rgba(`)?e.replace(/rgba\(([^)]+),\s*[\d.]+\)/,`rgba($1, ${t})`):e.startsWith(`rgb(`)?e.replace(`rgb(`,`rgba(`).replace(`)`,`, ${t})`):`rgba(130, 145, 165, ${t})`}function di(e,t){if(!e.startsWith(`#`))return e;let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length!==6)return e;let i=e=>li(0,e,255);return`#${[i(Number.parseInt(r.slice(0,2),16)-t),i(Number.parseInt(r.slice(2,4),16)-t),i(Number.parseInt(r.slice(4,6),16)-t)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function see(e){return e<=W.zoomTiers.inspection.maxRatio?`inspection`:e<=W.zoomTiers.structure.maxRatio?`structure`:`overview`}function fi(e,t){return si.indexOf(e)>=si.indexOf(t)}var G=i(),cee={iterations:50,settings:{barnesHutOptimize:!0,barnesHutTheta:.5,adjustSizes:!1,gravity:1,slowDown:10}},pi={allowInvalidContainer:!0,labelRenderedSizeThreshold:3,defaultNodeType:`circle`,defaultEdgeType:`line`,hideEdgesOnMove:!0,webGLTarget:`webgl2`},mi=W.focus.maxNeighbors,hi=W.focus.ringCapacity,gi=W.focus.ringGap,_i=W.focus.primaryLabels;function vi(e){let t=new Set;for(let n=0;n<e.length-1;n+=1)t.add(`${e[n]}::${e[n+1]}`),t.add(`${e[n+1]}::${e[n]}`);return t}function yi(e,t){let n=0;if(mt.hasDirectedEdge(e,t)){let r=mt.getDirectedEdgeAttributes(e,t);n=Math.max(n,Number(r?.weight??0))}if(mt.hasDirectedEdge(t,e)){let r=mt.getDirectedEdgeAttributes(t,e);n=Math.max(n,Number(r?.weight??0))}return n}function bi(e){return mt.neighbors(e).map(t=>({id:t,weight:yi(e,t),degree:mt.degree(t)})).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.id.localeCompare(t.id):t.degree-e.degree:t.weight-e.weight).map(e=>e.id)}function xi(e){let t=bi(e).slice(0,mi);return new Set([e,...t])}function Si(e,t,n,r){let i=String(n.baseColor||r||e.palette.semantic[0]);switch(e.nodes.states[t].color){case`selected`:return e.palette.accent.selected;case`hovered`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`muted`:return String(n.mutedColor||ui(i,e.nodes.mutedAlpha));default:return i}}function Ci(e,t,n,r){let i=String(n.baseColor||r||e.palette.muted.edgeInspection);switch(e.edges.states[t].color){case`hover`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`focus`:return e.palette.muted.edgeFocus;case`overview`:return e.palette.muted.edgeOverview;case`structure`:return e.palette.muted.edgeStructure;case`inspection`:return e.palette.muted.edgeInspection;case`muted`:return String(n.mutedColor||e.palette.muted.edgeOverview);default:return i}}function wi(e,t,n,r,i){return t&&e===t?`hovered`:n&&e===n?`selected`:i.has(e)?`path`:r.has(e)?`neighbor`:t||n||i.size>0?`muted`:`default`}function Ti(e,t,n,r,i,a){let o=`${e}::${t}`,s=n||r;return a.has(o)?`path`:s&&(e===s||t===s)?n?`hovered`:`selected`:i.has(e)&&i.has(t)?`neighbor`:n||r||a.size>0?`muted`:`default`}function Ei(e,t){return e===`selected`?`selected`:t.nodeShapeVariant||t.nodeVariant||`default`}function lee(e,t){return e===`path`?`pathSignal`:t.edgeVariant?t.edgeVariant:t.isBidirectional?`bidirectionalCurve`:t.arrowVisibilityPolicy===`contextual`?`directional`:`line`}function uee(e,t,n,r,i){let a=e.zoomTiers[t],o=e.labels.forceVisibleStates.includes(n),s=r.labelVisibilityPolicy||`priority`;if(o||e.nodes.states[n].forceLabel)return!0;switch(s){case`always`:return!0;case`local`:return t!==`overview`&&n!==`default`&&n!==`muted`&&n!==`inactive`;case`priority`:return i>=a.labelThreshold;default:return!1}}function dee(e,t,n,r,i){return t===`selected`||n===`selected`?r.ringColor||e.nodes.selectedRing.color:t===`hovered`?e.palette.accent.hovered:t===`path`?e.palette.accent.path:t===`muted`||t===`inactive`?ui(r.strokeColor||r.borderColor||e.palette.background.nodeBorder,.7):n===`temporal`?e.palette.accent.temporal:n===`provenance`?e.palette.accent.provenance:n===`inferred`?e.palette.accent.inferred:r.strokeColor||r.borderColor||e.palette.background.nodeBorder||i}function Di(e,t,n,r,i){let a=e.zoomTiers[t],o=e.nodes.states[n],s=Ei(n,r),c=e.nodes.variants[s],l=Number(r.baseSize||r.size||4),u=Number(r.labelPriority??0),d=Si(e,n,r,r.color),f=(n===`default`?a.nodeScale:o.sizeMultiplier)*c.sizeMultiplier,p=uee(e,t,n,r,u),m=r.badgeKind||c.badgeKind,h=e.labels.forceVisibleStates.includes(n),g=!!(m&&(h||a.showBadges&&fi(t,c.badgeVisibleFrom))&&n!==`muted`&&n!==`inactive`),_=n===`selected`&&fi(t,e.nodes.selectedRing.visibleFrom),v=n===`hovered`||n===`selected`||n===`path`,y=n===`muted`||n===`inactive`?e.nodes.strokeHierarchy[t].muted:h?e.nodes.strokeHierarchy[t].emphasis:e.nodes.strokeHierarchy[t].base;return{color:d,size:Math.max(l*f,o.minSize),forceLabel:p,label:p?i:``,zIndex:p&&o.zIndex===0?1:o.zIndex,hidden:!1,borderColor:dee(e,n,s,r,d),borderSize:Math.max(.4,Number(r.borderSize??.85)+y+o.borderBoost+c.borderBoost-.8),nodeVariant:s,badgeKind:m,badgeCount:r.badgeCount,showBadge:g,showRing:_,ringColor:r.ringColor||e.nodes.selectedRing.color,showHalo:v,haloColor:r.haloColor||r.glowColor||ui(d,e.overlays.hoverGlowAlpha+c.haloBoost)}}function fee(e,t,n,r,i){let a=e.edges.variants[r];return e.edges.states[n].forceArrow||a.arrowPolicy===`always`||a.arrowPolicy===`contextual`&&e.zoomTiers[t].showContextualArrows?`arrow`:n===`default`?Number(i.visualPriority??0)>=e.zoomTiers[t].arrowPriorityThreshold&&e.zoomTiers[t].showContextualArrows?`arrow`:`line`:i.type||a.baseType}function Oi(e,t,n,r){let i=e.zoomTiers[t],a=e.edges.states[n],o=lee(n,r),s=e.edges.variants[o],c=Number(r.baseSize||r.size||.9),l=Number(r.visualPriority??0),u=n===`default`&&l<i.edgePriorityThreshold&&o===`line`;if(a.hide||u)return{hidden:!0,zIndex:0,edgeVariant:o,arrowVisibilityPolicy:s.arrowPolicy,curveStrength:s.curveStrength,drawCurvedOverlay:!1};let d=(n===`default`?i.edgeSizeScale:a.sizeMultiplier)*s.sizeMultiplier,f=i.showCurves&&(o===`bidirectionalCurve`||o===`parallelCurve`||o===`pathSignal`)&&t!==`overview`;return{hidden:!1,type:fee(e,t,n,o,r),color:Ci(e,n,r,r.color),size:Math.max(c*d,a.minSize),zIndex:a.zIndex,edgeVariant:o,arrowVisibilityPolicy:s.arrowPolicy,curveStrength:s.curveStrength,drawCurvedOverlay:f}}function pee(e,t){let n=new st({type:`directed`,multi:!1,allowSelfLoops:!1}),r=bi(e).slice(0,mi),i=new Set([e,...r]),a=new Set(r.slice(0,_i)),o=new Set(t),s=vi(t),c=(e,t)=>{n.hasNode(e)||n.addNode(e,t)},l=mt.getNodeAttributes(e),u=Di(W,`inspection`,`selected`,l,l.label);c(e,{...l,x:0,y:0,color:u.color,size:Math.max(u.size,22),label:u.label}),r.forEach((e,t)=>{let n=mt.getNodeAttributes(e),i=Math.floor(t/hi),s=t%hi,l=Math.min(hi,r.length-i*hi),u=gi*(i+1),d=Math.PI*2*s/l-Math.PI/2,f=Di(W,`inspection`,o.has(e)?`path`:a.has(e)?`neighbor`:`default`,{...n,labelPriority:a.has(e)||o.has(e)?Math.max(Number(n.labelPriority??0),1):0},n.label);c(e,{...n,x:Math.cos(d)*u,y:Math.sin(d)*u,color:f.color,size:Math.max(f.size,8.5),label:f.label})});for(let t of i)for(let r of i){if(t===r||!mt.hasDirectedEdge(t,r))continue;let i=mt.getDirectedEdgeAttributes(t,r),a=Oi(W,`inspection`,s.has(`${t}::${r}`)?`path`:t===e||r===e?`selected`:`neighbor`,i);n.mergeDirectedEdge(t,r,{...i,type:a.type,size:a.size,color:a.color})}return n}function ki(e,t,n,r,i){let a=e.createRadialGradient(t,n,0,t,n,r);a.addColorStop(0,i),a.addColorStop(1,`rgba(0,0,0,0)`),e.fillStyle=a,e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill()}function Ai(e,t,n,r,i,a,o){e.strokeStyle=ui(i,o),e.lineWidth=a*2.4,e.beginPath(),e.arc(t,n,r+a*1.9,0,Math.PI*2),e.stroke(),e.strokeStyle=i,e.lineWidth=a,e.beginPath(),e.arc(t,n,r+a*1.45,0,Math.PI*2),e.stroke()}function ji(e,t,n,r,i,a){let o=W.nodes.badges[i],s=W.nodes.badge.radius,c=W.nodes.badge.offset,l=t+Math.max(r*.62,s+c),u=n-Math.max(r*.62,s+c);ki(e,l,u,W.overlays.badgeGlowRadius,ui(o.color,W.nodes.badge.glowAlpha)),e.fillStyle=o.color,e.beginPath(),e.arc(l,u,s,0,Math.PI*2),e.fill(),e.strokeStyle=W.nodes.badge.stroke,e.lineWidth=1,e.beginPath(),e.arc(l,u,s,0,Math.PI*2),e.stroke(),e.fillStyle=W.nodes.badge.textColor,e.font=`700 ${W.nodes.badge.fontSize}px Inter, system-ui, sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`;let d=i===`provenance`&&a&&a>1?String(Math.min(9,a)):o.label;e.fillText(d,l,u+.5)}function Mi(e,t,n,r,i,a,o){let s=n.x-t.x,c=n.y-t.y,l=Math.max(Math.hypot(s,c),1),u=-c/l,d=s/l,f=l*a,p=(t.x+n.x)/2+u*f,m=(t.y+n.y)/2+d*f;e.strokeStyle=ui(r,o),e.lineWidth=i+W.overlays.curveGlowWidth,e.beginPath(),e.moveTo(t.x,t.y),e.quadraticCurveTo(p,m,n.x,n.y),e.stroke(),e.strokeStyle=r,e.lineWidth=i,e.beginPath(),e.moveTo(t.x,t.y),e.quadraticCurveTo(p,m,n.x,n.y),e.stroke()}function Ni(e,t){let{zoomTier:n,hoveredNodeId:r,selectedNodeId:i,activePath:a}=t,o=r||i,s=o&&mt.hasNode(o)?xi(o):new Set,c=new Set(a),l=vi(a);e.setSetting(`nodeReducer`,(e,t)=>{let a=t,o=Di(W,n,wi(e,r,i,s,c),a,t.label);return{...t,color:o.color,size:o.size,forceLabel:o.forceLabel,label:o.label,zIndex:o.zIndex,hidden:o.hidden,borderColor:o.borderColor,borderSize:o.borderSize}}),e.setSetting(`edgeReducer`,(e,t)=>{let a=t,[o,c]=mt.extremities(e),u=Oi(W,n,Ti(o,c,r,i,s,l),a);return{...t,hidden:u.hidden,type:u.type,color:u.color,size:u.size,zIndex:u.zIndex}}),e.refresh()}function Pi(e,t,n,r,i,a){return{hoveredNodeId:e,selectedNodeId:t,focusedNodeId:t,activePath:n,viewMode:r,zoomTier:i,isLayoutRunning:a}}function Fi(e,t,n){for(let r of e)if(r.performAction?.(t,n))return}var Ii=(0,l.forwardRef)(function({onNodeClick:e,selectedNodeId:t,activePath:n=[],isLayoutRunning:r,viewMode:i,className:a,pluginOverlays:o=[],onPluginRuntimeChange:s,onInteractionStateChange:c},u){let d=(0,l.useRef)(null),f=(0,l.useRef)(null),p=(0,l.useRef)(null),m=(0,l.useRef)(null),h=(0,l.useRef)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(`overview`),b=(0,l.useMemo)(()=>[ei,ti,ni,ri(),ii(),ai,oi()],[]),x=i===`focused`&&!!t&&mt.hasNode(t),S=(0,l.useMemo)(()=>x&&t?pee(t,n):mt,[n,x,t]),C=(0,l.useMemo)(()=>Pi(g,t,n,i,v,r),[n,g,r,t,i,v]),w=(0,l.useRef)(C);w.current=C;let T=(0,l.useCallback)(e=>{let t=p.current;if(!t)return;if(x){t.getCamera().animatedReset({duration:W.motion.cameraMs}),t.refresh();return}let n=t.getNodeDisplayData(e);if(!n){t.getCamera().animatedReset({duration:W.motion.cameraMs});return}t.getCamera().animate({x:n.x,y:n.y,ratio:.3},{duration:W.motion.cameraMs,easing:`quadraticOut`})},[x]),E=(0,l.useCallback)(()=>{let e=p.current;if(e){if(t){T(t);return}e.getCamera().animatedReset({duration:W.motion.cameraMs})}},[T,t]),D=(0,l.useCallback)(e=>{let t=h.current;t&&Fi(b,t,e)},[b]),O=(0,l.useCallback)(t=>{let n=t??p.current;if(!n)return null;let r={sigma:n,graph:mt,displayGraph:S,getInteractionState:()=>w.current,setHoveredNodeId:_,onNodeSelectionChange:e,focusNodeInView:T,fitCurrentView:E,dispatchAction:D};return h.current=r,r},[S,D,E,T,e]),ee=(0,l.useCallback)((e,...t)=>{let n=O();if(n)for(let r of b){let i=r[e];typeof i==`function`&&i(n,...t)}},[b,O]);(0,l.useImperativeHandle)(u,()=>({getSigma:()=>p.current,fitView:()=>D({type:`fitView`}),focusNode:e=>D({type:`focusNode`,nodeId:e})}),[D]),(0,l.useEffect)(()=>{if(!d.current)return;let e=new Jr(S,d.current,pi);p.current=e,s?.({sigma:e,graph:mt,displayGraph:S});let t=e.getCamera(),n=O(e);if(n)for(let e of b)e.attach(n);let r=()=>{let e={x:t.getState().x,y:t.getState().y,ratio:t.getState().ratio},n=see(e.ratio);y(e=>e===n?e:n),ee(`onCameraChange`,e)},i=new ResizeObserver(()=>{d.current&&d.current.offsetWidth>0&&e.refresh()});return i.observe(d.current),t.on(`updated`,r),e.on(`clickNode`,({node:e})=>ee(`onNodeClick`,e)),e.on(`clickStage`,()=>ee(`onStageClick`)),e.on(`enterNode`,({node:e})=>ee(`onNodeEnter`,e)),e.on(`leaveNode`,({node:e})=>ee(`onNodeLeave`,e)),requestAnimationFrame(()=>{r(),D({type:`fitView`})}),()=>{if(n)for(let e of b)e.detach(n);t.off(`updated`,r),i.disconnect(),e.kill(),h.current=null,p.current=null,s?.(null)}},[b,D,ee,S,O,s]),(0,l.useEffect)(()=>{let e=O();if(e){for(let t of b)t.onStateChange?.(e,C);for(let t of b)t.apply?.(e,C);c?.(C)}},[b,O,C,c]),(0,l.useEffect)(()=>{let e=p.current;!e||S!==mt||Ni(e,C)},[S,C]),(0,l.useEffect)(()=>{let e=p.current,t=f.current,n=d.current;if(!e||!t||!n)return;let r=0,i=()=>{let a=n.getBoundingClientRect(),o=window.devicePixelRatio||1;(t.width!==Math.floor(a.width*o)||t.height!==Math.floor(a.height*o))&&(t.width=Math.floor(a.width*o),t.height=Math.floor(a.height*o),t.style.width=`${a.width}px`,t.style.height=`${a.height}px`);let s=t.getContext(`2d`);if(!s){r=window.requestAnimationFrame(i);return}s.setTransform(o,0,0,o,0,0),s.clearRect(0,0,a.width,a.height);let c=C.hoveredNodeId||C.selectedNodeId,l=c&&mt.hasNode(c)?xi(c):new Set,u=new Set(C.activePath),d=vi(C.activePath),f=new Set([...l,...u,...c?[c]:[]]),p=performance.now()/1e3;if(f.forEach(t=>{let n=e.getNodeDisplayData(t);if(!n)return;let r=mt.getNodeAttributes(t),i=wi(t,C.hoveredNodeId,C.selectedNodeId,l,u),a=Di(W,C.zoomTier,i,r,r.label),o=e.graphToViewport({x:n.x,y:n.y});if(a.showHalo){let e=Math.max(n.size*W.overlays.glowRadiusMultiplier*(a.nodeVariant===`selected`?1.08:1),W.overlays.minGlowRadius);ki(s,o.x,o.y,e,ui(a.haloColor,t===c?W.overlays.hoverGlowAlpha:W.overlays.pathGlowAlpha))}a.showRing&&Ai(s,o.x,o.y,n.size,a.ringColor||W.nodes.selectedRing.color,W.nodes.selectedRing.width,W.nodes.selectedRing.glowAlpha),a.showBadge&&a.badgeKind&&ji(s,o.x,o.y,n.size,a.badgeKind,a.badgeCount)}),W.zoomTiers[C.zoomTier].showCurves&&c){let t=new Set;l.forEach(n=>{l.forEach(r=>{if(n>=r||!mt.hasDirectedEdge(n,r)||!mt.hasDirectedEdge(r,n))return;let i=[n,r].sort().join(`::`);if(t.has(i))return;t.add(i);let a=e.getNodeDisplayData(n),o=e.getNodeDisplayData(r);if(!a||!o)return;let l=mt.getDirectedEdgeAttributes(n,r),u=n===c||r===c?C.hoveredNodeId?`hovered`:`selected`:`neighbor`,d=Oi(W,C.zoomTier,u,l);!d.drawCurvedOverlay||!d.color||!d.size||Mi(s,e.graphToViewport({x:a.x,y:a.y}),e.graphToViewport({x:o.x,y:o.y}),d.color,Math.max(d.size,W.overlays.curveLineWidth),d.curveStrength,W.edges.variants.bidirectionalCurve.glowAlpha)})})}if(C.activePath.length>1)for(let t=0;t<C.activePath.length-1;t+=1){let n=C.activePath[t],r=C.activePath[t+1];if(!d.has(`${n}::${r}`))continue;let i=e.getNodeDisplayData(n),a=e.getNodeDisplayData(r);if(!i||!a)continue;let o=e.graphToViewport({x:i.x,y:i.y}),c=e.graphToViewport({x:a.x,y:a.y}),l=mt.hasDirectedEdge(n,r)?mt.getDirectedEdgeAttributes(n,r):{baseColor:W.palette.accent.path,baseSize:1.2,edgeVariant:`pathSignal`,arrowVisibilityPolicy:`always`},u=Oi(W,C.zoomTier,`path`,l);u.color&&u.size&&Mi(s,o,c,u.color,Math.max(u.size,W.overlays.curveLineWidth+.4),u.curveStrength||W.edges.variants.pathSignal.curveStrength,W.edges.variants.pathSignal.glowAlpha);let f=(p*.22+t*.17)%1,m=o.x+(c.x-o.x)*f,h=o.y+(c.y-o.y)*f,g=s.createRadialGradient(m,h,0,m,h,W.overlays.pulseRadius);g.addColorStop(0,W.palette.accent.path),g.addColorStop(1,`rgba(0,0,0,0)`),s.fillStyle=g,s.beginPath(),s.arc(m,h,W.overlays.pulseRadius,0,Math.PI*2),s.fill()}r=window.requestAnimationFrame(i)};return i(),()=>{window.cancelAnimationFrame(r)}},[C]),(0,l.useEffect)(()=>{if(t||x){m.current?.stop();return}return r?(m.current||=new $r.default(mt,cee),m.current.start()):m.current?.stop(),()=>{m.current?.stop()}},[x,r,t]),(0,l.useEffect)(()=>()=>{m.current?.kill(),m.current=null},[]);let k=(0,l.useCallback)(()=>{E()},[E]);return(0,G.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`},children:[(0,G.jsx)(`div`,{ref:d,className:a,style:{width:`100%`,height:`100%`,background:`transparent`}}),(0,G.jsx)(`canvas`,{ref:f,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:4}}),o.length?(0,G.jsx)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,zIndex:6},children:o.map((e,t)=>(0,G.jsx)(`div`,{style:{position:`absolute`,inset:0},children:e},`graph-plugin-overlay-${t}`))}):null,(0,G.jsx)(`button`,{id:`graph-fit-view-btn`,onClick:k,style:{position:`absolute`,bottom:24,left:24,padding:`8px 16px`,background:`linear-gradient(135deg, rgba(27, 79, 170, 0.9), rgba(53, 123, 255, 0.84))`,color:`#fff`,border:`1px solid ${W.palette.background.shellBorder}`,borderRadius:10,cursor:`pointer`,fontWeight:700,zIndex:10,backdropFilter:`blur(10px)`,boxShadow:`0 10px 28px ${W.palette.background.shellGlow}`,fontSize:12,letterSpacing:`0.01em`},children:`Fit View`})]})}),Li=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var zi={exports:{}},Bi={},Vi,Hi;function Ui(){if(Hi)return Vi;Hi=1;var e=function(e){return e&&e.Math===Math&&e};return Vi=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof Li==`object`&&Li)||e(typeof Vi==`object`&&Vi)||(function(){return this})()||Function(`return this`)(),Vi}var Wi,Gi;function Ki(){return Gi?Wi:(Gi=1,Wi=function(e){try{return!!e()}catch{return!0}},Wi)}var qi,Ji;function Yi(){return Ji?qi:(Ji=1,qi=!Ki()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),qi)}var Xi,Zi;function Qi(){if(Zi)return Xi;Zi=1;var e=Yi(),t=Function.prototype,n=t.apply,r=t.call;return Xi=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Xi}var $i,ea;function ta(){if(ea)return $i;ea=1;var e=Yi(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return $i=e?r:function(e){return function(){return n.apply(e,arguments)}},$i}var na,ra;function ia(){if(ra)return na;ra=1;var e=ta(),t=e({}.toString),n=e(``.slice);return na=function(e){return n(t(e),8,-1)},na}var aa,oa;function sa(){if(oa)return aa;oa=1;var e=ia(),t=ta();return aa=function(n){if(e(n)===`Function`)return t(n)},aa}var ca,la;function ua(){if(la)return ca;la=1;var e=typeof document==`object`&&document.all;return ca=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},ca}var da={},fa,pa;function ma(){return pa?fa:(pa=1,fa=!Ki()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),fa)}var ha,ga;function _a(){if(ga)return ha;ga=1;var e=Yi(),t=Function.prototype.call;return ha=e?t.bind(t):function(){return t.apply(t,arguments)},ha}var va={},ya;function ba(){if(ya)return va;ya=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return va.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,va}var xa,Sa;function Ca(){return Sa?xa:(Sa=1,xa=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},xa)}var wa,Ta;function Ea(){if(Ta)return wa;Ta=1;var e=ta(),t=Ki(),n=ia(),r=Object,i=e(``.split);return wa=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,wa}var Da,Oa;function ka(){return Oa?Da:(Oa=1,Da=function(e){return e==null},Da)}var Aa,ja;function Ma(){if(ja)return Aa;ja=1;var e=ka(),t=TypeError;return Aa=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},Aa}var Na,Pa;function Fa(){if(Pa)return Na;Pa=1;var e=Ea(),t=Ma();return Na=function(n){return e(t(n))},Na}var Ia,La;function Ra(){if(La)return Ia;La=1;var e=ua();return Ia=function(t){return typeof t==`object`?t!==null:e(t)},Ia}var za,Ba;function Va(){return Ba?za:(Ba=1,za={},za)}var Ha,Ua;function Wa(){if(Ua)return Ha;Ua=1;var e=Va(),t=Ui(),n=ua(),r=function(e){return n(e)?e:void 0};return Ha=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Ha}var Ga,Ka;function qa(){return Ka?Ga:(Ka=1,Ga=ta()({}.isPrototypeOf),Ga)}var Ja,Ya;function Xa(){if(Ya)return Ja;Ya=1;var e=Ui().navigator,t=e&&e.userAgent;return Ja=t?String(t):``,Ja}var Za,Qa;function $a(){if(Qa)return Za;Qa=1;var e=Ui(),t=Xa(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Za=s,Za}var eo,to;function no(){if(to)return eo;to=1;var e=$a(),t=Ki(),n=Ui().String;return eo=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),eo}var ro,io;function ao(){return io?ro:(io=1,ro=no()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,ro)}var oo,so;function co(){if(so)return oo;so=1;var e=Wa(),t=ua(),n=qa(),r=ao(),i=Object;return oo=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},oo}var lo,uo;function fo(){if(uo)return lo;uo=1;var e=String;return lo=function(t){try{return e(t)}catch{return`Object`}},lo}var po,mo;function ho(){if(mo)return po;mo=1;var e=ua(),t=fo(),n=TypeError;return po=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},po}var go,_o;function vo(){if(_o)return go;_o=1;var e=ho(),t=ka();return go=function(n,r){var i=n[r];return t(i)?void 0:e(i)},go}var yo,bo;function xo(){if(bo)return yo;bo=1;var e=_a(),t=ua(),n=Ra(),r=TypeError;return yo=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},yo}var So={exports:{}},Co,wo;function To(){return wo?Co:(wo=1,Co=!0,Co)}var Eo,Do;function Oo(){if(Do)return Eo;Do=1;var e=Ui(),t=Object.defineProperty;return Eo=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},Eo}var ko;function Ao(){if(ko)return So.exports;ko=1;var e=To(),t=Ui(),n=Oo(),r=`__core-js_shared__`,i=So.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),So.exports}var jo,Mo;function No(){if(Mo)return jo;Mo=1;var e=Ao();return jo=function(t,n){return e[t]||(e[t]=n||{})},jo}var Po,Fo;function Io(){if(Fo)return Po;Fo=1;var e=Ma(),t=Object;return Po=function(n){return t(e(n))},Po}var Lo,Ro;function zo(){if(Ro)return Lo;Ro=1;var e=ta(),t=Io(),n=e({}.hasOwnProperty);return Lo=Object.hasOwn||function(e,r){return n(t(e),r)},Lo}var Bo,Vo;function Ho(){if(Vo)return Bo;Vo=1;var e=ta(),t=0,n=Math.random(),r=e(1.1.toString);return Bo=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},Bo}var Uo,Wo;function Go(){if(Wo)return Uo;Wo=1;var e=Ui(),t=No(),n=zo(),r=Ho(),i=no(),a=ao(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return Uo=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},Uo}var Ko,qo;function Jo(){if(qo)return Ko;qo=1;var e=_a(),t=Ra(),n=co(),r=vo(),i=xo(),a=Go(),o=TypeError,s=a(`toPrimitive`);return Ko=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},Ko}var Yo,Xo;function Zo(){if(Xo)return Yo;Xo=1;var e=Jo(),t=co();return Yo=function(n){var r=e(n,`string`);return t(r)?r:r+``},Yo}var Qo,$o;function es(){if($o)return Qo;$o=1;var e=Ui(),t=Ra(),n=e.document,r=t(n)&&t(n.createElement);return Qo=function(e){return r?n.createElement(e):{}},Qo}var ts,ns;function rs(){if(ns)return ts;ns=1;var e=ma(),t=Ki(),n=es();return ts=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),ts}var is;function as(){if(is)return da;is=1;var e=ma(),t=_a(),n=ba(),r=Ca(),i=Fa(),a=Zo(),o=zo(),s=rs(),c=Object.getOwnPropertyDescriptor;return da.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},da}var os,ss;function cs(){if(ss)return os;ss=1;var e=Ki(),t=ua(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return os=r,os}var ls,us;function ds(){if(us)return ls;us=1;var e=sa(),t=ho(),n=Yi(),r=e(e.bind);return ls=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},ls}var fs={},ps,ms;function hs(){return ms?ps:(ms=1,ps=ma()&&Ki()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),ps)}var gs,_s;function vs(){if(_s)return gs;_s=1;var e=Ra(),t=String,n=TypeError;return gs=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},gs}var ys;function bs(){if(ys)return fs;ys=1;var e=ma(),t=rs(),n=hs(),r=vs(),i=Zo(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return fs.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},fs}var xs,Ss;function Cs(){if(Ss)return xs;Ss=1;var e=ma(),t=bs(),n=Ca();return xs=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},xs}var ws,Ts;function Es(){if(Ts)return ws;Ts=1;var e=Ui(),t=Qi(),n=sa(),r=ua(),i=as().f,a=cs(),o=Va(),s=ds(),c=Cs(),l=zo(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return ws=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},ws}var Ds;function Os(){if(Ds)return Bi;Ds=1;var e=Es(),t=ma(),n=bs().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),Bi}var ks;function mee(){if(ks)return zi.exports;ks=1,Os();var e=Va().Object,t=zi.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),zi.exports}var As,js;function Ms(){return js?As:(js=1,As=mee(),As)}var Ns,Ps;function hee(){return Ps?Ns:(Ps=1,Ns=Ms(),Ns)}var Fs,Is;function gee(){return Is?Fs:(Is=1,Fs=hee(),Fs)}var Ls,Rs;function _ee(){return Rs?Ls:(Rs=1,Ls=gee(),Ls)}var vee=Ri(_ee()),zs={},Bs,Vs;function Hs(){if(Vs)return Bs;Vs=1;var e=ia();return Bs=Array.isArray||function(t){return e(t)===`Array`},Bs}var Us,Ws;function Gs(){if(Ws)return Us;Ws=1;var e=Math.ceil,t=Math.floor;return Us=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Us}var Ks,qs;function Js(){if(qs)return Ks;qs=1;var e=Gs();return Ks=function(t){var n=+t;return n!==n||n===0?0:e(n)},Ks}var Ys,Xs;function Zs(){if(Xs)return Ys;Xs=1;var e=Js(),t=Math.min;return Ys=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},Ys}var Qs,$s;function ec(){if($s)return Qs;$s=1;var e=Zs();return Qs=function(t){return e(t.length)},Qs}var tc,nc;function rc(){if(nc)return tc;nc=1;var e=TypeError,t=9007199254740991;return tc=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},tc}var ic,ac;function oc(){if(ac)return ic;ac=1;var e=ma(),t=bs(),n=Ca();return ic=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},ic}var sc,cc;function lc(){if(cc)return sc;cc=1;var e=Go()(`toStringTag`),t={};return t[e]=`z`,sc=String(t)===`[object z]`,sc}var uc,dc;function fc(){if(dc)return uc;dc=1;var e=lc(),t=ua(),n=ia(),r=Go()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return uc=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},uc}var pc,mc;function hc(){if(mc)return pc;mc=1;var e=ta(),t=ua(),n=Ao(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),pc=n.inspectSource,pc}var gc,_c;function vc(){if(_c)return gc;_c=1;var e=ta(),t=Ki(),n=ua(),r=fc(),i=Wa(),a=hc(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,gc=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,gc}var yc,bc;function yee(){if(bc)return yc;bc=1;var e=Hs(),t=vc(),n=Ra(),r=Go()(`species`),i=Array;return yc=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},yc}var xc,Sc;function Cc(){if(Sc)return xc;Sc=1;var e=yee();return xc=function(t,n){return new(e(t))(n===0?0:n)},xc}var wc,Tc;function Ec(){if(Tc)return wc;Tc=1;var e=Ki(),t=Go(),n=$a(),r=t(`species`);return wc=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},wc}var Dc;function Oc(){if(Dc)return zs;Dc=1;var e=Es(),t=Ki(),n=Hs(),r=Ra(),i=Io(),a=ec(),o=rc(),s=oc(),c=Cc(),l=Ec(),u=Go(),d=$a(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),zs}var kc={},Ac={},jc,Mc;function Nc(){if(Mc)return jc;Mc=1;var e=fc(),t=String;return jc=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},jc}var Pc={},Fc,Ic;function Lc(){if(Ic)return Fc;Ic=1;var e=Js(),t=Math.max,n=Math.min;return Fc=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},Fc}var Rc,zc;function Bc(){if(zc)return Rc;zc=1;var e=Fa(),t=Lc(),n=ec(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return Rc={includes:r(!0),indexOf:r(!1)},Rc}var Vc,Hc;function Uc(){return Hc?Vc:(Hc=1,Vc={},Vc)}var Wc,Gc;function Kc(){if(Gc)return Wc;Gc=1;var e=ta(),t=zo(),n=Fa(),r=Bc().indexOf,i=Uc(),a=e([].push);return Wc=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},Wc}var qc,Jc;function Yc(){return Jc?qc:(Jc=1,qc=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],qc)}var Xc,Zc;function Qc(){if(Zc)return Xc;Zc=1;var e=Kc(),t=Yc();return Xc=Object.keys||function(n){return e(n,t)},Xc}var $c;function el(){if($c)return Pc;$c=1;var e=ma(),t=hs(),n=bs(),r=vs(),i=Fa(),a=Qc();return Pc.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},Pc}var tl,nl;function rl(){return nl?tl:(nl=1,tl=Wa()(`document`,`documentElement`),tl)}var il,al;function ol(){if(al)return il;al=1;var e=No(),t=Ho(),n=e(`keys`);return il=function(e){return n[e]||(n[e]=t(e))},il}var sl,cl;function ll(){if(cl)return sl;cl=1;var e=vs(),t=el(),n=Yc(),r=Uc(),i=rl(),a=es(),o=ol(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,sl=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},sl}var ul={},dl;function fl(){if(dl)return ul;dl=1;var e=Kc(),t=Yc().concat(`length`,`prototype`);return ul.f=Object.getOwnPropertyNames||function(n){return e(n,t)},ul}var pl={},ml,hl;function gl(){return hl?ml:(hl=1,ml=ta()([].slice),ml)}var _l;function vl(){if(_l)return pl;_l=1;var e=ia(),t=Fa(),n=fl().f,r=gl(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return pl.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},pl}var yl={},bl;function xl(){return bl?yl:(bl=1,yl.f=Object.getOwnPropertySymbols,yl)}var Sl,Cl;function wl(){if(Cl)return Sl;Cl=1;var e=Cs();return Sl=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},Sl}var Tl,El;function Dl(){if(El)return Tl;El=1;var e=bs();return Tl=function(t,n,r){return e.f(t,n,r)},Tl}var Ol={},kl;function Al(){return kl?Ol:(kl=1,Ol.f=Go(),Ol)}var jl,Ml;function Nl(){if(Ml)return jl;Ml=1;var e=Va(),t=zo(),n=Al(),r=bs().f;return jl=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},jl}var Pl,Fl;function Il(){if(Fl)return Pl;Fl=1;var e=_a(),t=Wa(),n=Go(),r=wl();return Pl=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},Pl}var Ll,Rl;function zl(){if(Rl)return Ll;Rl=1;var e=lc(),t=fc();return Ll=e?{}.toString:function(){return`[object `+t(this)+`]`},Ll}var Bl,Vl;function Hl(){if(Vl)return Bl;Vl=1;var e=lc(),t=bs().f,n=Cs(),r=zo(),i=zl(),a=Go()(`toStringTag`);return Bl=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},Bl}var Ul,Wl;function Gl(){if(Wl)return Ul;Wl=1;var e=Ui(),t=ua(),n=e.WeakMap;return Ul=t(n)&&/native code/.test(String(n)),Ul}var Kl,ql;function Jl(){if(ql)return Kl;ql=1;var e=Gl(),t=Ui(),n=Ra(),r=Cs(),i=zo(),a=Ao(),o=ol(),s=Uc(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return Kl={set:d,get:f,has:p,enforce:m,getterFor:h},Kl}var Yl,Xl;function Zl(){if(Xl)return Yl;Xl=1;var e=ds(),t=ta(),n=Ea(),r=Io(),i=ec(),a=Cc(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return Yl={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Yl}var Ql;function $l(){if(Ql)return Ac;Ql=1;var e=Es(),t=Ui(),n=_a(),r=ta(),i=To(),a=ma(),o=no(),s=Ki(),c=zo(),l=qa(),u=vs(),d=Fa(),f=Zo(),p=Nc(),m=Ca(),h=ll(),g=Qc(),_=fl(),v=vl(),y=xl(),b=as(),x=bs(),S=el(),C=ba(),w=wl(),T=Dl(),E=No(),D=ol(),O=Uc(),ee=Ho(),k=Go(),A=Al(),j=Nl(),M=Il(),N=Hl(),P=Jl(),te=Zl().forEach,F=D(`hidden`),I=`Symbol`,ne=`prototype`,re=P.set,ie=P.getterFor(I),ae=Object[ne],oe=t.Symbol,se=oe&&oe[ne],ce=t.RangeError,L=t.TypeError,R=t.QObject,le=b.f,z=x.f,B=v.f,V=C.f,ue=r([].push),de=E(`symbols`),fe=E(`op-symbols`),pe=E(`wks`),me=!R||!R[ne]||!R[ne].findChild,he=function(e,t,n){var r=le(ae,t);r&&delete ae[t],z(e,t,n),r&&e!==ae&&z(ae,t,r)},ge=a&&s(function(){return h(z({},`a`,{get:function(){return z(this,`a`,{value:7}).a}})).a!==7})?he:z,_e=function(e,t){var n=de[e]=h(se);return re(n,{type:I,tag:e,description:t}),a||(n.description=t),n},ve=function(e,t,n){e===ae&&ve(fe,t,n),u(e);var r=f(t);return u(n),c(de,r)?(n.enumerable?(c(e,F)&&e[F][r]&&(e[F][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,F)||z(e,F,m(1,h(null))),e[F][r]=!0),ge(e,r,n)):z(e,r,n)},ye=function(e,t){u(e);var r=d(t);return te(g(r).concat(we(r)),function(t){(!a||n(xe,r,t))&&ve(e,t,r[t])}),e},be=function(e,t){return t===void 0?h(e):ye(h(e),t)},xe=function(e){var t=f(e),r=n(V,this,t);return this===ae&&c(de,t)&&!c(fe,t)?!1:r||!c(this,t)||!c(de,t)||c(this,F)&&this[F][t]?r:!0},Se=function(e,t){var n=d(e),r=f(t);if(!(n===ae&&c(de,r)&&!c(fe,r))){var i=le(n,r);return i&&c(de,r)&&!(c(n,F)&&n[F][r])&&(i.enumerable=!0),i}},Ce=function(e){var t=B(d(e)),n=[];return te(t,function(e){!c(de,e)&&!c(O,e)&&ue(n,e)}),n},we=function(e){var t=e===ae,n=B(t?fe:d(e)),r=[];return te(n,function(e){c(de,e)&&(!t||c(ae,e))&&ue(r,de[e])}),r};return o||(oe=function(){if(l(se,this))throw new L(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=ee(e),i=function(e){var a=this===void 0?t:this;a===ae&&n(i,fe,e),c(a,F)&&c(a[F],r)&&(a[F][r]=!1);var o=m(1,e);try{ge(a,r,o)}catch(e){if(!(e instanceof ce))throw e;he(a,r,o)}};return a&&me&&ge(ae,r,{configurable:!0,set:i}),_e(r,e)},se=oe[ne],w(se,`toString`,function(){return ie(this).tag}),w(oe,`withoutSetter`,function(e){return _e(ee(e),e)}),C.f=xe,x.f=ve,S.f=ye,b.f=Se,_.f=v.f=Ce,y.f=we,A.f=function(e){return _e(k(e),e)},a&&(T(se,`description`,{configurable:!0,get:function(){return ie(this).description}}),i||w(ae,`propertyIsEnumerable`,xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:oe}),te(g(pe),function(e){j(e)}),e({target:I,stat:!0,forced:!o},{useSetter:function(){me=!0},useSimple:function(){me=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:be,defineProperty:ve,defineProperties:ye,getOwnPropertyDescriptor:Se}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:Ce}),M(),N(oe,I),O[F]=!0,Ac}var eu={},tu,nu;function ru(){return nu?tu:(nu=1,tu=no()&&!!Symbol.for&&!!Symbol.keyFor,tu)}var iu;function au(){if(iu)return eu;iu=1;var e=Es(),t=Wa(),n=zo(),r=Nc(),i=No(),a=ru(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),eu}var ou={},su;function cu(){if(su)return ou;su=1;var e=Es(),t=zo(),n=co(),r=fo(),i=No(),a=ru(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),ou}var lu={},uu,du;function fu(){if(du)return uu;du=1;var e=ta(),t=Hs(),n=ua(),r=ia(),i=Nc(),a=e([].push);return uu=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},uu}var pu;function mu(){if(pu)return lu;pu=1;var e=Es(),t=Wa(),n=Qi(),r=_a(),i=ta(),a=Ki(),o=ua(),s=co(),c=gl(),l=fu(),u=no(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),lu}var hu={},gu;function _u(){if(gu)return hu;gu=1;var e=Es(),t=no(),n=Ki(),r=xl(),i=Io();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),hu}var vu;function yu(){return vu?kc:(vu=1,$l(),au(),cu(),mu(),_u(),kc)}var bu={},xu;function Su(){return xu?bu:(xu=1,Nl()(`asyncDispose`),bu)}var Cu={},wu;function Tu(){return wu?Cu:(wu=1,Nl()(`asyncIterator`),Cu)}var Eu={},Du;function Ou(){return Du?Eu:(Du=1,Nl()(`dispose`),Eu)}var ku={},Au;function ju(){return Au?ku:(Au=1,Nl()(`hasInstance`),ku)}var Mu={},Nu;function Pu(){return Nu?Mu:(Nu=1,Nl()(`isConcatSpreadable`),Mu)}var Fu={},Iu;function Lu(){return Iu?Fu:(Iu=1,Nl()(`iterator`),Fu)}var Ru={},zu;function Bu(){return zu?Ru:(zu=1,Nl()(`match`),Ru)}var Vu={},Hu;function Uu(){return Hu?Vu:(Hu=1,Nl()(`matchAll`),Vu)}var Wu={},Gu;function Ku(){return Gu?Wu:(Gu=1,Nl()(`replace`),Wu)}var qu={},Ju;function Yu(){return Ju?qu:(Ju=1,Nl()(`search`),qu)}var Xu={},Zu;function Qu(){return Zu?Xu:(Zu=1,Nl()(`species`),Xu)}var $u={},ed;function td(){return ed?$u:(ed=1,Nl()(`split`),$u)}var nd={},rd;function id(){if(rd)return nd;rd=1;var e=Nl(),t=Il();return e(`toPrimitive`),t(),nd}var ad={},od;function sd(){if(od)return ad;od=1;var e=Wa(),t=Nl(),n=Hl();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),ad}var cd={},ld;function ud(){return ld?cd:(ld=1,Nl()(`unscopables`),cd)}var dd={},fd;function pd(){return fd?dd:(fd=1,Hl()(Ui().JSON,`JSON`,!0),dd)}var md,hd;function gd(){return hd?md:(hd=1,Oc(),yu(),Su(),Tu(),Ou(),ju(),Pu(),Lu(),Bu(),Uu(),Ku(),Yu(),Qu(),td(),id(),sd(),ud(),pd(),md=Va().Symbol,md)}var _d={},vd,yd;function bd(){return yd?vd:(yd=1,vd=function(){},vd)}var xd,Sd;function Cd(){return Sd?xd:(Sd=1,xd={},xd)}var wd,Td;function Ed(){if(Td)return wd;Td=1;var e=ma(),t=zo(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return wd={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},wd}var Dd,Od;function bee(){return Od?Dd:(Od=1,Dd=!Ki()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Dd)}var kd,Ad;function jd(){if(Ad)return kd;Ad=1;var e=zo(),t=ua(),n=Io(),r=ol(),i=bee(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return kd=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},kd}var Md,Nd;function Pd(){if(Nd)return Md;Nd=1;var e=Ki(),t=ua(),n=Ra(),r=ll(),i=jd(),a=wl(),o=Go(),s=To(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),Md={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},Md}var Fd,Id;function xee(){if(Id)return Fd;Id=1;var e=Pd().IteratorPrototype,t=ll(),n=Ca(),r=Hl(),i=Cd(),a=function(){return this};return Fd=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},Fd}var Ld,Rd;function See(){if(Rd)return Ld;Rd=1;var e=ta(),t=ho();return Ld=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},Ld}var zd,Bd;function Cee(){if(Bd)return zd;Bd=1;var e=Ra();return zd=function(t){return e(t)||t===null},zd}var Vd,Hd;function wee(){if(Hd)return Vd;Hd=1;var e=Cee(),t=String,n=TypeError;return Vd=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Vd}var Ud,Wd;function Tee(){if(Wd)return Ud;Wd=1;var e=See(),t=Ra(),n=Ma(),r=wee();return Ud=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),Ud}var Gd,Kd;function qd(){if(Kd)return Gd;Kd=1;var e=Es(),t=_a(),n=To(),r=Ed(),i=ua(),a=xee(),o=jd(),s=Tee(),c=Hl(),l=Cs(),u=wl(),d=Go(),f=Cd(),p=Pd(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return Gd=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),M=d===`Array`&&k.entries||A,N,P,te;if(M&&(N=o(M.call(new r)),N!==Object.prototype&&N.next&&(!n&&o(N)!==g&&(s?s(N,g):i(N[v])||u(N,v,S)),c(N,O,!0,!0),n&&(f[O]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,j=function(){return t(A,this)})),w)if(P={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(te in P)(_||ee||!(te in k))&&u(k,te,P[te]);else e({target:d,proto:!0,forced:_||ee},P);return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,P},Gd}var Jd,Yd;function Xd(){return Yd?Jd:(Yd=1,Jd=function(e,t){return{value:e,done:t}},Jd)}var Zd,Qd;function $d(){if(Qd)return Zd;Qd=1;var e=Fa(),t=bd(),n=Cd(),r=Jl(),i=bs().f,a=qd(),o=Xd(),s=To(),c=ma(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Zd=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return Zd}var ef,tf;function nf(){return tf?ef:(tf=1,ef={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ef)}var rf;function af(){if(rf)return _d;rf=1,$d();var e=nf(),t=Ui(),n=Hl(),r=Cd();for(var i in e)n(t[i],i),r[i]=r.Array;return _d}var of,sf;function cf(){if(sf)return of;sf=1;var e=gd();return af(),of=e,of}var lf={},uf;function df(){if(uf)return lf;uf=1;var e=Go(),t=bs().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),lf}var ff={},pf;function mf(){return pf?ff:(pf=1,Su(),ff)}var hf={},gf;function _f(){return gf?hf:(gf=1,Ou(),hf)}var vf={},yf;function bf(){return yf?vf:(yf=1,Nl()(`metadata`),vf)}var xf,Sf;function Cf(){if(Sf)return xf;Sf=1;var e=cf();return df(),mf(),_f(),bf(),xf=e,xf}var wf={},Tf,Ef;function Df(){if(Ef)return Tf;Ef=1;var e=Wa(),t=ta(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return Tf=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},Tf}var Of;function kf(){return Of?wf:(Of=1,Es()({target:`Symbol`,stat:!0},{isRegisteredSymbol:Df()}),wf)}var Af={},jf,Mf;function Nf(){if(Mf)return jf;Mf=1;for(var e=No(),t=Wa(),n=ta(),r=co(),i=Go(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return jf=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},jf}var Pf;function Ff(){return Pf?Af:(Pf=1,Es()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Nf()}),Af)}var If={},Lf;function Rf(){return Lf?If:(Lf=1,Nl()(`customMatcher`),If)}var zf={},Bf;function Vf(){return Bf?zf:(Bf=1,Nl()(`observable`),zf)}var Hf={},Uf;function Wf(){return Uf?Hf:(Uf=1,Es()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:Df()}),Hf)}var Gf={},Kf;function qf(){return Kf?Gf:(Kf=1,Es()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Nf()}),Gf)}var Jf={},Yf;function Xf(){return Yf?Jf:(Yf=1,Nl()(`matcher`),Jf)}var Zf={},Qf;function $f(){return Qf?Zf:(Qf=1,Nl()(`metadataKey`),Zf)}var ep={},tp;function np(){return tp?ep:(tp=1,Nl()(`patternMatch`),ep)}var rp={},ip;function ap(){return ip?rp:(ip=1,Nl()(`replaceAll`),rp)}var op,sp;function cp(){if(sp)return op;sp=1;var e=Cf();return kf(),Ff(),Rf(),Vf(),Wf(),qf(),Xf(),$f(),np(),ap(),op=e,op}var lp,up;function dp(){return up?lp:(up=1,lp=cp(),lp)}var fp=Ri(dp()),pp={},mp,hp;function gp(){if(hp)return mp;hp=1;var e=ta(),t=Js(),n=Nc(),r=Ma(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return mp={codeAt:s(!1),charAt:s(!0)},mp}var _p;function vp(){if(_p)return pp;_p=1;var e=gp().charAt,t=Nc(),n=Jl(),r=qd(),i=Xd(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),pp}var yp,bp;function xp(){return bp?yp:(bp=1,$d(),vp(),Lu(),yp=Al().f(`iterator`),yp)}var Sp,Cp;function wp(){if(Cp)return Sp;Cp=1;var e=xp();return af(),Sp=e,Sp}var Tp,Ep;function Dp(){return Ep?Tp:(Ep=1,Tp=wp(),Tp)}var Op,kp;function Ap(){return kp?Op:(kp=1,Op=Dp(),Op)}var jp,Mp;function Np(){return Mp?jp:(Mp=1,jp=Ap(),jp)}var Pp=Ri(Np());function Fp(e){"@babel/helpers - typeof";return Fp=typeof fp==`function`&&typeof Pp==`symbol`?function(e){return typeof e}:function(e){return e&&typeof fp==`function`&&e.constructor===fp&&e!==fp.prototype?`symbol`:typeof e},Fp(e)}var Ip,Lp;function Rp(){return Lp?Ip:(Lp=1,id(),Ip=Al().f(`toPrimitive`),Ip)}var zp,Bp;function Vp(){return Bp?zp:(Bp=1,zp=Rp(),zp)}var Hp,Up;function Wp(){return Up?Hp:(Up=1,Hp=Vp(),Hp)}var Gp,Kp;function qp(){return Kp?Gp:(Kp=1,Gp=Wp(),Gp)}var Jp,Yp;function Xp(){return Yp?Jp:(Yp=1,Jp=qp(),Jp)}var Zp=Ri(Xp());function Qp(e,t){if(Fp(e)!=`object`||!e)return e;var n=e[Zp];if(n!==void 0){var r=n.call(e,t);if(Fp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $p(e){var t=Qp(e,`string`);return Fp(t)==`symbol`?t:t+``}function em(e,t,n){return(t=$p(t))in e?vee(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tm={},nm,rm;function im(){if(rm)return nm;rm=1;var e=ta(),t=ho(),n=Ra(),r=zo(),i=gl(),a=Yi(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return nm=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},nm}var am;function om(){if(am)return tm;am=1;var e=Es(),t=im();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),tm}var sm,cm;function lm(){if(cm)return sm;cm=1;var e=Ui(),t=Va();return sm=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},sm}var um,dm;function fm(){return dm?um:(dm=1,om(),um=lm()(`Function`,`bind`),um)}var pm,mm;function hm(){if(mm)return pm;mm=1;var e=qa(),t=fm(),n=Function.prototype;return pm=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},pm}var gm,_m;function vm(){return _m?gm:(_m=1,gm=hm(),gm)}var ym,bm;function xm(){return bm?ym:(bm=1,ym=vm(),ym)}var Sm=Ri(xm()),Cm={},wm,Tm;function Em(){if(Tm)return wm;Tm=1;var e=ho(),t=Io(),n=Ea(),r=ec(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return wm={left:o(!1),right:o(!0)},wm}var Dm,Om;function km(){if(Om)return Dm;Om=1;var e=Ki();return Dm=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},Dm}var Am,jm;function Mm(){if(jm)return Am;jm=1;var e=Ui(),t=Xa(),n=ia(),r=function(e){return t.slice(0,e.length)===e};return Am=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),Am}var Nm,Pm;function Fm(){return Pm?Nm:(Pm=1,Nm=Mm()===`NODE`,Nm)}var Im;function Lm(){if(Im)return Cm;Im=1;var e=Es(),t=Em().left,n=km(),r=$a();return e({target:`Array`,proto:!0,forced:!Fm()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),Cm}var Rm,zm;function Bm(){return zm?Rm:(zm=1,Lm(),Rm=lm()(`Array`,`reduce`),Rm)}var Vm,Hm;function Um(){if(Hm)return Vm;Hm=1;var e=qa(),t=Bm(),n=Array.prototype;return Vm=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},Vm}var Wm,Gm;function Km(){return Gm?Wm:(Gm=1,Wm=Um(),Wm)}var qm,Jm;function Ym(){return Jm?qm:(Jm=1,qm=Km(),qm)}var Xm=Ri(Ym()),Zm={},Qm;function $m(){if(Qm)return Zm;Qm=1;var e=Es(),t=Zl().filter;return e({target:`Array`,proto:!0,forced:!Ec()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Zm}var eh,th;function nh(){return th?eh:(th=1,$m(),eh=lm()(`Array`,`filter`),eh)}var rh,ih;function ah(){if(ih)return rh;ih=1;var e=qa(),t=nh(),n=Array.prototype;return rh=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},rh}var oh,sh;function ch(){return sh?oh:(sh=1,oh=ah(),oh)}var lh,uh;function dh(){return uh?lh:(uh=1,lh=ch(),lh)}var fh=Ri(dh()),ph={},mh;function hh(){if(mh)return ph;mh=1;var e=Es(),t=Zl().map;return e({target:`Array`,proto:!0,forced:!Ec()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),ph}var gh,_h;function vh(){return _h?gh:(_h=1,hh(),gh=lm()(`Array`,`map`),gh)}var yh,bh;function xh(){if(bh)return yh;bh=1;var e=qa(),t=vh(),n=Array.prototype;return yh=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},yh}var Sh,Ch;function wh(){return Ch?Sh:(Ch=1,Sh=xh(),Sh)}var Th,Eh;function Dh(){return Eh?Th:(Eh=1,Th=wh(),Th)}var Oh=Ri(Dh()),kh={},Ah,jh;function Eee(){if(jh)return Ah;jh=1;var e=Hs(),t=ec(),n=rc(),r=ds(),i=function(a,o,s,c,l,u,d,f){for(var p=l,m=0,h=d?r(d,f):!1,g,_;m<c;)m in s&&(g=h?h(s[m],m,o):s[m],u>0&&e(g)?(_=t(g),p=i(a,o,g,_,p,u-1)-1):(n(p+1),a[p]=g),p++),m++;return p};return Ah=i,Ah}var Mh;function Dee(){if(Mh)return kh;Mh=1;var e=Es(),t=Eee(),n=ho(),r=Io(),i=ec(),a=Cc();return e({target:`Array`,proto:!0},{flatMap:function(e){var o=r(this),s=i(o),c;return n(e),c=a(o,0),c.length=t(c,o,o,s,0,1,e,arguments.length>1?arguments[1]:void 0),c}}),kh}var Nh={},Ph;function Oee(){return Ph?Nh:(Ph=1,bd()(`flatMap`),Nh)}var Fh,Ih;function kee(){return Ih?Fh:(Ih=1,Dee(),Oee(),Fh=lm()(`Array`,`flatMap`),Fh)}var Lh,Rh;function Aee(){if(Rh)return Lh;Rh=1;var e=qa(),t=kee(),n=Array.prototype;return Lh=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},Lh}var zh,Bh;function jee(){return Bh?zh:(Bh=1,zh=Aee(),zh)}var Vh,Hh;function Mee(){return Hh?Vh:(Hh=1,Vh=jee(),Vh)}var Nee=Ri(Mee());function Pee(e){return new Iee(e)}var Fee=class{constructor(e,t,n){var r,i,a;em(this,`_listeners`,{add:Sm(r=this._add).call(r,this),remove:Sm(i=this._remove).call(i,this),update:Sm(a=this._update).call(a,this)}),this._source=e,this._transformers=t,this._target=n}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}stop(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}_transformItems(e){var t;return Xm(t=this._transformers).call(t,(e,t)=>t(e),e)}_add(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}_update(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}_remove(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}},Iee=class{constructor(e){em(this,`_transformers`,[]),this._source=e}filter(e){return this._transformers.push(t=>fh(t).call(t,e)),this}map(e){return this._transformers.push(t=>Oh(t).call(t,e)),this}flatMap(e){return this._transformers.push(t=>Nee(t).call(t,e)),this}to(e){return new Fee(this._source,this._transformers,e)}},Uh,Wh;function Gh(){return Wh?Uh:(Wh=1,Uh=cf(),Uh)}var Kh=Ri(Gh()),qh={},Jh;function Yh(){if(Jh)return qh;Jh=1;var e=Es(),t=Hs(),n=vc(),r=Ra(),i=Lc(),a=ec(),o=Fa(),s=oc(),c=Go(),l=Ec(),u=gl(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),qh}var Xh,Zh;function Qh(){return Zh?Xh:(Zh=1,Yh(),Xh=lm()(`Array`,`slice`),Xh)}var $h,eg;function tg(){if(eg)return $h;eg=1;var e=qa(),t=Qh(),n=Array.prototype;return $h=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},$h}var ng,rg;function ig(){return rg?ng:(rg=1,ng=tg(),ng)}var ag,og;function sg(){return og?ag:(og=1,ag=ig(),ag)}var cg=Ri(sg()),lg={},ug,dg;function fg(){if(dg)return ug;dg=1;var e=Wa(),t=ta(),n=fl(),r=xl(),i=vs(),a=t([].concat);return ug=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},ug}var pg;function mg(){return pg?lg:(pg=1,Es()({target:`Reflect`,stat:!0},{ownKeys:fg()}),lg)}var hg,gg;function _g(){return gg?hg:(gg=1,mg(),hg=Va().Reflect.ownKeys,hg)}var vg,yg;function bg(){return yg?vg:(yg=1,vg=_g(),vg)}var xg,Sg;function Cg(){return Sg?xg:(Sg=1,xg=bg(),xg)}var wg=Ri(Cg()),Tg={},Eg;function Dg(){return Eg?Tg:(Eg=1,Es()({target:`Array`,stat:!0},{isArray:Hs()}),Tg)}var Og,kg;function Ag(){return kg?Og:(kg=1,Dg(),Og=Va().Array.isArray,Og)}var jg,Mg;function Ng(){return Mg?jg:(Mg=1,jg=Ag(),jg)}var Pg,Fg;function Ig(){return Fg?Pg:(Fg=1,Pg=Ng(),Pg)}var Lg=Ri(Ig()),Rg={},zg;function Bg(){if(zg)return Rg;zg=1;var e=Es(),t=Io(),n=Qc();return e({target:`Object`,stat:!0,forced:Ki()(function(){n(1)})},{keys:function(e){return n(t(e))}}),Rg}var Vg,Hg;function Ug(){return Hg?Vg:(Hg=1,Bg(),Vg=Va().Object.keys,Vg)}var Wg,Gg;function Kg(){return Gg?Wg:(Gg=1,Wg=Ug(),Wg)}var qg,Jg;function Yg(){return Jg?qg:(Jg=1,qg=Kg(),qg)}var Xg=Ri(Yg()),Zg={},Qg,$g;function e_(){if($g)return Qg;$g=1;var e=Zl().forEach;return Qg=km()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},Qg}var t_;function n_(){if(t_)return Zg;t_=1;var e=Es(),t=e_();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),Zg}var r_,i_;function a_(){return i_?r_:(i_=1,n_(),r_=lm()(`Array`,`forEach`),r_)}var o_,s_;function c_(){return s_?o_:(s_=1,o_=a_(),o_)}var l_,u_;function d_(){if(u_)return l_;u_=1;var e=fc(),t=zo(),n=qa(),r=c_(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return l_=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},l_}var f_,p_;function m_(){return p_?f_:(p_=1,f_=d_(),f_)}var h_=Ri(m_()),g_={},__;function v_(){if(__)return g_;__=1;var e=Es(),t=ta(),n=Hs(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),g_}var y_,b_;function x_(){return b_?y_:(b_=1,v_(),y_=lm()(`Array`,`reverse`),y_)}var S_,C_;function w_(){if(C_)return S_;C_=1;var e=qa(),t=x_(),n=Array.prototype;return S_=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},S_}var T_,E_;function D_(){return E_?T_:(E_=1,T_=w_(),T_)}var O_,k_;function A_(){return k_?O_:(k_=1,O_=D_(),O_)}var j_=Ri(A_()),M_={},N_,P_;function F_(){if(P_)return N_;P_=1;var e=ma(),t=Hs(),n=TypeError,r=Object.getOwnPropertyDescriptor;return N_=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},N_}var I_,L_;function R_(){if(L_)return I_;L_=1;var e=fo(),t=TypeError;return I_=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},I_}var z_;function B_(){if(z_)return M_;z_=1;var e=Es(),t=Io(),n=Lc(),r=Js(),i=ec(),a=F_(),o=rc(),s=Cc(),c=oc(),l=R_(),u=Ec()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),M_}var V_,H_;function U_(){return H_?V_:(H_=1,B_(),V_=lm()(`Array`,`splice`),V_)}var W_,G_;function K_(){if(G_)return W_;G_=1;var e=qa(),t=U_(),n=Array.prototype;return W_=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},W_}var q_,J_;function Y_(){return J_?q_:(J_=1,q_=K_(),q_)}var X_,Z_;function Q_(){return Z_?X_:(Z_=1,X_=Y_(),X_)}var $_=Ri(Q_()),ev={},tv,nv;function rv(){if(nv)return tv;nv=1;var e=ma(),t=ta(),n=_a(),r=Ki(),i=Qc(),a=xl(),o=ba(),s=Io(),c=Ea(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return tv=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,tv}var iv;function av(){if(iv)return ev;iv=1;var e=Es(),t=rv();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),ev}var ov,sv;function cv(){return sv?ov:(sv=1,av(),ov=Va().Object.assign,ov)}var lv,uv;function dv(){return uv?lv:(uv=1,lv=cv(),lv)}var fv,pv;function mv(){return pv?fv:(pv=1,fv=dv(),fv)}var hv=Ri(mv()),gv,_v;function vv(){return _v?gv:(_v=1,Oc(),gv=lm()(`Array`,`concat`),gv)}var yv,bv;function xv(){if(bv)return yv;bv=1;var e=qa(),t=vv(),n=Array.prototype;return yv=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},yv}var Sv,Cv;function wv(){return Cv?Sv:(Cv=1,Sv=xv(),Sv)}var Tv,Ev;function Dv(){return Ev?Tv:(Ev=1,Tv=wv(),Tv)}var Ov=Ri(Dv()),kv={},Av;function jv(){return Av?kv:(Av=1,Es()({target:`Object`,stat:!0,sham:!ma()},{create:ll()}),kv)}var Mv,Nv;function Pv(){if(Nv)return Mv;Nv=1,jv();var e=Va().Object;return Mv=function(t,n){return e.create(t,n)},Mv}var Fv,Iv;function Lv(){return Iv?Fv:(Iv=1,Fv=Pv(),Fv)}var Rv,zv;function Bv(){return zv?Rv:(zv=1,Rv=Lv(),Rv)}var Vv=Ri(Bv()),Hv={},Uv,Wv;function Gv(){if(Wv)return Uv;Wv=1;var e=Js(),t=Nc(),n=Ma(),r=RangeError;return Uv=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},Uv}var Kv,qv;function Jv(){if(qv)return Kv;qv=1;var e=ta(),t=Zs(),n=Nc(),r=Gv(),i=Ma(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return Kv={start:c(!1),end:c(!0)},Kv}var Yv,Xv;function Zv(){if(Xv)return Yv;Xv=1;var e=ta(),t=Ki(),n=Jv().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return Yv=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,Yv}var Qv;function $v(){if(Qv)return Hv;Qv=1;var e=Es(),t=_a(),n=Io(),r=Jo(),i=Zv(),a=ia();return e({target:`Date`,proto:!0,forced:Ki()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),Hv}var ey,ty;function ny(){if(ty)return ey;ty=1,$v(),mu();var e=Va(),t=Qi();return e.JSON||={stringify:JSON.stringify},ey=function(n,r,i){return t(e.JSON.stringify,null,arguments)},ey}var ry,iy;function ay(){return iy?ry:(iy=1,ry=ny(),ry)}var oy,sy;function cy(){return sy?oy:(sy=1,oy=ay(),oy)}var ly=Ri(cy()),uy={},dy={},fy,py;function my(){if(py)return fy;py=1;var e=TypeError;return fy=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},fy}var hy,gy;function _y(){if(gy)return hy;gy=1;var e=Ui(),t=Qi(),n=ua(),r=Mm(),i=Xa(),a=gl(),o=my(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return hy=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},hy}var vy;function yy(){if(vy)return dy;vy=1;var e=Es(),t=Ui(),n=_y()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),dy}var by={},xy;function Sy(){if(xy)return by;xy=1;var e=Es(),t=Ui(),n=_y()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),by}var Cy;function wy(){return Cy?uy:(Cy=1,yy(),Sy(),uy)}var Ty,Ey;function Dy(){return Ey?Ty:(Ey=1,wy(),Ty=Va().setTimeout,Ty)}var Oy,ky;function Ay(){return ky?Oy:(ky=1,Oy=Dy(),Oy)}var jy=Ri(Ay()),My={exports:{}},Ny;function Py(){return Ny?My.exports:(Ny=1,(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(My),My.exports)}var Fy=Ri(Py());function Iy(){return Iy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iy.apply(this,arguments)}function Ly(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ry(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var zy=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},By=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Vy=typeof document>`u`?{style:{}}:document.createElement(`div`),Hy=`function`,Uy=Math.round,Wy=Math.abs,Gy=Date.now;function Ky(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<By.length;){if(n=By[a],r=n?n+i:t,r in e)return r;a++}}var qy=typeof window>`u`?{}:window,Jy=Ky(Vy.style,`touchAction`),Yy=Jy!==void 0;function Xy(){if(!Yy)return!1;var e={},t=qy.CSS&&qy.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?qy.CSS.supports(`touch-action`,n):!0}),e}var Zy=`compute`,Qy=`auto`,$y=`manipulation`,eb=`none`,tb=`pan-x`,nb=`pan-y`,rb=Xy(),ib=/mobile|tablet|ip(ad|hone|od)|android/i,ab=`ontouchstart`in qy,ob=Ky(qy,`PointerEvent`)!==void 0,sb=ab&&ib.test(navigator.userAgent),cb=`touch`,lb=`pen`,ub=`mouse`,db=`kinect`,fb=25,pb=1,mb=2,hb=4,gb=8,_b=1,vb=2,yb=4,bb=8,xb=16,Sb=vb|yb,Cb=bb|xb,wb=Sb|Cb,Tb=[`x`,`y`],Eb=[`clientX`,`clientY`];function Db(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Ob(e,t){return typeof e===Hy?e.apply(t&&t[0]||void 0,t):e}function kb(e,t){return e.indexOf(t)>-1}function Ab(e){if(kb(e,eb))return eb;var t=kb(e,tb),n=kb(e,nb);return t&&n?eb:t||n?t?tb:nb:kb(e,$y)?$y:Qy}var jb=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Zy&&(e=this.compute()),Yy&&this.manager.element.style&&rb[e]&&(this.manager.element.style[Jy]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Db(this.manager.recognizers,function(t){Ob(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Ab(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=kb(r,eb)&&!rb[eb],a=kb(r,nb)&&!rb[nb],o=kb(r,tb)&&!rb[tb];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&Sb||o&&n&Cb))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Mb(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Nb(e){var t=e.length;if(t===1)return{x:Uy(e[0].clientX),y:Uy(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Uy(n/t),y:Uy(r/t)}}function Pb(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Uy(e.pointers[n].clientX),clientY:Uy(e.pointers[n].clientY)},n++;return{timeStamp:Gy(),pointers:t,center:Nb(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Fb(e,t,n){n||=Tb;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Ib(e,t,n){n||=Tb;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Lb(e,t){return e===t?_b:Wy(e)>=Wy(t)?e<0?vb:yb:t<0?bb:xb}function Rb(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===pb||a.eventType===hb)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function zb(e,t,n){return{x:t/e||0,y:n/e||0}}function Bb(e,t){return Fb(t[0],t[1],Eb)/Fb(e[0],e[1],Eb)}function Vb(e,t){return Ib(t[1],t[0],Eb)+Ib(e[1],e[0],Eb)}function Hb(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==gb&&(r>fb||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=zb(r,c,l);a=u.x,o=u.y,i=Wy(u.x)>Wy(u.y)?u.x:u.y,s=Lb(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Ub(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=Pb(t),i>1&&!n.firstMultiple?n.firstMultiple=Pb(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=Nb(r);t.timeStamp=Gy(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Ib(s,c),t.distance=Fb(s,c),Rb(n,t),t.offsetDirection=Lb(t.deltaX,t.deltaY);var l=zb(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=Wy(l.x)>Wy(l.y)?l.x:l.y,t.scale=o?Bb(o.pointers,r):1,t.rotation=o?Vb(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Hb(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;Mb(f,u)&&(u=f),t.target=u}function Wb(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&pb&&r-i===0,o=t&(hb|gb)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ub(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Gb(e){return e.trim().split(/\s+/g)}function Kb(e,t,n){Db(Gb(t),function(t){e.addEventListener(t,n,!1)})}function qb(e,t,n){Db(Gb(t),function(t){e.removeEventListener(t,n,!1)})}function Jb(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Yb=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Ob(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Kb(this.element,this.evEl,this.domHandler),this.evTarget&&Kb(this.target,this.evTarget,this.domHandler),this.evWin&&Kb(Jb(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&qb(this.element,this.evEl,this.domHandler),this.evTarget&&qb(this.target,this.evTarget,this.domHandler),this.evWin&&qb(Jb(this.element),this.evWin,this.domHandler)},e}();function Xb(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Zb={pointerdown:pb,pointermove:mb,pointerup:hb,pointercancel:gb,pointerout:gb},Qb={2:cb,3:lb,4:ub,5:db},$b=`pointerdown`,ex=`pointermove pointerup pointercancel`;qy.MSPointerEvent&&!qy.PointerEvent&&($b=`MSPointerDown`,ex=`MSPointerMove MSPointerUp MSPointerCancel`);var tx=function(e){Ly(t,e);function t(){var n,r=t.prototype;return r.evEl=$b,r.evWin=ex,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Zb[e.type.toLowerCase().replace(`ms`,``)],i=Qb[e.pointerType]||e.pointerType,a=i===cb,o=Xb(t,e.pointerId,`pointerId`);r&pb&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(hb|gb)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Yb);function nx(e){return Array.prototype.slice.call(e,0)}function rx(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Xb(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var ix={touchstart:pb,touchmove:mb,touchend:hb,touchcancel:gb},ax=`touchstart touchmove touchend touchcancel`,ox=function(e){Ly(t,e);function t(){var n;return t.prototype.evTarget=ax,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=ix[e.type],n=sx.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:cb,srcEvent:e})},t}(Yb);function sx(e,t){var n=nx(e.touches),r=this.targetIds;if(t&(pb|mb)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=nx(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return Mb(e.target,c)}),t===pb)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(hb|gb)&&delete r[o[i].identifier],i++;if(s.length)return[rx(a.concat(s),`identifier`,!0),s]}var cx={mousedown:pb,mousemove:mb,mouseup:hb},lx=`mousedown`,ux=`mousemove mouseup`,dx=function(e){Ly(t,e);function t(){var n,r=t.prototype;return r.evEl=lx,r.evWin=ux,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=cx[e.type];t&pb&&e.button===0&&(this.pressed=!0),t&mb&&e.which!==1&&(t=hb),this.pressed&&(t&hb&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ub,srcEvent:e}))},t}(Yb),fx=2500,px=25;function mx(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},fx)}}function hx(e,t){e&pb?(this.primaryTouch=t.changedPointers[0].identifier,mx.call(this,t)):e&(hb|gb)&&mx.call(this,t)}function gx(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=px&&o<=px)return!0}return!1}var _x=function(){return function(e){Ly(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===cb,a=n.pointerType===ub;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)hx.call(Ry(Ry(r)),t,n);else if(a&&gx.call(Ry(Ry(r)),n))return;r.callback(e,t,n)}},r.touch=new ox(r.manager,r.handler),r.mouse=new dx(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Yb)}();function vx(e){var t;return t=e.options.inputClass||(ob?tx:sb?ox:ab?_x:dx),new t(e,Wb)}function yx(e,t,n){return Array.isArray(e)?(Db(e,n[t],n),!0):!1}var bx=1,xx=2,Sx=4,Cx=8,wx=Cx,Tx=16,Ex=32,Lee=1;function Ree(){return Lee++}function Dx(e,t){var n=t.manager;return n?n.get(e):e}function Ox(e){return e&Tx?`cancel`:e&Cx?`end`:e&Sx?`move`:e&xx?`start`:``}var kx=function(){function e(e){e===void 0&&(e={}),this.options=Iy({enable:!0},e),this.id=Ree(),this.manager=null,this.state=bx,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return zy(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(yx(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=Dx(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return yx(e,`dropRecognizeWith`,this)?this:(e=Dx(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(yx(e,`requireFailure`,this))return this;var t=this.requireFail;return e=Dx(e,this),Xb(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(yx(e,`dropRequireFailure`,this))return this;e=Dx(e,this);var t=Xb(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<Cx&&r(t.options.event+Ox(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=Cx&&r(t.options.event+Ox(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ex},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Ex|bx)))return!1;e++}return!0},t.recognize=function(e){var t=zy({},e);if(!Ob(this.options.enable,[this,t])){this.reset(),this.state=Ex;return}this.state&(wx|Tx|Ex)&&(this.state=bx),this.state=this.process(t),this.state&(xx|Sx|Cx|Tx)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Ax=function(e){Ly(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Iy({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[$y]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&pb&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==hb)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||Fb(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=wx,t.tryEmit()},n.interval),xx):wx}return Ex},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Ex},this.options.interval),Ex},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===wx&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(kx),jx=function(e){Ly(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Iy({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(xx|Sx),i=this.attrTest(e);return r&&(n&gb||!i)?t|Tx:r||i?n&hb?t|Cx:t&xx?t|Sx:xx:Ex},t}(kx);function Mx(e){return e===xb?`down`:e===bb?`up`:e===vb?`left`:e===yb?`right`:``}var Nx=function(e){Ly(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Iy({event:`pan`,threshold:10,pointers:1,direction:wb},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&Sb&&t.push(nb),e&Cb&&t.push(tb),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&Sb?(i=a===0?_b:a<0?vb:yb,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?_b:o<0?bb:xb,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return jx.prototype.attrTest.call(this,e)&&(this.state&xx||!(this.state&xx)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Mx(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(jx),Px=function(e){Ly(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Iy({event:`swipe`,threshold:10,velocity:.3,direction:Sb|Cb,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return Nx.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(Sb|Cb)?r=t.overallVelocity:n&Sb?r=t.overallVelocityX:n&Cb&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Wy(r)>this.options.velocity&&t.eventType&hb},n.emit=function(e){var t=Mx(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(jx),Fx=function(e){Ly(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Iy({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[eb]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&xx)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(jx),Ix=function(e){Ly(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Iy({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[eb]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&xx)},t}(jx),Lx=function(e){Ly(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Iy({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[Qy]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(hb|gb)&&!a)this.reset();else if(e.eventType&pb)this.reset(),this._timer=setTimeout(function(){t.state=wx,t.tryEmit()},n.time);else if(e.eventType&hb)return wx;return Ex},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===wx&&(e&&e.eventType&hb?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Gy(),this.manager.emit(this.options.event,this._input)))},t}(kx),Rx={domEvents:!1,touchAction:Zy,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},zx=[[Ix,{enable:!1}],[Fx,{enable:!1},[`rotate`]],[Px,{direction:Sb}],[Nx,{direction:Sb},[`swipe`]],[Ax],[Ax,{event:`doubletap`,taps:2},[`tap`]],[Lx]],zee=1,Bx=2;function Vx(e,t){var n=e.element;if(n.style){var r;Db(e.options.cssProps,function(i,a){r=Ky(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Bee(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Hx=function(){function e(e,t){var n=this;this.options=zy({},Rx,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=vx(this),this.touchAction=new jb(this,this.options.touchAction),Vx(this,!0),Db(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return zy(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Bx:zee},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&wx)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Bx&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(xx|Sx|Cx)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof kx)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(yx(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(yx(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Xb(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return Db(Gb(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return Db(Gb(e),function(e){t?n[e]&&n[e].splice(Xb(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Bee(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Vx(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Vee={touchstart:pb,touchmove:mb,touchend:hb,touchcancel:gb},Hee=`touchstart`,Uee=`touchstart touchmove touchend touchcancel`,Wee=function(e){Ly(t,e);function t(){var n,r=t.prototype;return r.evTarget=Hee,r.evWin=Uee,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=Vee[e.type];if(t===pb&&(this.started=!0),this.started){var n=Gee.call(this,e,t);t&(hb|gb)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:cb,srcEvent:e})}},t}(Yb);function Gee(e,t){var n=nx(e.touches),r=nx(e.changedTouches);return t&(hb|gb)&&(n=rx(n.concat(r),`identifier`,!0)),[n,r]}function Ux(e,t,n){var r=`DEPRECATED METHOD: `+t+`+`+n+` AT+`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var Wx=Ux(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),Kee=Ux(function(e,t){return Wx(e,t,!0)},`merge`,"Use `assign`.");function qee(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&zy(i,n)}function Gx(e,t){return function(){return e.apply(t,arguments)}}var Jee=function(){var e=function(e,t){return t===void 0&&(t={}),new Hx(e,Iy({recognizers:zx.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=wb,e.DIRECTION_DOWN=xb,e.DIRECTION_LEFT=vb,e.DIRECTION_RIGHT=yb,e.DIRECTION_UP=bb,e.DIRECTION_HORIZONTAL=Sb,e.DIRECTION_VERTICAL=Cb,e.DIRECTION_NONE=_b,e.DIRECTION_DOWN=xb,e.INPUT_START=pb,e.INPUT_MOVE=mb,e.INPUT_END=hb,e.INPUT_CANCEL=gb,e.STATE_POSSIBLE=bx,e.STATE_BEGAN=xx,e.STATE_CHANGED=Sx,e.STATE_ENDED=Cx,e.STATE_RECOGNIZED=wx,e.STATE_CANCELLED=Tx,e.STATE_FAILED=Ex,e.Manager=Hx,e.Input=Yb,e.TouchAction=jb,e.TouchInput=ox,e.MouseInput=dx,e.PointerEventInput=tx,e.TouchMouseInput=_x,e.SingleTouchInput=Wee,e.Recognizer=kx,e.AttrRecognizer=jx,e.Tap=Ax,e.Pan=Nx,e.Swipe=Px,e.Pinch=Fx,e.Rotate=Ix,e.Press=Lx,e.on=Kb,e.off=qb,e.each=Db,e.merge=Kee,e.extend=Wx,e.bindFn=Gx,e.assign=zy,e.inherit=qee,e.bindFn=Gx,e.prefixed=Ky,e.toArray=nx,e.inArray=Xb,e.uniqueArray=rx,e.splitStr=Gb,e.boolOrFn=Ob,e.hasParent=Mb,e.addEventListeners=Kb,e.removeEventListeners=qb,e.defaults=zy({},Rx,{preset:zx}),e}(),Kx=Kh(`DELETE`);function Yee(e){return qx({},e,...[...arguments].slice(1))}function qx(){let e=Jx(...arguments);return Xx(e),e}function Jx(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return Jx(qx(e[0],e[1]),...cg(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of wg(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===Kx?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!Lg(t[e])&&!Lg(n[e])?t[e]=Jx(t[e],n[e]):t[e]=Yx(n[e]));return t}function Yx(e){return Lg(e)?Oh(e).call(e,e=>Yx(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):Jx({},e):e}function Xx(e){for(let t of Xg(e))e[t]===Kx?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&Xx(e[t])}function Xee(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var Zee=typeof window<`u`?window.Hammer||Jee:function(){return Xee()};function Zx(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=Zee(this._dom.overlay);n.on(`tap`,Sm(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];h_(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{Qee(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}Fy(Zx.prototype),Zx.current=null,Zx.prototype.destroy=function(){this.deactivate();for(let n of j_(e=$_(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},Zx.prototype.activate=function(){Zx.current&&Zx.current.deactivate(),Zx.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},Zx.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},Zx.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function Qee(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var Qx,$x;function $ee(){return $x?Qx:($x=1,yu(),Qx=Va().Object.getOwnPropertySymbols,Qx)}var eS,tS;function ete(){return tS?eS:(tS=1,eS=$ee(),eS)}var nS,rS;function tte(){return rS?nS:(rS=1,nS=ete(),nS)}var iS=Ri(tte()),aS={exports:{}},oS={},sS;function nte(){if(sS)return oS;sS=1;var e=Es(),t=Ki(),n=Fa(),r=as().f,i=ma();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),oS}var cS;function rte(){if(cS)return aS.exports;cS=1,nte();var e=Va().Object,t=aS.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),aS.exports}var lS,uS;function ite(){return uS?lS:(uS=1,lS=rte(),lS)}var dS,fS;function ate(){return fS?dS:(fS=1,dS=ite(),dS)}var pS=Ri(ate()),mS={},hS;function ote(){if(hS)return mS;hS=1;var e=Es(),t=ma(),n=fg(),r=Fa(),i=as(),a=oc();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),mS}var gS,_S;function vS(){return _S?gS:(_S=1,ote(),gS=Va().Object.getOwnPropertyDescriptors,gS)}var yS,bS;function xS(){return bS?yS:(bS=1,yS=vS(),yS)}var SS,CS;function wS(){return CS?SS:(CS=1,SS=xS(),SS)}var TS=Ri(wS()),ES={exports:{}},DS={},OS;function kS(){if(OS)return DS;OS=1;var e=Es(),t=ma(),n=el().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),DS}var AS;function jS(){if(AS)return ES.exports;AS=1,kS();var e=Va().Object,t=ES.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),ES.exports}var MS,NS;function PS(){return NS?MS:(NS=1,MS=jS(),MS)}var FS,IS;function LS(){return IS?FS:(IS=1,FS=PS(),FS)}var RS=Ri(LS()),zS,BS;function VS(){return BS?zS:(BS=1,zS=Ms(),zS)}var HS=Ri(VS()),US={},WS={},GS={exports:{}},KS,qS;function JS(){return qS?KS:(qS=1,KS=Ki()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),KS)}var YS,XS;function ZS(){if(XS)return YS;XS=1;var e=Ki(),t=Ra(),n=ia(),r=JS(),i=Object.isExtensible;return YS=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,YS}var QS,$S;function eC(){return $S?QS:($S=1,QS=!Ki()(function(){return Object.isExtensible(Object.preventExtensions({}))}),QS)}var tC;function nC(){if(tC)return GS.exports;tC=1;var e=Es(),t=ta(),n=Uc(),r=Ra(),i=zo(),a=bs().f,o=fl(),s=vl(),c=ZS(),l=Ho(),u=eC(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=GS.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,GS.exports}var rC,iC;function ste(){if(iC)return rC;iC=1;var e=Go(),t=Cd(),n=e(`iterator`),r=Array.prototype;return rC=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},rC}var aC,oC;function sC(){if(oC)return aC;oC=1;var e=fc(),t=vo(),n=ka(),r=Cd(),i=Go()(`iterator`);return aC=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},aC}var cC,lC;function uC(){if(lC)return cC;lC=1;var e=_a(),t=ho(),n=vs(),r=fo(),i=sC(),a=TypeError;return cC=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},cC}var dC,fC;function pC(){if(fC)return dC;fC=1;var e=_a(),t=vs(),n=vo();return dC=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},dC}var mC,hC;function gC(){if(hC)return mC;hC=1;var e=ds(),t=_a(),n=vs(),r=fo(),i=ste(),a=ec(),o=qa(),s=uC(),c=sC(),l=pC(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return mC=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},mC}var _C,vC;function yC(){if(vC)return _C;vC=1;var e=qa(),t=TypeError;return _C=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},_C}var bC,xC;function SC(){if(xC)return bC;xC=1;var e=Es(),t=Ui(),n=nC(),r=Ki(),i=Cs(),a=gC(),o=yC(),s=ua(),c=Ra(),l=ka(),u=Hl(),d=bs().f,f=Zl().forEach,p=ma(),m=Jl(),h=m.set,g=m.getterFor;return bC=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},bC}var CC,wC;function TC(){if(wC)return CC;wC=1;var e=wl();return CC=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},CC}var EC,DC;function cte(){if(DC)return EC;DC=1;var e=Wa(),t=Dl(),n=Go(),r=ma(),i=n(`species`);return EC=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},EC}var OC,kC;function AC(){if(kC)return OC;kC=1;var e=ll(),t=Dl(),n=TC(),r=ds(),i=yC(),a=ka(),o=gC(),s=qd(),c=Xd(),l=cte(),u=ma(),d=nC().fastKey,f=Jl(),p=f.set,m=f.getterFor;return OC={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},OC}var jC;function MC(){return jC?WS:(jC=1,SC()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},AC()),WS)}var NC;function PC(){return NC?US:(NC=1,MC(),US)}var FC={},IC,LC;function RC(){return LC?IC:(LC=1,IC=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},IC)}var zC,BC;function VC(){if(BC)return zC;BC=1;var e=Wa(),t=RC(),n=e(`Map`);return zC={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},zC}var HC;function UC(){if(HC)return FC;HC=1;var e=Es(),t=ta(),n=ho(),r=Ma(),i=gC(),a=VC(),o=To(),s=Ki(),c=a.Map,l=a.has,u=a.get,d=a.set,f=t([].push),p=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||p},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);l(a,n)?f(u(a,n),e):d(a,n,[e])}),a}}),FC}var WC,GC;function KC(){return GC?WC:(GC=1,$d(),PC(),UC(),vp(),WC=Va().Map,WC)}var qC,JC;function YC(){if(JC)return qC;JC=1;var e=KC();return af(),qC=e,qC}var XC,ZC;function QC(){return ZC?XC:(ZC=1,XC=YC(),XC)}var $C=Ri(QC()),ew={},tw;function nw(){if(tw)return ew;tw=1;var e=Es(),t=Zl().some;return e({target:`Array`,proto:!0,forced:!km()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),ew}var rw,iw;function aw(){return iw?rw:(iw=1,nw(),rw=lm()(`Array`,`some`),rw)}var ow,sw;function cw(){if(sw)return ow;sw=1;var e=qa(),t=aw(),n=Array.prototype;return ow=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},ow}var lw,uw;function lte(){return uw?lw:(uw=1,lw=cw(),lw)}var dw,fw;function ute(){return fw?dw:(fw=1,dw=lte(),dw)}var pw=Ri(ute()),mw,hw;function gw(){return hw?mw:(hw=1,$d(),mw=lm()(`Array`,`keys`),mw)}var _w,vw;function yw(){return vw?_w:(vw=1,_w=gw(),_w)}var bw,xw;function Sw(){if(xw)return bw;xw=1,af();var e=fc(),t=zo(),n=qa(),r=yw(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return bw=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},bw}var Cw,ww;function Tw(){return ww?Cw:(ww=1,Cw=Sw(),Cw)}var Ew=Ri(Tw()),Dw={},Ow,kw;function Aw(){if(kw)return Ow;kw=1;var e=gl(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return Ow=n,Ow}var jw,Mw;function Nw(){if(Mw)return jw;Mw=1;var e=Xa().match(/firefox\/(\d+)/i);return jw=!!e&&+e[1],jw}var Pw,Fw;function Iw(){if(Fw)return Pw;Fw=1;var e=Xa();return Pw=/MSIE|Trident/.test(e),Pw}var Lw,Rw;function zw(){if(Rw)return Lw;Rw=1;var e=Xa().match(/AppleWebKit\/(\d+)\./);return Lw=!!e&&+e[1],Lw}var Bw;function Vw(){if(Bw)return Dw;Bw=1;var e=Es(),t=ta(),n=ho(),r=Io(),i=ec(),a=R_(),o=Nc(),s=Ki(),c=Aw(),l=km(),u=Nw(),d=Iw(),f=$a(),p=zw(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),Dw}var Hw,Uw;function Ww(){return Uw?Hw:(Uw=1,Vw(),Hw=lm()(`Array`,`sort`),Hw)}var Gw,Kw;function qw(){if(Kw)return Gw;Kw=1;var e=qa(),t=Ww(),n=Array.prototype;return Gw=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},Gw}var Jw,Yw;function Xw(){return Yw?Jw:(Yw=1,Jw=qw(),Jw)}var Zw,Qw;function $w(){return Qw?Zw:(Qw=1,Zw=Xw(),Zw)}var eT=Ri($w()),tT,nT;function rT(){return nT?tT:(nT=1,$d(),tT=lm()(`Array`,`values`),tT)}var iT,aT;function oT(){return aT?iT:(aT=1,iT=rT(),iT)}var sT,cT;function lT(){if(cT)return sT;cT=1,af();var e=fc(),t=zo(),n=qa(),r=oT(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return sT=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},sT}var uT,dT;function dte(){return dT?uT:(dT=1,uT=lT(),uT)}var fT=Ri(dte()),pT,mT;function hT(){return mT?pT:(mT=1,pT=wp(),pT)}var gT=Ri(hT()),_T,vT;function yT(){return vT?_T:(vT=1,$d(),_T=lm()(`Array`,`entries`),_T)}var bT,xT;function fte(){return xT?bT:(xT=1,bT=yT(),bT)}var ST,CT;function pte(){if(CT)return ST;CT=1,af();var e=fc(),t=zo(),n=qa(),r=fte(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return ST=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},ST}var wT,TT;function mte(){return TT?wT:(TT=1,wT=pte(),wT)}var hte=Ri(mte()),ET=[];for(let e=0;e<256;++e)ET.push((e+256).toString(16).slice(1));function gte(e,t=0){return(ET[e[t+0]]+ET[e[t+1]]+ET[e[t+2]]+ET[e[t+3]]+`-`+ET[e[t+4]]+ET[e[t+5]]+`-`+ET[e[t+6]]+ET[e[t+7]]+`-`+ET[e[t+8]]+ET[e[t+9]]+`-`+ET[e[t+10]]+ET[e[t+11]]+ET[e[t+12]]+ET[e[t+13]]+ET[e[t+14]]+ET[e[t+15]]).toLowerCase()}var DT,_te=new Uint8Array(16);function vte(){if(!DT){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);DT=crypto.getRandomValues.bind(crypto)}return DT(_te)}var OT={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kT(e,t,n){e||={};let r=e.random??e.rng?.()??vte();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,gte(r)}function AT(e,t,n){return OT.randomUUID&&!e?OT.randomUUID():kT(e)}function jT(e){return typeof e==`string`||typeof e==`number`}var MT=class e{constructor(e){em(this,`_queue`,[]),em(this,`_timeout`,null),em(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let a=n.replace[e];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay==`number`&&(this._timeout=jy(()=>{this.flush()},this.delay))}flush(){var e,t;h_(e=$_(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},NT=class e{constructor(){em(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),em(this,`subscribe`,e.prototype.on),em(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);h_(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=fh(n=this._subscribers[e]).call(n,e=>e!==t)}},PT={},FT={},IT;function LT(){return IT?FT:(IT=1,SC()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},AC()),FT)}var RT;function zT(){return RT?PT:(RT=1,LT(),PT)}var BT={},VT,HT;function UT(){if(HT)return VT;HT=1;var e=fo(),t=TypeError;return VT=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},VT}var WT,GT;function KT(){if(GT)return WT;GT=1;var e=Wa(),t=RC(),n=e(`Set`),r=n.prototype;return WT={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},WT}var qT,JT;function YT(){if(JT)return qT;JT=1;var e=_a();return qT=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},qT}var XT,ZT;function QT(){if(ZT)return XT;ZT=1;var e=YT();return XT=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},XT}var $T,eE;function tE(){if(eE)return $T;eE=1;var e=KT(),t=QT(),n=e.Set,r=e.add;return $T=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},$T}var nE,rE;function iE(){return rE?nE:(rE=1,nE=function(e){return e.size},nE)}var aE,oE;function sE(){return oE?aE:(oE=1,aE=function(e){return{iterator:e,next:e.next,done:!1}},aE)}var cE,lE;function uE(){if(lE)return cE;lE=1;var e=ho(),t=vs(),n=_a(),r=Js(),i=sE(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},cE=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},cE}var dE,fE;function pE(){if(fE)return dE;fE=1;var e=UT(),t=KT(),n=tE(),r=iE(),i=uE(),a=QT(),o=YT(),s=t.has,c=t.remove;return dE=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},dE}var mE,hE;function gE(){return hE?mE:(hE=1,mE=function(){return!1},mE)}var _E;function vE(){if(_E)return BT;_E=1;var e=Es(),t=pE(),n=Ki();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),BT}var yE={},bE,xE;function SE(){if(xE)return bE;xE=1;var e=UT(),t=KT(),n=iE(),r=uE(),i=QT(),a=YT(),o=t.Set,s=t.add,c=t.has;return bE=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},bE}var CE;function wE(){if(CE)return yE;CE=1;var e=Es(),t=Ki(),n=SE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),yE}var TE={},EE,DE;function OE(){if(DE)return EE;DE=1;var e=UT(),t=KT().has,n=iE(),r=uE(),i=QT(),a=YT(),o=pC();return EE=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},EE}var kE;function AE(){if(kE)return TE;kE=1;var e=Es(),t=OE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),TE}var jE={},ME,NE;function PE(){if(NE)return ME;NE=1;var e=UT(),t=iE(),n=QT(),r=uE();return ME=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},ME}var FE;function IE(){if(FE)return jE;FE=1;var e=Es(),t=PE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),jE}var LE={},RE,zE;function BE(){if(zE)return RE;zE=1;var e=UT(),t=KT().has,n=iE(),r=uE(),i=YT(),a=pC();return RE=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},RE}var VE;function HE(){if(VE)return LE;VE=1;var e=Es(),t=BE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),LE}var UE={},WE,GE;function KE(){if(GE)return WE;GE=1;var e=UT(),t=KT(),n=tE(),r=uE(),i=YT(),a=t.add,o=t.has,s=t.remove;return WE=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},WE}var qE,JE;function YE(){return JE?qE:(JE=1,qE=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},qE)}var XE;function ZE(){if(XE)return UE;XE=1;var e=Es(),t=KE(),n=YE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),UE}var QE={},$E,eD;function tD(){if(eD)return $E;eD=1;var e=UT(),t=KT().add,n=tE(),r=uE(),i=YT();return $E=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},$E}var nD;function rD(){if(nD)return QE;nD=1;var e=Es(),t=tD(),n=YE();return e({target:`Set`,proto:!0,real:!0,forced:!gE()(`union`)||!n(`union`)},{union:t}),QE}var iD,aD;function oD(){return aD?iD:(aD=1,$d(),zT(),vE(),wE(),AE(),IE(),HE(),ZE(),rD(),vp(),iD=Va().Set,iD)}var sD,cD;function lD(){if(cD)return sD;cD=1;var e=oD();return af(),sD=e,sD}var uD,dD;function fD(){return dD?uD:(dD=1,uD=lD(),uD)}var pD=Ri(fD()),mD,hD;function gD(){return hD?mD:(hD=1,$d(),vp(),mD=uC(),mD)}var _D,vD;function yD(){if(vD)return _D;vD=1;var e=gD();return af(),_D=e,_D}var bD,xD;function SD(){return xD?bD:(xD=1,bD=yD(),bD)}var CD,wD;function TD(){return wD?CD:(wD=1,CD=SD(),CD)}var ED,DD;function yte(){return DD?ED:(DD=1,ED=TD(),ED)}var OD,kD;function bte(){return kD?OD:(kD=1,OD=yte(),OD)}var AD=Ri(bte()),jD=class e{constructor(e){this._pairs=e}*[gT](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){var e;return Oh(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return Oh(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Vv(null);for(let[t,n]of this._pairs)e[t]=n;return e}toMap(){return new $C(this._pairs)}toIdSet(){return new pD(this.toIdArray())}toItemSet(){return new pD(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new pD;for(let[n,r]of this._pairs)t.add(e(r,n));return t}filter(t){let n=this._pairs;return new e({*[gT](){for(let[e,r]of n)t(r,e)&&(yield[e,r])}})}forEach(e){for(let[t,n]of this._pairs)e(n,t)}map(t){let n=this._pairs;return new e({*[gT](){for(let[e,r]of n)yield[e,t(r,e)]}})}max(e){let t=AD(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o>i&&(i=o,r=a)}return r}min(e){let t=AD(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o<i&&(i=o,r=a)}return r}reduce(e,t){for(let[n,r]of this._pairs)t=e(t,r,n);return t}sort(t){return new e({[gT]:()=>{var e;return AD(eT(e=[...this._pairs]).call(e,(e,n)=>{let[r,i]=e,[a,o]=n;return t(i,o,r,a)}))}})}};function MD(e,t){var n=Xg(e);if(iS){var r=iS(e);t&&(r=fh(r).call(r,function(t){return pS(e,t).enumerable})),n.push.apply(n,r)}return n}function ND(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?h_(n=MD(Object(i),!0)).call(n,function(t){em(e,t,i[t])}):TS?RS(e,TS(i)):h_(r=MD(Object(i))).call(r,function(t){HS(e,t,pS(i,t))})}return e}function xte(e,t){return e[t]??(e[t]=AT()),e}var PD=class extends NT{get idProp(){return this._idProp}constructor(e,t){super(),em(this,`_queue`,null),e&&!Lg(e)&&(t=e,e=[]),this._options=t||{},this._data=new $C,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=MT.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(Lg(e)){let t=Oh(e).call(e,e=>e[this._idProp]);if(pw(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,i=e.length;t<i;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],i=[],a=[],o=this._idProp,s=e=>{let t=e[o];if(t!=null&&this._data.has(t)){let n=e,o=hv({},this._data.get(t)),s=this._updateItem(n);r.push(s),a.push(n),i.push(o)}else{let t=this._addItem(e);n.push(t)}};if(Lg(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?s(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)s(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:i,data:a};this._trigger(`update`,e,t)}return Ov(n).call(n,r)}updateOnly(e,t){var n;Lg(e)||(e=[e]);let r=Oh(n=Oh(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let{oldData:t,update:n}=e,r=t[this._idProp],i=Yee(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:Oh(r).call(r,e=>e.id),oldData:Oh(r).call(r,e=>e.oldData),data:Oh(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}else return[]}get(e,t){let n,r,i;jT(e)?(n=e,i=t):Lg(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&fh(i),s=[],c,l,u;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)c=this._data.get(r[e]),c!=null&&(!o||o(c))&&s.push(c);else{var d;l=[...Ew(d=this._data).call(d)];for(let e=0,t=l.length;e<t;e++)u=l[e],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){let e=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,e);else for(let t=0,n=s.length;t<n;t++)s[t]=this._filterFields(s[t],e)}if(a==`Object`){let e={};for(let t=0,n=s.length;t<n;t++){let n=s[t],r=n[this._idProp];e[r]=n}return e}else if(n!=null)return c??null;else return s}getIds(e){let t=this._data,n=e&&fh(e),r=e&&e.order,i=[...Ew(t).call(t)],a=[];if(n)if(r){let e=[];for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&n(a)&&e.push(a)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,t=i.length;e<t;e++){let t=i[e],r=this._data.get(t);r!=null&&n(r)&&a.push(r[this._idProp])}else if(r){let e=[];for(let n=0,r=i.length;n<r;n++){let r=i[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,n=i.length;e<n;e++){let n=i[e],r=t.get(n);r!=null&&a.push(r[this._idProp])}return a}getDataSet(){return this}forEach(e,t){let n=t&&fh(t),r=this._data,i=[...Ew(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],i=r[this._idProp];e(r,i)}}else for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&(!n||n(a))&&e(a,r)}}map(e,t){let n=t&&fh(t),r=[],i=this._data,a=[...Ew(i).call(i)];for(let t=0,i=a.length;t<i;t++){let i=a[t],o=this._data.get(i);o!=null&&(!n||n(o))&&r.push(e(o,i))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&Xm(n=Lg(t)?t:Xg(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;eT(e).call(e,(e,t)=>{let r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)eT(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=Lg(e)?e:[e];for(let e=0,t=i.length;e<t;e++){let t=this._remove(i[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(jT(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...Ew(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let i of fT(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a>n)&&(t=i,n=a)}return t||null}min(e){let t=null,n=null;for(let i of fT(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a<n)&&(t=i,n=a)}return t||null}distinct(e){let t=this._data,n=[...Ew(t).call(t)],r=[],i=0;for(let a=0,o=n.length;a<o;a++){let o=n[a],s=t.get(o)[e],c=!1;for(let e=0;e<i;e++)if(r[e]==s){c=!0;break}!c&&s!==void 0&&(r[i]=s,i++)}return r}_addItem(e){let t=xte(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+ly(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,ND(ND({},n),e)),t}stream(e){if(e){let t=this._data;return new jD({*[gT](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}else{var t;return new jD({[gT]:Sm(t=hte(this._data)).call(t,this._data)})}}},Ste=class e extends NT{get idProp(){return this.getDataSet().idProp}constructor(e,t){var n;super(),em(this,`length`,0),em(this,`_ids`,new pD),this._options=t||{},this._listener=Sm(n=this._onEvent).call(n,this),this.setData(e)}setData(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);let e=this._data.getIds({filter:fh(this._options)}),t=this._data.get(e);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:e,oldData:t})}if(e!=null){this._data=e;let t=this._data.getIds({filter:fh(this._options)});for(let e=0,n=t.length;e<n;e++){let n=t[e];this._ids.add(n)}this.length=t.length,this._trigger(`add`,{items:t})}else this._data=new PD;this._data.on&&this._data.on(`*`,this._listener)}refresh(){let e=this._data.getIds({filter:fh(this._options)}),t=[...this._ids],n={},r=[],i=[],a=[];for(let t=0,i=e.length;t<i;t++){let i=e[t];n[i]=!0,this._ids.has(i)||(r.push(i),this._ids.add(i))}for(let e=0,r=t.length;e<r;e++){let r=t[e],o=this._data.get(r);o==null?console.error(`If you see this, report it please.`):n[r]||(i.push(r),a.push(o),this._ids.delete(r))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}get(e,t){if(this._data==null)return null;let n=null,r;jT(e)||Lg(e)?(n=e,r=t):r=e;let i=hv({},this._options,r),a=fh(this._options),o=r&&fh(r);return a&&o&&(i.filter=e=>a(e)&&o(e)),n==null?this._data.get(i):this._data.get(n,i)}getIds(e){if(this._data.length){let t=fh(this._options),n=e==null?null:fh(e),r;return r=n?t?e=>t(e)&&n(e):n:t,this._data.getIds({filter:r,order:e&&e.order})}else return[]}forEach(e,t){if(this._data){var n;let r=fh(this._options),i=t&&fh(t),a;a=i?r?function(e){return r(e)&&i(e)}:i:r,h_(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}map(e,t){if(this._data){var n;let r=fh(this._options),i=t&&fh(t),a;return a=i?r?e=>r(e)&&i(e):i:r,Oh(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}getDataSet(){return this._data.getDataSet()}stream(e){var t;return this._data.stream(e||{[gT]:Sm(t=Ew(this._ids)).call(t,this._ids)})}dispose(){var t;(t=this._data)!=null&&t.off&&this._data.off(`*`,this._listener);let n=`This data view has already been disposed of.`,r={get:()=>{throw Error(n)},set:()=>{throw Error(n)},configurable:!1};for(let t of wg(e.prototype))HS(this,t,r)}_onEvent(e,t,n){if(!t||!t.items||!this._data)return;let r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(let e=0,t=r.length;e<t;e++){let t=r[e];this.get(t)&&(this._ids.add(t),i.push(t))}break;case`update`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this.get(n)?this._ids.has(n)?(a.push(n),c.push(t.data[e]),s.push(t.oldData[e])):(this._ids.add(n),i.push(n)):this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break;case`remove`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}};function Cte(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof h_(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Oh(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function wte(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof h_(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Oh(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&Cte(e,t.getDataSet())}var FD;function K(){return FD.apply(null,arguments)}function Tte(e){FD=e}function ID(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function LD(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function RD(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function zD(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(RD(e,t))return!1;return!0}function BD(e){return e===void 0}function VD(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function HD(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function UD(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function WD(e,t){for(var n in t)RD(t,n)&&(e[n]=t[n]);return RD(t,`toString`)&&(e.toString=t.toString),RD(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function GD(e,t,n,r){return Cj(e,t,n,r,!0).utc()}function KD(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function qD(e){return e._pf??=KD(),e._pf}var JD=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function YD(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=qD(e),n=JD.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function XD(e){var t=GD(NaN);return e==null?qD(t).userInvalidated=!0:WD(qD(t),e),t}var ZD=K.momentProperties=[],QD=!1;function $D(e,t){var n,r,i,a=ZD.length;if(BD(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),BD(t._i)||(e._i=t._i),BD(t._f)||(e._f=t._f),BD(t._l)||(e._l=t._l),BD(t._strict)||(e._strict=t._strict),BD(t._tzm)||(e._tzm=t._tzm),BD(t._isUTC)||(e._isUTC=t._isUTC),BD(t._offset)||(e._offset=t._offset),BD(t._pf)||(e._pf=qD(t)),BD(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=ZD[n],i=t[r],BD(i)||(e[r]=i);return e}function eO(e){$D(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),QD===!1&&(QD=!0,K.updateOffset(this),QD=!1)}function tO(e){return e instanceof eO||e!=null&&e._isAMomentObject!=null}function nO(e){K.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function rO(e,t){var n=!0;return WD(function(){if(K.deprecationHandler!=null&&K.deprecationHandler(null,e),n){var r=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i=``,typeof arguments[a]==`object`){for(o in i+=`+[`+a+`] `,arguments[0])RD(arguments[0],o)&&(i+=o+`: `+arguments[0][o]+`, `);i=i.slice(0,-2)}else i=arguments[a];r.push(i)}nO(e+`+Arguments: `+Array.prototype.slice.call(r).join(``)+`+`+Error().stack),n=!1}return t.apply(this,arguments)},t)}var iO={};function aO(e,t){K.deprecationHandler!=null&&K.deprecationHandler(e,t),iO[e]||(nO(t),iO[e]=!0)}K.suppressDeprecationWarnings=!1,K.deprecationHandler=null;function oO(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function sO(e){var t,n;for(n in e)RD(e,n)&&(t=e[n],oO(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function cO(e,t){var n=WD({},e),r;for(r in t)RD(t,r)&&(LD(e[r])&&LD(t[r])?(n[r]={},WD(n[r],e[r]),WD(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)RD(e,r)&&!RD(t,r)&&LD(e[r])&&(n[r]=WD({},n[r]));return n}function lO(e){e!=null&&this.set(e)}var uO=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)RD(e,t)&&n.push(t);return n},dO={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function fO(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return oO(r)?r.call(t,n):r}function pO(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var mO=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,hO=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gO={},_O={};function q(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(_O[e]=i),t&&(_O[t[0]]=function(){return pO(i.apply(this,arguments),t[1],t[2])}),n&&(_O[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function vO(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function yO(e){var t=e.match(mO),n,r;for(n=0,r=t.length;n<r;n++)_O[t[n]]?t[n]=_O[t[n]]:t[n]=vO(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=oO(t[a])?t[a].call(n,e):t[a];return i}}function bO(e,t){return e.isValid()?(t=xO(t,e.localeData()),gO[t]=gO[t]||yO(t),gO[t](e)):e.localeData().invalidDate()}function xO(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(hO.lastIndex=0;n>=0&&hO.test(e);)e=e.replace(hO,r),hO.lastIndex=0,--n;return e}var SO={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function CO(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(mO).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var wO=`Invalid date`;function TO(){return this._invalidDate}var EO=`%d`,DO=/\d{1,2}/;function OO(e){return this._ordinal.replace(`%d`,e)}var kO={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function AO(e,t,n,r){var i=this._relativeTime[n];return oO(i)?i(e,t,n,r):i.replace(/%d/i,e)}function jO(e,t){var n=this._relativeTime[e>0?`future`:`past`];return oO(n)?n(t):n.replace(/%s/i,t)}var MO={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function NO(e){return typeof e==`string`?MO[e]||MO[e.toLowerCase()]:void 0}function PO(e){var t={},n,r;for(r in e)RD(e,r)&&(n=NO(r),n&&(t[n]=e[r]));return t}var FO={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function IO(e){var t=[],n;for(n in e)RD(e,n)&&t.push({unit:n,priority:FO[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var LO=/\d/,RO=/\d\d/,zO=/\d{3}/,BO=/\d{4}/,VO=/[+-]?\d{6}/,HO=/\d\d?/,UO=/\d\d\d\d?/,WO=/\d\d\d\d\d\d?/,GO=/\d{1,3}/,KO=/\d{1,4}/,qO=/[+-]?\d{1,6}/,JO=/\d+/,YO=/[+-]?\d+/,XO=/Z|[+-]\d\d:?\d\d/gi,ZO=/Z|[+-]\d\d(?::?\d\d)?/gi,QO=/[+-]?\d+(\.\d{1,3})?/,$O=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ek=/^[1-9]\d?/,tk=/^([1-9]\d|\d)/,nk={};function J(e,t,n){nk[e]=oO(t)?t:function(e,r){return e&&n?n:t}}function rk(e,t){return RD(nk,e)?nk[e](t._strict,t._locale):new RegExp(ik(e))}function ik(e){return ak(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function ak(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function ok(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function sk(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ok(t)),n}var ck={};function lk(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),VD(t)&&(r=function(e,n){n[t]=sk(e)}),i=e.length,n=0;n<i;n++)ck[e[n]]=r}function uk(e,t){lk(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function dk(e,t,n){t!=null&&RD(ck,e)&&ck[e](t,n._a,n,e)}function fk(e){return e%4==0&&e%100!=0||e%400==0}var pk=0,mk=1,hk=2,gk=3,_k=4,vk=5,yk=6,bk=7,xk=8;q(`Y`,0,0,function(){var e=this.year();return e<=9999?pO(e,4):`+`+e}),q(0,[`YY`,2],0,function(){return this.year()%100}),q(0,[`YYYY`,4],0,`year`),q(0,[`YYYYY`,5],0,`year`),q(0,[`YYYYYY`,6,!0],0,`year`),J(`Y`,YO),J(`YY`,HO,RO),J(`YYYY`,KO,BO),J(`YYYYY`,qO,VO),J(`YYYYYY`,qO,VO),lk([`YYYYY`,`YYYYYY`],pk),lk(`YYYY`,function(e,t){t[pk]=e.length===2?K.parseTwoDigitYear(e):sk(e)}),lk(`YY`,function(e,t){t[pk]=K.parseTwoDigitYear(e)}),lk(`Y`,function(e,t){t[pk]=parseInt(e,10)});function Sk(e){return fk(e)?366:365}K.parseTwoDigitYear=function(e){return sk(e)+(sk(e)>68?1900:2e3)};var Ck=Tk(`FullYear`,!0);function wk(){return fk(this.year())}function Tk(e,t){return function(n){return n==null?Ek(this,e):(Dk(this,e,n),K.updateOffset(this,t),this)}}function Ek(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Dk(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!fk(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function Ok(e){return e=NO(e),oO(this[e])?this[e]():this}function kk(e,t){if(typeof e==`object`){e=PO(e);var n=IO(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=NO(e),oO(this[e]))return this[e](t);return this}function Ak(e,t){return(e%t+t)%t}var jk=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Mk(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Ak(t,12);return e+=(t-n)/12,n===1?fk(e)?29:28:31-n%7%2}q(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),q(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),q(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),J(`M`,HO,ek),J(`MM`,HO,RO),J(`MMM`,function(e,t){return t.monthsShortRegex(e)}),J(`MMMM`,function(e,t){return t.monthsRegex(e)}),lk([`M`,`MM`],function(e,t){t[mk]=sk(e)-1}),lk([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?qD(n).invalidMonth=e:t[mk]=i});var Nk=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),Pk=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),Fk=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ik=$O,Lk=$O;function Rk(e,t){return e?ID(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Fk).test(t)?`format`:`standalone`][e.month()]:ID(this._months)?this._months:this._months.standalone}function zk(e,t){return e?ID(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Fk.test(t)?`format`:`standalone`][e.month()]:ID(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Bk(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=GD([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=jk.call(this._shortMonthsParse,o),i===-1?null:i):(i=jk.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=jk.call(this._shortMonthsParse,o),i===-1?(i=jk.call(this._longMonthsParse,o),i===-1?null:i):i):(i=jk.call(this._longMonthsParse,o),i===-1?(i=jk.call(this._shortMonthsParse,o),i===-1?null:i):i)}function Vk(e,t,n){var r,i,a;if(this._monthsParseExact)return Bk.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=GD([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function Hk(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=sk(t);else if(t=e.localeData().monthsParse(t),!VD(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Mk(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Uk(e){return e==null?Ek(this,`Month`):(Hk(this,e),K.updateOffset(this,!0),this)}function Wk(){return Mk(this.year(),this.month())}function Gk(e){return this._monthsParseExact?(RD(this,`_monthsRegex`)||qk.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(RD(this,`_monthsShortRegex`)||(this._monthsShortRegex=Ik),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Kk(e){return this._monthsParseExact?(RD(this,`_monthsRegex`)||qk.call(this),e?this._monthsStrictRegex:this._monthsRegex):(RD(this,`_monthsRegex`)||(this._monthsRegex=Lk),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function qk(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=GD([2e3,i]),o=ak(this.monthsShort(a,``)),s=ak(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function Jk(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Yk(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xk(e,t,n){var r=7+t-n;return-((7+Yk(e,0,r).getUTCDay()-t)%7)+r-1}function Zk(e,t,n,r,i){var a=(7+n-r)%7,o=Xk(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=Sk(c)+s):s>Sk(e)?(c=e+1,l=s-Sk(e)):(c=e,l=s),{year:c,dayOfYear:l}}function Qk(e,t,n){var r=Xk(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+$k(o,t,n)):i>$k(e.year(),t,n)?(a=i-$k(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function $k(e,t,n){var r=Xk(e,t,n),i=Xk(e+1,t,n);return(Sk(e)-r+i)/7}q(`w`,[`ww`,2],`wo`,`week`),q(`W`,[`WW`,2],`Wo`,`isoWeek`),J(`w`,HO,ek),J(`ww`,HO,RO),J(`W`,HO,ek),J(`WW`,HO,RO),uk([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=sk(e)});function eA(e){return Qk(e,this._week.dow,this._week.doy).week}var tA={dow:0,doy:6};function nA(){return this._week.dow}function rA(){return this._week.doy}function iA(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function aA(e){var t=Qk(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}q(`d`,0,`do`,`day`),q(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),q(`e`,0,0,`weekday`),q(`E`,0,0,`isoWeekday`),J(`d`,HO),J(`e`,HO),J(`E`,HO),J(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),J(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),J(`dddd`,function(e,t){return t.weekdaysRegex(e)}),uk([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?qD(n).invalidWeekday=e:t.d=i}),uk([`d`,`e`,`E`],function(e,t,n,r){t[r]=sk(e)});function oA(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function sA(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function cA(e,t){return e.slice(t,7).concat(e.slice(0,t))}var lA=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),uA=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),dA=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),fA=$O,pA=$O,mA=$O;function hA(e,t){var n=ID(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?cA(n,this._week.dow):e?n[e.day()]:n}function gA(e){return e===!0?cA(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function _A(e){return e===!0?cA(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function vA(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=GD([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=jk.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=jk.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=jk.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=jk.call(this._weekdaysParse,o),i!==-1||(i=jk.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=jk.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=jk.call(this._shortWeekdaysParse,o),i!==-1||(i=jk.call(this._weekdaysParse,o),i!==-1)?i:(i=jk.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=jk.call(this._minWeekdaysParse,o),i!==-1||(i=jk.call(this._weekdaysParse,o),i!==-1)?i:(i=jk.call(this._shortWeekdaysParse,o),i===-1?null:i))}function yA(e,t,n){var r,i,a;if(this._weekdaysParseExact)return vA.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=GD([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function bA(e){if(!this.isValid())return e==null?NaN:this;var t=Ek(this,`Day`);return e==null?t:(e=oA(e,this.localeData()),this.add(e-t,`d`))}function xA(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function SA(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=sA(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function CA(e){return this._weekdaysParseExact?(RD(this,`_weekdaysRegex`)||EA.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(RD(this,`_weekdaysRegex`)||(this._weekdaysRegex=fA),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function wA(e){return this._weekdaysParseExact?(RD(this,`_weekdaysRegex`)||EA.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(RD(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=pA),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function TA(e){return this._weekdaysParseExact?(RD(this,`_weekdaysRegex`)||EA.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(RD(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=mA),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function EA(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=GD([2e3,1]).day(a),s=ak(this.weekdaysMin(o,``)),c=ak(this.weekdaysShort(o,``)),l=ak(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function DA(){return this.hours()%12||12}function OA(){return this.hours()||24}q(`H`,[`HH`,2],0,`hour`),q(`h`,[`hh`,2],0,DA),q(`k`,[`kk`,2],0,OA),q(`hmm`,0,0,function(){return``+DA.apply(this)+pO(this.minutes(),2)}),q(`hmmss`,0,0,function(){return``+DA.apply(this)+pO(this.minutes(),2)+pO(this.seconds(),2)}),q(`Hmm`,0,0,function(){return``+this.hours()+pO(this.minutes(),2)}),q(`Hmmss`,0,0,function(){return``+this.hours()+pO(this.minutes(),2)+pO(this.seconds(),2)});function kA(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}kA(`a`,!0),kA(`A`,!1);function AA(e,t){return t._meridiemParse}J(`a`,AA),J(`A`,AA),J(`H`,HO,tk),J(`h`,HO,ek),J(`k`,HO,ek),J(`HH`,HO,RO),J(`hh`,HO,RO),J(`kk`,HO,RO),J(`hmm`,UO),J(`hmmss`,WO),J(`Hmm`,UO),J(`Hmmss`,WO),lk([`H`,`HH`],gk),lk([`k`,`kk`],function(e,t,n){var r=sk(e);t[gk]=r===24?0:r}),lk([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),lk([`h`,`hh`],function(e,t,n){t[gk]=sk(e),qD(n).bigHour=!0}),lk(`hmm`,function(e,t,n){var r=e.length-2;t[gk]=sk(e.substr(0,r)),t[_k]=sk(e.substr(r)),qD(n).bigHour=!0}),lk(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[gk]=sk(e.substr(0,r)),t[_k]=sk(e.substr(r,2)),t[vk]=sk(e.substr(i)),qD(n).bigHour=!0}),lk(`Hmm`,function(e,t,n){var r=e.length-2;t[gk]=sk(e.substr(0,r)),t[_k]=sk(e.substr(r))}),lk(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[gk]=sk(e.substr(0,r)),t[_k]=sk(e.substr(r,2)),t[vk]=sk(e.substr(i))});function jA(e){return(e+``).toLowerCase().charAt(0)===`p`}var MA=/[ap]\.?m?\.?/i,NA=Tk(`Hours`,!0);function PA(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var FA={calendar:dO,longDateFormat:SO,invalidDate:wO,ordinal:EO,dayOfMonthOrdinalParse:DO,relativeTime:kO,months:Nk,monthsShort:Pk,week:tA,weekdays:lA,weekdaysMin:dA,weekdaysShort:uA,meridiemParse:MA},IA={},LA={},RA;function zA(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function BA(e){return e&&e.toLowerCase().replace(`_`,`-`)}function VA(e){for(var t=0,n,r,i,a;t<e.length;){for(a=BA(e[t]).split(`-`),n=a.length,r=BA(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=UA(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&zA(a,r)>=n-1)break;n--}t++}return RA}function HA(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function UA(t){var n=null,r;if(IA[t]===void 0&&typeof module<`u`&&module&&module.exports&&HA(t))try{n=RA._abbr,r=e,r(`./locale/`+t),WA(n)}catch{IA[t]=null}return IA[t]}function WA(e,t){var n;return e&&(n=BD(t)?qA(e):GA(e,t),n?RA=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),RA._abbr}function GA(e,t){if(t!==null){var n,r=FA;if(t.abbr=e,IA[e]!=null)aO(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=IA[e]._config;else if(t.parentLocale!=null)if(IA[t.parentLocale]!=null)r=IA[t.parentLocale]._config;else if(n=UA(t.parentLocale),n!=null)r=n._config;else return LA[t.parentLocale]||(LA[t.parentLocale]=[]),LA[t.parentLocale].push({name:e,config:t}),null;return IA[e]=new lO(cO(r,t)),LA[e]&&LA[e].forEach(function(e){GA(e.name,e.config)}),WA(e),IA[e]}else return delete IA[e],null}function KA(e,t){if(t!=null){var n,r,i=FA;IA[e]!=null&&IA[e].parentLocale!=null?IA[e].set(cO(IA[e]._config,t)):(r=UA(e),r!=null&&(i=r._config),t=cO(i,t),r??(t.abbr=e),n=new lO(t),n.parentLocale=IA[e],IA[e]=n),WA(e)}else IA[e]!=null&&(IA[e].parentLocale==null?IA[e]!=null&&delete IA[e]:(IA[e]=IA[e].parentLocale,e===WA()&&WA(e)));return IA[e]}function qA(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return RA;if(!ID(e)){if(t=UA(e),t)return t;e=[e]}return VA(e)}function JA(){return uO(IA)}function YA(e){var t,n=e._a;return n&&qD(e).overflow===-2&&(t=n[mk]<0||n[mk]>11?mk:n[hk]<1||n[hk]>Mk(n[pk],n[mk])?hk:n[gk]<0||n[gk]>24||n[gk]===24&&(n[_k]!==0||n[vk]!==0||n[yk]!==0)?gk:n[_k]<0||n[_k]>59?_k:n[vk]<0||n[vk]>59?vk:n[yk]<0||n[yk]>999?yk:-1,qD(e)._overflowDayOfYear&&(t<pk||t>hk)&&(t=hk),qD(e)._overflowWeeks&&t===-1&&(t=bk),qD(e)._overflowWeekday&&t===-1&&(t=xk),qD(e).overflow=t),e}var XA=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ZA=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QA=/Z|[+-]\d\d(?::?\d\d)?/,$A=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],ej=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],tj=/^\/?Date\((-?\d+)/i,nj=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,rj={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ij(e){var t,n,r=e._i,i=XA.exec(r)||ZA.exec(r),a,o,s,c,l=$A.length,u=ej.length;if(i){for(qD(e).iso=!0,t=0,n=l;t<n;t++)if($A[t][1].exec(i[1])){o=$A[t][0],a=$A[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(ej[t][1].exec(i[3])){s=(i[2]||` `)+ej[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(QA.exec(i[4]))c=`Z`;else{e._isValid=!1;return}e._f=o+(s||``)+(c||``),gj(e)}else e._isValid=!1}function aj(e,t,n,r,i,a){var o=[oj(e),Pk.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function oj(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function sj(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function cj(e,t,n){return e&&uA.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(qD(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function lj(e,t,n){if(e)return rj[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function uj(e){var t=nj.exec(sj(e._i)),n;if(t){if(n=aj(t[4],t[3],t[2],t[5],t[6],t[7]),!cj(t[1],n,e))return;e._a=n,e._tzm=lj(t[8],t[9],t[10]),e._d=Yk.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),qD(e).rfc2822=!0}else e._isValid=!1}function dj(e){var t=tj.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(ij(e),e._isValid===!1)delete e._isValid;else return;if(uj(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:K.createFromInputFallback(e)}K.createFromInputFallback=rO(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function fj(e,t,n){return e??t??n}function pj(e){var t=new Date(K.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function mj(e){var t,n,r=[],i,a,o;if(!e._d){for(i=pj(e),e._w&&e._a[hk]==null&&e._a[mk]==null&&hj(e),e._dayOfYear!=null&&(o=fj(e._a[pk],i[pk]),(e._dayOfYear>Sk(o)||e._dayOfYear===0)&&(qD(e)._overflowDayOfYear=!0),n=Yk(o,0,e._dayOfYear),e._a[mk]=n.getUTCMonth(),e._a[hk]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[gk]===24&&e._a[_k]===0&&e._a[vk]===0&&e._a[yk]===0&&(e._nextDay=!0,e._a[gk]=0),e._d=(e._useUTC?Yk:Jk).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[gk]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(qD(e).weekdayMismatch=!0)}}function hj(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=fj(t.GG,e._a[pk],Qk(wj(),1,4).year),r=fj(t.W,1),i=fj(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Qk(wj(),a,o),n=fj(t.gg,e._a[pk],l.year),r=fj(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>$k(n,a,o)?qD(e)._overflowWeeks=!0:c==null?(s=Zk(n,r,i,a,o),e._a[pk]=s.year,e._dayOfYear=s.dayOfYear):qD(e)._overflowWeekday=!0}K.ISO_8601=function(){},K.RFC_2822=function(){};function gj(e){if(e._f===K.ISO_8601){ij(e);return}if(e._f===K.RFC_2822){uj(e);return}e._a=[],qD(e).empty=!0;var t=``+e._i,n,r,i,a,o,s=t.length,c=0,l,u;for(i=xO(e._f,e._locale).match(mO)||[],u=i.length,n=0;n<u;n++)a=i[n],r=(t.match(rk(a,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&qD(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),_O[a]?(r?qD(e).empty=!1:qD(e).unusedTokens.push(a),dk(a,r,e)):e._strict&&!r&&qD(e).unusedTokens.push(a);qD(e).charsLeftOver=s-c,t.length>0&&qD(e).unusedInput.push(t),e._a[gk]<=12&&qD(e).bigHour===!0&&e._a[gk]>0&&(qD(e).bigHour=void 0),qD(e).parsedDateParts=e._a.slice(0),qD(e).meridiem=e._meridiem,e._a[gk]=_j(e._locale,e._a[gk],e._meridiem),l=qD(e).era,l!==null&&(e._a[pk]=e._locale.erasConvertYear(l,e._a[pk])),mj(e),YA(e)}function _j(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function vj(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){qD(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=$D({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],gj(t),YD(t)&&(o=!0),a+=qD(t).charsLeftOver,a+=qD(t).unusedTokens.length*10,qD(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));WD(e,n||t)}function yj(e){if(!e._d){var t=PO(e._i),n=t.day===void 0?t.date:t.day;e._a=UD([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),mj(e)}}function bj(e){var t=new eO(YA(xj(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function xj(e){var t=e._i,n=e._f;return e._locale=e._locale||qA(e._l),t===null||n===void 0&&t===``?XD({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),tO(t)?new eO(YA(t)):(HD(t)?e._d=t:ID(n)?vj(e):n?gj(e):Sj(e),YD(e)||(e._d=null),e))}function Sj(e){var t=e._i;BD(t)?e._d=new Date(K.now()):HD(t)?e._d=new Date(t.valueOf()):typeof t==`string`?dj(e):ID(t)?(e._a=UD(t.slice(0),function(e){return parseInt(e,10)}),mj(e)):LD(t)?yj(e):VD(t)?e._d=new Date(t):K.createFromInputFallback(e)}function Cj(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(LD(e)&&zD(e)||ID(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,bj(a)}function wj(e,t,n,r){return Cj(e,t,n,r,!1)}var Tj=rO(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=wj.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:XD()}),Ej=rO(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=wj.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:XD()});function Dj(e,t){var n,r;if(t.length===1&&ID(t[0])&&(t=t[0]),!t.length)return wj();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Oj(){return Dj(`isBefore`,[].slice.call(arguments,0))}function kj(){return Dj(`isAfter`,[].slice.call(arguments,0))}var Aj=function(){return Date.now?Date.now():+new Date},jj=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function Mj(e){var t,n=!1,r,i=jj.length;for(t in e)if(RD(e,t)&&!(jk.call(jj,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[jj[r]]){if(n)return!1;parseFloat(e[jj[r]])!==sk(e[jj[r]])&&(n=!0)}return!0}function Nj(){return this._isValid}function Pj(){return rM(NaN)}function Fj(e){var t=PO(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=Mj(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=qA(),this._bubble()}function Ij(e){return e instanceof Fj}function Lj(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Rj(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&sk(e[o])!==sk(t[o]))&&a++;return a+i}function zj(e,t){q(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+pO(~~(e/60),2)+t+pO(~~e%60,2)})}zj(`Z`,`:`),zj(`ZZ`,``),J(`Z`,ZO),J(`ZZ`,ZO),lk([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=Vj(ZO,e)});var Bj=/([\+\-]|\d\d)/gi;function Vj(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(Bj)||[`-`,0,0],a=+(i[1]*60)+sk(i[2]),a===0?0:i[0]===`+`?a:-a)}function Hj(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(tO(e)||HD(e)?e.valueOf():wj(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),K.updateOffset(n,!1),n):wj(e).local()}function Uj(e){return-Math.round(e._d.getTimezoneOffset())}K.updateOffset=function(){};function Wj(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=Vj(ZO,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=Uj(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,`m`),r!==e&&(!t||this._changeInProgress?cM(this,rM(e-r,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,K.updateOffset(this,!0),null)),this}else return this._isUTC?r:Uj(this)}function Gj(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function Kj(e){return this.utcOffset(0,e)}function qj(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Uj(this),`m`)),this}function Jj(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=Vj(XO,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function Yj(e){return this.isValid()?(e=e?wj(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Xj(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Zj(){if(!BD(this._isDSTShifted))return this._isDSTShifted;var e={},t;return $D(e,this),e=xj(e),e._a?(t=e._isUTC?GD(e._a):wj(e._a),this._isDSTShifted=this.isValid()&&Rj(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Qj(){return this.isValid()?!this._isUTC:!1}function $j(){return this.isValid()?this._isUTC:!1}function eM(){return this.isValid()?this._isUTC&&this._offset===0:!1}var tM=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nM=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function rM(e,t){var n=e,r=null,i,a,o;return Ij(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:VD(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=tM.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:sk(r[hk])*i,h:sk(r[gk])*i,m:sk(r[_k])*i,s:sk(r[vk])*i,ms:sk(Lj(r[yk]*1e3))*i}):(r=nM.exec(e))?(i=r[1]===`-`?-1:1,n={y:iM(r[2],i),M:iM(r[3],i),w:iM(r[4],i),d:iM(r[5],i),h:iM(r[6],i),m:iM(r[7],i),s:iM(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=oM(wj(n.from),wj(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new Fj(n),Ij(e)&&RD(e,`_locale`)&&(a._locale=e._locale),Ij(e)&&RD(e,`_isValid`)&&(a._isValid=e._isValid),a}rM.fn=Fj.prototype,rM.invalid=Pj;function iM(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function aM(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function oM(e,t){var n;return e.isValid()&&t.isValid()?(t=Hj(t,e),e.isBefore(t)?n=aM(e,t):(n=aM(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function sM(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(aO(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=rM(n,r),cM(this,i,e),this}}function cM(e,t,n,r){var i=t._milliseconds,a=Lj(t._days),o=Lj(t._months);e.isValid()&&(r??=!0,o&&Hk(e,Ek(e,`Month`)+o*n),a&&Dk(e,`Date`,Ek(e,`Date`)+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&K.updateOffset(e,a||o))}var lM=sM(1,`add`),uM=sM(-1,`subtract`);function dM(e){return typeof e==`string`||e instanceof String}function fM(e){return tO(e)||HD(e)||dM(e)||VD(e)||mM(e)||pM(e)||e==null}function pM(e){var t=LD(e)&&!zD(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n||=RD(e,a);return t&&n}function mM(e){var t=ID(e),n=!1;return t&&(n=e.filter(function(t){return!VD(t)&&dM(e)}).length===0),t&&n}function hM(e){var t=LD(e)&&!zD(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=RD(e,a);return t&&n}function gM(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function _M(e,t){arguments.length===1&&(arguments[0]?fM(arguments[0])?(e=arguments[0],t=void 0):hM(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||wj(),r=Hj(n,this).startOf(`day`),i=K.calendarFormat(this,r)||`sameElse`,a=t&&(oO(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,wj(n)))}function vM(){return new eO(this)}function yM(e,t){var n=tO(e)?e:wj(e);return this.isValid()&&n.isValid()?(t=NO(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function bM(e,t){var n=tO(e)?e:wj(e);return this.isValid()&&n.isValid()?(t=NO(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function xM(e,t,n,r){var i=tO(e)?e:wj(e),a=tO(t)?t:wj(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function SM(e,t){var n=tO(e)?e:wj(e),r;return this.isValid()&&n.isValid()?(t=NO(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function CM(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function wM(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function TM(e,t,n){var r,i,a;if(!this.isValid()||(r=Hj(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=NO(t),t){case`year`:a=EM(this,r)/12;break;case`month`:a=EM(this,r);break;case`quarter`:a=EM(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:ok(a)}function EM(e,t){if(e.date()<t.date())return-EM(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}K.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,K.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function DM(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function OM(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?bO(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):oO(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,bO(n,`Z`)):bO(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function kM(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function AM(e){e||=this.isUtc()?K.defaultFormatUtc:K.defaultFormat;var t=bO(this,e);return this.localeData().postformat(t)}function jM(e,t){return this.isValid()&&(tO(e)&&e.isValid()||wj(e).isValid())?rM({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function MM(e){return this.from(wj(),e)}function NM(e,t){return this.isValid()&&(tO(e)&&e.isValid()||wj(e).isValid())?rM({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function PM(e){return this.to(wj(),e)}function FM(e){var t;return e===void 0?this._locale._abbr:(t=qA(e),t!=null&&(this._locale=t),this)}var IM=rO(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function LM(){return this._locale}var RM=1e3,zM=60*RM,BM=60*zM,VM=146097*24*BM;function HM(e,t){return(e%t+t)%t}function UM(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-VM:new Date(e,t,n).valueOf()}function WM(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-VM:Date.UTC(e,t,n)}function GM(e){var t,n;if(e=NO(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?WM:UM,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=HM(t+(this._isUTC?0:this.utcOffset()*zM),BM);break;case`minute`:t=this._d.valueOf(),t-=HM(t,zM);break;case`second`:t=this._d.valueOf(),t-=HM(t,RM);break}return this._d.setTime(t),K.updateOffset(this,!0),this}function KM(e){var t,n;if(e=NO(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?WM:UM,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=BM-HM(t+(this._isUTC?0:this.utcOffset()*zM),BM)-1;break;case`minute`:t=this._d.valueOf(),t+=zM-HM(t,zM)-1;break;case`second`:t=this._d.valueOf(),t+=RM-HM(t,RM)-1;break}return this._d.setTime(t),K.updateOffset(this,!0),this}function qM(){return this._d.valueOf()-(this._offset||0)*6e4}function JM(){return Math.floor(this.valueOf()/1e3)}function YM(){return new Date(this.valueOf())}function XM(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ZM(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function QM(){return this.isValid()?this.toISOString():null}function $M(){return YD(this)}function eN(){return WD({},qD(this))}function tN(){return qD(this).overflow}function nN(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q(`N`,0,0,`eraAbbr`),q(`NN`,0,0,`eraAbbr`),q(`NNN`,0,0,`eraAbbr`),q(`NNNN`,0,0,`eraName`),q(`NNNNN`,0,0,`eraNarrow`),q(`y`,[`y`,1],`yo`,`eraYear`),q(`y`,[`yy`,2],0,`eraYear`),q(`y`,[`yyy`,3],0,`eraYear`),q(`y`,[`yyyy`,4],0,`eraYear`),J(`N`,pN),J(`NN`,pN),J(`NNN`,pN),J(`NNNN`,mN),J(`NNNNN`,hN),lk([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?qD(n).era=i:qD(n).invalidEra=e}),J(`y`,JO),J(`yy`,JO),J(`yyy`,JO),J(`yyyy`,JO),J(`yo`,gN),lk([`y`,`yy`,`yyy`,`yyyy`],pk),lk([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pk]=n._locale.eraYearOrdinalParse(e,i):t[pk]=parseInt(e,10)});function rN(e,t){var n,r,i,a=this._eras||qA(`en`)._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case`string`:i=K(a[n].since).startOf(`day`),a[n].since=i.valueOf();break}switch(typeof a[n].until){case`undefined`:a[n].until=1/0;break;case`string`:i=K(a[n].until).startOf(`day`).valueOf(),a[n].until=i.valueOf();break}}return a}function iN(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r];break}else if([o,s,c].indexOf(e)>=0)return a[r]}function aN(e,t){var n=e.since<=e.until?1:-1;return t===void 0?K(e.since).year():K(e.since).year()+(t-e.offset)*n}function oN(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function sN(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function cN(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function lN(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf(`day`).valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-K(i[e].since).year())*n+i[e].offset;return this.year()}function uN(e){return RD(this,`_erasNameRegex`)||_N.call(this),e?this._erasNameRegex:this._erasRegex}function dN(e){return RD(this,`_erasAbbrRegex`)||_N.call(this),e?this._erasAbbrRegex:this._erasRegex}function fN(e){return RD(this,`_erasNarrowRegex`)||_N.call(this),e?this._erasNarrowRegex:this._erasRegex}function pN(e,t){return t.erasAbbrRegex(e)}function mN(e,t){return t.erasNameRegex(e)}function hN(e,t){return t.erasNarrowRegex(e)}function gN(e,t){return t._eraYearOrdinalRegex||JO}function _N(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=ak(l[i].name),s=ak(l[i].abbr),c=ak(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}q(0,[`gg`,2],0,function(){return this.weekYear()%100}),q(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function vN(e,t){q(0,[e,e.length],0,t)}vN(`gggg`,`weekYear`),vN(`ggggg`,`weekYear`),vN(`GGGG`,`isoWeekYear`),vN(`GGGGG`,`isoWeekYear`),J(`G`,YO),J(`g`,YO),J(`GG`,HO,RO),J(`gg`,HO,RO),J(`GGGG`,KO,BO),J(`gggg`,KO,BO),J(`GGGGG`,qO,VO),J(`ggggg`,qO,VO),uk([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=sk(e)}),uk([`gg`,`GG`],function(e,t,n,r){t[r]=K.parseTwoDigitYear(e)});function yN(e){return TN.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function bN(e){return TN.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function xN(){return $k(this.year(),1,4)}function SN(){return $k(this.isoWeekYear(),1,4)}function CN(){var e=this.localeData()._week;return $k(this.year(),e.dow,e.doy)}function wN(){var e=this.localeData()._week;return $k(this.weekYear(),e.dow,e.doy)}function TN(e,t,n,r,i){var a;return e==null?Qk(this,r,i).year:(a=$k(e,r,i),t>a&&(t=a),EN.call(this,e,t,n,r,i))}function EN(e,t,n,r,i){var a=Zk(e,t,n,r,i),o=Yk(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}q(`Q`,0,`Qo`,`quarter`),J(`Q`,LO),lk(`Q`,function(e,t){t[mk]=(sk(e)-1)*3});function DN(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}q(`D`,[`DD`,2],`Do`,`date`),J(`D`,HO,ek),J(`DD`,HO,RO),J(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),lk([`D`,`DD`],hk),lk(`Do`,function(e,t){t[hk]=sk(e.match(HO)[0])});var ON=Tk(`Date`,!0);q(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),J(`DDD`,GO),J(`DDDD`,zO),lk([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=sk(e)});function kN(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}q(`m`,[`mm`,2],0,`minute`),J(`m`,HO,tk),J(`mm`,HO,RO),lk([`m`,`mm`],_k);var AN=Tk(`Minutes`,!1);q(`s`,[`ss`,2],0,`second`),J(`s`,HO,tk),J(`ss`,HO,RO),lk([`s`,`ss`],vk);var jN=Tk(`Seconds`,!1);q(`S`,0,0,function(){return~~(this.millisecond()/100)}),q(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),q(0,[`SSS`,3],0,`millisecond`),q(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),q(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),q(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),q(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),q(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),q(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),J(`S`,GO,LO),J(`SS`,GO,RO),J(`SSS`,GO,zO);var MN,NN;for(MN=`SSSS`;MN.length<=9;MN+=`S`)J(MN,JO);function PN(e,t){t[yk]=sk((`0.`+e)*1e3)}for(MN=`S`;MN.length<=9;MN+=`S`)lk(MN,PN);NN=Tk(`Milliseconds`,!1),q(`z`,0,0,`zoneAbbr`),q(`zz`,0,0,`zoneName`);function FN(){return this._isUTC?`UTC`:``}function IN(){return this._isUTC?`Coordinated Universal Time`:``}var Y=eO.prototype;Y.add=lM,Y.calendar=_M,Y.clone=vM,Y.diff=TM,Y.endOf=KM,Y.format=AM,Y.from=jM,Y.fromNow=MM,Y.to=NM,Y.toNow=PM,Y.get=Ok,Y.invalidAt=tN,Y.isAfter=yM,Y.isBefore=bM,Y.isBetween=xM,Y.isSame=SM,Y.isSameOrAfter=CM,Y.isSameOrBefore=wM,Y.isValid=$M,Y.lang=IM,Y.locale=FM,Y.localeData=LM,Y.max=Ej,Y.min=Tj,Y.parsingFlags=eN,Y.set=kk,Y.startOf=GM,Y.subtract=uM,Y.toArray=XM,Y.toObject=ZM,Y.toDate=YM,Y.toISOString=OM,Y.inspect=kM,typeof Symbol<`u`&&Symbol.for!=null&&(Y[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Y.toJSON=QM,Y.toString=DM,Y.unix=JM,Y.valueOf=qM,Y.creationData=nN,Y.eraName=oN,Y.eraNarrow=sN,Y.eraAbbr=cN,Y.eraYear=lN,Y.year=Ck,Y.isLeapYear=wk,Y.weekYear=yN,Y.isoWeekYear=bN,Y.quarter=Y.quarters=DN,Y.month=Uk,Y.daysInMonth=Wk,Y.week=Y.weeks=iA,Y.isoWeek=Y.isoWeeks=aA,Y.weeksInYear=CN,Y.weeksInWeekYear=wN,Y.isoWeeksInYear=xN,Y.isoWeeksInISOWeekYear=SN,Y.date=ON,Y.day=Y.days=bA,Y.weekday=xA,Y.isoWeekday=SA,Y.dayOfYear=kN,Y.hour=Y.hours=NA,Y.minute=Y.minutes=AN,Y.second=Y.seconds=jN,Y.millisecond=Y.milliseconds=NN,Y.utcOffset=Wj,Y.utc=Kj,Y.local=qj,Y.parseZone=Jj,Y.hasAlignedHourOffset=Yj,Y.isDST=Xj,Y.isLocal=Qj,Y.isUtcOffset=$j,Y.isUtc=eM,Y.isUTC=eM,Y.zoneAbbr=FN,Y.zoneName=IN,Y.dates=rO(`dates accessor is deprecated. Use date instead.`,ON),Y.months=rO(`months accessor is deprecated. Use month instead`,Uk),Y.years=rO(`years accessor is deprecated. Use year instead`,Ck),Y.zone=rO(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,Gj),Y.isDSTShifted=rO(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Zj);function LN(e){return wj(e*1e3)}function Ete(){return wj.apply(null,arguments).parseZone()}function RN(e){return e}var zN=lO.prototype;zN.calendar=fO,zN.longDateFormat=CO,zN.invalidDate=TO,zN.ordinal=OO,zN.preparse=RN,zN.postformat=RN,zN.relativeTime=AO,zN.pastFuture=jO,zN.set=sO,zN.eras=rN,zN.erasParse=iN,zN.erasConvertYear=aN,zN.erasAbbrRegex=dN,zN.erasNameRegex=uN,zN.erasNarrowRegex=fN,zN.months=Rk,zN.monthsShort=zk,zN.monthsParse=Vk,zN.monthsRegex=Kk,zN.monthsShortRegex=Gk,zN.week=eA,zN.firstDayOfYear=rA,zN.firstDayOfWeek=nA,zN.weekdays=hA,zN.weekdaysMin=_A,zN.weekdaysShort=gA,zN.weekdaysParse=yA,zN.weekdaysRegex=CA,zN.weekdaysShortRegex=wA,zN.weekdaysMinRegex=TA,zN.isPM=jA,zN.meridiem=PA;function BN(e,t,n,r){var i=qA(),a=GD().set(r,t);return i[n](a,e)}function VN(e,t,n){if(VD(e)&&(t=e,e=void 0),e||=``,t!=null)return BN(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=BN(e,r,n,`month`);return i}function HN(e,t,n,r){typeof e==`boolean`?(VD(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,VD(t)&&(n=t,t=void 0),t||=``);var i=qA(),a=e?i._week.dow:0,o,s=[];if(n!=null)return BN(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=BN(t,(o+a)%7,r,`day`);return s}function Dte(e,t){return VN(e,t,`months`)}function Ote(e,t){return VN(e,t,`monthsShort`)}function kte(e,t,n){return HN(e,t,n,`weekdays`)}function Ate(e,t,n){return HN(e,t,n,`weekdaysShort`)}function jte(e,t,n){return HN(e,t,n,`weekdaysMin`)}WA(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(sk(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),K.lang=rO(`moment.lang is deprecated. Use moment.locale instead.`,WA),K.langData=rO(`moment.langData is deprecated. Use moment.localeData instead.`,qA);var UN=Math.abs;function Mte(){var e=this._data;return this._milliseconds=UN(this._milliseconds),this._days=UN(this._days),this._months=UN(this._months),e.milliseconds=UN(e.milliseconds),e.seconds=UN(e.seconds),e.minutes=UN(e.minutes),e.hours=UN(e.hours),e.months=UN(e.months),e.years=UN(e.years),this}function WN(e,t,n,r){var i=rM(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Nte(e,t){return WN(this,e,t,1)}function Pte(e,t){return WN(this,e,t,-1)}function GN(e){return e<0?Math.floor(e):Math.ceil(e)}function Fte(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=GN(qN(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=ok(e/1e3),r.seconds=i%60,a=ok(i/60),r.minutes=a%60,o=ok(a/60),r.hours=o%24,t+=ok(o/24),c=ok(KN(t)),n+=c,t-=GN(qN(c)),s=ok(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function KN(e){return e*4800/146097}function qN(e){return e*146097/4800}function Ite(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=NO(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+KN(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(qN(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function JN(e){return function(){return this.as(e)}}var YN=JN(`ms`),Lte=JN(`s`),Rte=JN(`m`),zte=JN(`h`),Bte=JN(`d`),Vte=JN(`w`),Hte=JN(`M`),Ute=JN(`Q`),Wte=JN(`y`),Gte=YN;function Kte(){return rM(this)}function qte(e){return e=NO(e),this.isValid()?this[e+`s`]():NaN}function XN(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jte=XN(`milliseconds`),Yte=XN(`seconds`),Xte=XN(`minutes`),Zte=XN(`hours`),Qte=XN(`days`),$te=XN(`months`),ene=XN(`years`);function tne(){return ok(this.days()/7)}var ZN=Math.round,QN={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nne(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function rne(e,t,n,r){var i=rM(e).abs(),a=ZN(i.as(`s`)),o=ZN(i.as(`m`)),s=ZN(i.as(`h`)),c=ZN(i.as(`d`)),l=ZN(i.as(`M`)),u=ZN(i.as(`w`)),d=ZN(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,nne.apply(null,f)}function ine(e){return e===void 0?ZN:typeof e==`function`?(ZN=e,!0):!1}function ane(e,t){return QN[e]===void 0?!1:t===void 0?QN[e]:(QN[e]=t,e===`s`&&(QN.ss=t-1),!0)}function one(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=QN,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},QN,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=rne(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var $N=Math.abs;function eP(e){return(e>0)-(e<0)||+e}function tP(){if(!this.isValid())return this.localeData().invalidDate();var e=$N(this._milliseconds)/1e3,t=$N(this._days),n=$N(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=ok(e/60),i=ok(r/60),e%=60,r%=60,a=ok(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=eP(this._months)===eP(s)?``:`-`,u=eP(this._days)===eP(s)?``:`-`,d=eP(this._milliseconds)===eP(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var nP=Fj.prototype;nP.isValid=Nj,nP.abs=Mte,nP.add=Nte,nP.subtract=Pte,nP.as=Ite,nP.asMilliseconds=YN,nP.asSeconds=Lte,nP.asMinutes=Rte,nP.asHours=zte,nP.asDays=Bte,nP.asWeeks=Vte,nP.asMonths=Hte,nP.asQuarters=Ute,nP.asYears=Wte,nP.valueOf=Gte,nP._bubble=Fte,nP.clone=Kte,nP.get=qte,nP.milliseconds=Jte,nP.seconds=Yte,nP.minutes=Xte,nP.hours=Zte,nP.days=Qte,nP.weeks=tne,nP.months=$te,nP.years=ene,nP.humanize=one,nP.toISOString=tP,nP.toString=tP,nP.toJSON=tP,nP.locale=FM,nP.localeData=LM,nP.toIsoString=rO(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,tP),nP.lang=IM,q(`X`,0,0,`unix`),q(`x`,0,0,`valueOf`),J(`x`,YO),J(`X`,QO),lk(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),lk(`x`,function(e,t,n){n._d=new Date(sk(e))}),K.version=`2.30.1`,Tte(wj),K.fn=Y,K.min=Oj,K.max=kj,K.now=Aj,K.utc=GD,K.unix=LN,K.months=Dte,K.isDate=HD,K.locale=WA,K.invalid=XD,K.duration=rM,K.isMoment=tO,K.weekdays=kte,K.parseZone=Ete,K.localeData=qA,K.isDuration=Ij,K.monthsShort=Ote,K.weekdaysMin=jte,K.defineLocale=GA,K.updateLocale=KA,K.locales=JA,K.weekdaysShort=Ate,K.normalizeUnits=NO,K.relativeTimeRounding=ine,K.relativeTimeThreshold=ane,K.calendarFormat=gM,K.prototype=Y,K.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`};var rP=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function iP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var aP={},oP,sP;function cP(){if(sP)return oP;sP=1;var e=function(e){return e&&e.Math===Math&&e};return oP=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof rP==`object`&&rP)||e(typeof oP==`object`&&oP)||(function(){return this})()||Function(`return this`)(),oP}var lP,uP;function dP(){return uP?lP:(uP=1,lP=function(e){try{return!!e()}catch{return!0}},lP)}var fP,pP;function mP(){return pP?fP:(pP=1,fP=!dP()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),fP)}var hP,gP;function _P(){if(gP)return hP;gP=1;var e=mP(),t=Function.prototype,n=t.apply,r=t.call;return hP=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),hP}var vP,yP;function bP(){if(yP)return vP;yP=1;var e=mP(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return vP=e?r:function(e){return function(){return n.apply(e,arguments)}},vP}var xP,SP;function CP(){if(SP)return xP;SP=1;var e=bP(),t=e({}.toString),n=e(``.slice);return xP=function(e){return n(t(e),8,-1)},xP}var wP,TP;function EP(){if(TP)return wP;TP=1;var e=CP(),t=bP();return wP=function(n){if(e(n)===`Function`)return t(n)},wP}var DP,OP;function kP(){if(OP)return DP;OP=1;var e=typeof document==`object`&&document.all;return DP=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},DP}var AP={},jP,MP;function NP(){return MP?jP:(MP=1,jP=!dP()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),jP)}var PP,FP;function IP(){if(FP)return PP;FP=1;var e=mP(),t=Function.prototype.call;return PP=e?t.bind(t):function(){return t.apply(t,arguments)},PP}var LP={},RP;function zP(){if(RP)return LP;RP=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return LP.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,LP}var BP,VP;function HP(){return VP?BP:(VP=1,BP=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},BP)}var UP,WP;function GP(){if(WP)return UP;WP=1;var e=bP(),t=dP(),n=CP(),r=Object,i=e(``.split);return UP=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,UP}var KP,qP;function JP(){return qP?KP:(qP=1,KP=function(e){return e==null},KP)}var YP,XP;function ZP(){if(XP)return YP;XP=1;var e=JP(),t=TypeError;return YP=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},YP}var QP,$P;function eF(){if($P)return QP;$P=1;var e=GP(),t=ZP();return QP=function(n){return e(t(n))},QP}var tF,nF;function rF(){if(nF)return tF;nF=1;var e=kP();return tF=function(t){return typeof t==`object`?t!==null:e(t)},tF}var iF,aF;function oF(){return aF?iF:(aF=1,iF={},iF)}var sF,cF;function lF(){if(cF)return sF;cF=1;var e=oF(),t=cP(),n=kP(),r=function(e){return n(e)?e:void 0};return sF=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},sF}var uF,dF;function fF(){return dF?uF:(dF=1,uF=bP()({}.isPrototypeOf),uF)}var pF,mF;function hF(){if(mF)return pF;mF=1;var e=cP().navigator,t=e&&e.userAgent;return pF=t?String(t):``,pF}var gF,_F;function vF(){if(_F)return gF;_F=1;var e=cP(),t=hF(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),gF=s,gF}var yF,bF;function xF(){if(bF)return yF;bF=1;var e=vF(),t=dP(),n=cP().String;return yF=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),yF}var SF,CF;function wF(){return CF?SF:(CF=1,SF=xF()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,SF)}var TF,EF;function DF(){if(EF)return TF;EF=1;var e=lF(),t=kP(),n=fF(),r=wF(),i=Object;return TF=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},TF}var OF,kF;function AF(){if(kF)return OF;kF=1;var e=String;return OF=function(t){try{return e(t)}catch{return`Object`}},OF}var jF,MF;function NF(){if(MF)return jF;MF=1;var e=kP(),t=AF(),n=TypeError;return jF=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},jF}var PF,FF;function IF(){if(FF)return PF;FF=1;var e=NF(),t=JP();return PF=function(n,r){var i=n[r];return t(i)?void 0:e(i)},PF}var LF,RF;function zF(){if(RF)return LF;RF=1;var e=IP(),t=kP(),n=rF(),r=TypeError;return LF=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},LF}var BF={exports:{}},VF,HF;function UF(){return HF?VF:(HF=1,VF=!0,VF)}var WF,GF;function KF(){if(GF)return WF;GF=1;var e=cP(),t=Object.defineProperty;return WF=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},WF}var qF;function JF(){if(qF)return BF.exports;qF=1;var e=UF(),t=cP(),n=KF(),r=`__core-js_shared__`,i=BF.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),BF.exports}var YF,XF;function ZF(){if(XF)return YF;XF=1;var e=JF();return YF=function(t,n){return e[t]||(e[t]=n||{})},YF}var QF,$F;function eI(){if($F)return QF;$F=1;var e=ZP(),t=Object;return QF=function(n){return t(e(n))},QF}var tI,nI;function rI(){if(nI)return tI;nI=1;var e=bP(),t=eI(),n=e({}.hasOwnProperty);return tI=Object.hasOwn||function(e,r){return n(t(e),r)},tI}var iI,aI;function oI(){if(aI)return iI;aI=1;var e=bP(),t=0,n=Math.random(),r=e(1.1.toString);return iI=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},iI}var sI,cI;function lI(){if(cI)return sI;cI=1;var e=cP(),t=ZF(),n=rI(),r=oI(),i=xF(),a=wF(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return sI=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},sI}var uI,dI;function fI(){if(dI)return uI;dI=1;var e=IP(),t=rF(),n=DF(),r=IF(),i=zF(),a=lI(),o=TypeError,s=a(`toPrimitive`);return uI=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},uI}var pI,mI;function hI(){if(mI)return pI;mI=1;var e=fI(),t=DF();return pI=function(n){var r=e(n,`string`);return t(r)?r:r+``},pI}var gI,_I;function vI(){if(_I)return gI;_I=1;var e=cP(),t=rF(),n=e.document,r=t(n)&&t(n.createElement);return gI=function(e){return r?n.createElement(e):{}},gI}var yI,bI;function xI(){if(bI)return yI;bI=1;var e=NP(),t=dP(),n=vI();return yI=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),yI}var SI;function CI(){if(SI)return AP;SI=1;var e=NP(),t=IP(),n=zP(),r=HP(),i=eF(),a=hI(),o=rI(),s=xI(),c=Object.getOwnPropertyDescriptor;return AP.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},AP}var wI,TI;function EI(){if(TI)return wI;TI=1;var e=dP(),t=kP(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return wI=r,wI}var DI,OI;function kI(){if(OI)return DI;OI=1;var e=EP(),t=NF(),n=mP(),r=e(e.bind);return DI=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},DI}var AI={},jI,MI;function NI(){return MI?jI:(MI=1,jI=NP()&&dP()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),jI)}var PI,FI;function II(){if(FI)return PI;FI=1;var e=rF(),t=String,n=TypeError;return PI=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},PI}var LI;function RI(){if(LI)return AI;LI=1;var e=NP(),t=xI(),n=NI(),r=II(),i=hI(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return AI.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},AI}var zI,BI;function VI(){if(BI)return zI;BI=1;var e=NP(),t=RI(),n=HP();return zI=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},zI}var HI,UI;function X(){if(UI)return HI;UI=1;var e=cP(),t=_P(),n=EP(),r=kP(),i=CI().f,a=EI(),o=oF(),s=kI(),c=VI(),l=rI(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return HI=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},HI}var WI,GI;function KI(){if(GI)return WI;GI=1;var e=CP();return WI=Array.isArray||function(t){return e(t)===`Array`},WI}var qI;function JI(){return qI?aP:(qI=1,X()({target:`Array`,stat:!0},{isArray:KI()}),aP)}var YI,XI;function ZI(){return XI?YI:(XI=1,JI(),YI=oF().Array.isArray,YI)}var QI,$I;function eL(){return $I?QI:($I=1,QI=ZI(),QI)}var tL,nL;function rL(){return nL?tL:(nL=1,tL=eL(),tL)}var iL=iP(rL()),aL={},oL,sL;function cL(){return sL?oL:(sL=1,oL=bP()([].slice),oL)}var lL,uL;function dL(){if(uL)return lL;uL=1;var e=bP(),t=NF(),n=rF(),r=rI(),i=cL(),a=mP(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return lL=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},lL}var fL;function pL(){if(fL)return aL;fL=1;var e=X(),t=dL();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),aL}var mL,hL;function gL(){if(hL)return mL;hL=1;var e=cP(),t=oF();return mL=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},mL}var _L,vL;function yL(){return vL?_L:(vL=1,pL(),_L=gL()(`Function`,`bind`),_L)}var bL,xL;function SL(){if(xL)return bL;xL=1;var e=fF(),t=yL(),n=Function.prototype;return bL=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},bL}var CL,wL;function TL(){return wL?CL:(wL=1,CL=SL(),CL)}var EL,DL;function OL(){return DL?EL:(DL=1,EL=TL(),EL)}var Z=iP(OL()),kL={},AL={},jL,ML;function NL(){if(ML)return jL;ML=1;var e=cP(),t=hF(),n=CP(),r=function(e){return t.slice(0,e.length)===e};return jL=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),jL}var PL,FL;function IL(){if(FL)return PL;FL=1;var e=TypeError;return PL=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},PL}var LL,RL;function zL(){if(RL)return LL;RL=1;var e=cP(),t=_P(),n=kP(),r=NL(),i=hF(),a=cL(),o=IL(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return LL=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},LL}var BL;function VL(){if(BL)return AL;BL=1;var e=X(),t=cP(),n=zL()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),AL}var HL={},UL;function WL(){if(UL)return HL;UL=1;var e=X(),t=cP(),n=zL()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),HL}var GL;function KL(){return GL?kL:(GL=1,VL(),WL(),kL)}var qL,JL;function YL(){return JL?qL:(JL=1,KL(),qL=oF().setTimeout,qL)}var XL,ZL;function QL(){return ZL?XL:(ZL=1,XL=YL(),XL)}var $L=iP(QL()),eR,tR;function nR(){if(tR)return eR;tR=1;var e=lI()(`toStringTag`),t={};return t[e]=`z`,eR=String(t)===`[object z]`,eR}var rR,iR;function aR(){if(iR)return rR;iR=1;var e=nR(),t=kP(),n=CP(),r=lI()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return rR=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},rR}var oR={},sR,cR;function lR(){if(cR)return sR;cR=1;var e=Math.ceil,t=Math.floor;return sR=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},sR}var uR,dR;function fR(){if(dR)return uR;dR=1;var e=lR();return uR=function(t){var n=+t;return n!==n||n===0?0:e(n)},uR}var pR,mR;function hR(){if(mR)return pR;mR=1;var e=fR(),t=Math.min;return pR=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},pR}var gR,_R;function vR(){if(_R)return gR;_R=1;var e=hR();return gR=function(t){return e(t.length)},gR}var yR,bR;function xR(){if(bR)return yR;bR=1;var e=bP(),t=kP(),n=JF(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),yR=n.inspectSource,yR}var SR,CR;function wR(){if(CR)return SR;CR=1;var e=bP(),t=dP(),n=kP(),r=aR(),i=lF(),a=xR(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,SR=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,SR}var TR,ER;function DR(){if(ER)return TR;ER=1;var e=KI(),t=wR(),n=rF(),r=lI()(`species`),i=Array;return TR=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},TR}var OR,kR;function AR(){if(kR)return OR;kR=1;var e=DR();return OR=function(t,n){return new(e(t))(n===0?0:n)},OR}var jR,MR;function NR(){if(MR)return jR;MR=1;var e=kI(),t=bP(),n=GP(),r=eI(),i=vR(),a=AR(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return jR={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},jR}var PR,FR;function IR(){if(FR)return PR;FR=1;var e=dP();return PR=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},PR}var LR,RR;function zR(){if(RR)return LR;RR=1;var e=NR().forEach;return LR=IR()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},LR}var BR;function VR(){if(BR)return oR;BR=1;var e=X(),t=zR();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),oR}var HR,UR;function WR(){return UR?HR:(UR=1,VR(),HR=gL()(`Array`,`forEach`),HR)}var GR,KR;function qR(){return KR?GR:(KR=1,GR=WR(),GR)}var JR,YR;function XR(){if(YR)return JR;YR=1;var e=aR(),t=rI(),n=fF(),r=qR(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return JR=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},JR}var ZR,QR;function $R(){return QR?ZR:(QR=1,ZR=XR(),ZR)}var Q=iP($R()),ez=typeof window<`u`&&window.moment||K,tz={},nz={},rz,iz;function az(){if(iz)return rz;iz=1;var e=aR(),t=String;return rz=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},rz}var oz={},sz,cz;function lz(){if(cz)return sz;cz=1;var e=fR(),t=Math.max,n=Math.min;return sz=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},sz}var uz,dz;function fz(){if(dz)return uz;dz=1;var e=eF(),t=lz(),n=vR(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return uz={includes:r(!0),indexOf:r(!1)},uz}var pz,mz;function hz(){return mz?pz:(mz=1,pz={},pz)}var gz,_z;function vz(){if(_z)return gz;_z=1;var e=bP(),t=rI(),n=eF(),r=fz().indexOf,i=hz(),a=e([].push);return gz=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},gz}var yz,bz;function xz(){return bz?yz:(bz=1,yz=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],yz)}var Sz,Cz;function wz(){if(Cz)return Sz;Cz=1;var e=vz(),t=xz();return Sz=Object.keys||function(n){return e(n,t)},Sz}var Tz;function Ez(){if(Tz)return oz;Tz=1;var e=NP(),t=NI(),n=RI(),r=II(),i=eF(),a=wz();return oz.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},oz}var Dz,Oz;function kz(){return Oz?Dz:(Oz=1,Dz=lF()(`document`,`documentElement`),Dz)}var Az,jz;function Mz(){if(jz)return Az;jz=1;var e=ZF(),t=oI(),n=e(`keys`);return Az=function(e){return n[e]||(n[e]=t(e))},Az}var Nz,Pz;function Fz(){if(Pz)return Nz;Pz=1;var e=II(),t=Ez(),n=xz(),r=hz(),i=kz(),a=vI(),o=Mz(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,Nz=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},Nz}var Iz={},Lz;function Rz(){if(Lz)return Iz;Lz=1;var e=vz(),t=xz().concat(`length`,`prototype`);return Iz.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Iz}var zz={},Bz;function Vz(){if(Bz)return zz;Bz=1;var e=CP(),t=eF(),n=Rz().f,r=cL(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return zz.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},zz}var Hz={},Uz;function Wz(){return Uz?Hz:(Uz=1,Hz.f=Object.getOwnPropertySymbols,Hz)}var Gz,Kz;function qz(){if(Kz)return Gz;Kz=1;var e=VI();return Gz=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},Gz}var Jz,Yz;function Xz(){if(Yz)return Jz;Yz=1;var e=RI();return Jz=function(t,n,r){return e.f(t,n,r)},Jz}var Zz={},Qz;function $z(){return Qz?Zz:(Qz=1,Zz.f=lI(),Zz)}var eB,tB;function nB(){if(tB)return eB;tB=1;var e=oF(),t=rI(),n=$z(),r=RI().f;return eB=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},eB}var rB,iB;function aB(){if(iB)return rB;iB=1;var e=IP(),t=lF(),n=lI(),r=qz();return rB=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},rB}var oB,sB;function cB(){if(sB)return oB;sB=1;var e=nR(),t=aR();return oB=e?{}.toString:function(){return`[object `+t(this)+`]`},oB}var lB,uB;function dB(){if(uB)return lB;uB=1;var e=nR(),t=RI().f,n=VI(),r=rI(),i=cB(),a=lI()(`toStringTag`);return lB=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},lB}var fB,pB;function mB(){if(pB)return fB;pB=1;var e=cP(),t=kP(),n=e.WeakMap;return fB=t(n)&&/native code/.test(String(n)),fB}var hB,gB;function _B(){if(gB)return hB;gB=1;var e=mB(),t=cP(),n=rF(),r=VI(),i=rI(),a=JF(),o=Mz(),s=hz(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return hB={set:d,get:f,has:p,enforce:m,getterFor:h},hB}var vB;function yB(){if(vB)return nz;vB=1;var e=X(),t=cP(),n=IP(),r=bP(),i=UF(),a=NP(),o=xF(),s=dP(),c=rI(),l=fF(),u=II(),d=eF(),f=hI(),p=az(),m=HP(),h=Fz(),g=wz(),_=Rz(),v=Vz(),y=Wz(),b=CI(),x=RI(),S=Ez(),C=zP(),w=qz(),T=Xz(),E=ZF(),D=Mz(),O=hz(),ee=oI(),k=lI(),A=$z(),j=nB(),M=aB(),N=dB(),P=_B(),te=NR().forEach,F=D(`hidden`),I=`Symbol`,ne=`prototype`,re=P.set,ie=P.getterFor(I),ae=Object[ne],oe=t.Symbol,se=oe&&oe[ne],ce=t.RangeError,L=t.TypeError,R=t.QObject,le=b.f,z=x.f,B=v.f,V=C.f,ue=r([].push),de=E(`symbols`),fe=E(`op-symbols`),pe=E(`wks`),me=!R||!R[ne]||!R[ne].findChild,he=function(e,t,n){var r=le(ae,t);r&&delete ae[t],z(e,t,n),r&&e!==ae&&z(ae,t,r)},ge=a&&s(function(){return h(z({},`a`,{get:function(){return z(this,`a`,{value:7}).a}})).a!==7})?he:z,_e=function(e,t){var n=de[e]=h(se);return re(n,{type:I,tag:e,description:t}),a||(n.description=t),n},ve=function(e,t,n){e===ae&&ve(fe,t,n),u(e);var r=f(t);return u(n),c(de,r)?(n.enumerable?(c(e,F)&&e[F][r]&&(e[F][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,F)||z(e,F,m(1,h(null))),e[F][r]=!0),ge(e,r,n)):z(e,r,n)},ye=function(e,t){u(e);var r=d(t);return te(g(r).concat(we(r)),function(t){(!a||n(xe,r,t))&&ve(e,t,r[t])}),e},be=function(e,t){return t===void 0?h(e):ye(h(e),t)},xe=function(e){var t=f(e),r=n(V,this,t);return this===ae&&c(de,t)&&!c(fe,t)?!1:r||!c(this,t)||!c(de,t)||c(this,F)&&this[F][t]?r:!0},Se=function(e,t){var n=d(e),r=f(t);if(!(n===ae&&c(de,r)&&!c(fe,r))){var i=le(n,r);return i&&c(de,r)&&!(c(n,F)&&n[F][r])&&(i.enumerable=!0),i}},Ce=function(e){var t=B(d(e)),n=[];return te(t,function(e){!c(de,e)&&!c(O,e)&&ue(n,e)}),n},we=function(e){var t=e===ae,n=B(t?fe:d(e)),r=[];return te(n,function(e){c(de,e)&&(!t||c(ae,e))&&ue(r,de[e])}),r};return o||(oe=function(){if(l(se,this))throw new L(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=ee(e),i=function(e){var a=this===void 0?t:this;a===ae&&n(i,fe,e),c(a,F)&&c(a[F],r)&&(a[F][r]=!1);var o=m(1,e);try{ge(a,r,o)}catch(e){if(!(e instanceof ce))throw e;he(a,r,o)}};return a&&me&&ge(ae,r,{configurable:!0,set:i}),_e(r,e)},se=oe[ne],w(se,`toString`,function(){return ie(this).tag}),w(oe,`withoutSetter`,function(e){return _e(ee(e),e)}),C.f=xe,x.f=ve,S.f=ye,b.f=Se,_.f=v.f=Ce,y.f=we,A.f=function(e){return _e(k(e),e)},a&&(T(se,`description`,{configurable:!0,get:function(){return ie(this).description}}),i||w(ae,`propertyIsEnumerable`,xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:oe}),te(g(pe),function(e){j(e)}),e({target:I,stat:!0,forced:!o},{useSetter:function(){me=!0},useSimple:function(){me=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:be,defineProperty:ve,defineProperties:ye,getOwnPropertyDescriptor:Se}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:Ce}),M(),N(oe,I),O[F]=!0,nz}var bB={},xB,SB;function CB(){return SB?xB:(SB=1,xB=xF()&&!!Symbol.for&&!!Symbol.keyFor,xB)}var wB;function TB(){if(wB)return bB;wB=1;var e=X(),t=lF(),n=rI(),r=az(),i=ZF(),a=CB(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),bB}var EB={},DB;function OB(){if(DB)return EB;DB=1;var e=X(),t=rI(),n=DF(),r=AF(),i=ZF(),a=CB(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),EB}var kB={},AB,jB;function MB(){if(jB)return AB;jB=1;var e=bP(),t=KI(),n=kP(),r=CP(),i=az(),a=e([].push);return AB=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},AB}var NB;function PB(){if(NB)return kB;NB=1;var e=X(),t=lF(),n=_P(),r=IP(),i=bP(),a=dP(),o=kP(),s=DF(),c=cL(),l=MB(),u=xF(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),kB}var FB={},IB;function LB(){if(IB)return FB;IB=1;var e=X(),t=xF(),n=dP(),r=Wz(),i=eI();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),FB}var RB;function zB(){return RB?tz:(RB=1,yB(),TB(),OB(),PB(),LB(),tz)}var BB,VB;function HB(){return VB?BB:(VB=1,zB(),BB=oF().Object.getOwnPropertySymbols,BB)}var UB,WB;function GB(){return WB?UB:(WB=1,UB=HB(),UB)}var KB,qB;function JB(){return qB?KB:(qB=1,KB=GB(),KB)}var YB=iP(JB()),XB={},ZB,QB;function $B(){if(QB)return ZB;QB=1;var e=dP(),t=lI(),n=vF(),r=t(`species`);return ZB=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},ZB}var eV;function tV(){if(eV)return XB;eV=1;var e=X(),t=NR().filter;return e({target:`Array`,proto:!0,forced:!$B()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),XB}var nV,rV;function iV(){return rV?nV:(rV=1,tV(),nV=gL()(`Array`,`filter`),nV)}var aV,oV;function sV(){if(oV)return aV;oV=1;var e=fF(),t=iV(),n=Array.prototype;return aV=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},aV}var cV,lV;function uV(){return lV?cV:(lV=1,cV=sV(),cV)}var dV,fV;function pV(){return fV?dV:(fV=1,dV=uV(),dV)}var mV=iP(pV()),hV={exports:{}},gV={},_V;function vV(){if(_V)return gV;_V=1;var e=X(),t=dP(),n=eF(),r=CI().f,i=NP();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),gV}var yV;function bV(){if(yV)return hV.exports;yV=1,vV();var e=oF().Object,t=hV.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),hV.exports}var xV,SV;function CV(){return SV?xV:(SV=1,xV=bV(),xV)}var wV,TV;function EV(){return TV?wV:(TV=1,wV=CV(),wV)}var DV=iP(EV()),OV={},kV,AV;function jV(){if(AV)return kV;AV=1;var e=lF(),t=bP(),n=Rz(),r=Wz(),i=II(),a=t([].concat);return kV=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},kV}var MV,NV;function PV(){if(NV)return MV;NV=1;var e=NP(),t=RI(),n=HP();return MV=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},MV}var FV;function IV(){if(FV)return OV;FV=1;var e=X(),t=NP(),n=jV(),r=eF(),i=CI(),a=PV();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),OV}var LV,RV;function zV(){return RV?LV:(RV=1,IV(),LV=oF().Object.getOwnPropertyDescriptors,LV)}var BV,VV;function HV(){return VV?BV:(VV=1,BV=zV(),BV)}var UV,WV;function GV(){return WV?UV:(WV=1,UV=HV(),UV)}var KV=iP(GV()),qV={exports:{}},JV={},YV;function XV(){if(YV)return JV;YV=1;var e=X(),t=NP(),n=Ez().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),JV}var ZV;function QV(){if(ZV)return qV.exports;ZV=1,XV();var e=oF().Object,t=qV.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),qV.exports}var $V,eH;function tH(){return eH?$V:(eH=1,$V=QV(),$V)}var nH,rH;function iH(){return rH?nH:(rH=1,nH=tH(),nH)}var aH=iP(iH()),oH={exports:{}},sH={},cH;function lH(){if(cH)return sH;cH=1;var e=X(),t=NP(),n=RI().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),sH}var uH;function dH(){if(uH)return oH.exports;uH=1,lH();var e=oF().Object,t=oH.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),oH.exports}var fH,pH;function mH(){return pH?fH:(pH=1,fH=dH(),fH)}var hH,gH;function _H(){return gH?hH:(gH=1,hH=mH(),hH)}var vH,yH;function bH(){return yH?vH:(yH=1,vH=_H(),vH)}var xH,SH;function CH(){return SH?xH:(SH=1,xH=bH(),xH)}var wH=iP(CH()),TH={},EH,DH;function OH(){if(DH)return EH;DH=1;var e=TypeError,t=9007199254740991;return EH=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},EH}var kH;function AH(){if(kH)return TH;kH=1;var e=X(),t=dP(),n=KI(),r=rF(),i=eI(),a=vR(),o=OH(),s=PV(),c=AR(),l=$B(),u=lI(),d=vF(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),TH}var jH={},MH;function NH(){return MH?jH:(MH=1,nB()(`asyncDispose`),jH)}var PH={},FH;function IH(){return FH?PH:(FH=1,nB()(`asyncIterator`),PH)}var LH={},RH;function zH(){return RH?LH:(RH=1,nB()(`dispose`),LH)}var BH={},VH;function HH(){return VH?BH:(VH=1,nB()(`hasInstance`),BH)}var UH={},WH;function GH(){return WH?UH:(WH=1,nB()(`isConcatSpreadable`),UH)}var KH={},qH;function JH(){return qH?KH:(qH=1,nB()(`iterator`),KH)}var YH={},XH;function ZH(){return XH?YH:(XH=1,nB()(`match`),YH)}var QH={},$H;function eU(){return $H?QH:($H=1,nB()(`matchAll`),QH)}var tU={},nU;function sne(){return nU?tU:(nU=1,nB()(`replace`),tU)}var rU={},iU;function cne(){return iU?rU:(iU=1,nB()(`search`),rU)}var aU={},oU;function lne(){return oU?aU:(oU=1,nB()(`species`),aU)}var sU={},cU;function une(){return cU?sU:(cU=1,nB()(`split`),sU)}var lU={},uU;function dU(){if(uU)return lU;uU=1;var e=nB(),t=aB();return e(`toPrimitive`),t(),lU}var fU={},pU;function dne(){if(pU)return fU;pU=1;var e=lF(),t=nB(),n=dB();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),fU}var mU={},hU;function fne(){return hU?mU:(hU=1,nB()(`unscopables`),mU)}var gU={},_U;function pne(){return _U?gU:(_U=1,dB()(cP().JSON,`JSON`,!0),gU)}var vU,yU;function mne(){return yU?vU:(yU=1,AH(),zB(),NH(),IH(),zH(),HH(),GH(),JH(),ZH(),eU(),sne(),cne(),lne(),une(),dU(),dne(),fne(),pne(),vU=oF().Symbol,vU)}var bU={},xU,SU;function CU(){return SU?xU:(SU=1,xU=function(){},xU)}var wU,TU;function EU(){return TU?wU:(TU=1,wU={},wU)}var DU,OU;function hne(){if(OU)return DU;OU=1;var e=NP(),t=rI(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return DU={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},DU}var kU,AU;function jU(){return AU?kU:(AU=1,kU=!dP()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),kU)}var MU,NU;function PU(){if(NU)return MU;NU=1;var e=rI(),t=kP(),n=eI(),r=Mz(),i=jU(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return MU=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},MU}var FU,IU;function LU(){if(IU)return FU;IU=1;var e=dP(),t=kP(),n=rF(),r=Fz(),i=PU(),a=qz(),o=lI(),s=UF(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),FU={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},FU}var RU,zU;function gne(){if(zU)return RU;zU=1;var e=LU().IteratorPrototype,t=Fz(),n=HP(),r=dB(),i=EU(),a=function(){return this};return RU=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},RU}var BU,VU;function _ne(){if(VU)return BU;VU=1;var e=bP(),t=NF();return BU=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},BU}var HU,UU;function vne(){if(UU)return HU;UU=1;var e=rF();return HU=function(t){return e(t)||t===null},HU}var WU,GU;function yne(){if(GU)return WU;GU=1;var e=vne(),t=String,n=TypeError;return WU=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},WU}var KU,qU;function bne(){if(qU)return KU;qU=1;var e=_ne(),t=rF(),n=ZP(),r=yne();return KU=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),KU}var JU,YU;function XU(){if(YU)return JU;YU=1;var e=X(),t=IP(),n=UF(),r=hne(),i=kP(),a=gne(),o=PU(),s=bne(),c=dB(),l=VI(),u=qz(),d=lI(),f=EU(),p=LU(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return JU=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),M=d===`Array`&&k.entries||A,N,P,te;if(M&&(N=o(M.call(new r)),N!==Object.prototype&&N.next&&(!n&&o(N)!==g&&(s?s(N,g):i(N[v])||u(N,v,S)),c(N,O,!0,!0),n&&(f[O]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,j=function(){return t(A,this)})),w)if(P={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(te in P)(_||ee||!(te in k))&&u(k,te,P[te]);else e({target:d,proto:!0,forced:_||ee},P);return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,P},JU}var ZU,QU;function $U(){return QU?ZU:(QU=1,ZU=function(e,t){return{value:e,done:t}},ZU)}var eW,tW;function nW(){if(tW)return eW;tW=1;var e=eF(),t=CU(),n=EU(),r=_B(),i=RI().f,a=XU(),o=$U(),s=UF(),c=NP(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);eW=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return eW}var rW,iW;function xne(){return iW?rW:(iW=1,rW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rW)}var aW;function oW(){if(aW)return bU;aW=1,nW();var e=xne(),t=cP(),n=dB(),r=EU();for(var i in e)n(t[i],i),r[i]=r.Array;return bU}var sW,cW;function lW(){if(cW)return sW;cW=1;var e=mne();return oW(),sW=e,sW}var uW={},dW;function Sne(){if(dW)return uW;dW=1;var e=lI(),t=RI().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),uW}var fW={},pW;function Cne(){return pW?fW:(pW=1,NH(),fW)}var mW={},hW;function wne(){return hW?mW:(hW=1,zH(),mW)}var gW={},_W;function Tne(){return _W?gW:(_W=1,nB()(`metadata`),gW)}var vW,yW;function Ene(){if(yW)return vW;yW=1;var e=lW();return Sne(),Cne(),wne(),Tne(),vW=e,vW}var bW={},xW,SW;function CW(){if(SW)return xW;SW=1;var e=lF(),t=bP(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return xW=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},xW}var wW;function Dne(){return wW?bW:(wW=1,X()({target:`Symbol`,stat:!0},{isRegisteredSymbol:CW()}),bW)}var TW={},EW,DW;function OW(){if(DW)return EW;DW=1;for(var e=ZF(),t=lF(),n=bP(),r=DF(),i=lI(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return EW=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},EW}var kW;function One(){return kW?TW:(kW=1,X()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:OW()}),TW)}var AW={},jW;function kne(){return jW?AW:(jW=1,nB()(`customMatcher`),AW)}var MW={},NW;function PW(){return NW?MW:(NW=1,nB()(`observable`),MW)}var FW={},IW;function LW(){return IW?FW:(IW=1,X()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:CW()}),FW)}var RW={},zW;function BW(){return zW?RW:(zW=1,X()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:OW()}),RW)}var VW={},HW;function UW(){return HW?VW:(HW=1,nB()(`matcher`),VW)}var WW={},GW;function KW(){return GW?WW:(GW=1,nB()(`metadataKey`),WW)}var qW={},JW;function YW(){return JW?qW:(JW=1,nB()(`patternMatch`),qW)}var XW={},ZW;function QW(){return ZW?XW:(ZW=1,nB()(`replaceAll`),XW)}var $W,eG;function tG(){if(eG)return $W;eG=1;var e=Ene();return Dne(),One(),kne(),PW(),LW(),BW(),UW(),KW(),YW(),QW(),$W=e,$W}var nG,rG;function iG(){return rG?nG:(rG=1,nG=tG(),nG)}var aG=iP(iG()),oG={},sG,cG;function lG(){if(cG)return sG;cG=1;var e=bP(),t=fR(),n=az(),r=ZP(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return sG={codeAt:s(!1),charAt:s(!0)},sG}var uG;function dG(){if(uG)return oG;uG=1;var e=lG().charAt,t=az(),n=_B(),r=XU(),i=$U(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),oG}var fG,pG;function mG(){return pG?fG:(pG=1,nW(),dG(),JH(),fG=$z().f(`iterator`),fG)}var hG,gG;function _G(){if(gG)return hG;gG=1;var e=mG();return oW(),hG=e,hG}var vG,yG;function bG(){return yG?vG:(yG=1,vG=_G(),vG)}var xG,SG;function CG(){return SG?xG:(SG=1,xG=bG(),xG)}var wG,TG;function EG(){return TG?wG:(TG=1,wG=CG(),wG)}var DG=iP(EG());function OG(e){"@babel/helpers - typeof";return OG=typeof aG==`function`&&typeof DG==`symbol`?function(e){return typeof e}:function(e){return e&&typeof aG==`function`&&e.constructor===aG&&e!==aG.prototype?`symbol`:typeof e},OG(e)}var kG,AG;function jG(){return AG?kG:(AG=1,dU(),kG=$z().f(`toPrimitive`),kG)}var MG,NG;function PG(){return NG?MG:(NG=1,MG=jG(),MG)}var FG,IG;function LG(){return IG?FG:(IG=1,FG=PG(),FG)}var RG,zG;function BG(){return zG?RG:(zG=1,RG=LG(),RG)}var VG,HG;function UG(){return HG?VG:(HG=1,VG=BG(),VG)}var WG=iP(UG());function GG(e,t){if(OG(e)!=`object`||!e)return e;var n=e[WG];if(n!==void 0){var r=n.call(e,t);if(OG(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function KG(e){var t=GG(e,`string`);return OG(t)==`symbol`?t:t+``}function qG(e,t,n){return(t=KG(t))in e?wH(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JG={},YG;function XG(){if(YG)return JG;YG=1;var e=X(),t=NR().map;return e({target:`Array`,proto:!0,forced:!$B()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),JG}var ZG,QG;function $G(){return QG?ZG:(QG=1,XG(),ZG=gL()(`Array`,`map`),ZG)}var eK,tK;function nK(){if(tK)return eK;tK=1;var e=fF(),t=$G(),n=Array.prototype;return eK=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},eK}var rK,iK;function aK(){return iK?rK:(iK=1,rK=nK(),rK)}var oK,sK;function cK(){return sK?oK:(sK=1,oK=aK(),oK)}var lK=iP(cK()),uK={},dK,fK;function pK(){if(fK)return dK;fK=1;var e=NF(),t=eI(),n=GP(),r=vR(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return dK={left:o(!1),right:o(!0)},dK}var mK,hK;function gK(){return hK?mK:(hK=1,mK=NL()===`NODE`,mK)}var _K;function vK(){if(_K)return uK;_K=1;var e=X(),t=pK().left,n=IR(),r=vF();return e({target:`Array`,proto:!0,forced:!gK()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),uK}var yK,bK;function xK(){return bK?yK:(bK=1,vK(),yK=gL()(`Array`,`reduce`),yK)}var SK,CK;function wK(){if(CK)return SK;CK=1;var e=fF(),t=xK(),n=Array.prototype;return SK=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},SK}var TK,EK;function DK(){return EK?TK:(EK=1,TK=wK(),TK)}var OK,kK;function AK(){return kK?OK:(kK=1,OK=DK(),OK)}var jK=iP(AK()),MK={},NK;function PK(){if(NK)return MK;NK=1;var e=X(),t=eI(),n=wz();return e({target:`Object`,stat:!0,forced:dP()(function(){n(1)})},{keys:function(e){return n(t(e))}}),MK}var FK,IK;function LK(){return IK?FK:(IK=1,PK(),FK=oF().Object.keys,FK)}var RK,zK;function BK(){return zK?RK:(zK=1,RK=LK(),RK)}var VK,HK;function UK(){return HK?VK:(HK=1,VK=BK(),VK)}var WK=iP(UK()),GK,KK;function qK(){return KK?GK:(KK=1,GK=mH(),GK)}var JK=iP(qK()),YK,XK;function ZK(){return XK?YK:(XK=1,YK=lW(),YK)}var QK=iP(ZK()),$K={},eq;function tq(){if(eq)return $K;eq=1;var e=X(),t=KI(),n=wR(),r=rF(),i=lz(),a=vR(),o=eF(),s=PV(),c=lI(),l=$B(),u=cL(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),$K}var nq,rq;function iq(){return rq?nq:(rq=1,tq(),nq=gL()(`Array`,`slice`),nq)}var aq,oq;function sq(){if(oq)return aq;oq=1;var e=fF(),t=iq(),n=Array.prototype;return aq=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},aq}var cq,lq;function uq(){return lq?cq:(lq=1,cq=sq(),cq)}var dq,fq;function pq(){return fq?dq:(fq=1,dq=uq(),dq)}var mq=iP(pq()),hq={},gq;function _q(){return gq?hq:(gq=1,X()({target:`Reflect`,stat:!0},{ownKeys:jV()}),hq)}var vq,yq;function bq(){return yq?vq:(yq=1,_q(),vq=oF().Reflect.ownKeys,vq)}var xq,Sq;function Cq(){return Sq?xq:(Sq=1,xq=bq(),xq)}var wq,Tq;function Eq(){return Tq?wq:(Tq=1,wq=Cq(),wq)}var Dq=iP(Eq()),Oq={},kq;function Aq(){if(kq)return Oq;kq=1;var e=X(),t=bP(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),Oq}var jq,Mq;function Nq(){return Mq?jq:(Mq=1,Aq(),jq=oF().Date.now,jq)}var Pq,Fq;function Iq(){return Fq?Pq:(Fq=1,Pq=Nq(),Pq)}var Lq,Rq;function zq(){return Rq?Lq:(Rq=1,Lq=Iq(),Lq)}var Bq=iP(zq()),Vq={},Hq;function Uq(){if(Hq)return Vq;Hq=1;var e=X(),t=bP(),n=KI(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),Vq}var Wq,Gq;function Kq(){return Gq?Wq:(Gq=1,Uq(),Wq=gL()(`Array`,`reverse`),Wq)}var qq,Jq;function Yq(){if(Jq)return qq;Jq=1;var e=fF(),t=Kq(),n=Array.prototype;return qq=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},qq}var Xq,Zq;function Qq(){return Zq?Xq:(Zq=1,Xq=Yq(),Xq)}var $q,eJ;function tJ(){return eJ?$q:(eJ=1,$q=Qq(),$q)}var nJ=iP(tJ()),rJ={},iJ,aJ;function oJ(){if(aJ)return iJ;aJ=1;var e=NP(),t=KI(),n=TypeError,r=Object.getOwnPropertyDescriptor;return iJ=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},iJ}var sJ,cJ;function lJ(){if(cJ)return sJ;cJ=1;var e=AF(),t=TypeError;return sJ=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},sJ}var uJ;function dJ(){if(uJ)return rJ;uJ=1;var e=X(),t=eI(),n=lz(),r=fR(),i=vR(),a=oJ(),o=OH(),s=AR(),c=PV(),l=lJ(),u=$B()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),rJ}var fJ,pJ;function mJ(){return pJ?fJ:(pJ=1,dJ(),fJ=gL()(`Array`,`splice`),fJ)}var hJ,gJ;function _J(){if(gJ)return hJ;gJ=1;var e=fF(),t=mJ(),n=Array.prototype;return hJ=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},hJ}var vJ,yJ;function bJ(){return yJ?vJ:(yJ=1,vJ=_J(),vJ)}var xJ,SJ;function CJ(){return SJ?xJ:(SJ=1,xJ=bJ(),xJ)}var wJ=iP(CJ()),TJ={},EJ,DJ;function OJ(){if(DJ)return EJ;DJ=1;var e=NP(),t=bP(),n=IP(),r=dP(),i=wz(),a=Wz(),o=zP(),s=eI(),c=GP(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return EJ=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,EJ}var kJ;function AJ(){if(kJ)return TJ;kJ=1;var e=X(),t=OJ();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),TJ}var jJ,MJ;function NJ(){return MJ?jJ:(MJ=1,AJ(),jJ=oF().Object.assign,jJ)}var PJ,FJ;function IJ(){return FJ?PJ:(FJ=1,PJ=NJ(),PJ)}var LJ,RJ;function zJ(){return RJ?LJ:(RJ=1,LJ=IJ(),LJ)}var BJ=iP(zJ()),VJ={},HJ;function UJ(){if(HJ)return VJ;HJ=1;var e=X(),t=fz().includes,n=dP(),r=CU();return e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),VJ}var WJ,GJ;function KJ(){return GJ?WJ:(GJ=1,UJ(),WJ=gL()(`Array`,`includes`),WJ)}var qJ={},JJ,YJ;function XJ(){if(YJ)return JJ;YJ=1;var e=rF(),t=CP(),n=lI()(`match`);return JJ=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},JJ}var ZJ,QJ;function $J(){if(QJ)return ZJ;QJ=1;var e=XJ(),t=TypeError;return ZJ=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},ZJ}var eY,tY;function nY(){if(tY)return eY;tY=1;var e=lI()(`match`);return eY=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},eY}var rY;function iY(){if(rY)return qJ;rY=1;var e=X(),t=bP(),n=$J(),r=ZP(),i=az(),a=nY(),o=t(``.indexOf);return e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}}),qJ}var aY,oY;function sY(){return oY?aY:(oY=1,iY(),aY=gL()(`String`,`includes`),aY)}var cY,lY;function uY(){if(lY)return cY;lY=1;var e=fF(),t=KJ(),n=sY(),r=Array.prototype,i=String.prototype;return cY=function(a){var o=a.includes;return a===r||e(r,a)&&o===r.includes?t:typeof a==`string`||a===i||e(i,a)&&o===i.includes?n:o},cY}var dY,fY;function pY(){return fY?dY:(fY=1,dY=uY(),dY)}var mY,hY;function gY(){return hY?mY:(hY=1,mY=pY(),mY)}var _Y=iP(gY()),vY={},yY;function bY(){if(yY)return vY;yY=1;var e=X(),t=dP(),n=eI(),r=PU(),i=jU();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),vY}var xY,SY;function CY(){return SY?xY:(SY=1,bY(),xY=oF().Object.getPrototypeOf,xY)}var wY,TY;function EY(){return TY?wY:(TY=1,wY=CY(),wY)}var DY,OY;function kY(){return OY?DY:(OY=1,DY=EY(),DY)}var AY=iP(kY()),jY,MY;function NY(){return MY?jY:(MY=1,AH(),jY=gL()(`Array`,`concat`),jY)}var PY,FY;function IY(){if(FY)return PY;FY=1;var e=fF(),t=NY(),n=Array.prototype;return PY=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},PY}var LY,RY;function zY(){return RY?LY:(RY=1,LY=IY(),LY)}var BY,VY;function HY(){return VY?BY:(VY=1,BY=zY(),BY)}var UY=iP(HY()),WY={},GY,KY;function qY(){if(KY)return GY;KY=1;var e=NP(),t=dP(),n=bP(),r=PU(),i=wz(),a=eF(),o=zP().f,s=n(o),c=n([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),u=function(t){return function(n){for(var o=a(n),u=i(o),d=l&&r(o)===null,f=u.length,p=0,m=[],h;f>p;)h=u[p++],(!e||(d?h in o:s(o,h)))&&c(m,t?[h,o[h]]:o[h]);return m}};return GY={entries:u(!0),values:u(!1)},GY}var JY;function YY(){if(JY)return WY;JY=1;var e=X(),t=qY().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),WY}var XY,ZY;function QY(){return ZY?XY:(ZY=1,YY(),XY=oF().Object.values,XY)}var $Y,eX;function tX(){return eX?$Y:(eX=1,$Y=QY(),$Y)}var nX,rX;function iX(){return rX?nX:(rX=1,nX=tX(),nX)}var aX=iP(iX()),oX={},sX,cX;function lX(){return cX?sX:(cX=1,sX=`+\v\f\r \xA0 \u2028\u2029`,sX)}var uX,dX;function fX(){if(dX)return uX;dX=1;var e=bP(),t=ZP(),n=az(),r=lX(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return uX={start:s(1),end:s(2),trim:s(3)},uX}var pX,mX;function hX(){if(mX)return pX;mX=1;var e=cP(),t=dP(),n=bP(),r=az(),i=fX().trim,a=lX(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return pX=o(a+`08`)!==8||o(a+`0x16`)!==22||c&&!t(function(){o(Object(c))})?function(e,t){var n=i(r(e));return o(n,t>>>0||(u(l,n)?16:10))}:o,pX}var gX;function _X(){if(gX)return oX;gX=1;var e=X(),t=hX();return e({global:!0,forced:parseInt!==t},{parseInt:t}),oX}var vX,yX;function bX(){return yX?vX:(yX=1,_X(),vX=oF().parseInt,vX)}var xX,SX;function CX(){return SX?xX:(SX=1,xX=bX(),xX)}var wX,TX;function EX(){return TX?wX:(TX=1,wX=CX(),wX)}var DX=iP(EX()),OX={},kX;function AX(){if(kX)return OX;kX=1;var e=X(),t=EP(),n=fz().indexOf,r=IR(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}}),OX}var jX,MX;function NX(){return MX?jX:(MX=1,AX(),jX=gL()(`Array`,`indexOf`),jX)}var PX,FX;function IX(){if(FX)return PX;FX=1;var e=fF(),t=NX(),n=Array.prototype;return PX=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},PX}var LX,RX;function zX(){return RX?LX:(RX=1,LX=IX(),LX)}var BX,VX;function HX(){return VX?BX:(VX=1,BX=zX(),BX)}var UX=iP(HX()),WX={},GX;function KX(){if(GX)return WX;GX=1;var e=X(),t=qY().entries;return e({target:`Object`,stat:!0},{entries:function(e){return t(e)}}),WX}var qX,JX;function YX(){return JX?qX:(JX=1,KX(),qX=oF().Object.entries,qX)}var XX,ZX;function QX(){return ZX?XX:(ZX=1,XX=YX(),XX)}var $X,eZ;function tZ(){return eZ?$X:(eZ=1,$X=QX(),$X)}var nZ=iP(tZ()),rZ={},iZ;function aZ(){return iZ?rZ:(iZ=1,X()({target:`Object`,stat:!0,sham:!NP()},{create:Fz()}),rZ)}var oZ,sZ;function cZ(){if(sZ)return oZ;sZ=1,aZ();var e=oF().Object;return oZ=function(t,n){return e.create(t,n)},oZ}var lZ,uZ;function dZ(){return uZ?lZ:(uZ=1,lZ=cZ(),lZ)}var fZ,pZ;function mZ(){return pZ?fZ:(pZ=1,fZ=dZ(),fZ)}var hZ=iP(mZ()),gZ={},_Z,vZ;function yZ(){if(vZ)return _Z;vZ=1;var e=fR(),t=az(),n=ZP(),r=RangeError;return _Z=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},_Z}var bZ,xZ;function SZ(){if(xZ)return bZ;xZ=1;var e=bP(),t=hR(),n=az(),r=yZ(),i=ZP(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return bZ={start:c(!1),end:c(!0)},bZ}var CZ,wZ;function TZ(){if(wZ)return CZ;wZ=1;var e=bP(),t=dP(),n=SZ().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return CZ=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,CZ}var EZ;function DZ(){if(EZ)return gZ;EZ=1;var e=X(),t=IP(),n=eI(),r=fI(),i=TZ(),a=CP();return e({target:`Date`,proto:!0,forced:dP()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),gZ}var OZ,kZ;function AZ(){if(kZ)return OZ;kZ=1,DZ(),PB();var e=oF(),t=_P();return e.JSON||={stringify:JSON.stringify},OZ=function(n,r,i){return t(e.JSON.stringify,null,arguments)},OZ}var jZ,MZ;function NZ(){return MZ?jZ:(MZ=1,jZ=AZ(),jZ)}var PZ,FZ;function IZ(){return FZ?PZ:(FZ=1,PZ=NZ(),PZ)}var LZ=iP(IZ()),RZ={},zZ,BZ;function VZ(){if(BZ)return zZ;BZ=1;var e=eI(),t=lz(),n=vR();return zZ=function(r){for(var i=e(this),a=n(i),o=arguments.length,s=t(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:t(c,a);l>s;)i[s++]=r;return i},zZ}var HZ;function UZ(){if(HZ)return RZ;HZ=1;var e=X(),t=VZ(),n=CU();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),RZ}var WZ,GZ;function KZ(){return GZ?WZ:(GZ=1,UZ(),WZ=gL()(`Array`,`fill`),WZ)}var qZ,JZ;function YZ(){if(JZ)return qZ;JZ=1;var e=fF(),t=KZ(),n=Array.prototype;return qZ=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},qZ}var XZ,ZZ;function QZ(){return ZZ?XZ:(ZZ=1,XZ=YZ(),XZ)}var $Z,eQ;function tQ(){return eQ?$Z:(eQ=1,$Z=QZ(),$Z)}var nQ=iP(tQ()),rQ={exports:{}},iQ;function aQ(){return iQ?rQ.exports:(iQ=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(rQ),rQ.exports)}var oQ=iP(aQ());function sQ(){return sQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sQ.apply(this,arguments)}function cQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function lQ(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var uQ=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},dQ=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],fQ=typeof document>`u`?{style:{}}:document.createElement(`div`),pQ=`function`,mQ=Math.round,hQ=Math.abs,gQ=Date.now;function _Q(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<dQ.length;){if(n=dQ[a],r=n?n+i:t,r in e)return r;a++}}var vQ=typeof window>`u`?{}:window,yQ=_Q(fQ.style,`touchAction`),bQ=yQ!==void 0;function xQ(){if(!bQ)return!1;var e={},t=vQ.CSS&&vQ.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?vQ.CSS.supports(`touch-action`,n):!0}),e}var SQ=`compute`,CQ=`auto`,wQ=`manipulation`,TQ=`none`,EQ=`pan-x`,DQ=`pan-y`,OQ=xQ(),kQ=/mobile|tablet|ip(ad|hone|od)|android/i,AQ=`ontouchstart`in vQ,jQ=_Q(vQ,`PointerEvent`)!==void 0,MQ=AQ&&kQ.test(navigator.userAgent),NQ=`touch`,PQ=`pen`,FQ=`mouse`,IQ=`kinect`,LQ=25,RQ=1,zQ=2,BQ=4,VQ=8,HQ=1,UQ=2,WQ=4,GQ=8,KQ=16,qQ=UQ|WQ,JQ=GQ|KQ,YQ=qQ|JQ,XQ=[`x`,`y`],ZQ=[`clientX`,`clientY`];function QQ(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function $Q(e,t){return typeof e===pQ?e.apply(t&&t[0]||void 0,t):e}function e$(e,t){return e.indexOf(t)>-1}function t$(e){if(e$(e,TQ))return TQ;var t=e$(e,EQ),n=e$(e,DQ);return t&&n?TQ:t||n?t?EQ:DQ:e$(e,wQ)?wQ:CQ}var n$=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===SQ&&(e=this.compute()),bQ&&this.manager.element.style&&OQ[e]&&(this.manager.element.style[yQ]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return QQ(this.manager.recognizers,function(t){$Q(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),t$(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=e$(r,TQ)&&!OQ[TQ],a=e$(r,DQ)&&!OQ[DQ],o=e$(r,EQ)&&!OQ[EQ];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&qQ||o&&n&JQ))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function r$(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function i$(e){var t=e.length;if(t===1)return{x:mQ(e[0].clientX),y:mQ(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:mQ(n/t),y:mQ(r/t)}}function a$(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:mQ(e.pointers[n].clientX),clientY:mQ(e.pointers[n].clientY)},n++;return{timeStamp:gQ(),pointers:t,center:i$(t),deltaX:e.deltaX,deltaY:e.deltaY}}function o$(e,t,n){n||=XQ;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function s$(e,t,n){n||=XQ;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function c$(e,t){return e===t?HQ:hQ(e)>=hQ(t)?e<0?UQ:WQ:t<0?GQ:KQ}function l$(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===RQ||a.eventType===BQ)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function u$(e,t,n){return{x:t/e||0,y:n/e||0}}function d$(e,t){return o$(t[0],t[1],ZQ)/o$(e[0],e[1],ZQ)}function f$(e,t){return s$(t[1],t[0],ZQ)+s$(e[1],e[0],ZQ)}function p$(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==VQ&&(r>LQ||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=u$(r,c,l);a=u.x,o=u.y,i=hQ(u.x)>hQ(u.y)?u.x:u.y,s=c$(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function m$(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=a$(t),i>1&&!n.firstMultiple?n.firstMultiple=a$(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=i$(r);t.timeStamp=gQ(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=s$(s,c),t.distance=o$(s,c),l$(n,t),t.offsetDirection=c$(t.deltaX,t.deltaY);var l=u$(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=hQ(l.x)>hQ(l.y)?l.x:l.y,t.scale=o?d$(o.pointers,r):1,t.rotation=o?f$(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,p$(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;r$(f,u)&&(u=f),t.target=u}function h$(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&RQ&&r-i===0,o=t&(BQ|VQ)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,m$(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function g$(e){return e.trim().split(/\s+/g)}function _$(e,t,n){QQ(g$(t),function(t){e.addEventListener(t,n,!1)})}function v$(e,t,n){QQ(g$(t),function(t){e.removeEventListener(t,n,!1)})}function y$(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var b$=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){$Q(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&_$(this.element,this.evEl,this.domHandler),this.evTarget&&_$(this.target,this.evTarget,this.domHandler),this.evWin&&_$(y$(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&v$(this.element,this.evEl,this.domHandler),this.evTarget&&v$(this.target,this.evTarget,this.domHandler),this.evWin&&v$(y$(this.element),this.evWin,this.domHandler)},e}();function x$(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var S$={pointerdown:RQ,pointermove:zQ,pointerup:BQ,pointercancel:VQ,pointerout:VQ},C$={2:NQ,3:PQ,4:FQ,5:IQ},w$=`pointerdown`,T$=`pointermove pointerup pointercancel`;vQ.MSPointerEvent&&!vQ.PointerEvent&&(w$=`MSPointerDown`,T$=`MSPointerMove MSPointerUp MSPointerCancel`);var E$=function(e){cQ(t,e);function t(){var n,r=t.prototype;return r.evEl=w$,r.evWin=T$,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=S$[e.type.toLowerCase().replace(`ms`,``)],i=C$[e.pointerType]||e.pointerType,a=i===NQ,o=x$(t,e.pointerId,`pointerId`);r&RQ&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(BQ|VQ)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(b$);function D$(e){return Array.prototype.slice.call(e,0)}function O$(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];x$(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var k$={touchstart:RQ,touchmove:zQ,touchend:BQ,touchcancel:VQ},A$=`touchstart touchmove touchend touchcancel`,j$=function(e){cQ(t,e);function t(){var n;return t.prototype.evTarget=A$,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=k$[e.type],n=M$.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:NQ,srcEvent:e})},t}(b$);function M$(e,t){var n=D$(e.touches),r=this.targetIds;if(t&(RQ|zQ)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=D$(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return r$(e.target,c)}),t===RQ)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(BQ|VQ)&&delete r[o[i].identifier],i++;if(s.length)return[O$(a.concat(s),`identifier`,!0),s]}var N$={mousedown:RQ,mousemove:zQ,mouseup:BQ},P$=`mousedown`,F$=`mousemove mouseup`,I$=function(e){cQ(t,e);function t(){var n,r=t.prototype;return r.evEl=P$,r.evWin=F$,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=N$[e.type];t&RQ&&e.button===0&&(this.pressed=!0),t&zQ&&e.which!==1&&(t=BQ),this.pressed&&(t&BQ&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:FQ,srcEvent:e}))},t}(b$),L$=2500,R$=25;function z$(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},L$)}}function B$(e,t){e&RQ?(this.primaryTouch=t.changedPointers[0].identifier,z$.call(this,t)):e&(BQ|VQ)&&z$.call(this,t)}function V$(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=R$&&o<=R$)return!0}return!1}var H$=function(){return function(e){cQ(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===NQ,a=n.pointerType===FQ;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)B$.call(lQ(lQ(r)),t,n);else if(a&&V$.call(lQ(lQ(r)),n))return;r.callback(e,t,n)}},r.touch=new j$(r.manager,r.handler),r.mouse=new I$(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(b$)}();function U$(e){var t;return t=e.options.inputClass||(jQ?E$:MQ?j$:AQ?H$:I$),new t(e,h$)}function W$(e,t,n){return Array.isArray(e)?(QQ(e,n[t],n),!0):!1}var G$=1,K$=2,q$=4,J$=8,Y$=J$,X$=16,Z$=32,Q$=1;function $$(){return Q$++}function e1(e,t){var n=t.manager;return n?n.get(e):e}function t1(e){return e&X$?`cancel`:e&J$?`end`:e&q$?`move`:e&K$?`start`:``}var n1=function(){function e(e){e===void 0&&(e={}),this.options=sQ({enable:!0},e),this.id=$$(),this.manager=null,this.state=G$,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return uQ(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(W$(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=e1(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return W$(e,`dropRecognizeWith`,this)?this:(e=e1(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(W$(e,`requireFailure`,this))return this;var t=this.requireFail;return e=e1(e,this),x$(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(W$(e,`dropRequireFailure`,this))return this;e=e1(e,this);var t=x$(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<J$&&r(t.options.event+t1(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=J$&&r(t.options.event+t1(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Z$},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Z$|G$)))return!1;e++}return!0},t.recognize=function(e){var t=uQ({},e);if(!$Q(this.options.enable,[this,t])){this.reset(),this.state=Z$;return}this.state&(Y$|X$|Z$)&&(this.state=G$),this.state=this.process(t),this.state&(K$|q$|J$|X$)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),r1=function(e){cQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,sQ({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[wQ]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&RQ&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==BQ)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||o$(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=Y$,t.tryEmit()},n.interval),K$):Y$}return Z$},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Z$},this.options.interval),Z$},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===Y$&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(n1),i1=function(e){cQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,sQ({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(K$|q$),i=this.attrTest(e);return r&&(n&VQ||!i)?t|X$:r||i?n&BQ?t|J$:t&K$?t|q$:K$:Z$},t}(n1);function a1(e){return e===KQ?`down`:e===GQ?`up`:e===UQ?`left`:e===WQ?`right`:``}var o1=function(e){cQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,sQ({event:`pan`,threshold:10,pointers:1,direction:YQ},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&qQ&&t.push(DQ),e&JQ&&t.push(EQ),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&qQ?(i=a===0?HQ:a<0?UQ:WQ,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?HQ:o<0?GQ:KQ,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return i1.prototype.attrTest.call(this,e)&&(this.state&K$||!(this.state&K$)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=a1(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(i1),s1=function(e){cQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,sQ({event:`swipe`,threshold:10,velocity:.3,direction:qQ|JQ,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return o1.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(qQ|JQ)?r=t.overallVelocity:n&qQ?r=t.overallVelocityX:n&JQ&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&hQ(r)>this.options.velocity&&t.eventType&BQ},n.emit=function(e){var t=a1(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(i1),c1=function(e){cQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,sQ({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[TQ]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&K$)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(i1),l1=function(e){cQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,sQ({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[TQ]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&K$)},t}(i1),u1=function(e){cQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,sQ({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[CQ]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(BQ|VQ)&&!a)this.reset();else if(e.eventType&RQ)this.reset(),this._timer=setTimeout(function(){t.state=Y$,t.tryEmit()},n.time);else if(e.eventType&BQ)return Y$;return Z$},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===Y$&&(e&&e.eventType&BQ?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=gQ(),this.manager.emit(this.options.event,this._input)))},t}(n1),d1={domEvents:!1,touchAction:SQ,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},f1=[[l1,{enable:!1}],[c1,{enable:!1},[`rotate`]],[s1,{direction:qQ}],[o1,{direction:qQ},[`swipe`]],[r1],[r1,{event:`doubletap`,taps:2},[`tap`]],[u1]],p1=1,m1=2;function h1(e,t){var n=e.element;if(n.style){var r;QQ(e.options.cssProps,function(i,a){r=_Q(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function g1(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var _1=function(){function e(e,t){var n=this;this.options=uQ({},d1,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=U$(this),this.touchAction=new n$(this,this.options.touchAction),h1(this,!0),QQ(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return uQ(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?m1:p1},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&Y$)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==m1&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(K$|q$|J$)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof n1)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(W$(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(W$(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=x$(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return QQ(g$(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return QQ(g$(e),function(e){t?n[e]&&n[e].splice(x$(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&g1(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&h1(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),v1={touchstart:RQ,touchmove:zQ,touchend:BQ,touchcancel:VQ},y1=`touchstart`,b1=`touchstart touchmove touchend touchcancel`,x1=function(e){cQ(t,e);function t(){var n,r=t.prototype;return r.evTarget=y1,r.evWin=b1,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=v1[e.type];if(t===RQ&&(this.started=!0),this.started){var n=S1.call(this,e,t);t&(BQ|VQ)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:NQ,srcEvent:e})}},t}(b$);function S1(e,t){var n=D$(e.touches),r=D$(e.changedTouches);return t&(BQ|VQ)&&(n=O$(n.concat(r),`identifier`,!0)),[n,r]}function C1(e,t,n){var r=`DEPRECATED METHOD: `+t+`+`+n+` AT+`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var w1=C1(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),T1=C1(function(e,t){return w1(e,t,!0)},`merge`,"Use `assign`.");function E1(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&uQ(i,n)}function D1(e,t){return function(){return e.apply(t,arguments)}}var O1=function(){var e=function(e,t){return t===void 0&&(t={}),new _1(e,sQ({recognizers:f1.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=YQ,e.DIRECTION_DOWN=KQ,e.DIRECTION_LEFT=UQ,e.DIRECTION_RIGHT=WQ,e.DIRECTION_UP=GQ,e.DIRECTION_HORIZONTAL=qQ,e.DIRECTION_VERTICAL=JQ,e.DIRECTION_NONE=HQ,e.DIRECTION_DOWN=KQ,e.INPUT_START=RQ,e.INPUT_MOVE=zQ,e.INPUT_END=BQ,e.INPUT_CANCEL=VQ,e.STATE_POSSIBLE=G$,e.STATE_BEGAN=K$,e.STATE_CHANGED=q$,e.STATE_ENDED=J$,e.STATE_RECOGNIZED=Y$,e.STATE_CANCELLED=X$,e.STATE_FAILED=Z$,e.Manager=_1,e.Input=b$,e.TouchAction=n$,e.TouchInput=j$,e.MouseInput=I$,e.PointerEventInput=E$,e.TouchMouseInput=H$,e.SingleTouchInput=x1,e.Recognizer=n1,e.AttrRecognizer=i1,e.Tap=r1,e.Pan=o1,e.Swipe=s1,e.Pinch=c1,e.Rotate=l1,e.Press=u1,e.on=_$,e.off=v$,e.each=QQ,e.merge=T1,e.extend=w1,e.bindFn=D1,e.assign=uQ,e.inherit=E1,e.bindFn=D1,e.prefixed=_Q,e.toArray=D$,e.inArray=x$,e.uniqueArray=O$,e.splitStr=g$,e.boolOrFn=$Q,e.hasParent=r$,e.addEventListeners=_$,e.removeEventListeners=v$,e.defaults=uQ({},d1,{preset:f1}),e}();O1.defaults;var k1=QK(`DELETE`);function A1(e){return j1({},e,...[...arguments].slice(1))}function j1(){let e=M1(...arguments);return P1(e),e}function M1(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return M1(j1(e[0],e[1]),...mq(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of Dq(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===k1?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!iL(t[e])&&!iL(n[e])?t[e]=M1(t[e],n[e]):t[e]=N1(n[e]));return t}function N1(e){return iL(e)?lK(e).call(e,e=>N1(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):M1({},e):e}function P1(e){for(let t of WK(e))e[t]===k1?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&P1(e[t])}function F1(){var e=[...arguments];return I1(e.length?e:[Bq()])}function I1(e){let[t,n,r]=L1(e),i=1,a=()=>{let e=2091639*t+i*23283064365386963e-26;return t=n,n=r,r=e-(i=e|0)};return a.uint32=()=>a()*4294967296,a.fract53=()=>a()+(a()*2097152|0)*11102230246251565e-32,a.algorithm=`Alea`,a.seed=e,a.version=`0.9`,a}function L1(){let e=R1(),t=e(` `),n=e(` `),r=e(` `);for(let i=0;i<arguments.length;i++)t-=e(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=e(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),r-=e(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[t,n,r]}function R1(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function z1(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var B1=typeof window<`u`?window.Hammer||O1:function(){return z1()};function V1(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=B1(this._dom.overlay);n.on(`tap`,Z(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{H1(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}oQ(V1.prototype),V1.current=null,V1.prototype.destroy=function(){this.deactivate();for(let n of nJ(e=wJ(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},V1.prototype.activate=function(){V1.current&&V1.current.deactivate(),V1.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},V1.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},V1.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function H1(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var U1=/^\/?Date\((-?\d+)/i,W1=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,G1=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,K1=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,q1=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function J1(e){return e instanceof Number||typeof e==`number`}function Y1(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(Y1(t),e.removeChild(t))}}function X1(e){return e instanceof String||typeof e==`string`}function Z1(e){return typeof e==`object`&&!!e}function Q1(e){return!!(e instanceof Date||X1(e)&&(U1.exec(e)||!isNaN(Date.parse(e))))}function $1(e,t,n,r){let i=!1;r===!0&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function e0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(let r in e)if(t[r]!==void 0)if(t[r]===null||typeof t[r]!=`object`)$1(e,t,r,n);else{let i=e[r],a=t[r];Z1(i)&&Z1(a)&&e0(i,a,n)}}var t0=BJ;function n0(e,t){if(!iL(e))throw Error(`Array with property names expected as first argument`);var n=[...arguments].slice(2);for(let r of n)for(let n=0;n<e.length;n++){let i=e[n];r&&Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}function r0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(iL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i=0;i<e.length;i++){let a=e[i];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?a0(t[a],n[a],!1,r):$1(t,n,a,r);else if(iL(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else $1(t,n,a,r)}return t}function i0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(iL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!_Y(e).call(e,i))if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?a0(t[i],n[i]):$1(t,n,i,r);else if(iL(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else $1(t,n,i,r);return t}function a0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)||n===!0)if(typeof t[a]==`object`&&t[a]!==null&&AY(t[a])===Object.prototype)e[a]===void 0?e[a]=a0({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&AY(e[a])===Object.prototype?a0(e[a],t[a],n):$1(e,t,a,r);else if(iL(t[a])){var i;e[a]=mq(i=t[a]).call(i)}else $1(e,t,a,r);return e}function o0(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!=t[n])return!1;return!0}function s0(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`Boolean`:e instanceof Number?`Number`:e instanceof String?`String`:iL(e)?`Array`:e instanceof Date?`Date`:`Object`:t===`number`?`Number`:t===`boolean`?`Boolean`:t===`string`?`String`:t===void 0?`undefined`:t}function c0(e,t){return[...e,t]}function l0(e){return mq(e).call(e)}function u0(e){return e.getBoundingClientRect().left}function d0(e){return e.getBoundingClientRect().right}function f0(e){return e.getBoundingClientRect().top}function p0(e,t){let n=e.className.split(` `),r=t.split(` `);n=UY(n).call(n,mV(r).call(r,function(e){return!_Y(n).call(n,e)})),e.className=n.join(` `)}function m0(e,t){let n=e.className.split(` `),r=t.split(` `);n=mV(n).call(n,function(e){return!_Y(r).call(r,e)}),e.className=n.join(` `)}function h0(e,t){if(iL(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}var g0=aX;function _0(e,t,n){return e[t]===n?!1:(e[t]=n,!0)}function v0(e){let t=!1;return()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}}function y0(e){e||=window.event,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function b0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event,t=null;return e&&(e.target?t=e.target:e.srcElement&&(t=e.srcElement)),!(t instanceof Element)||t.nodeType!=null&&t.nodeType==3&&(t=t.parentNode,!(t instanceof Element))?null:t}function x0(e,t){let n=e;for(;n;)if(n===t)return!0;else if(n.parentNode)n=n.parentNode;else return!1;return!1}var S0={asBoolean(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:e!=0},asNumber(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:Number(e)||t||null},asString(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:String(e)},asSize(e,t){return typeof e==`function`&&(e=e()),X1(e)?e:J1(e)?e+`px`:t||null},asElement(e,t){return typeof e==`function`&&(e=e()),e||t||null}};function C0(e){let t;switch(e.length){case 3:case 4:return t=G1.exec(e),t?{r:DX(t[1]+t[1],16),g:DX(t[2]+t[2],16),b:DX(t[3]+t[3],16)}:null;case 6:case 7:return t=W1.exec(e),t?{r:DX(t[1],16),g:DX(t[2],16),b:DX(t[3],16)}:null;default:return null}}function w0(e,t){if(_Y(e).call(e,`rgba`))return e;if(_Y(e).call(e,`rgb`)){let n=e.substr(UX(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}else{let n=C0(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function T0(e,t,n){var r;return`#`+mq(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function E0(e,t){if(X1(e)){let t=e;if(F0(t)){var n;let e=lK(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return DX(e)});t=T0(e[0],e[1],e[2])}if(P0(t)===!0){let e=N0(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},i=M0(r.h,r.s,r.v),a=M0(n.h,n.s,n.v);return{background:t,border:i,highlight:{background:a,border:i},hover:{background:a,border:i}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else if(t)return{background:e.background||t.background,border:e.border||t.border,highlight:X1(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:X1(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}};else return{background:e.background||void 0,border:e.border||void 0,highlight:X1(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:X1(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function D0(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));if(r===i)return{h:0,s:0,v:r};let a=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-a/(i-r))/360,s:(i-r)/i,v:i}}function O0(e){let t=document.createElement(`div`),n={};t.style.cssText=e;for(let e=0;e<t.style.length;++e)n[t.style[e]]=t.style.getPropertyValue(t.style[e]);return n}function k0(e,t){let n=O0(t);for(let[t,r]of nZ(n))e.style.setProperty(t,r)}function A0(e,t){let n=O0(t);for(let t of WK(n))e.style.removeProperty(t)}function j0(e,t,n){let r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function M0(e,t,n){let r=j0(e,t,n);return T0(r.r,r.g,r.b)}function N0(e){let t=C0(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return D0(t.r,t.g,t.b)}function P0(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function F0(e){return K1.test(e)}function I0(e){return q1.test(e)}function L0(e,t){if(typeof t==`object`&&t){let n=hZ(t);for(let r=0;r<e.length;r++)Object.prototype.hasOwnProperty.call(t,e[r])&&typeof t[e[r]]==`object`&&(n[e[r]]=R0(t[e[r]]));return n}else return null}function R0(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=hZ(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=R0(e[n]));return t}function z0(e,t){for(let n=0;n<e.length;n++){let r=e[n],i;for(i=n;i>0&&t(r,e[i-1])<0;i--)e[i]=e[i-1];e[i]=r}return e}function B0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return typeof e==`object`&&!!e},o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);let s=function(e,t,n){a(e[n])||(e[n]={});let r=t[n],i=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])},c=t[n],l=a(r)&&!o(r)?r[n]:void 0,u=l?l.enabled:void 0;if(c===void 0)return;if(typeof c==`boolean`){a(e[n])||(e[n]={}),e[n].enabled=c;return}if(c===null&&!a(e[n]))if(i(l))e[n]=hZ(l);else return;if(!a(c))return;let d=!0;c.enabled===void 0?u!==void 0&&(d=l.enabled):d=c.enabled,s(e,t,n),e[n].enabled=d}function V0(e,t,n,r){let i=0,a=0,o=e.length-1;for(;a<=o&&i<1e4;){let s=Math.floor((a+o)/2),c=e[s],l=t(r===void 0?c[n]:c[n][r]);if(l==0)return s;l==-1?a=s+1:o=s-1,i++}return-1}function H0(e,t,n,r,i){let a=0,o=0,s=e.length-1,c,l,u,d;for(i??=function(e,t){return e==t?0:e<t?-1:1};o<=s&&a<1e4;){if(d=Math.floor(.5*(s+o)),c=e[Math.max(0,d-1)][n],l=e[d][n],u=e[Math.min(e.length-1,d+1)][n],i(l,t)==0)return d;if(i(c,t)<0&&i(l,t)>0)return r==`before`?Math.max(0,d-1):d;if(i(l,t)<0&&i(u,t)>0)return r==`before`?d:Math.min(e.length-1,d+1);i(l,t)<0?o=d+1:s=d-1,a++}return-1}var U0={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function W0(){let e=document.createElement(`p`);e.style.width=`100%`,e.style.height=`200px`;let t=document.createElement(`div`);t.style.position=`absolute`,t.style.top=`0px`,t.style.left=`0px`,t.style.visibility=`hidden`,t.style.width=`200px`,t.style.height=`150px`,t.style.overflow=`hidden`,t.appendChild(e),document.body.appendChild(t);let n=e.offsetWidth;t.style.overflow=`scroll`;let r=e.offsetWidth;return n==r&&(r=t.clientWidth),document.body.removeChild(t),n-r}function G0(e,t){let n;iL(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var K0={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},q0=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return K0[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),X1(e)===!0){if(F0(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(I0(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(P0(e)===!0){let t=C0(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+LZ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=BJ({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,$L(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=BJ({},e)),this.color=e;let t=D0(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=D0(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=j0(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=D0(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),nQ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);let i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerText=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerText=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerText=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerText=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerText=`cancel`,this.cancelButton.onclick=Z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerText=`apply`,this.applyButton.onclick=Z(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=Z(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerText=`load last`,this.loadButton.onclick=Z(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new B1(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=j0(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=D0(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=j0(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}};function J0(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(J0(...mq(e).call(e,1))),t}}var Y0=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=i,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},BJ(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new q0(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(iL(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),mV(e)!==void 0&&(this.options.filter=mV(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);mV(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=mV(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||UX(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return Q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(J0(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&UX(e).call(e,t)!==-1&&(i=UX(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=s.value;let d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=$L(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=$L(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=mV(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=c0(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!iL(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(iL(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions))if(s.enabled!==void 0){let e=c0(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(J0(`pre`,`const options = `+LZ(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},X0=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=DX(e),this.y=DX(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,i=0,a=0;if(this.overflowMethod==`flip`){let n=!1,o=!0;this.y-e<this.padding&&(o=!1),this.x+t>r-this.padding&&(n=!0),i=n?this.x-t:this.x,a=o?this.y-e:this.y}else a=this.y-e,a+e+this.padding>n&&(a=n-e-this.padding),a<this.padding&&(a=this.padding),i=this.x,i+t+this.padding>r&&(i=r-t-this.padding),i<this.padding&&(i=this.padding);this.frame.style.left=i+`px`,this.frame.style.top=a+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},Z0=!1,Q0,$0=`background: #FFeeee; color: #dd0000`,e2=Object.freeze({__proto__:null,Activator:V1,Alea:F1,ColorPicker:q0,Configurator:Y0,DELETE:k1,HSVToHex:M0,HSVToRGB:j0,Hammer:B1,Popup:X0,RGBToHSV:D0,RGBToHex:T0,VALIDATOR_PRINT_STYLE:$0,Validator:class e{static validate(t,n,r){Z0=!1,Q0=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),Z0}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.error(`%c`+n+e.printLocation(o,t),$0)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(WK(a))+`. Received [`+c+`] "`+n[t]+`"`),Z0=!0):e.getType(l)===`array`&&UX(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),Z0=!0):c===`object`&&i!==`__any__`&&(o=c0(o,t),e.parse(n[t],r[i],o))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:iL(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,Q0,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(WK(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?++`,console.error(`%cUnknown option detected: "`+t+`"`+o,$0),Z0=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],c0(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;UX(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=l0(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`++`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:+`)+`options = {+`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {+`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`+`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}+`}return n+`++`}static print(e){return LZ(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},addClassName:p0,addCssText:k0,binarySearchCustom:V0,binarySearchValue:H0,bridgeObject:R0,copyAndExtendArray:c0,copyArray:l0,deepExtend:a0,deepObjectAssign:j1,easingFunctions:U0,equalArray:o0,extend:t0,fillIfDefined:e0,forEach:h0,getAbsoluteLeft:u0,getAbsoluteRight:d0,getAbsoluteTop:f0,getScrollBarWidth:W0,getTarget:b0,getType:s0,hasParent:x0,hexToHSV:N0,hexToRGB:C0,insertSort:z0,isDate:Q1,isNumber:J1,isObject:Z1,isString:X1,isValidHex:P0,isValidRGB:F0,isValidRGBA:I0,mergeOptions:B0,option:S0,overrideOpacity:w0,parseColor:E0,preventDefault:y0,pureDeepObjectAssign:A1,recursiveDOMDelete:Y1,removeClassName:m0,removeCssText:A0,selectiveBridgeObject:L0,selectiveDeepExtend:r0,selectiveExtend:n0,selectiveNotDeepExtend:i0,throttle:v0,toArray:g0,topMost:G0,updateProperty:_0}),t2={exports:{}},n2={},r2={exports:{}},i2={},a2;function o2(){if(a2)return i2;a2=1;function e(){var e={};return e[`align-content`]=!1,e[`align-items`]=!1,e[`align-self`]=!1,e[`alignment-adjust`]=!1,e[`alignment-baseline`]=!1,e.all=!1,e[`anchor-point`]=!1,e.animation=!1,e[`animation-delay`]=!1,e[`animation-direction`]=!1,e[`animation-duration`]=!1,e[`animation-fill-mode`]=!1,e[`animation-iteration-count`]=!1,e[`animation-name`]=!1,e[`animation-play-state`]=!1,e[`animation-timing-function`]=!1,e.azimuth=!1,e[`backface-visibility`]=!1,e.background=!0,e[`background-attachment`]=!0,e[`background-clip`]=!0,e[`background-color`]=!0,e[`background-image`]=!0,e[`background-origin`]=!0,e[`background-position`]=!0,e[`background-repeat`]=!0,e[`background-size`]=!0,e[`baseline-shift`]=!1,e.binding=!1,e.bleed=!1,e[`bookmark-label`]=!1,e[`bookmark-level`]=!1,e[`bookmark-state`]=!1,e.border=!0,e[`border-bottom`]=!0,e[`border-bottom-color`]=!0,e[`border-bottom-left-radius`]=!0,e[`border-bottom-right-radius`]=!0,e[`border-bottom-style`]=!0,e[`border-bottom-width`]=!0,e[`border-collapse`]=!0,e[`border-color`]=!0,e[`border-image`]=!0,e[`border-image-outset`]=!0,e[`border-image-repeat`]=!0,e[`border-image-slice`]=!0,e[`border-image-source`]=!0,e[`border-image-width`]=!0,e[`border-left`]=!0,e[`border-left-color`]=!0,e[`border-left-style`]=!0,e[`border-left-width`]=!0,e[`border-radius`]=!0,e[`border-right`]=!0,e[`border-right-color`]=!0,e[`border-right-style`]=!0,e[`border-right-width`]=!0,e[`border-spacing`]=!0,e[`border-style`]=!0,e[`border-top`]=!0,e[`border-top-color`]=!0,e[`border-top-left-radius`]=!0,e[`border-top-right-radius`]=!0,e[`border-top-style`]=!0,e[`border-top-width`]=!0,e[`border-width`]=!0,e.bottom=!1,e[`box-decoration-break`]=!0,e[`box-shadow`]=!0,e[`box-sizing`]=!0,e[`box-snap`]=!0,e[`box-suppress`]=!0,e[`break-after`]=!0,e[`break-before`]=!0,e[`break-inside`]=!0,e[`caption-side`]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e[`clip-path`]=!1,e[`clip-rule`]=!1,e.color=!0,e[`color-interpolation-filters`]=!0,e[`column-count`]=!1,e[`column-fill`]=!1,e[`column-gap`]=!1,e[`column-rule`]=!1,e[`column-rule-color`]=!1,e[`column-rule-style`]=!1,e[`column-rule-width`]=!1,e[`column-span`]=!1,e[`column-width`]=!1,e.columns=!1,e.contain=!1,e.content=!1,e[`counter-increment`]=!1,e[`counter-reset`]=!1,e[`counter-set`]=!1,e.crop=!1,e.cue=!1,e[`cue-after`]=!1,e[`cue-before`]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e[`display-inside`]=!0,e[`display-list`]=!0,e[`display-outside`]=!0,e[`dominant-baseline`]=!1,e.elevation=!1,e[`empty-cells`]=!1,e.filter=!1,e.flex=!1,e[`flex-basis`]=!1,e[`flex-direction`]=!1,e[`flex-flow`]=!1,e[`flex-grow`]=!1,e[`flex-shrink`]=!1,e[`flex-wrap`]=!1,e.float=!1,e[`float-offset`]=!1,e[`flood-color`]=!1,e[`flood-opacity`]=!1,e[`flow-from`]=!1,e[`flow-into`]=!1,e.font=!0,e[`font-family`]=!0,e[`font-feature-settings`]=!0,e[`font-kerning`]=!0,e[`font-language-override`]=!0,e[`font-size`]=!0,e[`font-size-adjust`]=!0,e[`font-stretch`]=!0,e[`font-style`]=!0,e[`font-synthesis`]=!0,e[`font-variant`]=!0,e[`font-variant-alternates`]=!0,e[`font-variant-caps`]=!0,e[`font-variant-east-asian`]=!0,e[`font-variant-ligatures`]=!0,e[`font-variant-numeric`]=!0,e[`font-variant-position`]=!0,e[`font-weight`]=!0,e.grid=!1,e[`grid-area`]=!1,e[`grid-auto-columns`]=!1,e[`grid-auto-flow`]=!1,e[`grid-auto-rows`]=!1,e[`grid-column`]=!1,e[`grid-column-end`]=!1,e[`grid-column-start`]=!1,e[`grid-row`]=!1,e[`grid-row-end`]=!1,e[`grid-row-start`]=!1,e[`grid-template`]=!1,e[`grid-template-areas`]=!1,e[`grid-template-columns`]=!1,e[`grid-template-rows`]=!1,e[`hanging-punctuation`]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e[`image-orientation`]=!1,e[`image-resolution`]=!1,e[`ime-mode`]=!1,e[`initial-letters`]=!1,e[`inline-box-align`]=!1,e[`justify-content`]=!1,e[`justify-items`]=!1,e[`justify-self`]=!1,e.left=!1,e[`letter-spacing`]=!0,e[`lighting-color`]=!0,e[`line-box-contain`]=!1,e[`line-break`]=!1,e[`line-grid`]=!1,e[`line-height`]=!1,e[`line-snap`]=!1,e[`line-stacking`]=!1,e[`line-stacking-ruby`]=!1,e[`line-stacking-shift`]=!1,e[`line-stacking-strategy`]=!1,e[`list-style`]=!0,e[`list-style-image`]=!0,e[`list-style-position`]=!0,e[`list-style-type`]=!0,e.margin=!0,e[`margin-bottom`]=!0,e[`margin-left`]=!0,e[`margin-right`]=!0,e[`margin-top`]=!0,e[`marker-offset`]=!1,e[`marker-side`]=!1,e.marks=!1,e.mask=!1,e[`mask-box`]=!1,e[`mask-box-outset`]=!1,e[`mask-box-repeat`]=!1,e[`mask-box-slice`]=!1,e[`mask-box-source`]=!1,e[`mask-box-width`]=!1,e[`mask-clip`]=!1,e[`mask-image`]=!1,e[`mask-origin`]=!1,e[`mask-position`]=!1,e[`mask-repeat`]=!1,e[`mask-size`]=!1,e[`mask-source-type`]=!1,e[`mask-type`]=!1,e[`max-height`]=!0,e[`max-lines`]=!1,e[`max-width`]=!0,e[`min-height`]=!0,e[`min-width`]=!0,e[`move-to`]=!1,e[`nav-down`]=!1,e[`nav-index`]=!1,e[`nav-left`]=!1,e[`nav-right`]=!1,e[`nav-up`]=!1,e[`object-fit`]=!1,e[`object-position`]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e[`outline-color`]=!1,e[`outline-offset`]=!1,e[`outline-style`]=!1,e[`outline-width`]=!1,e.overflow=!1,e[`overflow-wrap`]=!1,e[`overflow-x`]=!1,e[`overflow-y`]=!1,e.padding=!0,e[`padding-bottom`]=!0,e[`padding-left`]=!0,e[`padding-right`]=!0,e[`padding-top`]=!0,e.page=!1,e[`page-break-after`]=!1,e[`page-break-before`]=!1,e[`page-break-inside`]=!1,e[`page-policy`]=!1,e.pause=!1,e[`pause-after`]=!1,e[`pause-before`]=!1,e.perspective=!1,e[`perspective-origin`]=!1,e.pitch=!1,e[`pitch-range`]=!1,e[`play-during`]=!1,e.position=!1,e[`presentation-level`]=!1,e.quotes=!1,e[`region-fragment`]=!1,e.resize=!1,e.rest=!1,e[`rest-after`]=!1,e[`rest-before`]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e[`rotation-point`]=!1,e[`ruby-align`]=!1,e[`ruby-merge`]=!1,e[`ruby-position`]=!1,e[`shape-image-threshold`]=!1,e[`shape-outside`]=!1,e[`shape-margin`]=!1,e.size=!1,e.speak=!1,e[`speak-as`]=!1,e[`speak-header`]=!1,e[`speak-numeral`]=!1,e[`speak-punctuation`]=!1,e[`speech-rate`]=!1,e.stress=!1,e[`string-set`]=!1,e[`tab-size`]=!1,e[`table-layout`]=!1,e[`text-align`]=!0,e[`text-align-last`]=!0,e[`text-combine-upright`]=!0,e[`text-decoration`]=!0,e[`text-decoration-color`]=!0,e[`text-decoration-line`]=!0,e[`text-decoration-skip`]=!0,e[`text-decoration-style`]=!0,e[`text-emphasis`]=!0,e[`text-emphasis-color`]=!0,e[`text-emphasis-position`]=!0,e[`text-emphasis-style`]=!0,e[`text-height`]=!0,e[`text-indent`]=!0,e[`text-justify`]=!0,e[`text-orientation`]=!0,e[`text-overflow`]=!0,e[`text-shadow`]=!0,e[`text-space-collapse`]=!0,e[`text-transform`]=!0,e[`text-underline-position`]=!0,e[`text-wrap`]=!0,e.top=!1,e.transform=!1,e[`transform-origin`]=!1,e[`transform-style`]=!1,e.transition=!1,e[`transition-delay`]=!1,e[`transition-duration`]=!1,e[`transition-property`]=!1,e[`transition-timing-function`]=!1,e[`unicode-bidi`]=!1,e[`vertical-align`]=!1,e.visibility=!1,e[`voice-balance`]=!1,e[`voice-duration`]=!1,e[`voice-family`]=!1,e[`voice-pitch`]=!1,e[`voice-range`]=!1,e[`voice-rate`]=!1,e[`voice-stress`]=!1,e[`voice-volume`]=!1,e.volume=!1,e[`white-space`]=!1,e.widows=!1,e.width=!0,e[`will-change`]=!1,e[`word-break`]=!0,e[`word-spacing`]=!0,e[`word-wrap`]=!0,e[`wrap-flow`]=!1,e[`wrap-through`]=!1,e[`writing-mode`]=!1,e[`z-index`]=!1,e}function t(e,t,n){}function n(e,t,n){}var r=/javascript\s*\:/gim;function i(e,t){return r.test(t)?``:t}return i2.whiteList=e(),i2.getDefaultWhiteList=e,i2.onAttr=t,i2.onIgnoreAttr=n,i2.safeAttrValue=i,i2}var s2,c2;function l2(){return c2?s2:(c2=1,s2={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,``)}},s2)}var u2,d2;function f2(){if(d2)return u2;d2=1;var e=l2();function t(t,n){t=e.trimRight(t),t[t.length-1]!==`;`&&(t+=`;`);var r=t.length,i=!1,a=0,o=0,s=``;function c(){if(!i){var r=e.trim(t.slice(a,o)),c=r.indexOf(`:`);if(c!==-1){var l=e.trim(r.slice(0,c)),u=e.trim(r.slice(c+1));if(l){var d=n(a,s.length,l,u,r);d&&(s+=d+`; `)}}}a=o+1}for(;o<r;o++){var l=t[o];if(l===`/`&&t[o+1]===`*`){var u=t.indexOf(`*/`,o+2);if(u===-1)break;o=u+1,a=o+1,i=!1}else l===`(`?i=!0:l===`)`?i=!1:l===`;`?i||c():l===`+`&&c()}return e.trim(s)}return u2=t,u2}var p2,m2;function h2(){if(m2)return p2;m2=1;var e=o2(),t=f2();l2();function n(e){return e==null}function r(e){var t={};for(var n in e)t[n]=e[n];return t}function i(t){t=r(t||{}),t.whiteList=t.whiteList||e.whiteList,t.onAttr=t.onAttr||e.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||e.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||e.safeAttrValue,this.options=t}return i.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var r=this.options,i=r.whiteList,a=r.onAttr,o=r.onIgnoreAttr,s=r.safeAttrValue;return t(e,function(e,t,r,c,l){var u=i[r],d=!1;if(u===!0?d=u:typeof u==`function`?d=u(c):u instanceof RegExp&&(d=u.test(c)),d!==!0&&(d=!1),c=s(r,c),c){var f={position:t,sourcePosition:e,source:l,isWhite:d};if(d){var p=a(r,c,f);return n(p)?r+`:`+c:p}else{var p=o(r,c,f);if(!n(p))return p}}})},p2=i,p2}var g2;function _2(){return g2?r2.exports:(g2=1,(function(e,t){var n=o2(),r=h2();function i(e,t){return new r(t).process(e)}for(var a in t=e.exports=i,t.FilterCSS=r,n)t[a]=n[a];typeof window<`u`&&(window.filterCSS=e.exports)})(r2,r2.exports),r2.exports)}var v2,y2;function b2(){return y2?v2:(y2=1,v2={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},v2)}var x2;function S2(){if(x2)return n2;x2=1;var e=_2().FilterCSS,t=_2().getDefaultWhiteList,n=b2();function r(){return{a:[`target`,`href`,`title`],abbr:[`title`],address:[],area:[`shape`,`coords`,`href`,`alt`],article:[],aside:[],audio:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`preload`,`src`],b:[],bdi:[`dir`],bdo:[`dir`],big:[],blockquote:[`cite`],br:[],caption:[],center:[],cite:[],code:[],col:[`align`,`valign`,`span`,`width`],colgroup:[`align`,`valign`,`span`,`width`],dd:[],del:[`datetime`],details:[`open`],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:[`color`,`size`,`face`],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:[`src`,`alt`,`title`,`width`,`height`,`loading`],ins:[`datetime`],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:[`width`,`border`,`align`,`valign`],tbody:[`align`,`valign`],td:[`width`,`rowspan`,`colspan`,`align`,`valign`],tfoot:[`align`,`valign`],th:[`width`,`rowspan`,`colspan`,`align`,`valign`],thead:[`align`,`valign`],tr:[`rowspan`,`align`,`valign`],tt:[],u:[],ul:[],video:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`playsinline`,`poster`,`preload`,`src`,`height`,`width`]}}var i=new e;function a(e,t,n){}function o(e,t,n){}function s(e,t,n){}function c(e,t,n){}function l(e){return e.replace(d,`<`).replace(f,`>`)}function u(e,t,r,a){if(r=E(r),t===`href`||t===`src`){if(r=n.trim(r),r===`#`)return`#`;if(!(r.substr(0,7)===`http://`||r.substr(0,8)===`https://`||r.substr(0,7)===`mailto:`||r.substr(0,4)===`tel:`||r.substr(0,11)===`data:image/`||r.substr(0,6)===`ftp://`||r.substr(0,2)===`./`||r.substr(0,3)===`../`||r[0]===`#`||r[0]===`/`))return``}else if(t===`background`){if(v.lastIndex=0,v.test(r))return``}else if(t===`style`){if(y.lastIndex=0,y.test(r)||(b.lastIndex=0,b.test(r)&&(v.lastIndex=0,v.test(r))))return``;a!==!1&&(a||=i,r=a.process(r))}return r=D(r),r}var d=/</g,f=/>/g,p=/"/g,m=/"/g,h=/&#([a-zA-Z0-9]*);?/gim,g=/:?/gim,_=/&newline;?/gim,v=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,y=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function x(e){return e.replace(p,`"`)}function S(e){return e.replace(m,`"`)}function C(e){return e.replace(h,function(e,t){return t[0]===`x`||t[0]===`X`?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function w(e){return e.replace(g,`:`).replace(_,` `)}function T(e){for(var t=``,r=0,i=e.length;r<i;r++)t+=e.charCodeAt(r)<32?` `:e.charAt(r);return n.trim(t)}function E(e){return e=S(e),e=C(e),e=w(e),e=T(e),e}function D(e){return e=x(e),e=l(e),e}function O(){return``}function ee(e,t){typeof t!=`function`&&(t=function(){});var r=!Array.isArray(e);function i(t){return r?!0:n.indexOf(e,t)!==-1}var a=[],o=!1;return{onIgnoreTag:function(e,n,r){if(i(e))if(r.isClosing){var s=`[/removed]`,c=r.position+s.length;return a.push([o===!1?r.position:o,c]),o=!1,s}else return o||=r.position,`[removed]`;else return t(e,n,r)},remove:function(e){var t=``,r=0;return n.forEach(a,function(n){t+=e.slice(r,n[0]),r=n[1]}),t+=e.slice(r),t}}}function k(e){for(var t=``,n=0;n<e.length;){var r=e.indexOf(`<!--`,n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var i=e.indexOf(`-->`,r);if(i===-1)break;n=i+3}return t}function A(e){var t=e.split(``);return t=t.filter(function(e){var t=e.charCodeAt(0);return t===127?!1:t<=31?t===10||t===13:!0}),t.join(``)}return n2.whiteList=r(),n2.getDefaultWhiteList=r,n2.onTag=a,n2.onIgnoreTag=o,n2.onTagAttr=s,n2.onIgnoreTagAttr=c,n2.safeAttrValue=u,n2.escapeHtml=l,n2.escapeQuote=x,n2.unescapeQuote=S,n2.escapeHtmlEntities=C,n2.escapeDangerHtml5Entities=w,n2.clearNonPrintableCharacter=T,n2.friendlyAttrValue=E,n2.escapeAttrValue=D,n2.onIgnoreTagStripAll=O,n2.StripTagBody=ee,n2.stripCommentTag=k,n2.stripBlankChar=A,n2.attributeWrapSign=`"`,n2.cssFilter=i,n2.getDefaultCSSWhiteList=t,n2}var C2={},w2;function T2(){if(w2)return C2;w2=1;var e=b2();function t(t){var n=e.spaceIndex(t),r=n===-1?t.slice(1,-1):t.slice(1,n+1);return r=e.trim(r).toLowerCase(),r.slice(0,1)===`/`&&(r=r.slice(1)),r.slice(-1)===`/`&&(r=r.slice(0,-1)),r}function n(e){return e.slice(0,2)===`</`}function r(e,r,i){var a=``,o=0,s=!1,c=!1,l=0,u=e.length,d=``,f=``;chariterator:for(l=0;l<u;l++){var p=e.charAt(l);if(s===!1){if(p===`<`){s=l;continue}}else if(c===!1){if(p===`<`){a+=i(e.slice(o,l)),s=l,o=l;continue}if(p===`>`||l===u-1){a+=i(e.slice(o,s)),f=e.slice(s,l+1),d=t(f),a+=r(s,a.length,d,f,n(f)),o=l+1,s=!1;continue}if(p===`"`||p===`'`)for(var m=1,h=e.charAt(l-m);h.trim()===``||h===`=`;){if(h===`=`){c=p;continue chariterator}h=e.charAt(l-++m)}}else if(p===c){c=!1;continue}}return o<u&&(a+=i(e.substr(o))),a}var i=/[^a-zA-Z0-9\\_:.-]/gim;function a(t,n){var r=0,a=0,l=[],d=!1,f=t.length;function p(t,r){if(t=e.trim(t),t=t.replace(i,``).toLowerCase(),!(t.length<1)){var a=n(t,r||``);a&&l.push(a)}}for(var m=0;m<f;m++){var h=t.charAt(m),g,_;if(d===!1&&h===`=`){d=t.slice(r,m),r=m+1,a=t.charAt(r)===`"`||t.charAt(r)===`'`?r:s(t,m+1);continue}if(d!==!1&&m===a){if(_=t.indexOf(h,m+1),_===-1)break;g=e.trim(t.slice(a+1,_)),p(d,g),d=!1,m=_,r=m+1;continue}if(/\s|\n|\t/.test(h))if(t=t.replace(/\s|\n|\t/g,` `),d===!1)if(_=o(t,m),_===-1){g=e.trim(t.slice(r,m)),p(g),d=!1,r=m+1;continue}else{m=_-1;continue}else if(_=c(t,m-1),_===-1){g=e.trim(t.slice(r,m)),g=u(g),p(d,g),d=!1,r=m+1;continue}else continue}return r<t.length&&(d===!1?p(t.slice(r)):p(d,u(e.trim(t.slice(r))))),e.trim(l.join(` `))}function o(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function s(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`'`||n===`"`?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function l(e){return e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`}function u(e){return l(e)?e.substr(1,e.length-2):e}return C2.parseTag=r,C2.parseAttr=a,C2}var E2,D2;function O2(){if(D2)return E2;D2=1;var e=_2().FilterCSS,t=S2(),n=T2(),r=n.parseTag,i=n.parseAttr,a=b2();function o(e){return e==null}function s(e){var t=a.spaceIndex(e);if(t===-1)return{html:``,closing:e[e.length-2]===`/`};e=a.trim(e.slice(t+1,-1));var n=e[e.length-1]===`/`;return n&&(e=a.trim(e.slice(0,-1))),{html:e,closing:n}}function c(e){var t={};for(var n in e)t[n]=e[n];return t}function l(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(e){return e.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function u(n){n=c(n||{}),n.stripIgnoreTag&&(n.onIgnoreTag&&console.error(`Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time`),n.onIgnoreTag=t.onIgnoreTagStripAll),n.whiteList||n.allowList?n.whiteList=l(n.whiteList||n.allowList):n.whiteList=t.whiteList,this.attributeWrapSign=n.singleQuotedAttributeValue===!0?`'`:t.attributeWrapSign,n.onTag=n.onTag||t.onTag,n.onTagAttr=n.onTagAttr||t.onTagAttr,n.onIgnoreTag=n.onIgnoreTag||t.onIgnoreTag,n.onIgnoreTagAttr=n.onIgnoreTagAttr||t.onIgnoreTagAttr,n.safeAttrValue=n.safeAttrValue||t.safeAttrValue,n.escapeHtml=n.escapeHtml||t.escapeHtml,this.options=n,n.css===!1?this.cssFilter=!1:(n.css=n.css||{},this.cssFilter=new e(n.css))}return u.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var n=this,c=n.options,l=c.whiteList,u=c.onTag,d=c.onIgnoreTag,f=c.onTagAttr,p=c.onIgnoreTagAttr,m=c.safeAttrValue,h=c.escapeHtml,g=n.attributeWrapSign,_=n.cssFilter;c.stripBlankChar&&(e=t.stripBlankChar(e)),c.allowCommentTag||(e=t.stripCommentTag(e));var v=!1;c.stripIgnoreTagBody&&(v=t.StripTagBody(c.stripIgnoreTagBody,d),d=v.onIgnoreTag);var y=r(e,function(e,t,n,r,c){var v={sourcePosition:e,position:t,isClosing:c,isWhite:Object.prototype.hasOwnProperty.call(l,n)},y=u(n,r,v);if(!o(y))return y;if(v.isWhite){if(v.isClosing)return`</`+n+`>`;var b=s(r),x=l[n],S=i(b.html,function(e,t){var r=a.indexOf(x,e)!==-1,i=f(n,e,t,r);return o(i)?r?(t=m(n,e,t,_),t?e+`=`+g+t+g:e):(i=p(n,e,t,r),o(i)?void 0:i):i});return r=`<`+n,S&&(r+=` `+S),b.closing&&(r+=` /`),r+=`>`,r}else return y=d(n,r,v),o(y)?h(r):y},h);return v&&(y=v.remove(y)),y},E2=u,E2}var k2;function A2(){return k2?t2.exports:(k2=1,(function(e,t){var n=S2(),r=T2(),i=O2();function a(e,t){return new i(t).process(e)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,(function(){for(var e in n)t[e]=n[e];for(var i in r)t[i]=r[i]})(),typeof window<`u`&&(window.filterXSS=e.exports);function o(){return typeof self<`u`&&typeof DedicatedWorkerGlobalScope<`u`&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=e.exports)})(t2,t2.exports),t2.exports)}var j2=iP(A2()),M2=[];for(let e=0;e<256;++e)M2.push((e+256).toString(16).slice(1));function N2(e,t=0){return(M2[e[t+0]]+M2[e[t+1]]+M2[e[t+2]]+M2[e[t+3]]+`-`+M2[e[t+4]]+M2[e[t+5]]+`-`+M2[e[t+6]]+M2[e[t+7]]+`-`+M2[e[t+8]]+M2[e[t+9]]+`-`+M2[e[t+10]]+M2[e[t+11]]+M2[e[t+12]]+M2[e[t+13]]+M2[e[t+14]]+M2[e[t+15]]).toLowerCase()}var P2,F2=new Uint8Array(16);function I2(){if(!P2){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);P2=crypto.getRandomValues.bind(crypto)}return P2(F2)}var L2={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function R2(e,t,n){e||={};let r=e.random??e.rng?.()??I2();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,N2(r)}function z2(e,t,n){return L2.randomUUID&&!e?L2.randomUUID():R2(e)}function B2(e,t){var n=WK(e);if(YB){var r=YB(e);t&&(r=mV(r).call(r,function(t){return DV(e,t).enumerable})),n.push.apply(n,r)}return n}function V2(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Q(n=B2(Object(i),!0)).call(n,function(t){qG(e,t,i[t])}):KV?aH(e,KV(i)):Q(r=B2(Object(i))).call(r,function(t){JK(e,t,DV(i,t))})}return e}function H2(e){if(!e)return!1;let t=e.idProp??e._idProp;return t?wte(t,e):!1}var U2=/^\/?Date\((-?\d+)/i,W2=/^\d+$/;function G2(e,t){let n;if(e!==void 0){if(e===null)return null;if(!t)return e;if(typeof t!=`string`&&!(t instanceof String))throw Error(`Type must be a string`);switch(t){case`boolean`:case`Boolean`:return!!e;case`number`:case`Number`:return X1(e)&&!isNaN(Date.parse(e))?K(e).valueOf():Number(e.valueOf());case`string`:case`String`:return String(e);case`Date`:try{return G2(e,`Moment`).toDate()}catch(n){throw n instanceof TypeError?TypeError(`Cannot convert object of type `+s0(e)+` to type `+t):n}case`Moment`:if(J1(e))return K(e);if(e instanceof Date)return K(e.valueOf());if(K.isMoment(e))return K(e);if(X1(e))return n=U2.exec(e),n?K(Number(n[1])):(n=W2.exec(e),K(n?Number(e):e));throw TypeError(`Cannot convert object of type `+s0(e)+` to type `+t);case`ISODate`:if(J1(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(K.isMoment(e))return e.toDate().toISOString();if(X1(e))return n=U2.exec(e),n?new Date(Number(n[1])).toISOString():K(e).format();throw Error(`Cannot convert object of type `+s0(e)+` to type ISODate`);case`ASPDate`:if(J1(e))return`/Date(`+e+`)/`;if(e instanceof Date||K.isMoment(e))return`/Date(`+e.valueOf()+`)/`;if(X1(e)){n=U2.exec(e);let t;return t=n?new Date(Number(n[1])).valueOf():new Date(e).valueOf(),`/Date(`+t+`)/`}else throw Error(`Cannot convert object of type `+s0(e)+` to type ASPDate`);default:throw Error(`Unknown type ${t}`)}}}function K2(e){var t,n,r,i,a,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{start:`Date`,end:`Date`},c=e._idProp,l=new PD({fieldId:c}),u=lK(t=Pee(e)).call(t,e=>{var t;return jK(t=WK(e)).call(t,(t,n)=>(t[n]=G2(e[n],s[n]),t),{})}).to(l);return u.all().start(),{add:function(){return e.getDataSet().add(...arguments)},remove:function(){return e.getDataSet().remove(...arguments)},update:function(){return e.getDataSet().update(...arguments)},updateOnly:function(){return e.getDataSet().updateOnly(...arguments)},clear:function(){return e.getDataSet().clear(...arguments)},forEach:Z(n=Q(l)).call(n,l),get:Z(r=l.get).call(r,l),getIds:Z(i=l.getIds).call(i,l),off:Z(a=l.off).call(a,l),on:Z(o=l.on).call(o,l),get length(){return l.length},idProp:c,type:s,rawDS:e,coercedDS:l,dispose:()=>u.stop()}}var q2=e=>{let t=new j2.FilterXSS(e);return e=>typeof e==`string`?t.process(e):e},J2=e=>e,Y2=q2(),$=V2(V2({},e2),{},{convert:G2,setupXSSProtection:e=>{e&&(e.disabled===!0?(Y2=J2,console.warn(`You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!`)):e.filterOptions&&(Y2=q2(e.filterOptions)))}});JK($,`xss`,{get:function(){return Y2}});var X2={},Z2,Q2;function $2(){if(Q2)return Z2;Q2=1;var e=cP(),t=dP(),n=bP(),r=az(),i=fX().trim,a=lX(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return Z2=1/s(a+`-0`)!=-1/0||l&&!t(function(){s(Object(l))})?function(e){var t=i(r(e)),n=s(t);return n===0&&o(t,0)===`-`?-0:n}:s,Z2}var e4;function t4(){if(e4)return X2;e4=1;var e=X(),t=$2();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),X2}var n4,r4;function i4(){return r4?n4:(r4=1,t4(),n4=oF().parseFloat,n4)}var a4,o4;function s4(){return o4?a4:(o4=1,a4=i4(),a4)}var c4,l4;function u4(){return l4?c4:(l4=1,c4=s4(),c4)}var d4=iP(u4()),f4=class{constructor(){this.options=null,this.props=null}setOptions(e){e&&$.extend(this.options,e)}redraw(){return!1}destroy(){}_isResized(){let e=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,e}},p4={},m4;function h4(){return m4?p4:(m4=1,X()({target:`String`,proto:!0},{repeat:yZ()}),p4)}var g4,_4;function v4(){return _4?g4:(_4=1,h4(),g4=gL()(`String`,`repeat`),g4)}var y4,b4;function x4(){if(b4)return y4;b4=1;var e=fF(),t=v4(),n=String.prototype;return y4=function(r){var i=r.repeat;return typeof r==`string`||r===n||e(n,r)&&i===n.repeat?t:i},y4}var S4,C4;function w4(){return C4?S4:(C4=1,S4=x4(),S4)}var T4,E4;function D4(){return E4?T4:(E4=1,T4=w4(),T4)}var O4=iP(D4()),k4={},A4,j4;function M4(){if(j4)return A4;j4=1;var e=cL(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return A4=n,A4}var N4,P4;function F4(){if(P4)return N4;P4=1;var e=hF().match(/firefox\/(\d+)/i);return N4=!!e&&+e[1],N4}var I4,L4;function R4(){if(L4)return I4;L4=1;var e=hF();return I4=/MSIE|Trident/.test(e),I4}var z4,B4;function V4(){if(B4)return z4;B4=1;var e=hF().match(/AppleWebKit\/(\d+)\./);return z4=!!e&&+e[1],z4}var H4;function U4(){if(H4)return k4;H4=1;var e=X(),t=bP(),n=NF(),r=eI(),i=vR(),a=lJ(),o=az(),s=dP(),c=M4(),l=IR(),u=F4(),d=R4(),f=vF(),p=V4(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),k4}var W4,G4;function K4(){return G4?W4:(G4=1,U4(),W4=gL()(`Array`,`sort`),W4)}var q4,J4;function Y4(){if(J4)return q4;J4=1;var e=fF(),t=K4(),n=Array.prototype;return q4=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},q4}var X4,Z4;function Q4(){return Z4?X4:(Z4=1,X4=Y4(),X4)}var $4,e3;function t3(){return e3?$4:(e3=1,$4=Q4(),$4)}var n3=iP(t3());function r3(e,t,n){if(n&&!iL(n))return r3(e,t,[n]);if(t.hiddenDates=[],n&&iL(n)==1){var r;for(let r=0;r<n.length;r++)if(O4(n[r])===void 0){let i={};i.start=e(n[r].start).toDate().valueOf(),i.end=e(n[r].end).toDate().valueOf(),t.hiddenDates.push(i)}n3(r=t.hiddenDates).call(r,(e,t)=>e.start-t.start)}}function i3(e,t,n){if(n&&!iL(n))return i3(e,t,[n]);if(n&&t.domProps.centerContainer.width!==void 0){r3(e,t,n);let r=e(t.range.start),i=e(t.range.end),a=(t.range.end-t.range.start)/t.domProps.centerContainer.width;for(let o=0;o<n.length;o++)if(O4(n[o])!==void 0){let s=e(n[o].start),c=e(n[o].end);if(s._d==`Invalid Date`)throw Error(`Supplied start date is not valid: ${n[o].start}`);if(c._d==`Invalid Date`)throw Error(`Supplied end date is not valid: ${n[o].end}`);if(c-s>=4*a){let e=0,a=i.clone();switch(O4(n[o])){case`daily`:s.day()!=c.day()&&(e=1),s=s.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7,`days`),c=c.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7-e,`days`),a.add(1,`weeks`);break;case`weekly`:{let e=c.diff(s,`days`),t=s.day();s=s.date(r.date()).month(r.month()).year(r.year()),c=s.clone(),s=s.day(t).subtract(1,`weeks`),c=c.day(t).add(e,`days`).subtract(1,`weeks`),a.add(1,`weeks`);break}case`monthly`:s.month()!=c.month()&&(e=1),s=s.month(r.month()).year(r.year()).subtract(1,`months`),c=c.month(r.month()).year(r.year()).subtract(1,`months`).add(e,`months`),a.add(1,`months`);break;case`yearly`:s.year()!=c.year()&&(e=1),s=s.year(r.year()).subtract(1,`years`),c=c.year(r.year()).subtract(1,`years`).add(e,`years`),a.add(1,`years`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,O4(n[o]));return}for(;s<a;)switch(t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()}),O4(n[o])){case`daily`:s=s.add(1,`days`),c=c.add(1,`days`);break;case`weekly`:s=s.add(1,`weeks`),c=c.add(1,`weeks`);break;case`monthly`:s=s.add(1,`months`),c=c.add(1,`months`);break;case`yearly`:s=s.add(1,`y`),c=c.add(1,`y`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,O4(n[o]));return}t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()})}}a3(t);let o=h3(t.range.start,t.hiddenDates),s=h3(t.range.end,t.hiddenDates),c=t.range.start,l=t.range.end;o.hidden==1&&(c=t.range.startToFront==1?o.startDate-1:o.endDate+1),s.hidden==1&&(l=t.range.endToFront==1?s.startDate-1:s.endDate+1),(o.hidden==1||s.hidden==1)&&t.range._applyRange(c,l)}}function a3(e){var t;let n=e.hiddenDates,r=[];for(var i=0;i<n.length;i++)for(let e=0;e<n.length;e++)i!=e&&n[e].remove!=1&&n[i].remove!=1&&(n[e].start>=n[i].start&&n[e].end<=n[i].end?n[e].remove=!0:n[e].start>=n[i].start&&n[e].start<=n[i].end?(n[i].end=n[e].end,n[e].remove=!0):n[e].end>=n[i].start&&n[e].end<=n[i].end&&(n[i].start=n[e].start,n[e].remove=!0));for(i=0;i<n.length;i++)n[i].remove!==!0&&r.push(n[i]);e.hiddenDates=r,n3(t=e.hiddenDates).call(t,(e,t)=>e.start-t.start)}function o3(e,t,n){let r=!1,i=t.current.valueOf();for(let e=0;e<t.hiddenDates.length;e++){let n=t.hiddenDates[e].start;var a=t.hiddenDates[e].end;if(i>=n&&i<a){r=!0;break}}if(r==1&&i<t._end.valueOf()&&i!=n){let r=e(n),i=e(a);r.year()==i.year()?r.month()==i.month()?r.dayOfYear()!=i.dayOfYear()&&(t.switchedDay=!0):t.switchedMonth=!0:t.switchedYear=!0,t.current=i}}function s3(e,t,n){let r;if(e.body.hiddenDates.length==0)return r=e.range.conversion(n),(t.valueOf()-r.offset)*r.scale;{let i=h3(t,e.body.hiddenDates);i.hidden==1&&(t=i.startDate);let a=l3(e.body.hiddenDates,e.range.start,e.range.end);if(t<e.range.start){r=e.range.conversion(n,a);let i=u3(e.body.hiddenDates,t,r.offset);return t=e.options.moment(t).toDate().valueOf(),t+=i,-(r.offset-t.valueOf())*r.scale}else if(t>e.range.end){let i={start:e.range.start,end:t};return t=d3(e.options.moment,e.body.hiddenDates,i,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}else return t=d3(e.options.moment,e.body.hiddenDates,e.range,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}}function c3(e,t,n){if(e.body.hiddenDates.length==0){let r=e.range.conversion(n);return new Date(t/r.scale+r.offset)}else{let r=l3(e.body.hiddenDates,e.range.start,e.range.end),i=(e.range.end-e.range.start-r)*t/n,a=p3(e.body.hiddenDates,e.range,i);return new Date(a+i+e.range.start)}}function l3(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<n&&(r+=o-a)}return r}function u3(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<=n&&(r+=o-a)}return r}function d3(e,t,n,r){return r=e(r).toDate().valueOf(),r-=f3(e,t,n,r),r}function f3(e,t,n,r){let i=0;r=e(r).toDate().valueOf();for(let e=0;e<t.length;e++){let a=t[e].start,o=t[e].end;a>=n.start&&o<n.end&&r>=o&&(i+=o-a)}return i}function p3(e,t,n){let r=0,i=0,a=t.start;for(let o=0;o<e.length;o++){let s=e[o].start,c=e[o].end;if(s>=t.start&&c<t.end){if(i+=s-a,a=c,i>=n)break;r+=c-s}}return r}function m3(e,t,n,r){let i=h3(t,e);return i.hidden==1?n<0?r==1?i.startDate-(i.endDate-t)-1:i.startDate-1:r==1?i.endDate+(t-i.startDate)+1:i.endDate+1:t}function h3(e,t){for(let i=0;i<t.length;i++){var n=t[i].start,r=t[i].end;if(e>=n&&e<r)return{hidden:!0,startDate:n,endDate:r}}return{hidden:!1,startDate:n,endDate:r}}var g3=class e extends f4{constructor(e,t){var n,r,i,a,o,s,c;super();let l=ez().hours(0).minutes(0).seconds(0).milliseconds(0),u=l.clone().add(-3,`days`).valueOf(),d=l.clone().add(3,`days`).valueOf();this.millisecondsPerPixelCache=void 0,t===void 0?(this.start=u,this.end=d):(this.start=t.start||u,this.end=t.end||d),this.rolling=!1,this.body=e,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:ez,direction:`horizontal`,moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:1e3*60*60*24*365*1e4,rollingMode:{follow:!1,offset:.5}},this.options=$.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on(`panstart`,Z(n=this._onDragStart).call(n,this)),this.body.emitter.on(`panmove`,Z(r=this._onDrag).call(r,this)),this.body.emitter.on(`panend`,Z(i=this._onDragEnd).call(i,this)),this.body.emitter.on(`mousewheel`,Z(a=this._onMouseWheel).call(a,this)),this.body.emitter.on(`touch`,Z(o=this._onTouch).call(o,this)),this.body.emitter.on(`pinch`,Z(s=this._onPinch).call(s,this)),this.body.dom.rollingModeBtn.addEventListener(`click`,Z(c=this.startRolling).call(c,this)),this.setOptions(t)}setOptions(e){e&&($.selectiveExtend([`animation`,`direction`,`min`,`max`,`zoomMin`,`zoomMax`,`moveable`,`zoomable`,`moment`,`activate`,`hiddenDates`,`zoomKey`,`zoomFriction`,`rtl`,`showCurrentTime`,`rollingMode`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`],this.options,e),e.rollingMode&&e.rollingMode.follow&&this.startRolling(),(`start`in e||`end`in e)&&this.setRange(e.start,e.end))}startRolling(){let e=this;function t(){e.stopRolling(),e.rolling=!0;let n=e.end-e.start,r=$.convert(new Date,`Date`).valueOf(),i=e.options.rollingMode&&e.options.rollingMode.offset||.5,a=r-n*i,o=r+n*(1-i);e.setRange(a,o,{animation:!1}),n=1/e.conversion(e.body.domProps.center.width).scale/10,n<30&&(n=30),n>1e3&&(n=1e3),e.body.dom.rollingModeBtn.style.visibility=`hidden`,e.currentTimeTimer=$L(t,n)}t()}stopRolling(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility=`visible`)}setRange(e,t,n,r,i){n||={},n.byUser!==!0&&(n.byUser=!1);let a=this,o=e==null?null:$.convert(e,`Date`).valueOf(),s=t==null?null:$.convert(t,`Date`).valueOf();if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,n.animation){let e=this.start,t=this.end,u=typeof n.animation==`object`&&`duration`in n.animation?n.animation.duration:500,d=typeof n.animation==`object`&&`easingFunction`in n.animation?n.animation.easingFunction:`easeInOutQuad`,f=$.easingFunctions[d];if(!f){var c;throw Error(UY(c=`Unknown easing function ${LZ(d)}. Choose from: `).call(c,WK($.easingFunctions).join(`, `)))}let p=Bq(),m=!1,h=()=>{if(!a.props.touch.dragging){let c=Bq()-p,d=f(c/u),g=c>u,_=g||o===null?o:e+(o-e)*d,v=g||s===null?s:t+(s-t)*d;l=a._applyRange(_,v),i3(a.options.moment,a.body,a.options.hiddenDates),m||=l;let y={start:new Date(a.start),end:new Date(a.end),byUser:n.byUser,event:n.event};if(i&&i(d,l,g),l&&a.body.emitter.emit(`rangechange`,y),g){if(m&&(a.body.emitter.emit(`rangechanged`,y),r))return r()}else a.animationTimer=$L(h,20)}};return h()}else{var l=this._applyRange(o,s);if(i3(this.options.moment,this.body,this.options.hiddenDates),l){let e={start:new Date(this.start),end:new Date(this.end),byUser:n.byUser,event:n.event};if(this.body.emitter.emit(`rangechange`,e),clearTimeout(a.timeoutID),a.timeoutID=$L(()=>{a.body.emitter.emit(`rangechanged`,e)},200),r)return r()}}}getMillisecondsPerPixel(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&=(clearTimeout(this.animationTimer),null)}_applyRange(e,t){let n=e==null?this.start:$.convert(e,`Date`).valueOf(),r=t==null?this.end:$.convert(t,`Date`).valueOf(),i=this.options.max==null?null:$.convert(this.options.max,`Date`).valueOf(),a=this.options.min==null?null:$.convert(this.options.min,`Date`).valueOf(),o;if(isNaN(n)||n===null)throw Error(`Invalid start "${e}"`);if(isNaN(r)||r===null)throw Error(`Invalid end "${t}"`);if(r<n&&(r=n),a!==null&&n<a&&(o=a-n,n+=o,r+=o,i!=null&&r>i&&(r=i)),i!==null&&r>i&&(o=r-i,n-=o,r-=o,a!=null&&n<a&&(n=a)),this.options.zoomMin!==null){let e=d4(this.options.zoomMin);e<0&&(e=0),r-n<e&&(this.end-this.start===e&&n>=this.start-.5&&r<=this.end?(n=this.start,r=this.end):(o=e-(r-n),n-=o/2,r+=o/2))}if(this.options.zoomMax!==null){let e=d4(this.options.zoomMax);e<0&&(e=0),r-n>e&&(this.end-this.start===e&&n<this.start&&r>this.end?(n=this.start,r=this.end):(o=r-n-e,n+=o/2,r-=o/2))}let s=this.start!=n||this.end!=r;return!(n>=this.start&&n<=this.end||r>=this.start&&r<=this.end)&&!(this.start>=n&&this.start<=r||this.end>=n&&this.end<=r)&&this.body.emitter.emit(`checkRangedItems`),this.start=n,this.end=r,s}getRange(){return{start:this.start,end:this.end}}conversion(t,n){return e.conversion(this.start,this.end,t,n)}static conversion(e,t,n,r){return r===void 0&&(r=0),n!=0&&t-e!=0?{offset:e,scale:n/(t-e-r)}:{offset:0,scale:1}}_onDragStart(e){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(e)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor=`move`))}_onDrag(e){if(!e||!this.props.touch.dragging||!this.options.moveable||!this.props.touch.allowDragging)return;let t=this.options.direction;_3(t);let n=t==`horizontal`?e.deltaX:e.deltaY;n-=this.deltaDifference;let r=this.props.touch.end-this.props.touch.start,i=l3(this.body.hiddenDates,this.start,this.end);r-=i;let a=t==`horizontal`?this.body.domProps.center.width:this.body.domProps.center.height,o;o=this.options.rtl?n/a*r:-n/a*r;let s=this.props.touch.start+o,c=this.props.touch.end+o,l=m3(this.body.hiddenDates,s,this.previousDelta-n,!0),u=m3(this.body.hiddenDates,c,this.previousDelta-n,!0);if(l!=s||u!=c){this.deltaDifference+=n,this.props.touch.start=l,this.props.touch.end=u,this._onDrag(e);return}this.previousDelta=n,this._applyRange(s,c);let d=new Date(this.start),f=new Date(this.end);this.body.emitter.emit(`rangechange`,{start:d,end:f,byUser:!0,event:e}),this.body.emitter.emit(`panmove`)}_onDragEnd(e){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor=`auto`),this.body.emitter.emit(`rangechanged`,{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:e}))}_onMouseWheel(e){let t=0;if(e.wheelDelta?t=e.wheelDelta/120:e.detail?t=-e.detail/3:e.deltaY&&(t=-e.deltaY/3),!(this.options.zoomKey&&!e[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(e)&&t){let n=this.options.zoomFriction||5,r;r=t<0?1-t/n:1/(1+t/n);let i;if(this.rolling){let e=this.options.rollingMode&&this.options.rollingMode.offset||.5;i=this.start+(this.end-this.start)*e}else{let t=this.getPointer({x:e.clientX,y:e.clientY},this.body.dom.center);i=this._pointerToDate(t)}this.zoom(r,i,t,e),e.preventDefault()}}_onTouch(e){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,$.preventDefault(e)}_onPinch(e){if(!(this.options.zoomable&&this.options.moveable))return;$.preventDefault(e),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(e.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();let t=1/(e.scale+this.scaleOffset),n=this.props.touch.centerDate,r=l3(this.body.hiddenDates,this.start,this.end),i=f3(this.options.moment,this.body.hiddenDates,this,n),a=r-i,o=n-i+(this.props.touch.start-(n-i))*t,s=n+a+(this.props.touch.end-(n+a))*t;this.startToFront=1-t<=0,this.endToFront=t-1<=0;let c=m3(this.body.hiddenDates,o,1-t,!0),l=m3(this.body.hiddenDates,s,t-1,!0);(c!=o||l!=s)&&(this.props.touch.start=c,this.props.touch.end=l,this.scaleOffset=1-e.scale,o=c,s=l);let u={animation:!1,byUser:!0,event:e};this.setRange(o,s,u),this.startToFront=!1,this.endToFront=!0}_isInsideRange(e){let t=e.center?e.center.x:e.clientX,n=this.body.dom.centerContainer.getBoundingClientRect(),r=this.options.rtl?t-n.left:n.right-t,i=this.body.util.toTime(r);return i>=this.start&&i<=this.end}_pointerToDate(e){let t,n=this.options.direction;if(_3(n),n==`horizontal`)return this.body.util.toTime(e.x).valueOf();{let n=this.body.domProps.center.height;return t=this.conversion(n),e.y/t.scale+t.offset}}getPointer(e,t){let n=t.getBoundingClientRect();return this.options.rtl?{x:n.right-e.x,y:e.y-n.top}:{x:e.x-n.left,y:e.y-n.top}}zoom(e,t,n,r){t??=(this.start+this.end)/2;let i=l3(this.body.hiddenDates,this.start,this.end),a=f3(this.options.moment,this.body.hiddenDates,this,t),o=i-a,s=t-a+(this.start-(t-a))*e,c=t+o+(this.end-(t+o))*e;this.startToFront=!(n>0),this.endToFront=!(-n>0);let l=m3(this.body.hiddenDates,s,n,!0),u=m3(this.body.hiddenDates,c,-n,!0);(l!=s||u!=c)&&(s=l,c=u);let d={animation:!1,byUser:!0,event:r};this.setRange(s,c,d),this.startToFront=!1,this.endToFront=!0}move(e){let t=this.end-this.start,n=this.start+t*e,r=this.end+t*e;this.start=n,this.end=r}moveTo(e){let t=(this.start+this.end)/2-e,n=this.start-t,r=this.end-t;this.setRange(n,r,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}};function _3(e){if(e!=`horizontal`&&e!=`vertical`)throw TypeError(`Unknown direction "${e}". Choose "horizontal" or "vertical".`)}var v3={},y3;function b3(){if(y3)return v3;y3=1;var e=X(),t=NR().some;return e({target:`Array`,proto:!0,forced:!IR()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),v3}var x3,S3;function C3(){return S3?x3:(S3=1,b3(),x3=gL()(`Array`,`some`),x3)}var w3,T3;function E3(){if(T3)return w3;T3=1;var e=fF(),t=C3(),n=Array.prototype;return w3=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},w3}var D3,O3;function k3(){return O3?D3:(O3=1,D3=E3(),D3)}var A3,j3;function M3(){return j3?A3:(j3=1,A3=k3(),A3)}var N3=iP(M3()),P3,F3;function I3(){return F3?P3:(F3=1,KL(),P3=oF().setInterval,P3)}var L3,R3;function z3(){return R3?L3:(R3=1,L3=I3(),L3)}var B3=iP(z3()),V3=null;function H3(e,t){var n=t||{preventDefault:!1};if(e.Manager){var r=e,i=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),H3(new r(e,i),i)};return r.assign(i,r),i.Manager=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),H3(new r.Manager(e,i),i)},i}var a=Object.create(e),o=e.element;o.hammer||=[],o.hammer.push(a),e.on(`hammer.input`,function(e){(n.preventDefault===!0||n.preventDefault===e.pointerType)&&e.preventDefault(),e.isFirst&&(V3=e.target)}),a._handlers={},a.on=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r||(a._handlers[t]=r=[],e.on(t,c)),r.push(n)}),a},a.off=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r&&(r=n?r.filter(function(e){return e!==n}):[],r.length>0?a._handlers[t]=r:(e.off(t,c),delete a._handlers[t]))}),a},a.emit=function(t,n){V3=n.target,e.emit(t,n)},a.destroy=function(){var t=e.element.hammer,n=t.indexOf(a);n!==-1&&t.splice(n,1),t.length||delete e.element.hammer,a._handlers={},e.destroy()};function s(e){return e.match(/[^ ]+/g)}function c(e){if(e.type!==`hammer.input`){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);typeof n==`function`&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=V3;for(var r=V3.isConnected?V3:e.target;r&&!t;){var i=r.hammer;if(i){for(var a,o=0;o<i.length;o++)if(a=i[o]._handlers[e.type],a)for(var s=0;s<a.length&&!t;s++)a[s](e)}r=r.parentNode}}return a}function U3(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var W3=typeof window<`u`?H3(window.Hammer||O1,{preventDefault:`mouse`}):function(){return U3()};function G3(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function K3(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}function q3(e){return e.getTouchAction=function(){return[`pan-y`]},e}var J3=class e{constructor(t,n,r,i,a){this.moment=a&&a.moment||ez,this.options=a||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale=`day`,this.step=1,this.setRange(t,n,r),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,iL(i)?this.hiddenDates=i:i==null?this.hiddenDates=[]:this.hiddenDates=[i],this.format=e.FORMAT}setMoment(e){this.moment=e,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){let n=$.deepExtend({},e.FORMAT);this.format=$.deepExtend(n,t)}setRange(e,t,n){if(!(e instanceof Date)||!(t instanceof Date))throw`No legal start or end date in method setRange`;this._start=e==null?Bq():this.moment(e.valueOf()),this._end=t==null?Bq():this.moment(t.valueOf()),this.autoScale&&this.setMinimumStep(n)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch(this.scale==`week`&&this.current.weekday(0),this.scale){case`year`:this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case`month`:this.current=this.current.date(1);case`week`:case`day`:case`weekday`:this.current=this.current.hours(0);case`hour`:this.current=this.current.minutes(0);case`minute`:this.current=this.current.seconds(0);case`second`:this.current=this.current.milliseconds(0)}if(this.step!=1){let e=this.current.clone();switch(this.scale){case`millisecond`:this.current=this.current.subtract(this.current.milliseconds()%this.step,`milliseconds`);break;case`second`:this.current=this.current.subtract(this.current.seconds()%this.step,`seconds`);break;case`minute`:this.current=this.current.subtract(this.current.minutes()%this.step,`minutes`);break;case`hour`:this.current=this.current.subtract(this.current.hours()%this.step,`hours`);break;case`weekday`:case`day`:this.current=this.current.subtract((this.current.date()-1)%this.step,`day`);break;case`week`:this.current=this.current.subtract(this.current.week()%this.step,`week`);break;case`month`:this.current=this.current.subtract(this.current.month()%this.step,`month`);break;case`year`:this.current=this.current.subtract(this.current.year()%this.step,`year`);break}e.isSame(this.current)||(this.current=this.moment(m3(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){let e=this.current.valueOf();switch(this.scale){case`millisecond`:this.current=this.current.add(this.step,`millisecond`);break;case`second`:this.current=this.current.add(this.step,`second`);break;case`minute`:this.current=this.current.add(this.step,`minute`);break;case`hour`:this.current=this.current.add(this.step,`hour`),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,`hour`):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,`hour`));break;case`weekday`:case`day`:this.current=this.current.add(this.step,`day`);break;case`week`:if(this.current.weekday()!==0)this.current=this.current.weekday(0).add(this.step,`week`);else if(this.options.showMajorLabels===!1)this.current=this.current.add(this.step,`week`);else{let e=this.current.clone();e.add(1,`week`),e.isSame(this.current,`month`)?this.current=this.current.add(this.step,`week`):this.current=this.current.add(this.step,`week`).date(1)}break;case`month`:this.current=this.current.add(this.step,`month`);break;case`year`:this.current=this.current.add(this.step,`year`);break}if(this.step!=1)switch(this.scale){case`millisecond`:this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case`second`:this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case`minute`:this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case`hour`:this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case`weekday`:case`day`:this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case`week`:this.current.week()<this.step&&(this.current=this.current.week(1));break;case`month`:this.current.month()<this.step&&(this.current=this.current.month(0));break}this.current.valueOf()==e&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,o3(this.moment,this,e)}getCurrent(){return this.current.clone()}setScale(e){e&&typeof e.scale==`string`&&(this.scale=e.scale,this.step=e.step>0?e.step:1,this.autoScale=!1)}setAutoScale(e){this.autoScale=e}setMinimumStep(e){if(e==null)return;let t=1e3*60*60*24*30*12,n=1e3*60*60*24*30,r=1e3*60*60*24,i=1e3*60*60,a=1e3*60,o=1e3;t*1e3>e&&(this.scale=`year`,this.step=1e3),t*500>e&&(this.scale=`year`,this.step=500),t*100>e&&(this.scale=`year`,this.step=100),t*50>e&&(this.scale=`year`,this.step=50),t*10>e&&(this.scale=`year`,this.step=10),t*5>e&&(this.scale=`year`,this.step=5),t>e&&(this.scale=`year`,this.step=1),n*3>e&&(this.scale=`month`,this.step=3),n>e&&(this.scale=`month`,this.step=1),r*7>e&&this.options.showWeekScale&&(this.scale=`week`,this.step=1),r*2>e&&(this.scale=`day`,this.step=2),r>e&&(this.scale=`day`,this.step=1),r/2>e&&(this.scale=`weekday`,this.step=1),i*4>e&&(this.scale=`hour`,this.step=4),i>e&&(this.scale=`hour`,this.step=1),a*15>e&&(this.scale=`minute`,this.step=15),a*10>e&&(this.scale=`minute`,this.step=10),a*5>e&&(this.scale=`minute`,this.step=5),a>e&&(this.scale=`minute`,this.step=1),o*15>e&&(this.scale=`second`,this.step=15),o*10>e&&(this.scale=`second`,this.step=10),o*5>e&&(this.scale=`second`,this.step=5),o>e&&(this.scale=`second`,this.step=1),200>e&&(this.scale=`millisecond`,this.step=200),100>e&&(this.scale=`millisecond`,this.step=100),50>e&&(this.scale=`millisecond`,this.step=50),10>e&&(this.scale=`millisecond`,this.step=10),5>e&&(this.scale=`millisecond`,this.step=5),1>e&&(this.scale=`millisecond`,this.step=1)}static snap(e,t,n){let r=ez(e);if(t==`year`){let e=r.year()+Math.round(r.month()/12);r=r.year(Math.round(e/n)*n).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if(t==`month`)r=r.date()>15?r.date(1).add(1,`month`):r.date(1),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`week`)r=r.weekday()>2?r.weekday(0).add(1,`week`):r.weekday(0),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`day`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/24)*24);break;default:r=r.hours(Math.round(r.hours()/12)*12);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`weekday`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/12)*12);break;default:r=r.hours(Math.round(r.hours()/6)*6);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`hour`){switch(n){case 4:r=r.minutes(Math.round(r.minutes()/60)*60);break;default:r=r.minutes(Math.round(r.minutes()/30)*30);break}r=r.seconds(0).milliseconds(0)}else if(t==`minute`){switch(n){case 15:case 10:r=r.minutes(Math.round(r.minutes()/5)*5).seconds(0);break;case 5:r=r.seconds(Math.round(r.seconds()/60)*60);break;default:r=r.seconds(Math.round(r.seconds()/30)*30);break}r=r.milliseconds(0)}else if(t==`second`)switch(n){case 15:case 10:r=r.seconds(Math.round(r.seconds()/5)*5).milliseconds(0);break;case 5:r=r.milliseconds(Math.round(r.milliseconds()/1e3)*1e3);break;default:r=r.milliseconds(Math.round(r.milliseconds()/500)*500);break}else if(t==`millisecond`){let e=n>5?n/2:1;r=r.milliseconds(Math.round(r.milliseconds()/e)*e)}return r}isMajor(){if(this.switchedYear==1)switch(this.scale){case`year`:case`month`:case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedMonth==1)switch(this.scale){case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedDay==1)switch(this.scale){case`millisecond`:case`second`:case`minute`:case`hour`:return!0;default:return!1}let e=this.moment(this.current);switch(this.scale){case`millisecond`:return e.milliseconds()==0;case`second`:return e.seconds()==0;case`minute`:return e.hours()==0&&e.minutes()==0;case`hour`:return e.hours()==0;case`weekday`:case`day`:return this.options.showWeekScale?e.isoWeekday()==1:e.date()==1;case`week`:return e.date()==1;case`month`:return e.month()==0;case`year`:return!1;default:return!1}}getLabelMinor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.minorLabels==`function`)return this.format.minorLabels(e,this.scale,this.step);let t=this.format.minorLabels[this.scale];switch(this.scale){case`week`:if(e.date()===1&&e.weekday()!==0)return``;default:return t&&t.length>0?this.moment(e).format(t):``}}getLabelMajor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.majorLabels==`function`)return this.format.majorLabels(e,this.scale,this.step);let t=this.format.majorLabels[this.scale];return t&&t.length>0?this.moment(e).format(t):``}getClassName(){var e;let t=this.moment,n=this.moment(this.current),r=n.locale?n.locale(`en`):n.lang(`en`),i=this.step,a=[];function o(e){return e/i%2==0?` vis-even`:` vis-odd`}function s(e){return e.isSame(Bq(),`day`)?` vis-today`:e.isSame(t().add(1,`day`),`day`)?` vis-tomorrow`:e.isSame(t().add(-1,`day`),`day`)?` vis-yesterday`:``}function c(e){return e.isSame(Bq(),`week`)?` vis-current-week`:``}function l(e){return e.isSame(Bq(),`month`)?` vis-current-month`:``}function u(e){return e.isSame(Bq(),`year`)?` vis-current-year`:``}switch(this.scale){case`millisecond`:a.push(s(r)),a.push(o(r.milliseconds()));break;case`second`:a.push(s(r)),a.push(o(r.seconds()));break;case`minute`:a.push(s(r)),a.push(o(r.minutes()));break;case`hour`:a.push(UY(e=`vis-h${r.hours()}`).call(e,this.step==4?`-h`+(r.hours()+4):``)),a.push(s(r)),a.push(o(r.hours()));break;case`weekday`:a.push(`vis-${r.format(`dddd`).toLowerCase()}`),a.push(s(r)),a.push(c(r)),a.push(o(r.date()));break;case`day`:a.push(`vis-day${r.date()}`),a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(s(r)),a.push(l(r)),a.push(this.step<=2?s(r):``),a.push(this.step<=2?`vis-${r.format(`dddd`).toLowerCase()}`:``),a.push(o(r.date()-1));break;case`week`:a.push(`vis-week${r.format(`w`)}`),a.push(c(r)),a.push(o(r.week()));break;case`month`:a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(l(r)),a.push(o(r.month()));break;case`year`:a.push(`vis-year${r.year()}`),a.push(u(r)),a.push(o(r.year()));break}return mV(a).call(a,String).join(` `)}};J3.FORMAT={minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}};var Y3=class extends f4{constructor(e,t){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:`bottom`},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:$.extend({},J3.FORMAT),moment:ez,timeAxis:null},this.options=$.extend({},this.defaultOptions),this.body=e,this._create(),this.setOptions(t)}setOptions(e){e&&($.selectiveExtend([`showMinorLabels`,`showMajorLabels`,`showWeekScale`,`maxMinorChars`,`hiddenDates`,`timeAxis`,`moment`,`rtl`],this.options,e),$.selectiveDeepExtend([`format`],this.options,e),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.axis=e.orientation:typeof e.orientation==`object`&&`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis)),`locale`in e&&(typeof ez.locale==`function`?ez.locale(e.locale):ez.lang(e.locale)))}_create(){this.dom.foreground=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.foreground.className=`vis-time-axis vis-foreground`,this.dom.background.className=`vis-time-axis vis-background`}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){let e=this.props,t=this.dom.foreground,n=this.dom.background,r=this.options.orientation.axis==`top`?this.body.dom.top:this.body.dom.bottom,i=t.parentNode!==r;this._calculateCharSize();let a=this.options.showMinorLabels&&this.options.orientation.axis!==`none`,o=this.options.showMajorLabels&&this.options.orientation.axis!==`none`;e.minorLabelHeight=a?e.minorCharHeight:0,e.majorLabelHeight=o?e.majorCharHeight:0,e.height=e.minorLabelHeight+e.majorLabelHeight,e.width=t.offsetWidth,e.minorLineHeight=this.body.domProps.root.height-e.majorLabelHeight-(this.options.orientation.axis==`top`?this.body.domProps.bottom.height:this.body.domProps.top.height),e.minorLineWidth=1,e.majorLineHeight=e.minorLineHeight+e.majorLabelHeight,e.majorLineWidth=1;let s=t.nextSibling,c=n.nextSibling;return t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n),t.style.height=`${this.props.height}px`,this._repaintLabels(),s?r.insertBefore(t,s):r.appendChild(t),c?this.body.dom.backgroundVertical.insertBefore(n,c):this.body.dom.backgroundVertical.appendChild(n),this._isResized()||i}_repaintLabels(){let e=this.options.orientation.axis,t=$.convert(this.body.range.start,`Number`),n=$.convert(this.body.range.end,`Number`),r=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),i=r-f3(this.options.moment,this.body.hiddenDates,this.body.range,r);i-=this.body.util.toTime(0).valueOf();let a=new J3(new Date(t),new Date(n),i,this.body.hiddenDates,this.options);a.setMoment(this.options.moment),this.options.format&&a.setFormat(this.options.format),this.options.timeAxis&&a.setScale(this.options.timeAxis),this.step=a;let o=this.dom;o.redundant.lines=o.lines,o.redundant.majorTexts=o.majorTexts,o.redundant.minorTexts=o.minorTexts,o.lines=[],o.majorTexts=[],o.minorTexts=[];let s,c,l,u,d,f,p=0,m,h,g,_=0,v=1e3,y;for(a.start(),c=a.getCurrent(),u=this.body.util.toScreen(c);a.hasNext()&&_<v;){switch(_++,d=a.isMajor(),y=a.getClassName(),s=c,l=u,a.next(),c=a.getCurrent(),u=this.body.util.toScreen(c),m=p,p=u-l,a.scale){case`week`:f=!0;break;default:f=p>=m*.4;break}if(this.options.showMinorLabels&&f){var b=this._repaintMinorText(l,a.getLabelMinor(s),e,y);b.style.width=`${p}px`}d&&this.options.showMajorLabels?(l>0&&(g??=l,b=this._repaintMajorText(l,a.getLabelMajor(s),e,y)),h=this._repaintMajorLine(l,p,e,y)):f?h=this._repaintMinorLine(l,p,e,y):h&&(h.style.width=`${DX(h.style.width)+p}px`)}if(_===v&&!X3&&(console.warn(`Something is wrong with the Timeline scale. Limited drawing of grid lines to ${v} lines.`),X3=!0),this.options.showMajorLabels){let t=this.body.util.toTime(0),n=a.getLabelMajor(t),r=n.length*(this.props.majorCharWidth||10)+10;(g==null||r<g)&&this._repaintMajorText(0,n,e,y)}Q($).call($,this.dom.redundant,e=>{for(;e.length;){let t=e.pop();t&&t.parentNode&&t.parentNode.removeChild(t)}})}_repaintMinorText(e,t,n,r){let i=this.dom.redundant.minorTexts.shift();if(!i){let e=document.createTextNode(``);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}this.dom.minorTexts.push(i),i.innerHTML=$.xss(t);let a=n==`top`?this.props.majorLabelHeight:0;return this._setXY(i,e,a),i.className=`vis-text vis-minor ${r}`,i}_repaintMajorText(e,t,n,r){let i=this.dom.redundant.majorTexts.shift();if(!i){let e=document.createElement(`div`);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}i.childNodes[0].innerHTML=$.xss(t),i.className=`vis-text vis-major ${r}`;let a=n==`top`?0:this.props.minorLabelHeight;return this._setXY(i,e,a),this.dom.majorTexts.push(i),i}_setXY(e,t,n){var r;let i=this.options.rtl?t*-1:t;e.style.transform=UY(r=`translate(${i}px, `).call(r,n,`px)`)}_repaintMinorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.minorLineHeight}px`;let s=n==`top`?o.majorLabelHeight:this.body.domProps.top.height,c=e-o.minorLineWidth/2;return this._setXY(a,c,s),a.className=UY(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-minor `).call(i,r),a}_repaintMajorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.majorLineHeight}px`;let s=n==`top`?0:this.body.domProps.top.height,c=e-o.majorLineWidth/2;return this._setXY(a,c,s),a.className=UY(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-major `).call(i,r),a}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement(`DIV`),this.dom.measureCharMinor.className=`vis-text vis-minor vis-measure`,this.dom.measureCharMinor.style.position=`absolute`,this.dom.measureCharMinor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement(`DIV`),this.dom.measureCharMajor.className=`vis-text vis-major vis-measure`,this.dom.measureCharMajor.style.position=`absolute`,this.dom.measureCharMajor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}},X3=!1;function Z3(e){var t=window,n={},r={keydown:{},keyup:{}},i={},a;for(a=97;a<=122;a++)i[String.fromCharCode(a)]={code:65+(a-97),shift:!1};for(a=65;a<=90;a++)i[String.fromCharCode(a)]={code:a,shift:!0};for(a=0;a<=9;a++)i[``+a]={code:48+a,shift:!1};for(a=1;a<=12;a++)i[`F`+a]={code:111+a,shift:!1};for(a=0;a<=9;a++)i[`num`+a]={code:96+a,shift:!1};i[`num*`]={code:106,shift:!1},i[`num+`]={code:107,shift:!1},i[`num-`]={code:109,shift:!1},i[`num/`]={code:111,shift:!1},i[`num.`]={code:110,shift:!1},i.left={code:37,shift:!1},i.up={code:38,shift:!1},i.right={code:39,shift:!1},i.down={code:40,shift:!1},i.space={code:32,shift:!1},i.enter={code:13,shift:!1},i.shift={code:16,shift:void 0},i.esc={code:27,shift:!1},i.backspace={code:8,shift:!1},i.tab={code:9,shift:!1},i.ctrl={code:17,shift:!1},i.alt={code:18,shift:!1},i.delete={code:46,shift:!1},i.pageup={code:33,shift:!1},i.pagedown={code:34,shift:!1},i[`=`]={code:187,shift:!1},i[`-`]={code:189,shift:!1},i[`]`]={code:221,shift:!1},i[`[`]={code:219,shift:!1};var o=function(e){c(e,`keydown`)},s=function(e){c(e,`keyup`)},c=function(e,t){if(r[t][e.keyCode]!==void 0)for(var n=r[t][e.keyCode],i=0;i<n.length;i++)(n[i].shift===void 0||n[i].shift==1&&e.shiftKey==1||n[i].shift==0&&e.shiftKey==0)&&n[i].fn(e)};return n.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);r[n][i[e].code]===void 0&&(r[n][i[e].code]=[]),r[n][i[e].code].push({fn:t,shift:i[e].shift})},n.bindAll=function(e,t){for(var r in t===void 0&&(t=`keydown`),i)i.hasOwnProperty(r)&&n.bind(r,e,t)},n.getKey=function(e){for(var t in i)if(i.hasOwnProperty(t)&&(e.shiftKey==1&&i[t].shift==1&&e.keyCode==i[t].code||e.shiftKey==0&&i[t].shift==0&&e.keyCode==i[t].code||e.keyCode==i[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},n.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var a=[],o=r[n][i[e].code];if(o!==void 0)for(var s=0;s<o.length;s++)o[s].fn==t&&o[s].shift==i[e].shift||a.push(r[n][i[e].code][s]);r[n][i[e].code]=a}else r[n][i[e].code]=[]},n.reset=function(){r={keydown:{},keyup:{}}},n.destroy=function(){r={keydown:{},keyup:{}},t.removeEventListener(`keydown`,o,!0),t.removeEventListener(`keyup`,s,!0)},t.addEventListener(`keydown`,o,!0),t.addEventListener(`keyup`,s,!0),n}function Q3(e){var t,n;this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement(`div`),this.dom.overlay.className=`vis-overlay`,this.dom.container.appendChild(this.dom.overlay),this.hammer=W3(this.dom.overlay),this.hammer.on(`tap`,Z(t=this._onTapOverlay).call(t,this));var r=this,i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(i).call(i,function(e){r.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(t){$3(t.target,e)||r.deactivate()},document.body.addEventListener(`click`,this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=Z3(),this.escListener=Z(n=this.deactivate).call(n,this)}oQ(Q3.prototype),Q3.current=null,Q3.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener(`click`,this.onClick),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},Q3.prototype.activate=function(){var e;Q3.current&&Q3.current.deactivate(),Q3.current=this,this.active=!0,this.dom.overlay.style.display=`none`,$.addClassName(this.dom.container,`vis-active`),this.emit(`change`),this.emit(`activate`),Z(e=this.keycharm).call(e,`esc`,this.escListener)},Q3.prototype.deactivate=function(){Q3.current===this&&(Q3.current=null),this.active=!1,this.dom.overlay.style.display=``,$.removeClassName(this.dom.container,`vis-active`),this.keycharm.unbind(`esc`,this.escListener),this.emit(`change`),this.emit(`deactivate`)},Q3.prototype._onTapOverlay=function(e){this.activate(),e.stopPropagation()};function $3(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var e6={current:`current`,time:`time`,deleteSelected:`Delete selected`},t6=e6,n6=e6,r6={current:`attuale`,time:`tempo`,deleteSelected:`Cancella la selezione`},i6=r6,a6=r6,o6={current:`huidige`,time:`tijd`,deleteSelected:`Selectie verwijderen`},s6=o6,c6=o6,l6={current:`Aktuelle`,time:`Zeit`,deleteSelected:`Lösche Auswahl`},u6=l6,d6=l6,f6={current:`actuel`,time:`heure`,deleteSelected:`Effacer la selection`},p6=f6,m6=f6,h6=f6,g6=f6,_6={current:`actual`,time:`hora`,deleteSelected:`Eliminar selección`},v6=_6,y6={current:`поточний`,time:`час`,deleteSelected:`Видалити обране`},b6=y6,x6={current:`текущее`,time:`время`,deleteSelected:`Удалить выбранное`},S6=x6,C6={current:`aktualny`,time:`czas`,deleteSelected:`Usuń wybrane`},w6=C6,T6={current:`atual`,time:`data`,deleteSelected:`Apagar selecionado`},E6=T6,D6=T6,O6={current:`güncel`,time:`zaman`,deleteSelected:`Seçileni sil`},k6=O6,A6={current:`現在`,time:`時刻`,deleteSelected:`選択されたものを削除`},j6=A6,M6={current:`nuvarande`,time:`tid`,deleteSelected:`Radera valda`},N6=M6,P6={current:`nåværende`,time:`tid`,deleteSelected:`Slett valgte`},F6=P6,I6=P6,L6=P6,R6={current:`einamas`,time:`laikas`,deleteSelected:`Pašalinti pasirinktą`},z6={en:e6,en_EN:t6,en_US:n6,it:r6,it_IT:i6,it_CH:a6,nl:o6,nl_NL:s6,nl_BE:c6,de:l6,de_DE:u6,de_CH:d6,fr:f6,fr_FR:p6,fr_CA:m6,fr_BE:h6,fr_CH:g6,es:_6,es_ES:v6,uk:y6,uk_UA:b6,ru:x6,ru_RU:S6,pl:C6,pl_PL:w6,pt:T6,pt_BR:E6,pt_PT:D6,tr:O6,tr_TR:k6,ja:A6,ja_JP:j6,lt:R6,lt_LT:R6,sv:M6,sv_SE:N6,nb:P6,nn:I6,nb_NO:F6,nn_NO:L6},B6=class extends f4{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={moment:ez,locales:z6,locale:`en`,id:void 0,title:void 0},this.options=$.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=$.extend({},z6,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];Q(n=WK(this.options.locales)).call(n,e=>{this.options.locales[e]=$.extend({},r,this.options.locales[e])}),t&&t.time!=null?this.customTime=t.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(e){e&&$.selectiveExtend([`moment`,`locale`,`locales`,`id`,`title`,`rtl`,`snap`],this.options,e)}_create(){var e,t,n;let r=document.createElement(`div`);r[`custom-time`]=this,r.className=`vis-custom-time ${this.options.id||``}`,r.style.position=`absolute`,r.style.top=`0px`,r.style.height=`100%`,this.bar=r;let i=document.createElement(`div`);i.style.position=`relative`,i.style.top=`0px`,this.options.rtl?i.style.right=`-10px`:i.style.left=`-10px`,i.style.height=`100%`,i.style.width=`20px`;function a(e){this.body.range._onMouseWheel(e)}i.addEventListener?(i.addEventListener(`mousewheel`,Z(a).call(a,this),!1),i.addEventListener(`DOMMouseScroll`,Z(a).call(a,this),!1)):i.attachEvent(`onmousewheel`,Z(a).call(a,this)),r.appendChild(i),this.hammer=new W3(i),this.hammer.on(`panstart`,Z(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,Z(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,Z(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:W3.DIRECTION_ALL}),this.hammer.get(`press`).set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){let e=this.body.dom.backgroundVertical;this.bar.parentNode!=e&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),e.appendChild(this.bar));let t=this.body.util.toScreen(this.customTime),n=this.options.locales[this.options.locale];n||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let r=this.options.title;if(r===void 0){var i;r=UY(i=`${n.time}: `).call(i,this.options.moment(this.customTime).format(`dddd, MMMM Do YYYY, H:mm:ss`)),r=r.charAt(0).toUpperCase()+r.substring(1)}else typeof r==`function`&&(r=r.call(this,this.customTime));return this.options.rtl?this.bar.style.right=`${t}px`:this.bar.style.left=`${t}px`,this.bar.title=r,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(e){this.customTime=$.convert(e,`Date`),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(e,t){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement(`div`),this.marker.className=`vis-custom-time-marker`,this.marker.innerHTML=$.xss(e),this.marker.style.position=`absolute`,t){var n;this.marker.setAttribute(`contenteditable`,`true`),this.marker.addEventListener(`pointerdown`,()=>{this.marker.focus()}),this.marker.addEventListener(`input`,Z(n=this._onMarkerChange).call(n,this)),this.marker.title=e,this.marker.addEventListener(`blur`,e=>{this.title!=e.target.innerHTML&&(this._onMarkerChanged(e),this.title=e.target.innerHTML)})}this.bar.appendChild(this.marker)}setCustomTitle(e){this.options.title=e}_onDragStart(e){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,e.stopPropagation()}_onDrag(e){if(!this.eventParams.dragging)return;let t=this.options.rtl?-1*e.deltaX:e.deltaX,n=this.body.util.toScreen(this.eventParams.customTime)+t,r=this.body.util.toTime(n),i=this.body.util.getScale(),a=this.body.util.getStep(),o=this.options.snap,s=o?o(r,i,a):r;this.setCustomTime(s),this.body.emitter.emit(`timechange`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation()}_onDragEnd(e){this.eventParams.dragging&&(this.body.emitter.emit(`timechanged`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation())}_onMarkerChange(e){this.body.emitter.emit(`markerchange`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}_onMarkerChanged(e){this.body.emitter.emit(`markerchanged`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}static customTimeFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`custom-time`))return t[`custom-time`];t=t.parentNode}return null}},V6=class{_create(e){var t,n,r;this.dom={},this.dom.container=e,this.dom.container.style.position=`relative`,this.dom.root=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.backgroundVertical=document.createElement(`div`),this.dom.backgroundHorizontal=document.createElement(`div`),this.dom.centerContainer=document.createElement(`div`),this.dom.leftContainer=document.createElement(`div`),this.dom.rightContainer=document.createElement(`div`),this.dom.center=document.createElement(`div`),this.dom.left=document.createElement(`div`),this.dom.right=document.createElement(`div`),this.dom.top=document.createElement(`div`),this.dom.bottom=document.createElement(`div`),this.dom.shadowTop=document.createElement(`div`),this.dom.shadowBottom=document.createElement(`div`),this.dom.shadowTopLeft=document.createElement(`div`),this.dom.shadowBottomLeft=document.createElement(`div`),this.dom.shadowTopRight=document.createElement(`div`),this.dom.shadowBottomRight=document.createElement(`div`),this.dom.rollingModeBtn=document.createElement(`div`),this.dom.loadingScreen=document.createElement(`div`),this.dom.root.className=`vis-timeline`,this.dom.background.className=`vis-panel vis-background`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical`,this.dom.backgroundHorizontal.className=`vis-panel vis-background vis-horizontal`,this.dom.centerContainer.className=`vis-panel vis-center`,this.dom.leftContainer.className=`vis-panel vis-left`,this.dom.rightContainer.className=`vis-panel vis-right`,this.dom.top.className=`vis-panel vis-top`,this.dom.bottom.className=`vis-panel vis-bottom`,this.dom.left.className=`vis-content`,this.dom.center.className=`vis-content`,this.dom.right.className=`vis-content`,this.dom.shadowTop.className=`vis-shadow vis-top`,this.dom.shadowBottom.className=`vis-shadow vis-bottom`,this.dom.shadowTopLeft.className=`vis-shadow vis-top`,this.dom.shadowBottomLeft.className=`vis-shadow vis-bottom`,this.dom.shadowTopRight.className=`vis-shadow vis-top`,this.dom.shadowBottomRight.className=`vis-shadow vis-bottom`,this.dom.rollingModeBtn.className=`vis-rolling-mode-btn`,this.dom.loadingScreen.className=`vis-loading-screen`,this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on(`rangechange`,()=>{this.initialDrawDone===!0&&this._redraw()}),this.on(`rangechanged`,()=>{this.initialRangeChangeDone||=!0}),this.on(`touch`,Z(t=this._onTouch).call(t,this)),this.on(`panmove`,Z(n=this._onDrag).call(n,this));let i=this;this._origRedraw=Z(r=this._redraw).call(r,this),this._redraw=$.throttle(this._origRedraw),this.on(`_change`,e=>{i.itemSet&&i.itemSet.initialItemSetDrawn&&e&&e.queue==1?i._redraw():i._origRedraw()}),this.hammer=new W3(this.dom.root);let a=this.hammer.get(`pinch`).set({enable:!0});a&&q3(a),this.hammer.get(`pan`).set({threshold:5,direction:W3.DIRECTION_ALL}),this.timelineListeners={};let o=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(o).call(o,e=>{let t=t=>{i.isActive()&&i.emit(e,t)};i.hammer.on(e,t),i.timelineListeners[e]=t}),G3(this.hammer,e=>{i.emit(`touch`,e)}),K3(this.hammer,e=>{i.emit(`release`,e)});function s(e){if(!this.isActive())return;if(this.emit(`mousewheel`,e),this.options.preferZoom){if(!this.options.zoomKey||e[this.options.zoomKey])return}else if(this.options.zoomKey&&e[this.options.zoomKey])return;if(!this.options.verticalScroll&&!this.options.horizontalScroll)return;let t=0,n=0;`detail`in e&&(n=e.detail*-1),`wheelDelta`in e&&(n=e.wheelDelta),`wheelDeltaY`in e&&(n=e.wheelDeltaY),`wheelDeltaX`in e&&(t=e.wheelDeltaX*-1),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n*-1,n=0),`deltaY`in e&&(n=e.deltaY*-1),`deltaX`in e&&(t=e.deltaX);var r=40;e.deltaMode&&(e.deltaMode===1?(t*=r,n*=r):(t*=r,n*=800));let i=this.options.verticalScroll,a=Math.abs(n)>=Math.abs(t),o=this.options.horizontalScroll&&this.options.horizontalScrollKey&&e[this.options.horizontalScrollKey];if(i&&a&&!o){let t=this.props.scrollTop,r=t+n;this._setScrollTop(r)!==t&&(this._redraw(),this.emit(`scroll`,e),e.preventDefault());return}if(this.options.horizontalScroll){this.range.stopRolling();let r=(a?n:t)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&a&&(r=-r);let i=this.range.start+r,o=this.range.end+r,s={animation:!1,byUser:!0,event:e};this.range.setRange(i,o,s),e.preventDefault();return}}let c=`onwheel`in document.createElement(`div`)?`wheel`:document.onmousewheel===void 0?this.dom.centerContainer.addEventListener?`DOMMouseScroll`:`onmousewheel`:`mousewheel`;this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Z(s).call(s,this),!1),this.dom.top.addEventListener(c,Z(s).call(s,this),!1),this.dom.bottom.addEventListener(c,Z(s).call(s,this),!1);function l(e){if(i.options.verticalScroll&&(e.preventDefault(),i.isActive())){let t=-e.target.scrollTop;i._setScrollTop(t),i._redraw(),i.emit(`scrollSide`,e)}}this.dom.left.parentNode.addEventListener(`scroll`,Z(l).call(l,this)),this.dom.right.parentNode.addEventListener(`scroll`,Z(l).call(l,this));let u=!1;function d(e){var t;if(e.preventDefault&&(i.emit(`dragover`,i.getEventProperties(e)),e.preventDefault()),UX(t=e.target.className).call(t,`timeline`)>-1&&!u)return e.dataTransfer.dropEffect=`move`,u=!0,!1}function f(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();try{var t=JSON.parse(e.dataTransfer.getData(`text`));if(!t||!t.content)return}catch{return!1}return u=!1,e.center={x:e.clientX,y:e.clientY},t.target===`item`?i.itemSet._onDropObjectOnItem(e):i.itemSet._onAddItem(e),i.emit(`drop`,i.getEventProperties(e)),!1}if(this.dom.center.addEventListener(`dragover`,Z(d).call(d,this),!1),this.dom.center.addEventListener(`drop`,Z(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!e)throw Error(`No container provided`);e.appendChild(this.dom.root),e.appendChild(this.dom.loadingScreen)}setOptions(e){var t;if(e){if($.selectiveExtend([`width`,`height`,`minHeight`,`maxHeight`,`autoResize`,`start`,`end`,`clickToUse`,`dataAttributes`,`hiddenDates`,`locale`,`locales`,`moment`,`preferZoom`,`rtl`,`zoomKey`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`,`longSelectPressTime`,`snap`],this.options,e),this.dom.rollingModeBtn.style.visibility=`hidden`,this.options.rtl&&(this.dom.container.style.direction=`rtl`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical-rtl`),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`:this.dom.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`),typeof this.options.orientation!=`object`&&(this.options.orientation={item:void 0,axis:void 0}),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation={item:e.orientation,axis:e.orientation}:typeof e.orientation==`object`&&(`item`in e.orientation&&(this.options.orientation.item=e.orientation.item),`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis))),this.options.orientation.axis===`both`){if(!this.timeAxis2){let e=this.timeAxis2=new Y3(this.body,this.options);e.setOptions=t=>{let n=t?$.extend({},t):{};n.orientation=`top`,Y3.prototype.setOptions.call(e,n)},this.components.push(e)}}else if(this.timeAxis2){var n;let e=UX(n=this.components).call(n,this.timeAxis2);if(e!==-1){var r;wJ(r=this.components).call(r,e,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),`hiddenDates`in this.options&&r3(this.options.moment,this.body,this.options.hiddenDates),`clickToUse`in e&&(e.clickToUse?this.activator||=new Q3(this.dom.root):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Q(t=this.components).call(t,t=>t.setOptions(e)),`configure`in e){var i;this.configurator||=this._createConfigurator(),this.configurator.setOptions(e.configure);let t=$.deepExtend({},this.options);Q(i=this.components).call(i,e=>{$.deepExtend(t,e.options)}),this.configurator.setModuleOptions({global:t})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var e;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(let e in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,Q(e=this.components).call(e,e=>e.destroy()),this.body=null}setCustomTime(e,t){var n;let r=mV(n=this.customTimes).call(n,e=>t===e.options.id);if(r.length===0)throw Error(`No custom time bar found with id ${LZ(t)}`);r.length>0&&r[0].setCustomTime(e)}getCustomTime(e){var t;let n=mV(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${LZ(e)}`);return n[0].getCustomTime()}setCustomTimeMarker(e,t,n){var r;let i=mV(r=this.customTimes).call(r,e=>e.options.id===t);if(i.length===0)throw Error(`No custom time bar found with id ${LZ(t)}`);i.length>0&&i[0].setCustomMarker(e,n)}setCustomTimeTitle(e,t){var n;let r=mV(n=this.customTimes).call(n,e=>e.options.id===t);if(r.length===0)throw Error(`No custom time bar found with id ${LZ(t)}`);if(r.length>0)return r[0].setCustomTitle(e)}getEventProperties(e){return{event:e}}addCustomTime(e,t){var n;let r=e===void 0?new Date:$.convert(e,`Date`);if(N3(n=this.customTimes).call(n,e=>e.options.id===t))throw Error(`A custom time with id ${LZ(t)} already exists`);let i=new B6(this.body,$.extend({},this.options,{time:r,id:t,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(i),this.components.push(i),this._redraw(),t}removeCustomTime(e){var t;let n=mV(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${LZ(e)}`);Q(n).call(n,e=>{var t,n,r,i;wJ(t=this.customTimes).call(t,UX(n=this.customTimes).call(n,e),1),wJ(r=this.components).call(r,UX(i=this.components).call(i,e),1),e.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(e){return this.time=e,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(e,t){let n=this.getDataRange();if(n.min===null&&n.max===null)return;let r=n.max-n.min,i=new Date(n.min.valueOf()-r*.01),a=new Date(n.max.valueOf()+r*.01),o=e&&e.animation!==void 0?e.animation:!0;this.range.setRange(i,a,{animation:o},t)}getDataRange(){throw Error(`Cannot invoke abstract method getDataRange`)}setWindow(e,t,n,r){typeof arguments[2]==`function`&&(r=arguments[2],n={});let i,a;arguments.length==1?(a=arguments[0],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i})):arguments.length==2&&typeof arguments[1]==`function`?(a=arguments[0],r=arguments[1],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i},r)):(i=n&&n.animation!==void 0?n.animation:!0,this.range.setRange(e,t,{animation:i},r))}moveTo(e,t,n){typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.range.end-this.range.start,i=$.convert(e,`Date`).valueOf(),a=i-r/2,o=i+r/2,s=t&&t.animation!==void 0?t.animation:!0;this.range.setRange(a,o,{animation:s},n)}getWindow(){let e=this.range.getRange();return{start:new Date(e.start),end:new Date(e.end)}}zoomIn(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=(o-o/(1+e))/2,c=i+s,l=a-s;this.setWindow(c,l,t,n)}zoomOut(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=i-o*e/2,c=a+o*e/2;this.setWindow(s,c,t,n)}redraw(){this._redraw()}_redraw(){var e;this.redrawCount++;let t=this.dom;if(!t||!t.container||t.root.offsetWidth==0)return;let n=!1,r=this.options,i=this.props;i3(this.options.moment,this.body,this.options.hiddenDates),r.orientation==`top`?($.addClassName(t.root,`vis-top`),$.removeClassName(t.root,`vis-bottom`)):($.removeClassName(t.root,`vis-top`),$.addClassName(t.root,`vis-bottom`)),r.rtl?($.addClassName(t.root,`vis-rtl`),$.removeClassName(t.root,`vis-ltr`)):($.addClassName(t.root,`vis-ltr`),$.removeClassName(t.root,`vis-rtl`)),t.root.style.maxHeight=$.option.asSize(r.maxHeight,``),t.root.style.minHeight=$.option.asSize(r.minHeight,``),t.root.style.width=$.option.asSize(r.width,``);let a=t.root.offsetWidth;i.border.left=1,i.border.right=1,i.border.top=1,i.border.bottom=1,i.center.height=t.center.offsetHeight,i.left.height=t.left.offsetHeight,i.right.height=t.right.offsetHeight,i.top.height=t.top.clientHeight||-i.border.top,i.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-i.border.bottom;let o=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+o+i.bottom.height+i.border.top+i.border.bottom;t.root.style.height=$.option.asSize(r.height,`${s}px`),i.root.height=t.root.offsetHeight,i.background.height=i.root.height;let c=i.root.height-i.top.height-i.bottom.height;i.centerContainer.height=c,i.leftContainer.height=c,i.rightContainer.height=i.leftContainer.height,i.root.width=a,i.background.width=i.root.width,this.initialDrawDone||(i.scrollbarWidth=$.getScrollBarWidth());let l=t.leftContainer.clientWidth,u=t.rightContainer.clientWidth;r.verticalScroll?r.rtl?(i.left.width=l||-i.border.left,i.right.width=u+i.scrollbarWidth||-i.border.right):(i.left.width=l+i.scrollbarWidth||-i.border.left,i.right.width=u||-i.border.right):(i.left.width=l||-i.border.left,i.right.width=u||-i.border.right),this._setDOM();let d=this._updateScrollTop();r.orientation.item!=`top`&&(d+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),t.center.style.transform=`translateY(${d}px)`;let f=i.scrollTop==0?`hidden`:``,p=i.scrollTop==i.scrollTopMin?`hidden`:``;t.shadowTop.style.visibility=f,t.shadowBottom.style.visibility=p,t.shadowTopLeft.style.visibility=f,t.shadowBottomLeft.style.visibility=p,t.shadowTopRight.style.visibility=f,t.shadowBottomRight.style.visibility=p,r.verticalScroll&&(t.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`,t.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`,t.shadowTopRight.style.visibility=`hidden`,t.shadowBottomRight.style.visibility=`hidden`,t.shadowTopLeft.style.visibility=`hidden`,t.shadowBottomLeft.style.visibility=`hidden`,t.left.style.top=`0px`,t.right.style.top=`0px`),(!r.verticalScroll||i.center.height<i.centerContainer.height)&&(t.left.style.top=`${d}px`,t.right.style.top=`${d}px`,t.rightContainer.className=t.rightContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),t.leftContainer.className=t.leftContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),i.left.width=l||-i.border.left,i.right.width=u||-i.border.right,this._setDOM());let m=i.center.height>i.centerContainer.height;if(this.hammer.get(`pan`).set({direction:m?W3.DIRECTION_ALL:W3.DIRECTION_HORIZONTAL}),this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),Q(e=this.components).call(e,e=>{n=e.redraw()||n}),n)if(this.redrawCount<5){this.body.emitter.emit(`_change`);return}else console.log(`WARNING: infinite loop in redraw?`);else this.redrawCount=0;this.body.emitter.emit(`changed`)}_setDOM(){let e=this.props,t=this.dom;e.leftContainer.width=e.left.width,e.rightContainer.width=e.right.width;let n=e.root.width-e.left.width-e.right.width;e.center.width=n,e.centerContainer.width=n,e.top.width=n,e.bottom.width=n,t.background.style.height=`${e.background.height}px`,t.backgroundVertical.style.height=`${e.background.height}px`,t.backgroundHorizontal.style.height=`${e.centerContainer.height}px`,t.centerContainer.style.height=`${e.centerContainer.height}px`,t.leftContainer.style.height=`${e.leftContainer.height}px`,t.rightContainer.style.height=`${e.rightContainer.height}px`,t.background.style.width=`${e.background.width}px`,t.backgroundVertical.style.width=`${e.centerContainer.width}px`,t.backgroundHorizontal.style.width=`${e.background.width}px`,t.centerContainer.style.width=`${e.center.width}px`,t.top.style.width=`${e.top.width}px`,t.bottom.style.width=`${e.bottom.width}px`,t.background.style.left=`0`,t.background.style.top=`0`,t.backgroundVertical.style.left=`${e.left.width+e.border.left}px`,t.backgroundVertical.style.top=`0`,t.backgroundHorizontal.style.left=`0`,t.backgroundHorizontal.style.top=`${e.top.height}px`,t.centerContainer.style.left=`${e.left.width}px`,t.centerContainer.style.top=`${e.top.height}px`,t.leftContainer.style.left=`0`,t.leftContainer.style.top=`${e.top.height}px`,t.rightContainer.style.left=`${e.left.width+e.center.width}px`,t.rightContainer.style.top=`${e.top.height}px`,t.top.style.left=`${e.left.width}px`,t.top.style.top=`0`,t.bottom.style.left=`${e.left.width}px`,t.bottom.style.top=`${e.top.height+e.centerContainer.height}px`,t.center.style.left=`0`,t.left.style.left=`0`,t.right.style.left=`0`}setCurrentTime(e){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);this.currentTime.setCurrentTime(e)}getCurrentTime(){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);return this.currentTime.getCurrentTime()}_toTime(e){return c3(this,e,this.props.center.width)}_toGlobalTime(e){return c3(this,e,this.props.root.width)}_toScreen(e){return s3(this,e,this.props.center.width)}_toGlobalScreen(e){return s3(this,e,this.props.root.width)}_initAutoResize(){this.options.autoResize==1?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){let e=this;this._stopAutoResize(),this._onResize=()=>{if(e.options.autoResize!=1){e._stopAutoResize();return}if(e.dom.root){let t=e.dom.root.offsetHeight,n=e.dom.root.offsetWidth;(n!=e.props.lastWidth||t!=e.props.lastHeight)&&(e.props.lastWidth=n,e.props.lastHeight=t,e.props.scrollbarWidth=$.getScrollBarWidth(),e.body.emitter.emit(`_change`))}},window.addEventListener(`resize`,this._onResize),e.dom.root&&(e.props.lastWidth=e.dom.root.offsetWidth,e.props.lastHeight=e.dom.root.offsetHeight),this.watchTimer=B3(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&=(clearInterval(this.watchTimer),void 0),this._onResize&&=(window.removeEventListener(`resize`,this._onResize),null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){this.touch.allowDragging=!1}_onDrag(e){if(!e||!this.touch.allowDragging)return;let t=e.deltaY,n=this._getScrollTop(),r=this._setScrollTop(this.touch.initialScrollTop+t);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),r!=n&&this.emit(`verticalDrag`)}_setScrollTop(e){return this.props.scrollTop=e,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){let e=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return e!=this.props.scrollTopMin&&(this.options.orientation.item!=`top`&&(this.props.scrollTop+=e-this.props.scrollTopMin),this.props.scrollTopMin=e),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<e&&(this.props.scrollTop=e),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw Error(`Cannot invoke abstract method _createConfigurator`)}};oQ(V6.prototype);var H6=class extends f4{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:ez,locales:z6,locale:`en`},this.options=$.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=$.extend({},z6,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];Q(n=WK(this.options.locales)).call(n,e=>{this.options.locales[e]=$.extend({},r,this.options.locales[e])}),this.offset=0,this._create()}_create(){let e=document.createElement(`div`);e.className=`vis-current-time`,e.style.position=`absolute`,e.style.top=`0px`,e.style.height=`100%`,this.bar=e}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(e){e&&$.selectiveExtend([`rtl`,`showCurrentTime`,`alignCurrentTime`,`moment`,`locale`,`locales`],this.options,e)}redraw(){if(this.options.showCurrentTime){var e,t;let n=this.body.dom.backgroundVertical;this.bar.parentNode!=n&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),n.appendChild(this.bar),this.start());let r=this.options.moment(Bq()+this.offset);this.options.alignCurrentTime&&(r=r.startOf(this.options.alignCurrentTime));let i=this.body.util.toScreen(r),a=this.options.locales[this.options.locale];a||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let o=UY(e=UY(t=`${a.current} `).call(t,a.time,`: `)).call(e,r.format(`dddd, MMMM Do YYYY, H:mm:ss`));o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${i*-1}px)`:this.bar.style.transform=`translateX(${i}px)`,this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){let e=this;function t(){e.stop();let n=1/e.body.range.conversion(e.body.domProps.center.width).scale/10;n<30&&(n=30),n>1e3&&(n=1e3),e.redraw(),e.body.emitter.emit(`currentTimeTick`),e.currentTimeTimer=$L(t,n)}t()}stop(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(e){this.offset=$.convert(e,`Date`).valueOf()-Bq(),this.redraw()}getCurrentTime(){return new Date(Bq()+this.offset)}},U6={},W6;function G6(){if(W6)return U6;W6=1;var e=X(),t=NR().find,n=CU(),r=`find`,i=!0;return r in[]&&[,][r](function(){i=!1}),e({target:`Array`,proto:!0,forced:i},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r),U6}var K6,q6;function J6(){return q6?K6:(q6=1,G6(),K6=gL()(`Array`,`find`),K6)}var Y6,X6;function Z6(){if(X6)return Y6;X6=1;var e=fF(),t=J6(),n=Array.prototype;return Y6=function(r){var i=r.find;return r===n||e(n,r)&&i===n.find?t:i},Y6}var Q6,$6;function e8(){return $6?Q6:($6=1,Q6=Z6(),Q6)}var t8,n8;function r8(){return n8?t8:(n8=1,t8=e8(),t8)}var i8=iP(r8()),a8={},o8={},s8={exports:{}},c8,l8;function u8(){return l8?c8:(l8=1,c8=dP()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),c8)}var d8,f8;function p8(){if(f8)return d8;f8=1;var e=dP(),t=rF(),n=CP(),r=u8(),i=Object.isExtensible;return d8=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,d8}var m8,h8;function g8(){return h8?m8:(h8=1,m8=!dP()(function(){return Object.isExtensible(Object.preventExtensions({}))}),m8)}var _8;function v8(){if(_8)return s8.exports;_8=1;var e=X(),t=bP(),n=hz(),r=rF(),i=rI(),a=RI().f,o=Rz(),s=Vz(),c=p8(),l=oI(),u=g8(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=s8.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,s8.exports}var y8,b8;function x8(){if(b8)return y8;b8=1;var e=lI(),t=EU(),n=e(`iterator`),r=Array.prototype;return y8=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},y8}var S8,C8;function w8(){if(C8)return S8;C8=1;var e=aR(),t=IF(),n=JP(),r=EU(),i=lI()(`iterator`);return S8=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},S8}var T8,E8;function D8(){if(E8)return T8;E8=1;var e=IP(),t=NF(),n=II(),r=AF(),i=w8(),a=TypeError;return T8=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},T8}var O8,k8;function A8(){if(k8)return O8;k8=1;var e=IP(),t=II(),n=IF();return O8=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},O8}var j8,M8;function N8(){if(M8)return j8;M8=1;var e=kI(),t=IP(),n=II(),r=AF(),i=x8(),a=vR(),o=fF(),s=D8(),c=w8(),l=A8(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return j8=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},j8}var P8,F8;function I8(){if(F8)return P8;F8=1;var e=fF(),t=TypeError;return P8=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},P8}var L8,R8;function z8(){if(R8)return L8;R8=1;var e=X(),t=cP(),n=v8(),r=dP(),i=VI(),a=N8(),o=I8(),s=kP(),c=rF(),l=JP(),u=dB(),d=RI().f,f=NR().forEach,p=NP(),m=_B(),h=m.set,g=m.getterFor;return L8=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},L8}var B8,V8;function H8(){if(V8)return B8;V8=1;var e=qz();return B8=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},B8}var U8,W8;function G8(){if(W8)return U8;W8=1;var e=lF(),t=Xz(),n=lI(),r=NP(),i=n(`species`);return U8=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},U8}var K8,q8;function J8(){if(q8)return K8;q8=1;var e=Fz(),t=Xz(),n=H8(),r=kI(),i=I8(),a=JP(),o=N8(),s=XU(),c=$U(),l=G8(),u=NP(),d=v8().fastKey,f=_B(),p=f.set,m=f.getterFor;return K8={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},K8}var Y8;function X8(){return Y8?o8:(Y8=1,z8()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},J8()),o8)}var Z8;function Q8(){return Z8?a8:(Z8=1,X8(),a8)}var $8={},e5,t5;function n5(){if(t5)return e5;t5=1;var e=AF(),t=TypeError;return e5=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},e5}var r5,i5;function a5(){return i5?r5:(i5=1,r5=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},r5)}var o5,s5;function c5(){if(s5)return o5;s5=1;var e=lF(),t=a5(),n=e(`Set`),r=n.prototype;return o5={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},o5}var l5,u5;function d5(){if(u5)return l5;u5=1;var e=IP();return l5=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},l5}var f5,p5;function m5(){if(p5)return f5;p5=1;var e=d5();return f5=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},f5}var h5,g5;function _5(){if(g5)return h5;g5=1;var e=c5(),t=m5(),n=e.Set,r=e.add;return h5=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},h5}var v5,y5;function b5(){return y5?v5:(y5=1,v5=function(e){return e.size},v5)}var x5,S5;function C5(){return S5?x5:(S5=1,x5=function(e){return{iterator:e,next:e.next,done:!1}},x5)}var w5,T5;function E5(){if(T5)return w5;T5=1;var e=NF(),t=II(),n=IP(),r=fR(),i=C5(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},w5=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},w5}var D5,O5;function Ane(){if(O5)return D5;O5=1;var e=n5(),t=c5(),n=_5(),r=b5(),i=E5(),a=m5(),o=d5(),s=t.has,c=t.remove;return D5=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},D5}var k5,A5;function j5(){return A5?k5:(A5=1,k5=function(){return!1},k5)}var M5;function jne(){if(M5)return $8;M5=1;var e=X(),t=Ane(),n=dP();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),$8}var N5={},P5,F5;function Mne(){if(F5)return P5;F5=1;var e=n5(),t=c5(),n=b5(),r=E5(),i=m5(),a=d5(),o=t.Set,s=t.add,c=t.has;return P5=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},P5}var I5;function Nne(){if(I5)return N5;I5=1;var e=X(),t=dP(),n=Mne();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),N5}var L5={},R5,z5;function Pne(){if(z5)return R5;z5=1;var e=n5(),t=c5().has,n=b5(),r=E5(),i=m5(),a=d5(),o=A8();return R5=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},R5}var B5;function Fne(){if(B5)return L5;B5=1;var e=X(),t=Pne();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),L5}var V5={},H5,U5;function Ine(){if(U5)return H5;U5=1;var e=n5(),t=b5(),n=m5(),r=E5();return H5=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},H5}var W5;function Lne(){if(W5)return V5;W5=1;var e=X(),t=Ine();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),V5}var G5={},K5,q5;function Rne(){if(q5)return K5;q5=1;var e=n5(),t=c5().has,n=b5(),r=E5(),i=d5(),a=A8();return K5=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},K5}var J5;function zne(){if(J5)return G5;J5=1;var e=X(),t=Rne();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),G5}var Y5={},X5,Z5;function Bne(){if(Z5)return X5;Z5=1;var e=n5(),t=c5(),n=_5(),r=E5(),i=d5(),a=t.add,o=t.has,s=t.remove;return X5=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},X5}var Q5,$5;function e7(){return $5?Q5:($5=1,Q5=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},Q5)}var t7;function Vne(){if(t7)return Y5;t7=1;var e=X(),t=Bne(),n=e7();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),Y5}var n7={},r7,i7;function Hne(){if(i7)return r7;i7=1;var e=n5(),t=c5().add,n=_5(),r=E5(),i=d5();return r7=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},r7}var a7;function Une(){if(a7)return n7;a7=1;var e=X(),t=Hne(),n=e7();return e({target:`Set`,proto:!0,real:!0,forced:!j5()(`union`)||!n(`union`)},{union:t}),n7}var o7,s7;function Wne(){return s7?o7:(s7=1,nW(),Q8(),jne(),Nne(),Fne(),Lne(),zne(),Vne(),Une(),dG(),o7=oF().Set,o7)}var c7,l7;function Gne(){if(l7)return c7;l7=1;var e=Wne();return oW(),c7=e,c7}var u7,d7;function Kne(){return d7?u7:(d7=1,u7=Gne(),u7)}var f7=iP(Kne()),p7=.001;function qne(e){n3(e).call(e,(e,t)=>e.data.start-t.data.start)}function Jne(e){n3(e).call(e,(e,t)=>(`end`in e.data?e.data.end:e.data.start)-(`end`in t.data?t.data.end:t.data.start))}function m7(e,t,n,r){return g7(e,t.item,!1,e=>e.stack&&(n||e.top===null),e=>e.stack,()=>t.axis,r)===null}function Yne(e,t,n){n.height=g7(e,t.item,!1,e=>e.stack,()=>!0,e=>e.baseTop)-n.top+.5*t.item.vertical}function Xne(e,t,n,r){for(let i=0;i<e.length;i++){if(e[i].data.subgroup==null){e[i].top=t.item.vertical;continue}if(e[i].data.subgroup===void 0||!r)continue;let a=0;for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||n[t].visible!==!0||n[t].index>=n[e[i].data.subgroup].index||(a+=n[t].height,n[e[i].data.subgroup].top=a);e[i].top=a+.5*t.item.vertical}r||Zne(e,t,n)}function Zne(e,t,n){var r;g7(n3(r=aX(n)).call(r,(e,t)=>e.index>t.index?1:e.index<t.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let r=0;r<e.length;r++)e[r].data.subgroup!==void 0&&(e[r].top=n[e[r].data.subgroup].top+.5*t.item.vertical)}function h7(e,t,n){let r=!1,i=[];for(let e in n)Object.prototype.hasOwnProperty.call(n[e],`index`)?i[n[e].index]=e:i.push(e);for(let a=0;a<i.length;a++){let o=i[a];if(!Object.prototype.hasOwnProperty.call(n,o))continue;r||=n[o].stack,n[o].top=0;for(let e in n)n[e].visible&&n[o].index>n[e].index&&(n[o].top+=n[e].height);let s=e[o];for(let e=0;e<s.length;e++)s[e].data.subgroup!==void 0&&(s[e].top=n[s[e].data.subgroup].top+.5*t.item.vertical,n[o].stack&&(s[e].baseTop=s[e].top));r&&n[o].stack&&Yne(e[o],t,n[o])}}function g7(e,t,n,r,i,a,o){let s=e=>e.start,c=e=>e.end;n||(s=e[0]&&e[0].options.rtl?e=>e.right:e=>e.left,c=e=>s(e)+e.width+t.horizontal);let l=[],u=[],d=null,f=0;for(let t of e)if(r(t))l.push(t);else if(i(t)){let e=s(t);d!==null&&e<d-p7&&(f=0),d=e,f=_7(u,t=>s(t)-p7>e,f),wJ(u).call(u,f,0,t),f++}d=null;let p=null;f=0;let m=0,h=0,g=0;for(;l.length>0;){var _;let e=l.shift();e.top=a(e);let n=s(e),r=c(e);d!==null&&n<d-p7&&(m=0,h=0,f=0,p=null),(d===null||n>d+p7)&&(m=_7(u,e=>n<c(e)-p7,m)),d=n,(p===null||p<r-p7)&&(h=_7(u,e=>r<s(e)-p7,Math.max(m,h))),p!==null&&p-p7>r&&(h=$ne(u,e=>r+p7>=s(e),m,h)+1),p=r;let v=n3(_=ere(u,e=>n<c(e)-p7,m,h)).call(_,(e,t)=>e.top-t.top);for(let n=0;n<v.length;n++){let r=v[n];Qne(e,r,t)&&(e.top=r.top+r.height+t.vertical)}i(e)&&(f=_7(u,e=>s(e)-p7>n,f),wJ(u).call(u,f,0,e),f<m&&m++,f<=h&&h++,f++);let y=e.top+e.height;if(y>g&&(g=y),o&&o())return null}return g}function Qne(e,t,n){return e.top-n.vertical+p7<t.top+t.height&&e.top+e.height+n.vertical-p7>t.top}function _7(e,t,n){n||=0;for(let r=n;r<e.length;r++)if(t(e[r]))return r;return e.length}function $ne(e,t,n,r){n||=0,r||=e.length;for(let i=r-1;i>=n;i--)if(t(e[i]))return i;return n-1}function ere(e,t,n,r){n||=0,r=r?Math.min(r,e.length):e.length;let i=[];for(let a=n;a<r;a++)t(e[a])&&i.push(e[a]);return i}var v7={BACKGROUND:`__background__`},y7=class{constructor(e,t,n){if(this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=t&&t.subgroupOrder,this.itemSet=n,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],t&&t.nestedGroups&&(this.nestedGroups=t.nestedGroups,t.showNested==0?this.showNested=!1:this.showNested=!0),t&&t.subgroupStack)if(typeof t.subgroupStack==`boolean`)this.doInnerStack=t.subgroupStack,this.subgroupStackAll=t.subgroupStack;else for(let e in t.subgroupStack)Object.prototype.hasOwnProperty.call(t.subgroupStack,e)&&(this.subgroupStack[e]=t.subgroupStack[e],this.doInnerStack=this.doInnerStack||t.subgroupStack[e]);t&&t.heightMode?this.heightMode=t.heightMode:this.heightMode=n.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;let r=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on(`checkRangedItems`,r),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off(`checkRangedItems`,r)}),this._create(),this.setData(t)}_create(){let e=document.createElement(`div`);this.itemSet.options.groupEditable.order?e.className=`vis-label draggable`:e.className=`vis-label`,this.dom.label=e;let t=document.createElement(`div`);t.className=`vis-inner`,e.appendChild(t),this.dom.inner=t;let n=document.createElement(`div`);n.className=`vis-group`,n[`vis-group`]=this,this.dom.foreground=n,this.dom.background=document.createElement(`div`),this.dom.background.className=`vis-group`,this.dom.axis=document.createElement(`div`),this.dom.axis.className=`vis-group`,this.dom.marker=document.createElement(`div`),this.dom.marker.style.visibility=`hidden`,this.dom.marker.style.position=`absolute`,this.dom.marker.innerHTML=``,this.dom.background.appendChild(this.dom.marker)}setData(e){if(this.itemSet.groupTouchParams.isDragging)return;let t,n;if(e&&e.subgroupVisibility)for(let t in e.subgroupVisibility)Object.prototype.hasOwnProperty.call(e.subgroupVisibility,t)&&(this.subgroupVisibility[t]=e.subgroupVisibility[t]);if(this.itemSet.options&&this.itemSet.options.groupTemplate){var r;n=Z(r=this.itemSet.options.groupTemplate).call(r,this),t=n(e,this.dom.inner)}else t=e&&e.content;if(t instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(t)}else t instanceof Object&&t.isReactComponent||(t instanceof Object?n(e,this.dom.inner):t==null?this.dom.inner.innerHTML=$.xss(this.groupId||``):this.dom.inner.innerHTML=$.xss(t));this.dom.label.title=e&&e.title||``,this.dom.inner.firstChild?$.removeClassName(this.dom.inner,`vis-hidden`):$.addClassName(this.dom.inner,`vis-hidden`),e&&e.nestedGroups?((!this.nestedGroups||this.nestedGroups!=e.nestedGroups)&&(this.nestedGroups=e.nestedGroups),(e.showNested!==void 0||this.showNested===void 0)&&(e.showNested==0?this.showNested=!1:this.showNested=!0),$.addClassName(this.dom.label,`vis-nesting-group`),this.showNested?($.removeClassName(this.dom.label,`collapsed`),$.addClassName(this.dom.label,`expanded`)):($.removeClassName(this.dom.label,`expanded`),$.addClassName(this.dom.label,`collapsed`))):this.nestedGroups&&(this.nestedGroups=null,$.removeClassName(this.dom.label,`collapsed`),$.removeClassName(this.dom.label,`expanded`),$.removeClassName(this.dom.label,`vis-nesting-group`)),e&&(e.treeLevel||e.nestedInGroup)?($.addClassName(this.dom.label,`vis-nested-group`),e.treeLevel?$.addClassName(this.dom.label,`vis-group-level-`+e.treeLevel):$.addClassName(this.dom.label,`vis-group-level-unknown-but-gte1`)):$.addClassName(this.dom.label,`vis-group-level-0`);let i=e&&e.className||null;i!=this.className&&(this.className&&($.removeClassName(this.dom.label,this.className),$.removeClassName(this.dom.foreground,this.className),$.removeClassName(this.dom.background,this.className),$.removeClassName(this.dom.axis,this.className)),$.addClassName(this.dom.label,i),$.addClassName(this.dom.foreground,i),$.addClassName(this.dom.background,i),$.addClassName(this.dom.axis,i),this.className=i),this.style&&=($.removeCssText(this.dom.label,this.style),null),e&&e.style&&($.addCssText(this.dom.label,e.style),this.style=e.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){let e=this.dom.marker.clientHeight;if(e!=this.lastMarkerHeight){this.lastMarkerHeight=e;let t={},n=0;if(Q($).call($,this.items,(e,r)=>{e.dirty=!0,e.displayed&&(t[r]=e.redraw(!0),n=t[r].length)}),n>0)for(let e=0;e<n;e++)Q($).call($,t,t=>{t[e]()});return!0}else return!1}_calculateGroupSizeAndPosition(){let{offsetTop:e,offsetLeft:t,offsetWidth:n}=this.dom.foreground;this.top=e,this.right=t,this.width=n}_shouldBailItemsRedraw(){let e=this,t=this.itemSet.options.onTimeout,n={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:t&&t.timeoutMs,userBailFunction:t&&t.callback,shouldBailStackItems:this.shouldBailStackItems},r=null;if(!this.itemSet.initialDrawDone){if(n.shouldBailStackItems)return!0;Math.abs(Bq()-new Date(n.relativeBailingTime))>n.bailTimeMs&&(n.userBailFunction&&this.itemSet.userContinueNotBail==null?n.userBailFunction(t=>{e.itemSet.userContinueNotBail=t,r=!t}):r=e.itemSet.userContinueNotBail==0)}return r}_redrawItems(e,t,n,r){if(e||this.stackDirty||this.isVisible&&!t){var i,a,o,s,c,l;let e={byEnd:mV(i=this.orderedItems.byEnd).call(i,e=>!e.isCluster),byStart:mV(a=this.orderedItems.byStart).call(a,e=>!e.isCluster)},t={byEnd:[...new f7(mV(o=lK(s=this.orderedItems.byEnd).call(s,e=>e.cluster)).call(o,e=>!!e))],byStart:[...new f7(mV(c=lK(l=this.orderedItems.byStart).call(l,e=>e.cluster)).call(c,e=>!!e))]},h=()=>{var n,i;let a=this._updateItemsInRange(e,mV(n=this.visibleItems).call(n,e=>!e.isCluster),r),o=this._updateClustersInRange(t,mV(i=this.visibleItems).call(i,e=>e.isCluster),r);return[...a,...o]},g=e=>{let t={};for(let r in this.subgroups){var n;if(!Object.prototype.hasOwnProperty.call(this.subgroups,r))continue;let i=mV(n=this.visibleItems).call(n,e=>e.data.subgroup===r);t[r]=e?n3(i).call(i,(t,n)=>e(t.data,n.data)):i}return t};if(typeof this.itemSet.options.order==`function`){let e=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups)h7(g(this.itemSet.options.order),n,this.subgroups),this.visibleItems=h(),this._updateSubGroupHeights(n);else{var u,d,f,p;this.visibleItems=h(),this._updateSubGroupHeights(n),this.shouldBailStackItems=m7(n3(u=mV(d=mq(f=this.visibleItems).call(f)).call(d,e=>e.isCluster||!e.isCluster&&!e.cluster)).call(u,(t,n)=>e.itemSet.options.order(t.data,n.data)),n,!0,Z(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=h(),this._updateSubGroupHeights(n),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups)h7(g(),n,this.subgroups);else{var m;this.shouldBailStackItems=m7(this.visibleItems,n,!0,Z(m=this._shouldBailItemsRedraw).call(m,this))}else Xne(this.visibleItems,n,this.subgroups,this.itemSet.options.stackSubgroups);for(let e=0;e<this.visibleItems.length;e++)this.visibleItems[e].repositionX(),this.subgroupVisibility[this.visibleItems[e].data.subgroup]!==void 0&&(this.subgroupVisibility[this.visibleItems[e].data.subgroup]||this.visibleItems[e].hide());this.itemSet.options.cluster&&Q($).call($,this.items,e=>{e.cluster&&e.displayed&&e.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit(`destroyTimeline`),this.stackDirty=!1}}_didResize(e,t){e=$.updateProperty(this,`height`,t)||e;let n=this.dom.inner.clientWidth,r=this.dom.inner.clientHeight;return e=$.updateProperty(this.props.label,`width`,n)||e,e=$.updateProperty(this.props.label,`height`,r)||e,e}_applyGroupHeight(e){this.dom.background.style.height=`${e}px`,this.dom.foreground.style.height=`${e}px`,this.dom.label.style.height=`${e}px`}_updateItemsVerticalPosition(e){for(let t=0,n=this.visibleItems.length;t<n;t++){let n=this.visibleItems[t];n.repositionY(e),!this.isVisible&&this.groupId!=v7.BACKGROUND&&n.displayed&&n.hide()}}redraw(e,t,n,r){var i,a,o,s,c;let l=!1,u=this.isVisible,d,f=[()=>{n=this._didMarkerHeightChange.call(this)||n},Z(i=this._updateSubGroupHeights).call(i,this,t),Z(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var n;this.isVisible=Z(n=this._isGroupVisible).call(n,this)(e,t)},()=>{var r;Z(r=this._redrawItems).call(r,this)(n,u,t,e)},Z(o=this._updateSubgroupsSizes).call(o,this),()=>{var e;d=this.height=Z(e=this._calculateHeight).call(e,this)(t)},Z(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var e;l=Z(e=this._didResize).call(e,this)(l,d)},()=>{var e;Z(e=this._applyGroupHeight).call(e,this)(d)},()=>{var e;Z(e=this._updateItemsVerticalPosition).call(e,this)(t)},Z(c=()=>(!this.isVisible&&this.height&&(l=!1),l)).call(c,this)];if(r)return f;{let e;return Q(f).call(f,t=>{e=t()}),e}}_updateSubGroupHeights(e){if(WK(this.subgroups).length>0){let t=this;this._resetSubgroups(),Q($).call($,this.visibleItems,n=>{n.data.subgroup!==void 0&&(t.subgroups[n.data.subgroup].height=Math.max(t.subgroups[n.data.subgroup].height,n.height+e.item.vertical),t.subgroups[n.data.subgroup].visible=this.subgroupVisibility[n.data.subgroup]===void 0?!0:!!this.subgroupVisibility[n.data.subgroup])})}}_isGroupVisible(e,t){return this.top<=e.body.domProps.centerContainer.height-e.body.domProps.scrollTop+t.axis&&this.top+this.height+t.axis>=-e.body.domProps.scrollTop}_calculateHeight(e){let t,n;if(n=this.heightMode===`fixed`?$.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)t=Math.max(this.height,this.props.label.height);else if(n.length>0){let r=n[0].top,i=n[0].top+n[0].height;if(Q($).call($,n,e=>{r=Math.min(r,e.top),i=Math.max(i,e.top+e.height)}),r>e.axis){let t=r-e.axis;i-=t,Q($).call($,n,e=>{e.top-=t})}t=Math.ceil(i+e.item.vertical/2),this.heightMode!==`fitItems`&&(t=Math.max(t,this.props.label.height))}else t=this.props.label.height;return t}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){let e=this.dom.label;e.parentNode&&e.parentNode.removeChild(e);let t=this.dom.foreground;t.parentNode&&t.parentNode.removeChild(t);let n=this.dom.background;n.parentNode&&n.parentNode.removeChild(n);let r=this.dom.axis;r.parentNode&&r.parentNode.removeChild(r)}add(e){var t;if(this.items[e.id]=e,e.setParent(this),this.stackDirty=!0,e.data.subgroup!==void 0&&(this._addToSubgroup(e),this.orderSubgroups()),!_Y(t=this.visibleItems).call(t,e)){let t=this.itemSet.body.range;this._checkIfVisible(e,this.visibleItems,t)}}_addToSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;t!=null&&this.subgroups[t]===void 0&&(this.subgroups[t]={height:0,top:0,start:e.data.start,end:e.data.end||e.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[t]||!1},this.subgroupIndex++),new Date(e.data.start)<new Date(this.subgroups[t].start)&&(this.subgroups[t].start=e.data.start);let n=e.data.end||e.data.start;new Date(n)>new Date(this.subgroups[t].end)&&(this.subgroups[t].end=n),this.subgroups[t].items.push(e)}_updateSubgroupsSizes(){let e=this;if(e.subgroups)for(let n in e.subgroups){var t;if(!Object.prototype.hasOwnProperty.call(e.subgroups,n))continue;let r=e.subgroups[n].items[0].data.end||e.subgroups[n].items[0].data.start,i=e.subgroups[n].items[0].data.start,a=r-1;Q(t=e.subgroups[n].items).call(t,e=>{new Date(e.data.start)<new Date(i)&&(i=e.data.start);let t=e.data.end||e.data.start;new Date(t)>new Date(a)&&(a=t)}),e.subgroups[n].start=i,e.subgroups[n].end=new Date(a-1)}}orderSubgroups(){if(this.subgroupOrderer!==void 0){let e=[];if(typeof this.subgroupOrderer==`string`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});n3(e).call(e,(e,t)=>e.sortField-t.sortField)}else if(typeof this.subgroupOrderer==`function`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push(this.subgroups[t].items[0].data);n3(e).call(e,this.subgroupOrderer)}if(e.length>0)for(let t=0;t<e.length;t++)this.subgroups[e[t].subgroup].index=t}}_resetSubgroups(){for(let e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&(this.subgroups[e].visible=!1,this.subgroups[e].height=0)}remove(e){var t,n;delete this.items[e.id],e.setParent(null),this.stackDirty=!0;let r=UX(t=this.visibleItems).call(t,e);r!=-1&&wJ(n=this.visibleItems).call(n,r,1),e.data.subgroup!==void 0&&(this._removeFromSubgroup(e),this.orderSubgroups())}_removeFromSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;if(t!=null){let i=this.subgroups[t];if(i){var n;let a=UX(n=i.items).call(n,e);if(a>=0){var r;wJ(r=i.items).call(r,a,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[t]}}}}removeFromDataSet(e){this.itemSet.removeItem(e.id)}order(){let e=$.toArray(this.items),t=[],n=[];for(let r=0;r<e.length;r++)e[r].data.end!==void 0&&n.push(e[r]),t.push(e[r]);this.orderedItems={byStart:t,byEnd:n},qne(this.orderedItems.byStart),Jne(this.orderedItems.byEnd)}_updateItemsInRange(e,t,n){let r=[],i={};if(!this.isVisible&&this.height!==void 0&&this.groupId!=v7.BACKGROUND){for(let e=0;e<t.length;e++){var a=t[e];a.displayed&&a.hide()}return r}let o=(n.end-n.start)/4,s=n.start-o,c=n.end+o,l=e=>e<s?-1:e<=c?0:1,u=e=>{let{start:t,end:n}=e;return n<s?-1:t<=c?0:1};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);let d=$.binarySearchCustom(e.byStart,l,`data`,`start`);if(this._traceVisible(d,e.byStart,r,i,e=>e.data.start<s||e.data.start>c),this.checkRangedItems==1){this.checkRangedItems=!1;for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n)}else{let t=$.binarySearchCustom(e.byEnd,u,`data`);this._traceVisible(t,e.byEnd,r,i,e=>e.data.end<s||e.data.start>c)}this._sortVisibleItems(e.byStart,r,i);let f={},p=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(f[e]=t.redraw(!0),p=f[e].length)}if(p>0)for(let e=0;e<p;e++)Q($).call($,f,t=>{t[e]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}_traceVisible(e,t,n,r,i){if(e!=-1){for(let a=e;a>=0;a--){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.unshift(e))}for(let a=e+1;a<t.length;a++){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.push(e))}}}_sortVisibleItems(e,t,n){t.length=0;for(let r=0;r<e.length;r++){let i=e[r];n[i.id]&&t.push(i)}}_checkIfVisible(e,t,n){e.isVisible(n)?(e.displayed||e.show(),e.repositionX(),t.push(e)):e.displayed&&e.hide()}_checkIfVisibleWithReference(e,t,n,r){e.isVisible(r)?n[e.id]===void 0&&(n[e.id]=!0,t.push(e)):e.displayed&&e.hide()}_updateClustersInRange(e,t,n){let r=[],i={};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);for(let t=0;t<e.byStart.length;t++)this._checkIfVisibleWithReference(e.byStart[t],r,i,n);for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n);let a={},o=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(a[e]=t.redraw(!0),o=a[e].length)}if(o>0)for(var s=0;s<o;s++)Q($).call($,a,function(e){e[s]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}changeSubgroup(e,t,n){this._removeFromSubgroup(e,t),this._addToSubgroup(e,n),this.orderSubgroups()}dispose(){this.hide();let e;for(;e=this._disposeCallbacks.pop();)e()}},b7=class extends y7{constructor(e,t,n){super(e,t,n),this.width=0,this.height=0,this.top=0,this.left=0}redraw(e,t){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,e),this.width=this.dom.background.offsetWidth,this.dom.background.style.height=`0`;for(let e=0,n=this.visibleItems.length;e<n;e++)this.visibleItems[e].repositionY(t);return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}},x7=class{constructor(e,t,n){var r;this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=t||{},this.defaultOptions={locales:z6,locale:`en`},this.options=$.extend({},this.defaultOptions,n),this.options.locales=$.extend({},z6,this.options.locales);let i=this.defaultOptions.locales[this.defaultOptions.locale];Q(r=WK(this.options.locales)).call(r,e=>{this.options.locales[e]=$.extend({},i,this.options.locales[e])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(e){e.group!=null&&this.data.group!=e.group&&this.parent!=null&&this.parent.itemSet._moveToGroup(this,e.group),this.setSelectability(e),this.parent&&(this.parent.stackDirty=!0),e.subgroup!=null&&this.data.subgroup!=e.subgroup&&this.parent!=null&&this.parent.changeSubgroup(this,this.data.subgroup,e.subgroup),this.data=e,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(e){e&&(this.selectable=e.selectable===void 0?!0:!!e.selectable)}setParent(e){this.displayed?(this.hide(),this.parent=e,this.parent&&this.show()):this.parent=e}isVisible(){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var e,t;let n=this,r=document.createElement(`div`);r.className=`vis-drag-center`,r.dragCenterItem=this,this.hammerDragCenter=new W3(r),this.hammerDragCenter.on(`tap`,e=>{n.parent.itemSet.body.emitter.emit(`click`,{event:e,item:n.id})}),this.hammerDragCenter.on(`doubletap`,e=>{e.stopPropagation(),n.parent.itemSet._onUpdateItem(n),n.parent.itemSet.body.emitter.emit(`doubleClick`,{event:e,item:n.id})}),this.hammerDragCenter.on(`panstart`,e=>{e.stopPropagation(),n.parent.itemSet._onDragStart(e)}),this.hammerDragCenter.on(`panmove`,Z(e=n.parent.itemSet._onDrag).call(e,n.parent.itemSet)),this.hammerDragCenter.on(`panend`,Z(t=n.parent.itemSet._onDragEnd).call(t,n.parent.itemSet)),this.hammerDragCenter.get(`press`).set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(r,this.dom.dragLeft):this.dom.box.appendChild(r):this.dom.point&&this.dom.point.appendChild(r),this.dom.dragCenter=r}else !this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&=(this.hammerDragCenter.destroy(),null))}_repaintDeleteButton(e){let t=(this.options.editable.overrideItems||this.editable==null)&&this.options.editable.remove||!this.options.editable.overrideItems&&this.editable!=null&&this.editable.remove;if(this.selected&&t&&!this.dom.deleteButton){let t=this,n=document.createElement(`div`);this.options.rtl?n.className=`vis-delete-rtl`:n.className=`vis-delete`;let r=this.options.locales[this.options.locale];r||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en),n.title=r.deleteSelected,this.hammerDeleteButton=new W3(n).on(`tap`,e=>{e.stopPropagation(),t.parent.removeFromDataSet(t)}),e.appendChild(n),this.dom.deleteButton=n}else (!this.selected||!t)&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&=(this.hammerDeleteButton.destroy(),null))}_repaintOnItemUpdateTimeTooltip(e){if(!this.options.tooltipOnItemUpdateTime)return;let t=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&t&&!this.dom.onItemUpdateTimeTooltip){let t=document.createElement(`div`);t.className=`vis-onUpdateTime-tooltip`,e.appendChild(t),this.dom.onItemUpdateTimeTooltip=t}else !this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?`visible`:`hidden`,this.dom.onItemUpdateTimeTooltip.style.transform=`translateX(-50%)`,this.dom.onItemUpdateTimeTooltip.style.left=`50%`;let e=this.parent.itemSet.body.domProps.scrollTop,t;t=this.options.orientation.item==`top`?this.top:this.parent.height-this.top-this.height,t+this.parent.top-50<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom=``,this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top=``,this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`);let r,i;if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template){var n;i=Z(n=this.options.tooltipOnItemUpdateTime.template).call(n,this),r=i(this.data)}else r=`start: ${ez(this.data.start).format(`MM/DD/YYYY hh:mm`)}`,this.data.end&&(r+=`<br> end: ${ez(this.data.end).format(`MM/DD/YYYY hh:mm`)}`);this.dom.onItemUpdateTimeTooltip.innerHTML=$.xss(r)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(e){let t,n,r,i,a,o=this._getItemData(),s=(this.dom.box||this.dom.point).getElementsByClassName(`vis-item-visible-frame`)[0];if(this.options.visibleFrameTemplate){var c;a=Z(c=this.options.visibleFrameTemplate).call(c,this),i=$.xss(a(o,s))}else i=``;if(s){if(i instanceof Object&&!(i instanceof Element))a(o,s);else if(n=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(i),n){if(i instanceof Element)s.innerHTML=``,s.appendChild(i);else if(i!=null)s.innerHTML=$.xss(i);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=i}}if(this.options.template){var l;r=Z(l=this.options.template).call(l,this),t=r(o,e,this.data)}else t=this.data.content;if(t instanceof Object&&!(t instanceof Element))r(o,e);else if(n=this._contentToString(this.content)!==this._contentToString(t),n){if(t instanceof Element)e.innerHTML=``,e.appendChild(t);else if(t!=null)e.innerHTML=$.xss(t);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.content=t}}_updateDataAttributes(e){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let t=[];if(iL(this.options.dataAttributes))t=this.options.dataAttributes;else if(this.options.dataAttributes==`all`)t=WK(this.data);else return;for(let n of t){let t=this.data[n];t==null?e.removeAttribute(`data-${n}`):e.setAttribute(`data-${n}`,t)}}}_updateStyle(e){this.style&&=($.removeCssText(e,this.style),null),this.data.style&&($.addCssText(e,this.data.style),this.style=this.data.style)}_contentToString(e){return typeof e==`string`?e:e&&`outerHTML`in e?e.outerHTML:e}_updateEditStatus(){this.options&&(typeof this.options.editable==`boolean`?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:typeof this.options.editable==`object`&&(this.editable={},$.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.options.editable))),(!this.options||!this.options.editable||this.options.editable.overrideItems!==!0)&&this.data&&(typeof this.data.editable==`boolean`?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:typeof this.data.editable==`object`&&(this.editable={},$.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var e;return Z(e=this.options.tooltip.template).call(e,this)(this._getItemData(),this.data)}return this.data.title}};x7.prototype.stack=!0;var tre=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={dot:{width:0,height:0},line:{width:0,height:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t,n=this.data.align||this.options.align,r=this.width*e.getMillisecondsPerPixel();return t=n==`right`?this.data.start.getTime()>e.start&&this.data.start.getTime()-r<e.end:n==`left`?this.data.start.getTime()+r>e.start&&this.data.start.getTime()<e.end:this.data.start.getTime()+r/2>e.start&&this.data.start.getTime()-r/2<e.end,t}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-line`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-dot`,this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){let t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=`vis-item vis-box${t}`,this.dom.line.className=`vis-item vis-line${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.props.dot.height=e.dot.height,this.props.dot.width=e.dot.width,this.props.line.width=e.line.width,this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom;e.box.remove?e.box.remove():e.box.parentNode&&e.box.parentNode.removeChild(e.box),e.line.remove?e.line.remove():e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.remove?e.dot.remove():e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot),this.displayed=!1}}repositionXY(){let e=this.options.rtl,t=function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=UY(r=`translate(${a}px, `).call(r,n,`px)`)};t(this.dom.box,this.boxX,this.boxY,e),t(this.dom.dot,this.dotX,this.dotY,e),t(this.dom.line,this.lineX,this.lineY,e)}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.align===void 0?this.options.align:this.data.align,n=this.props.line.width,r=this.props.dot.width;t==`right`?(this.boxX=e-this.width,this.lineX=e-n,this.dotX=e-n/2-r/2):t==`left`?(this.boxX=e,this.lineX=e,this.dotX=e+n/2-r/2):(this.boxX=e-this.width/2,this.lineX=this.options.rtl?e-n:e-n/2,this.dotX=e-r/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){let e=this.options.orientation.item,t=this.dom.line.style;if(e==`top`){let e=this.parent.top+this.top+1;this.boxY=this.top||0,t.height=`${e}px`,t.bottom=``,t.top=`0`}else{let e=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),t.height=`${e}px`,t.top=``,t.bottom=`0`}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},nre=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t=this.width*e.getMillisecondsPerPixel();return this.data.start.getTime()+t>e.start&&this.data.start<e.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement(`div`),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement(`div`),this.dom.point.appendChild(this.dom.dot),this.dom.point[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.point.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.point.className=`vis-item vis-point${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(e){this.props.dot.width=e.dot.width,this.props.dot.height=e.dot.height,this.props.content.height=e.content.height,this.options.rtl?this.dom.content.style.marginRight=`${this.props.dot.width/2}px`:this.dom.content.style.marginLeft=`${this.props.dot.width/2}px`,this.width=e.point.width,this.height=e.point.height,this.dom.dot.style.top=`${(this.height-this.props.dot.height)/2}px`;let t=this.props.dot.width,n=this.options.rtl?t/2:t/2*-1;this.dom.dot.style.transform=`translateX(${n}px`,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}repositionXY(){let e=this.options.rtl;(function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=UY(r=`translate(${a}px, `).call(r,n,`px)`)})(this.dom.point,this.pointX,this.pointY,e)}show(e){if(!this.displayed)return this.redraw(e)}hide(){this.displayed&&=(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),!1)}repositionX(){let e=this.conversion.toScreen(this.data.start);this.pointX=e,this.options.rtl?this.right=e-this.props.dot.width:this.left=e-this.props.dot.width,this.repositionXY()}repositionY(){this.options.orientation.item==`top`?this.pointY=this.top:this.pointY=this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}},S7=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.cluster?!1:this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement(`div`),this.dom.visibleFrame.className=`vis-item-visible-frame`,this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=this.baseClassName+t,this.dom.content.style.maxWidth=`none`}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.frame).overflow!==`hidden`,this.whiteSpace=window.getComputedStyle(this.dom.content).whiteSpace!==`nowrap`,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=e.box.height,this.dom.content.style.maxWidth=``,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=Z(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom.box;e.parentNode&&e.parentNode.removeChild(e),this.displayed=!1}}repositionX(e){let t=this.parent.width,n=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),i=this.data.align===void 0?this.options.align:this.data.align,a,o;this.data.limitSize!==!1&&(e===void 0||e===!0)&&(n<-t&&(n=-t),r>2*t&&(r=2*t));let s=Math.max(Math.round((r-n)*1e3)/1e3,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=s+this.props.content.width,o=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=s,o=Math.min(r-n,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${this.right*-1}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${s}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),i){case`left`:this.dom.content.style.transform=`translateX(0)`;break;case`right`:if(this.options.rtl){let e=Math.max(s-o,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max(s-o,0)}px)`;break;case`center`:if(this.options.rtl){let e=Math.max((s-o)/2,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max((s-o)/2,0)}px)`;break;default:if(a=this.overflow?r>0?Math.max(-n,0):-o:n<0?-n:0,this.options.rtl){let e=a*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${a}px)`}}repositionY(){let e=this.options.orientation.item,t=this.dom.box;e==`top`?t.style.top=`${this.top}px`:t.style.top=`${this.parent.height-this.top-this.height}px`}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){let e=document.createElement(`div`);e.className=`vis-drag-left`,e.dragLeftItem=this,this.dom.box.appendChild(e),this.dom.dragLeft=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){let e=document.createElement(`div`);e.className=`vis-drag-right`,e.dragRightItem=this,this.dom.box.appendChild(e),this.dom.dragRight=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}};S7.prototype.baseClassName=`vis-item vis-range`;var C7=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);let e=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``);this.dom.box.className=this.baseClassName+e}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.content).overflow!==`hidden`,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=Z(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}repositionY(){let e,t=this.options.orientation.item;if(this.data.subgroup!==void 0){let e=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[e].height}px`,t==`top`?this.dom.box.style.top=`${this.parent.top+this.parent.subgroups[e].top}px`:this.dom.box.style.top=`${this.parent.top+this.parent.height-this.parent.subgroups[e].top-this.parent.subgroups[e].height}px`,this.dom.box.style.bottom=``}else this.parent instanceof b7?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom=t==`bottom`?`0`:``,this.dom.box.style.top=t==`top`?`0`:``):(e=this.parent.height,this.dom.box.style.top=`${this.parent.top}px`,this.dom.box.style.bottom=``);this.dom.box.style.height=`${e}px`}};C7.prototype.baseClassName=`vis-item vis-background`,C7.prototype.stack=!1,C7.prototype.show=S7.prototype.show,C7.prototype.hide=S7.prototype.hide,C7.prototype.repositionX=S7.prototype.repositionX;var rre=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=DX(e),this.y=DX(t)}setText(e){e instanceof Element?(this.frame.innerHTML=``,this.frame.appendChild(e)):this.frame.innerHTML=$.xss(e)}show(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,n=this.frame.clientWidth,r=this.frame.parentNode.clientHeight,i=this.frame.parentNode.clientWidth,a=0,o=0;if(this.overflowMethod==`flip`||this.overflowMethod==`none`){let e=!1,r=!0;this.overflowMethod==`flip`&&(this.y-t<this.padding&&(r=!1),this.x+n>i-this.padding&&(e=!0)),a=e?this.x-n:this.x,o=r?this.y-t:this.y}else o=this.y-t,o+t+this.padding>r&&(o=r-t-this.padding),o<this.padding&&(o=this.padding),a=this.x,a+n+this.padding>i&&(a=i-n-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+`px`,this.frame.style.top=o+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},w7={},T7;function ire(){if(T7)return w7;T7=1;var e=X(),t=NR().every;return e({target:`Array`,proto:!0,forced:!IR()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),w7}var E7,D7;function are(){return D7?E7:(D7=1,ire(),E7=gL()(`Array`,`every`),E7)}var O7,k7;function ore(){if(k7)return O7;k7=1;var e=fF(),t=are(),n=Array.prototype;return O7=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},O7}var A7,j7;function sre(){return j7?A7:(j7=1,A7=ore(),A7)}var M7,N7;function cre(){return N7?M7:(N7=1,M7=sre(),M7)}var lre=iP(cre()),P7=class e extends x7{constructor(e,t,n){let r=BJ({},{fitOnDoubleClick:!0},n,{editable:!1});if(super(e,t,r),this.props={content:{width:0,height:0}},!e||e.uiItems==null)throw Error(`Property "uiItems" missing in item `+e.id);this.id=z2(),this.group=e.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(e){this.detach(),this.data.uiItems=e,this._setupRange(),this.attach()}isVisible(e){let t=this.data.end?this.data.end-this.data.start:0,n=this.width*e.getMillisecondsPerPixel(),r=Math.max(this.data.start.getTime()+t,this.data.start.getTime()+n);return this.data.start<e.end&&r>e.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(e){var t,n,r,i,a,o,s,c=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),Z(i=function(){this.dirty&&(s=this._getDomComponentsSizes())}).call(i,this),Z(a=function(){if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(s)}}).call(a,this),Z(o=this._repaintDomAdditionals).call(o,this)];if(e)return c;var l;return Q(c).call(c,function(e){l=e()}),l}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var e=this.dom;e.box.parentNode&&e.box.parentNode.removeChild(e.box),this.options.showStipes&&(e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot)),this.displayed=!1}}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.end?this.conversion.toScreen(this.data.end):0;if(t)this.repositionXWithRanges(e,t);else{let t=this.data.align===void 0?this.options.align:this.data.align;this.repositionXWithoutRanges(e,t)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?`block`:`none`,this.dom.dot.style.display=this._isStipeVisible()?`block`:`none`,this._isStipeVisible()&&this.repositionStype(e,t))}repositionStype(e,t){this.dom.line.style.display=`block`,this.dom.dot.style.display=`block`;let n=this.dom.line.offsetWidth,r=this.dom.dot.offsetWidth;if(t){let i=n+e+(t-e)/2,a=i-r/2,o=this.options.rtl?i*-1:i,s=this.options.rtl?a*-1:a;this.dom.line.style.transform=`translateX(${o}px)`,this.dom.dot.style.transform=`translateX(${s}px)`}else{let t=this.options.rtl?e*-1:e,n=this.options.rtl?(e-r/2)*-1:e-r/2;this.dom.line.style.transform=`translateX(${t}px)`,this.dom.dot.style.transform=`translateX(${n}px)`}}repositionXWithoutRanges(e,t){t==`right`?this.options.rtl?(this.right=e-this.width,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width,this.dom.box.style.left=this.left+`px`):t==`left`?this.options.rtl?(this.right=e,this.dom.box.style.right=this.right+`px`):(this.left=e,this.dom.box.style.left=this.left+`px`):this.options.rtl?(this.right=e-this.width/2,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width/2,this.dom.box.style.left=this.left+`px`)}repositionXWithRanges(e,t){let n=Math.round(Math.max(t-e+.5,1));this.options.rtl?this.right=e:this.left=e,this.width=Math.max(n,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+`px`:this.dom.box.style.left=this.left+`px`,this.dom.box.style.width=n+`px`}repositionY(){var e=this.options.orientation.item,t=this.dom.box;if(e==`top`?t.style.top=(this.top||0)+`px`:t.style.top=(this.parent.height-this.top-this.height||0)+`px`,this.options.showStipes){if(e==`top`)this.dom.line.style.top=`0`,this.dom.line.style.height=this.parent.top+this.top+1+`px`,this.dom.line.style.bottom=``;else{var n=this.parent.itemSet.props.height,r=n-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=n-r+`px`,this.dom.line.style.bottom=`0`}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+`px`}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var e;for(let e of this.data.uiItems)e.cluster=this;this.data.items=lK(e=this.data.uiItems).call(e,e=>e.data),this.attached=!0,this.dirty=!0}detach(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.hasItems()){for(let e of this.data.uiItems)delete e.cluster;this.attached=!1,e&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var e,t,n;let r=lK(e=this.data.uiItems).call(e,e=>({start:e.data.start.valueOf(),end:e.data.end?e.data.end.valueOf():e.data.start.valueOf()}));this.data.min=Math.min(...lK(r).call(r,e=>Math.min(e.start,e.end||e.start))),this.data.max=Math.max(...lK(r).call(r,e=>Math.max(e.start,e.end||e.start)));let i=lK(t=this.data.uiItems).call(t,e=>e.center),a=jK(i).call(i,(e,t)=>e+t,0)/this.data.uiItems.length;N3(n=this.data.uiItems).call(n,e=>e.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(a),this.data.end=null)}_getUiItems(){if(this.data.uiItems&&this.data.uiItems.length){var e;return mV(e=this.data.uiItems).call(e,e=>e.cluster===this)}return[]}_createDomElement(){if(!this.dom){if(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-cluster-line`,this.dom.line.style.display=`none`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-cluster-dot`,this.dom.dot.style.display=`none`),this.options.fitOnDoubleClick){var t;this.dom.box.ondblclick=Z(t=e.prototype._onDoubleClick).call(t,this)}this.dom.box[`vis-item`]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}let e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.baseClassName+` `+(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+` vis-readonly`;this.dom.box.className=`vis-item `+e,this.options.showStipes&&(this.dom.line.className=`vis-item vis-cluster-line `+(this.selected?` vis-selected`:``),this.dom.dot.className=`vis-item vis-cluster-dot `+(this.selected?` vis-selected`:``)),this.data.end&&(this.dom.content.style.maxWidth=`none`)}}_getDomComponentsSizes(){let e={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(e.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},e.line={width:this.dom.line.offsetWidth}),e}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.data.end?this.minWidth=e.box.width:this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){let e=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-e,fitEnd:this.data.max+e}}_fit(){if(this.emitter){let{fitStart:e,fitEnd:t}=this._getFitRange(),n={start:new Date(e),end:new Date(t),animation:!0};this.emitter.emit(`fit`,n)}}_getItemData(){return this.data}};P7.prototype.baseClassName=`vis-item vis-range vis-cluster`;var ure={UNGROUPED:`__ungrouped__`},dre=class{constructor(e){this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(e,t,n){return new P7(e,t,n)}setItems(e,t){this.items=e||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,t&&t.applyOnChangedLevel&&(this.applyOnChangedLevel=t.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(e,t,n){let{maxItems:r,clusterCriteria:i}=typeof n==`boolean`?{}:n;i||=()=>!0,r||=1;let a=-1,o=0;if(t>0){if(t>=1)return[];a=Math.abs(Math.round(Math.log(100/t)/Math.log(2))),o=Math.abs(2**a)}if(this.dataChanged){let e=a!=this.cacheLevel;(!this.applyOnChangedLevel||e)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=a;let s=this.cache[a];if(!s){s=[];for(let t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;let a=this.groups[t],c=a.length,l=0;for(;l<c;){let t=a[l],c=1,u=l-1;for(;u>=0&&t.center-a[u].center<o/2;)!a[u].cluster&&i(t.data,a[u].data)&&c++,u--;let d=l+1;for(;d<a.length&&a[d].center-t.center<o/2;)i(t.data,a[d].data)&&c++,d++;let f=s.length-1;for(;f>=0&&t.center-s[f].center<o;)t.group==s[f].group&&i(t.data,s[f].data)&&c++,f--;if(c>r){let o=c-r+1,u=[],d=l;for(;u.length<o&&d<a.length;)i(a[l].data,a[d].data)&&u.push(a[d]),d++;let f=this.itemSet.getGroupId(t.data),p=this.itemSet.groups[f]||this.itemSet.groups[ure.UNGROUPED],m=this._getClusterForItems(u,p,e,n);s.push(m),l+=o}else delete t.cluster,l+=1}}this.cache[a]=s}return s}_filterData(){let e={};this.groups=e;for(let t of aX(this.items)){let n=t.parent?t.parent.groupId:``,r=e[n];r||(r=[],e[n]=r),r.push(t),t.data.start&&(t.data.end?t.center=(t.data.start.valueOf()+t.data.end.valueOf())/2:t.center=t.data.start.valueOf())}for(let n in e){var t;Object.prototype.hasOwnProperty.call(e,n)&&n3(t=e[n]).call(t,(e,t)=>e.center-t.center)}this.dataChanged=!1}_getClusterForItems(e,t,n,r){var i;let a=lK(i=n||[]).call(i,e=>{var t;return{cluster:e,itemsIds:new f7(lK(t=e.data.uiItems).call(t,e=>e.id))}}),o;if(a.length){for(let t of a)if(t.itemsIds.size===e.length&&lre(e).call(e,e=>t.itemsIds.has(e.id))){o=t.cluster;break}}if(o)return o.setUiItems(e),o.group!==t&&(o.group&&o.group.remove(o),t&&(t.add(o),o.group=t)),o;let s=r.titleTemplate||``,c={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=s.replace(/{count}/,e.length),u=`<div title="`+l+`">`+e.length+`</div>`,d=BJ({},r,this.itemSet.options),f={content:u,title:l,group:t,uiItems:e,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return o=this.createClusterItem(f,c,d),t&&(t.add(o),o.group=t),o.attach(),o}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}},F7=`__ungrouped__`,I7=`__background__`,L7=class e extends f4{constructor(e,t){super(),this.body=e,this.defaultOptions={type:null,orientation:{item:`bottom`},align:`auto`,stack:!0,stackSubgroups:!0,groupOrderSwap(e,t){let n=t.order;t.order=e.order,e.order=n},groupOrder:`order`,selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:J3.snap,onDropObjectOnItem(e,t,n){n(t)},onAdd(e,t){t(e)},onUpdate(e,t){t(e)},onMove(e,t){t(e)},onRemove(e,t){t(e)},onMoving(e,t){t(e)},onAddGroup(e,t){t(e)},onMoveGroup(e,t){t(e)},onRemoveGroup(e,t){t(e)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:500},tooltipOnItemUpdateTime:!1},this.options=$.extend({},this.defaultOptions),this.options.rtl=t.rtl,this.options.onTimeout=t.onTimeout,this.conversion={toScreen:e.util.toScreen,toTime:e.util.toTime},this.dom={},this.props={},this.hammer=null;let n=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(e,t){n._onAdd(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},update(e,t){n._onUpdate(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},remove(e,t){n._onRemove(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()}},this.groupListeners={add(e,t,r){if(n._onAddGroups(t.items),n.groupsData&&n.groupsData.length>0){var i;let e=n.groupsData.getDataSet();Q(i=e.get()).call(i,t=>{if(t.nestedGroups){var n;t.showNested!=0&&(t.showNested=!0);let i=[];Q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r&&(r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),i=UY(i).call(i,r))}),e.update(i,r)}})}},update(e,t){n._onUpdateGroups(t.items)},remove(e,t){n._onRemoveGroups(t.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(t),this.clusters=[]}_create(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m;let h=document.createElement(`div`);h.className=`vis-itemset`,h[`vis-itemset`]=this,this.dom.frame=h;let g=document.createElement(`div`);g.className=`vis-background`,h.appendChild(g),this.dom.background=g;let _=document.createElement(`div`);_.className=`vis-foreground`,h.appendChild(_),this.dom.foreground=_;let v=document.createElement(`div`);v.className=`vis-axis`,this.dom.axis=v;let y=document.createElement(`div`);y.className=`vis-labelset`,this.dom.labelSet=y,this._updateUngrouped();let b=new b7(I7,null,this);b.show(),this.groups[I7]=b,this.hammer=new W3(this.body.dom.centerContainer),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._onTouch(e)}),this.hammer.on(`panstart`,Z(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,Z(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,Z(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:W3.ALL}),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`tap`,Z(r=this._onSelectItem).call(r,this)),this.hammer.on(`press`,Z(i=this._onMultiSelectItem).call(i,this)),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`doubletap`,Z(a=this._onAddItem).call(a,this)),this.options.rtl?this.groupHammer=new W3(this.body.dom.rightContainer):this.groupHammer=new W3(this.body.dom.leftContainer),this.groupHammer.on(`tap`,Z(o=this._onGroupClick).call(o,this)),this.groupHammer.on(`panstart`,Z(s=this._onGroupDragStart).call(s,this)),this.groupHammer.on(`panmove`,Z(c=this._onGroupDrag).call(c,this)),this.groupHammer.on(`panend`,Z(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get(`pan`).set({threshold:5,direction:W3.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener(`mouseover`,Z(u=this._onMouseOver).call(u,this)),this.body.dom.centerContainer.addEventListener(`mouseout`,Z(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener(`mousemove`,Z(f=this._onMouseMove).call(f,this)),this.body.dom.centerContainer.addEventListener(`contextmenu`,Z(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener(`mousewheel`,Z(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(e){if(e){var t,n;$.selectiveExtend([`type`,`rtl`,`align`,`order`,`stack`,`stackSubgroups`,`selectable`,`multiselect`,`sequentialSelection`,`multiselectPerGroup`,`longSelectPressTime`,`groupOrder`,`dataAttributes`,`template`,`groupTemplate`,`visibleFrameTemplate`,`hide`,`snap`,`groupOrderSwap`,`showTooltips`,`tooltip`,`tooltipOnItemUpdateTime`,`groupHeightMode`,`onTimeout`],this.options,e),`itemsAlwaysDraggable`in e&&(typeof e.itemsAlwaysDraggable==`boolean`?(this.options.itemsAlwaysDraggable.item=e.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):typeof e.itemsAlwaysDraggable==`object`&&($.selectiveExtend([`item`,`range`],this.options.itemsAlwaysDraggable,e.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),`sequentialSelection`in e&&typeof e.sequentialSelection==`boolean`&&(this.options.sequentialSelection=e.sequentialSelection),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.item=e.orientation===`top`?`top`:`bottom`:typeof e.orientation==`object`&&`item`in e.orientation&&(this.options.orientation.item=e.orientation.item)),`margin`in e&&(typeof e.margin==`number`?(this.options.margin.axis=e.margin,this.options.margin.item.horizontal=e.margin,this.options.margin.item.vertical=e.margin):typeof e.margin==`object`&&($.selectiveExtend([`axis`],this.options.margin,e.margin),`item`in e.margin&&(typeof e.margin.item==`number`?(this.options.margin.item.horizontal=e.margin.item,this.options.margin.item.vertical=e.margin.item):typeof e.margin.item==`object`&&$.selectiveExtend([`horizontal`,`vertical`],this.options.margin.item,e.margin.item)))),Q(t=[`locale`,`locales`]).call(t,t=>{t in e&&(this.options[t]=e[t])}),`editable`in e&&(typeof e.editable==`boolean`?(this.options.editable.updateTime=e.editable,this.options.editable.updateGroup=e.editable,this.options.editable.add=e.editable,this.options.editable.remove=e.editable,this.options.editable.overrideItems=!1):typeof e.editable==`object`&&$.selectiveExtend([`updateTime`,`updateGroup`,`add`,`remove`,`overrideItems`],this.options.editable,e.editable)),`groupEditable`in e&&(typeof e.groupEditable==`boolean`?(this.options.groupEditable.order=e.groupEditable,this.options.groupEditable.add=e.groupEditable,this.options.groupEditable.remove=e.groupEditable):typeof e.groupEditable==`object`&&$.selectiveExtend([`order`,`add`,`remove`],this.options.groupEditable,e.groupEditable)),Q(n=[`onDropObjectOnItem`,`onAdd`,`onUpdate`,`onRemove`,`onMove`,`onMoving`,`onAddGroup`,`onMoveGroup`,`onRemoveGroup`]).call(n,t=>{let n=e[t];if(n){if(typeof n!=`function`){var r;throw Error(UY(r=`option ${t} must be a function `).call(r,t,`(item, callback)`))}this.options[t]=n}}),e.cluster?(BJ(this.options,{cluster:e.cluster}),this.clusterGenerator||=new dre(this),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(e){this.groupIds=[],e&&(e.refreshItems&&Q($).call($,this.items,e=>{e.dirty=!0,e.displayed&&e.redraw()}),e.restackGroups&&Q($).call($,this.groups,(e,t)=>{t!==I7&&(e.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(e){this.clearPopupTimer(),e&&(this.popupTimer=$L(function(){e.show()},this.options.tooltip.delay||typeof this.options.tooltip.delay==`number`?this.options.tooltip.delay:500))}clearPopupTimer(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(e){var t;e??=[],iL(e)||(e=[e]);let n=mV(t=this.selection).call(t,t=>UX(e).call(e,t)===-1);for(let e of n){let t=this.getItemById(e);t&&t.unselect()}this.selection=[...e];for(let t of e){let e=this.getItemById(t);e&&e.select()}}getSelection(){var e;return UY(e=this.selection).call(e,[])}getVisibleItems(){let e=this.body.range.getRange(),t,n;this.options.rtl?(t=this.body.util.toScreen(e.start),n=this.body.util.toScreen(e.end)):(n=this.body.util.toScreen(e.start),t=this.body.util.toScreen(e.end));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getItemsAtCurrentTime(e){let t,n;this.options.rtl?(t=this.body.util.toScreen(e),n=this.body.util.toScreen(e)):(n=this.body.util.toScreen(e),t=this.body.util.toScreen(e));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getVisibleGroups(){let e=[];for(let t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&this.groups[t].isVisible&&e.push(t);return e}getItemById(e){var t;return this.items[e]||i8(t=this.clusters).call(t,t=>t.id===e)}_deselect(e){let t=this.selection;for(let n=0,r=t.length;n<r;n++)if(t[n]==e){wJ(t).call(t,n,1);break}}redraw(){let e=this.options.margin,t=this.body.range,n=$.option.asSize,r=this.options,i=r.orientation.item,a=!1,o=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,o.className=`vis-itemset`,this.options.cluster&&this._clusterItems(),a=this._orderGroups()||a;let s=t.end-t.start,c=s!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=t.start!=this.lastRangeStart,u=r.stack!=this.lastStack,d=r.stackSubgroups!=this.lastStackSubgroups,f=c||l||u||d;this.lastVisibleInterval=s,this.lastRangeStart=t.start,this.lastStack=r.stack,this.lastStackSubgroups=r.stackSubgroups,this.props.lastWidth=this.props.width;let p=this._firstGroup(),m={item:e.item,axis:e.axis},h={item:e.item,axis:e.item.vertical/2},g=0,_=e.axis+e.item.vertical;this.groups[I7].redraw(t,h,f);let v={},y=0;if(Q($).call($,this.groups,(e,n)=>{if(n===I7)return;let r=e==p?m:h;v[n]=e.redraw(t,r,f,!0),y=v[n].length}),y>0){let e={};for(let t=0;t<y;t++)Q($).call($,v,(n,r)=>{e[r]=n[t]()});Q($).call($,this.groups,(t,n)=>{n!==I7&&(a=e[n]||a,g+=t.height)}),g=Math.max(g,_)}return g=Math.max(g,_),o.style.height=n(g),this.props.width=o.offsetWidth,this.props.height=g,this.dom.axis.style.top=n(i==`top`?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right=`0`:this.dom.axis.style.left=`0`,this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,a=this._isResized()||a,a}_firstGroup(){let e=this.options.orientation.item==`top`?0:this.groupIds.length-1,t=this.groupIds[e];return this.groups[t]||this.groups[F7]||null}_updateUngrouped(){let e=this.groups[F7],t,n;if(this.groupsData){if(e)for(n in e.dispose(),delete this.groups[F7],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,n))continue;t=this.items[n],t.parent&&t.parent.remove(t);let e=this.getGroupId(t.data),r=this.groups[e];r&&r.add(t)||t.hide()}}else if(!e){for(n in e=new y7(null,null,this),this.groups[F7]=e,this.items)Object.prototype.hasOwnProperty.call(this.items,n)&&(t=this.items[n],e.add(t));e.show()}}getLabelSet(){return this.dom.labelSet}setItems(e){this.itemsSettingTime=new Date;let t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(H2(e))this.itemsData=K2(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(Q($).call($,this.itemListeners,(e,t)=>{r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){let e=this.id;Q($).call($,this.itemListeners,(n,r)=>{t.itemsData.on(r,n,e)}),n=this.itemsData.getIds(),this._onAdd(n),this._updateUngrouped()}this.body.emitter.emit(`_change`,{queue:!0})}getItems(){return this.itemsData==null?null:this.itemsData.rawDS}setGroups(e){let t=this,n;if(this.groupsData&&(Q($).call($,this.groupListeners,(e,n)=>{t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(n)),!e)this.groupsData=null;else if(H2(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var r;let e=this.groupsData.getDataSet();Q(r=e.get()).call(r,t=>{if(t.nestedGroups){var n;Q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),e.update(r)})}});let i=this.id;Q($).call($,this.groupListeners,(e,n)=>{t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit(`_change`,{queue:!0})}getGroups(){return this.groupsData}removeItem(e){let t=this.itemsData.get(e);t&&this.options.onRemove(t,t=>{t&&this.itemsData.remove(e)})}_getType(e){return e.type||this.options.type||(e.end?`range`:`box`)}getGroupId(e){return this._getType(e)==`background`&&e.group==null?I7:this.groupsData?e.group:F7}_onUpdate(t){let n=this;Q(t).call(t,t=>{let r=n.itemsData.get(t),i=n.items[t],a=r?n._getType(r):null,o=e.types[a],s;if(i&&(!o||!(i instanceof o)?(s=i.selected,n._removeItem(i),i=null):n._updateItem(i,r)),!i&&r)if(o)i=new o(r,n.conversion,n.options),i.id=t,n._addItem(i),s&&(this.selection.push(t),i.select());else throw TypeError(`Unknown item type "${a}"`)}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit(`_change`,{queue:!0})}_onRemove(e){let t=0,n=this;Q(e).call(e,e=>{let r=n.items[e];r&&(t++,n._removeItem(r))}),t&&(this._order(),this.body.emitter.emit(`_change`,{queue:!0}))}_order(){Q($).call($,this.groups,e=>{e.order()})}_onUpdateGroups(e){this._onAddGroups(e)}_onAddGroups(e){let t=this;Q(e).call(e,e=>{let n=t.groupsData.get(e),r=t.groups[e];if(r)r.setData(n);else{if(e==F7||e==I7)throw Error(`Illegal group id. ${e} is a reserved id.`);let i=hZ(t.options);$.extend(i,{height:null}),r=new y7(e,n,t),t.groups[e]=r;for(let n in t.items){if(!Object.prototype.hasOwnProperty.call(t.items,n))continue;let i=t.items[n];i.data.group==e&&r.add(i)}r.order(),r.show()}}),this.body.emitter.emit(`_change`,{queue:!0})}_onRemoveGroups(e){Q(e).call(e,e=>{let t=this.groups[e];t&&(t.dispose(),delete this.groups[e])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit(`_change`,{queue:!0})}_orderGroups(){if(this.groupsData){let e=this.groupsData.getIds({order:this.options.groupOrder});e=this._orderNestedGroups(e);let t=!$.equalArray(e,this.groupIds);if(t){let t=this.groups;Q(e).call(e,e=>{t[e].hide()}),Q(e).call(e,e=>{t[e].show()}),this.groupIds=e}return t}else return!1}_orderNestedGroups(e){function t(e,n){let r=[];return Q(n).call(n,n=>{if(r.push(n),e.groupsData.get(n).nestedGroups){var i;let a=lK(i=e.groupsData.get({filter(e){return e.nestedInGroup==n},order:e.options.groupOrder})).call(i,e=>e.id);r=UY(r).call(r,t(e,a))}}),r}let n=mV(e).call(e,e=>!this.groupsData.get(e).nestedInGroup);return t(this,n)}_addItem(e){this.items[e.id]=e;let t=this.getGroupId(e.data),n=this.groups[t];n?n&&n.data&&n.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1,n&&n.add(e)}_updateItem(e,t){e.setData(t);let n=this.getGroupId(e.data),r=this.groups[n];r?r&&r.data&&r.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1}_removeItem(e){var t,n;e.hide(),delete this.items[e.id];let r=UX(t=this.selection).call(t,e.id);r!=-1&&wJ(n=this.selection).call(n,r,1),e.parent&&e.parent.remove(e),this.popup!=null&&this.popup.hide()}_constructByEndArray(e){let t=[];for(let n=0;n<e.length;n++)e[n]instanceof S7&&t.push(e[n]);return t}_onTouch(e){this.touchParams.item=this.itemFromTarget(e),this.touchParams.dragLeftItem=e.target.dragLeftItem||!1,this.touchParams.dragRightItem=e.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(e){for(let t=0;t<this.groupIds.length;t++)if(e==this.groupIds[t])return t}_onDragStart(e){if(this.touchParams.itemIsDragging)return;let t=this.touchParams.item||null,n=this,r;if(t&&(t.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup||t.editable!=null&&!t.editable.updateTime&&!t.editable.updateGroup&&!this.options.editable.overrideItems)return;let i=this.touchParams.dragLeftItem,a=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=t,i)r={item:i,initialX:e.center.x,dragLeft:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(a)r={item:a,initialX:e.center.x,dragRight:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey))this._onDragStartAddItem(e);else{this.groupIds.length<1&&this.redraw();let r=this._getGroupIndex(t.data.group),i=this.options.itemsAlwaysDraggable.item&&!t.selected?[t.id]:this.getSelection();this.touchParams.itemProps=lK(i).call(i,t=>{let i=n.items[t],a=n._getGroupIndex(i.data.group);return{item:i,initialX:e.center.x,groupOffset:r-a,data:this._cloneItemData(i.data)}})}e.stopPropagation()}else this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey)&&this._onDragStartAddItem(e)}_onDragStartAddItem(e){let t=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),r=this.options.rtl?n.right-e.center.x+10:e.center.x-n.left-10,i=this.body.util.toTime(r),a=this.body.util.getScale(),o=this.body.util.getStep(),s=t?t(i,a,o):i,c={type:`range`,start:s,end:s,content:`new item`},l=z2();c[this.itemsData.idProp]=l;let u=this.groupFromTarget(e);u&&(c.group=u.groupId);let d=new S7(c,this.conversion,this.options);d.id=l,d.data=this._cloneItemData(c),this._addItem(d),this.touchParams.selectedItem=d;let f={item:d,initialX:e.center.x,data:d.data};this.options.rtl?f.dragLeft=!0:f.dragRight=!0,this.touchParams.itemProps=[f],e.stopPropagation()}_onDrag(e){if(this.popup!=null&&this.options.showTooltips&&!this.popup.hidden){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.center.x-n.left+t.offsetLeft,e.center.y-n.top+t.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var t;e.stopPropagation();let n=this,r=this.options.snap||null,i=this.body.dom.root.offsetLeft,a=this.options.rtl?i+this.body.domProps.right.width:i+this.body.domProps.left.width,o=this.body.util.getScale(),s=this.body.util.getStep(),c=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateGroup,u=null;if(l&&c&&c.data.group!=null){let t=n.groupFromTarget(e);t&&(u=this._getGroupIndex(t.groupId))}Q(t=this.touchParams.itemProps).call(t,t=>{let i=n.body.util.toTime(e.center.x-a),d=n.body.util.toTime(t.initialX-a),f,p,m,h,g;f=this.options.rtl?-(i-d):i-d;let _=this._cloneItemData(t.item.data);if(!(t.item.editable!=null&&!t.item.editable.updateTime&&!t.item.editable.updateGroup&&!n.options.editable.overrideItems)){if((this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateTime){if(t.dragLeft)this.options.rtl?_.end!=null&&(m=$.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g):_.start!=null&&(p=$.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h);else if(t.dragRight)this.options.rtl?_.start!=null&&(p=$.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h):_.end!=null&&(m=$.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g);else if(_.start!=null)if(p=$.convert(t.data.start,`Date`).valueOf(),h=new Date(p+f),_.end!=null){m=$.convert(t.data.end,`Date`);let e=m.valueOf()-p.valueOf();_.start=r?r(h,o,s):h,_.end=new Date(_.start.valueOf()+e)}else _.start=r?r(h,o,s):h}if(l&&!t.dragLeft&&!t.dragRight&&u!=null&&_.group!=null){let e=u-t.groupOffset;e=Math.max(0,e),e=Math.min(n.groupIds.length-1,e),_.group=n.groupIds[e]}_=this._cloneItemData(_),n.options.onMoving(_,e=>{e&&t.item.setData(this._cloneItemData(e,`Date`))})}}),this.body.emitter.emit(`_change`)}}_moveToGroup(e,t){let n=this.groups[t];if(n&&n.groupId!=e.data.group){let t=e.parent;t.remove(e),t.order(),e.data.group=n.groupId,n.add(e),n.order()}}_onDragEnd(e){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){e.stopPropagation();let t=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,Q(n).call(n,e=>{let n=e.item.id;if(t.itemsData.get(n)==null)t.options.onAdd(e.item.data,n=>{t._removeItem(e.item),n&&t.itemsData.add(n),t.body.emitter.emit(`_change`)});else{let r=this._cloneItemData(e.item.data);t.options.onMove(r,r=>{r?(r[this.itemsData.idProp]=n,this.itemsData.update(r)):(e.item.setData(e.data),t.body.emitter.emit(`_change`))})}})}}_onGroupClick(e){let t=this.groupFromTarget(e);$L(()=>{this.toggleGroupShowNested(t)},1)}toggleGroupShowNested(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(!e||!e.nestedGroups)return;let n=this.groupsData.getDataSet();t==null?e.showNested=!e.showNested:e.showNested=!!t;let r=n.get(e.groupId);r.showNested=e.showNested;let i=e.nestedGroups,a=i;for(;a.length>0;){let e=a;a=[];for(let t=0;t<e.length;t++){let r=n.get(e[t]);r.nestedGroups&&(a=UY(a).call(a,r.nestedGroups))}a.length>0&&(i=UY(i).call(i,a))}var o;if(r.showNested){var s=n.get(r.nestedGroups);for(let e=0;e<s.length;e++){let t=s[e];t.nestedGroups&&t.nestedGroups.length>0&&(t.showNested==null||t.showNested==1)&&s.push(...n.get(t.nestedGroups))}o=lK(s).call(s,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}else{var c;o=lK(c=n.get(i)).call(c,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}n.update(UY(o).call(o,r)),r.showNested?($.removeClassName(e.dom.label,`collapsed`),$.addClassName(e.dom.label,`expanded`)):($.removeClassName(e.dom.label,`expanded`),$.addClassName(e.dom.label,`collapsed`))}toggleGroupDragClassName(e){e.dom.label.classList.toggle(`vis-group-is-dragging`),e.dom.foreground.classList.toggle(`vis-group-is-dragging`)}_onGroupDragStart(e){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(e),this.groupTouchParams.group&&(e.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(e){if(this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this.groupsData.getDataSet(),n=this.groupFromTarget(e);if(n&&n.height!=this.groupTouchParams.group.height){let t=n.top<this.groupTouchParams.group.top,r=e.center?e.center.y:e.clientY,i=n.dom.foreground.getBoundingClientRect(),a=this.groupTouchParams.group.height;if(t){if(i.top+a<r)return}else{let e=n.height;if(i.top+e-a>r)return}}if(n&&n!=this.groupTouchParams.group){let e=t.get(n.groupId),r=t.get(this.groupTouchParams.group.groupId);r&&e&&(this.options.groupOrderSwap(r,e,t),t.update(r),t.update(e));let i=t.getIds({order:this.options.groupOrder});if(!$.equalArray(i,this.groupTouchParams.originalOrder)){let e=this.groupTouchParams.originalOrder,n=this.groupTouchParams.group.groupId,r=Math.min(e.length,i.length),a=0,o=0,s=0;for(;a<r;){for(;a+o<r&&a+s<r&&i[a+o]==e[a+s];)a++;if(a+o>=r)break;if(i[a+o]==n)o=1;else if(e[a+s]==n)s=1;else{let n=UX(i).call(i,e[a+s]),r=t.get(i[a+o]),c=t.get(e[a+s]);this.options.groupOrderSwap(r,c,t),t.update(r),t.update(c);let l=i[a+o];i[a+o]=e[a+s],i[n]=l,a++}}}}}}_onGroupDragEnd(e){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this,n=t.groupTouchParams.group.groupId,r=t.groupsData.getDataSet(),i=$.extend({},r.get(n));t.options.onMoveGroup(i,e=>{if(e)e[r._idProp]=n,r.update(e);else{let e=r.getIds({order:t.options.groupOrder});if(!$.equalArray(e,t.groupTouchParams.originalOrder)){let n=t.groupTouchParams.originalOrder,i=Math.min(n.length,e.length),a=0;for(;a<i;){for(;a<i&&e[a]==n[a];)a++;if(a>=i)break;let o=UX(e).call(e,n[a]),s=r.get(e[a]),c=r.get(n[a]);t.options.groupOrderSwap(s,c,r),r.update(s),r.update(c);let l=e[a];e[a]=n[a],e[o]=l,a++}}}}),t.body.emitter.emit(`groupDragged`,{groupId:n}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(e){if(!this.options.selectable)return;let t=e.srcEvent&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey),n=e.srcEvent&&e.srcEvent.shiftKey;if(t||n){this._onMultiSelectItem(e);return}let r=this.getSelection(),i=this.itemFromTarget(e),a=i&&i.selectable?[i.id]:[];this.setSelection(a);let o=this.getSelection();(o.length>0||r.length>0)&&this.body.emitter.emit(`select`,{items:o,event:e})}_onMouseOver(e){let t=this.itemFromTarget(e);if(!t||t===this.itemFromRelatedTarget(e))return;let n=t.getTitle();if(this.options.showTooltips&&n){this.popup??=new rre(this.body.dom.root,this.options.tooltip.overflowMethod||`flip`),this.popup.setText(n);let t=this.body.dom.centerContainer,r=t.getBoundingClientRect();this.popup.setPosition(e.clientX-r.left+t.offsetLeft,e.clientY-r.top+t.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit(`itemover`,{item:t.id,event:e})}_onMouseOut(e){let t=this.itemFromTarget(e);t&&t!==this.itemFromRelatedTarget(e)&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit(`itemout`,{item:t.id,event:e}))}_onMouseMove(e){if(this.itemFromTarget(e)&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.clientX-n.left+t.offsetLeft,e.clientY-n.top+t.offsetTop),this.popup.show()}}_onMouseWheel(e){this.touchParams.itemIsDragging&&this._onDragEnd(e)}_onUpdateItem(e){if(!this.options.selectable||!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;let t=this;if(e){let n=t.itemsData.get(e.id);this.options.onUpdate(n,e=>{e&&t.itemsData.update(e)})}}_onDropObjectOnItem(e){let t=this.itemFromTarget(e),n=JSON.parse(e.dataTransfer.getData(`text`));this.options.onDropObjectOnItem(n,t)}_onAddItem(e){if(!this.options.selectable||!this.options.editable.add)return;let t=this,n=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),i=this.options.rtl?r.right-e.center.x:e.center.x-r.left,a=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),c,l;e.type==`drop`?(l=JSON.parse(e.dataTransfer.getData(`text`)),l.content=l.content?l.content:`new item`,l.start=l.start?l.start:n?n(a,o,s):a,l.type=l.type||`box`,l[this.itemsData.idProp]=l.id||z2(),l.type==`range`&&!l.end&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c)):(l={start:n?n(a,o,s):a,content:`new item`},l[this.itemsData.idProp]=z2(),this.options.type===`range`&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c));let u=this.groupFromTarget(e);u&&(l.group=u.groupId),l=this._cloneItemData(l),this.options.onAdd(l,n=>{n&&(t.itemsData.add(n),e.type==`drop`&&t.setSelection([n.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;let n=this.itemFromTarget(t);if(n){let r=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||this.options.sequentialSelection)&&this.options.multiselect){let t=this.itemsData.get(n.id).group,i;this.options.multiselectPerGroup&&r.length>0&&(i=this.itemsData.get(r[0]).group),(!this.options.multiselectPerGroup||i==null||i==t)&&r.push(n.id);let a=e._getItemRange(this.itemsData.get(r));if(!this.options.multiselectPerGroup||i==t){r=[];for(let e in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;let t=this.items[e],n=t.data.start,o=t.data.end===void 0?n:t.data.end;n>=a.min&&o<=a.max&&(!this.options.multiselectPerGroup||i==this.itemsData.get(t.id).group)&&!(t instanceof C7)&&r.push(t.id)}}}else{let e=UX(r).call(r,n.id);e==-1?r.push(n.id):wJ(r).call(r,e,1)}let i=mV(r).call(r,e=>this.getItemById(e).selectable);this.setSelection(i),this.body.emitter.emit(`select`,{items:this.getSelection(),event:t})}}static _getItemRange(e){let t=null,n=null;return Q(e).call(e,e=>{(n==null||e.start<n)&&(n=e.start),e.end==null?(t==null||e.start>t)&&(t=e.start):(t==null||e.end>t)&&(t=e.end)}),{min:n,max:t}}itemFromElement(e){let t=e;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-item`))return t[`vis-item`];t=t.parentNode}return null}itemFromTarget(e){return this.itemFromElement(e.target)}itemFromRelatedTarget(e){return this.itemFromElement(e.relatedTarget)}groupFromTarget(e){let t=e.center?e.center.y:e.clientY,n=this.groupIds;n.length<=0&&this.groupsData&&(n=this.groupsData.getIds({order:this.options.groupOrder}));for(let e=0;e<n.length;e++){let r=n[e],i=this.groups[r],a=i.dom.foreground,o=a.getBoundingClientRect();if(t>=o.top&&t<o.top+a.offsetHeight)return i;if(this.options.orientation.item===`top`){if(e===this.groupIds.length-1&&t>o.top)return i}else if(e===0&&t<o.top+a.offset)return i}return null}static itemSetFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-itemset`))return t[`vis-itemset`];t=t.parentNode}return null}_cloneItemData(e,t){let n=$.extend({},e);return t||=this.itemsData.type,n.start!=null&&(n.start=$.convert(n.start,t&&t.start||`Date`)),n.end!=null&&(n.end=$.convert(n.end,t&&t.end||`Date`)),n}_clusterItems(){if(!this.options.cluster)return;let{scale:e}=this.body.range.conversion(this.body.domProps.center.width),t=this.clusterGenerator.getClusters(this.clusters,e,this.options.cluster);if(this.clusters!=t){if(this._detachAllClusters(),t){for(let e of t)e.attach();this.clusters=t}this._updateClusters(t)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let e of this.clusters)e.detach()}_updateClusters(e){if(this.clusters&&this.clusters.length){var t;let i=new f7(lK(e).call(e,e=>e.id)),a=mV(t=this.clusters).call(t,e=>!i.has(e.id)),o=!1;for(let e of a){var n;let t=UX(n=this.selection).call(n,e.id);if(t!==-1){var r;e.unselect(),wJ(r=this.selection).call(r,t,1),o=!0}}if(o){let e=this.getSelection();this.body.emitter.emit(`select`,{items:e,event})}}this.clusters=e||[]}};L7.types={background:C7,box:tre,range:S7,point:nre},L7.prototype._onAdd=L7.prototype._onUpdate;var R7=!1,z7,B7=`background: #FFeeee; color: #dd0000`,V7=class e{constructor(){}static validate(t,n,r){R7=!1,z7=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),R7}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.log(`%c`+n+e.printLocation(o,t),B7)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(WK(a))+`. Received [`+c+`] "`+n[t]+`"`),R7=!0):e.getType(l)===`array`&&UX(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),R7=!0):c===`object`&&i!==`__any__`&&(o=$.copyAndExtendArray(o,t),e.parse(n[t],r[i],o))}static getType(e){var t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:iL(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,z7,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(WK(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?++`,console.log(`%cUnknown option detected: "`+t+`"`+o,B7),R7=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){if(!Object.prototype.hasOwnProperty.call(n,d))continue;let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],$.copyAndExtendArray(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;UX(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=$.copyArray(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`++`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:+`)+`options = {+`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {+`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`+`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}+`}return n+`++`}static print(e){return LZ(e).replace(/(\")|(\[)|(\])|(,"__type__")/g,``).replace(/(\,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];var i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},H7=`string`,U7=`boolean`,W7=`number`,G7=`array`,K7=`date`,q7=`object`,fre=`dom`,J7=`moment`,Y7=`any`,pre={configure:{enabled:{boolean:U7},filter:{boolean:U7,function:`function`},container:{dom:fre},__type__:{object:q7,boolean:U7,function:`function`}},align:{string:H7},alignCurrentTime:{string:H7,undefined:`undefined`},rtl:{boolean:U7,undefined:`undefined`},rollingMode:{follow:{boolean:U7},offset:{number:W7,undefined:`undefined`},__type__:{object:q7}},onTimeout:{timeoutMs:{number:W7},callback:{function:`function`},__type__:{object:q7}},verticalScroll:{boolean:U7,undefined:`undefined`},horizontalScroll:{boolean:U7,undefined:`undefined`},horizontalScrollKey:{string:H7,undefined:`undefined`},horizontalScrollInvert:{boolean:U7,undefined:`undefined`},autoResize:{boolean:U7},throttleRedraw:{number:W7},clickToUse:{boolean:U7},dataAttributes:{string:H7,array:G7},editable:{add:{boolean:U7,undefined:`undefined`},remove:{boolean:U7,undefined:`undefined`},updateGroup:{boolean:U7,undefined:`undefined`},updateTime:{boolean:U7,undefined:`undefined`},overrideItems:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},end:{number:W7,date:K7,string:H7,moment:J7},format:{minorLabels:{millisecond:{string:H7,undefined:`undefined`},second:{string:H7,undefined:`undefined`},minute:{string:H7,undefined:`undefined`},hour:{string:H7,undefined:`undefined`},weekday:{string:H7,undefined:`undefined`},day:{string:H7,undefined:`undefined`},week:{string:H7,undefined:`undefined`},month:{string:H7,undefined:`undefined`},year:{string:H7,undefined:`undefined`},__type__:{object:q7,function:`function`}},majorLabels:{millisecond:{string:H7,undefined:`undefined`},second:{string:H7,undefined:`undefined`},minute:{string:H7,undefined:`undefined`},hour:{string:H7,undefined:`undefined`},weekday:{string:H7,undefined:`undefined`},day:{string:H7,undefined:`undefined`},week:{string:H7,undefined:`undefined`},month:{string:H7,undefined:`undefined`},year:{string:H7,undefined:`undefined`},__type__:{object:q7,function:`function`}},__type__:{object:q7}},moment:{function:`function`},groupHeightMode:{string:H7},groupOrder:{string:H7,function:`function`},groupEditable:{add:{boolean:U7,undefined:`undefined`},remove:{boolean:U7,undefined:`undefined`},order:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},groupOrderSwap:{function:`function`},height:{string:H7,number:W7},hiddenDates:{start:{date:K7,number:W7,string:H7,moment:J7},end:{date:K7,number:W7,string:H7,moment:J7},repeat:{string:H7},__type__:{object:q7,array:G7}},itemsAlwaysDraggable:{item:{boolean:U7,undefined:`undefined`},range:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},limitSize:{boolean:U7},locale:{string:H7},locales:{__any__:{any:Y7},__type__:{object:q7}},longSelectPressTime:{number:W7},margin:{axis:{number:W7},item:{horizontal:{number:W7,undefined:`undefined`},vertical:{number:W7,undefined:`undefined`},__type__:{object:q7,number:W7}},__type__:{object:q7,number:W7}},max:{date:K7,number:W7,string:H7,moment:J7},maxHeight:{number:W7,string:H7},maxMinorChars:{number:W7},min:{date:K7,number:W7,string:H7,moment:J7},minHeight:{number:W7,string:H7},moveable:{boolean:U7},multiselect:{boolean:U7},multiselectPerGroup:{boolean:U7},onAdd:{function:`function`},onDropObjectOnItem:{function:`function`},onUpdate:{function:`function`},onMove:{function:`function`},onMoving:{function:`function`},onRemove:{function:`function`},onAddGroup:{function:`function`},onMoveGroup:{function:`function`},onRemoveGroup:{function:`function`},onInitialDrawComplete:{function:`function`},order:{function:`function`},orientation:{axis:{string:H7,undefined:`undefined`},item:{string:H7,undefined:`undefined`},__type__:{string:H7,object:q7}},selectable:{boolean:U7},sequentialSelection:{boolean:U7},showCurrentTime:{boolean:U7},showMajorLabels:{boolean:U7},showMinorLabels:{boolean:U7},showWeekScale:{boolean:U7},stack:{boolean:U7},stackSubgroups:{boolean:U7},cluster:{maxItems:{number:W7,undefined:`undefined`},titleTemplate:{string:H7,undefined:`undefined`},clusterCriteria:{function:`function`,undefined:`undefined`},showStipes:{boolean:U7,undefined:`undefined`},fitOnDoubleClick:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},snap:{function:`function`,null:`null`},start:{date:K7,number:W7,string:H7,moment:J7},template:{function:`function`},loadingScreenTemplate:{function:`function`},groupTemplate:{function:`function`},visibleFrameTemplate:{string:H7,function:`function`},showTooltips:{boolean:U7},tooltip:{followMouse:{boolean:U7},overflowMethod:{string:[`cap`,`flip`,`none`]},delay:{number:W7},template:{function:`function`},__type__:{object:q7}},tooltipOnItemUpdateTime:{template:{function:`function`},__type__:{boolean:U7,object:q7}},timeAxis:{scale:{string:H7,undefined:`undefined`},step:{number:W7,undefined:`undefined`},__type__:{object:q7}},type:{string:H7},width:{string:H7,number:W7},preferZoom:{boolean:U7},zoomable:{boolean:U7},zoomKey:{string:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``]},zoomFriction:{number:W7},zoomMax:{number:W7},zoomMin:{number:W7},xss:{disabled:{boolean:U7},filterOptions:{__any__:{any:Y7},__type__:{object:q7}},__type__:{object:q7}},__type__:{object:q7}},mre={global:{align:[`center`,`left`,`right`],alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}},groupHeightMode:[`auto`,`fixed`,`fitItems`],groupsDraggable:!1,height:``,locale:``,longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:[`both`,`bottom`,`top`],item:[`bottom`,`top`]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:``,showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:[`box`,`point`,`range`,`background`],width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},hre={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},gre=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return hre[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n;var r=this._isColorString(e);if(r!==void 0&&(e=r),$.isString(e)===!0){if($.isValidRGB(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if($.isValidRGBA(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if($.isValidHex(e)===!0){let t=$.hexToRGB(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+LZ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=$.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,$L(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=$.extend({},e)),this.color=e;let t=$.RGBToHSV(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=$.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=$.HSVToRGB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=$.RGBToHSV(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),nQ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerHTML=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerHTML=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerHTML=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerHTML=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerHTML=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerHTML=`cancel`,this.cancelButton.onclick=Z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerHTML=`apply`,this.applyButton.onclick=Z(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerHTML=`save`,this.saveButton.onclick=Z(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerHTML=`load last`,this.loadButton.onclick=Z(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new W3(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),G3(this.hammer,e=>{this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=$.HSVToRGB(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=$.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=$.HSVToRGB(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}},X7=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},$.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new gre(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(iL(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),mV(e)!==void 0&&(this.options.filter=mV(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);mV(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=mV(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||UX(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return Q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerHTML=$.xss(e),this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);return r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0?r.innerHTML=$.xss(`<i><b>`+e+`:</b></i>`):r.innerHTML=$.xss(e+`:`),r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&UX(e).call(e,t)!==-1&&(i=UX(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerHTML=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=Number(s.value);var d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerHTML=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerHTML=$.xss(e),n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=$L(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=$L(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){var r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){var r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=mV(this.options),a=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r=!0;let s=e[o],c=$.copyAndExtendArray(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!iL(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(iL(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){let e=!0;if(UX(t).call(t,`physics`)!==-1&&this.moduleOptions.physics.solver!==o&&(e=!1),e===!0)if(s.enabled!==void 0){let e=$.copyAndExtendArray(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();this.optionsContainer.innerHTML=`<pre>var options = `+LZ(e,null,2)+`</pre>`}getOptions(){let e={};for(var t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},_re=class e extends V6{constructor(t,n,r,i){var a,o,s,c,l,u,d;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);if(!(iL(r)||H2(r))&&r instanceof Object){let e=i;i=r,r=e}i&&i.throttleRedraw&&console.warn(`Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);let f=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:`bottom`,item:`bottom`},moment:ez},this.options=$.deepExtend({},this.defaultOptions),i&&$.setupXSSProtection(i.xss),this._create(t),!i||i&&i.rtl===void 0){this.dom.root.style.visibility=`hidden`;let e,t=this.dom.root;for(;!e&&t;)e=window.getComputedStyle(t,null).direction,t=t.parentElement;this.options.rtl=e&&e.toLowerCase()==`rtl`}else this.options.rtl=i.rtl;i&&(i.rollingMode&&(this.options.rollingMode=i.rollingMode),i.onInitialDrawComplete&&(this.options.onInitialDrawComplete=i.onInitialDrawComplete),i.onTimeout&&(this.options.onTimeout=i.onTimeout),i.loadingScreenTemplate&&(this.options.loadingScreenTemplate=i.loadingScreenTemplate));let p=document.createElement(`div`);if(this.options.loadingScreenTemplate){var m;let e=Z(m=this.options.loadingScreenTemplate).call(m,this),t=e(this.dom.loadingScreen);t instanceof Object&&!(t instanceof Element)?e(p):t instanceof Element?(p.innerHTML=``,p.appendChild(t)):t!=null&&(p.innerHTML=$.xss(t))}this.dom.loadingScreen.appendChild(p),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Z(a=this.on).call(a,this),off:Z(o=this.off).call(o,this),emit:Z(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:Z(c=f._toScreen).call(c,f),toGlobalScreen:Z(l=f._toGlobalScreen).call(l,f),toTime:Z(u=f._toTime).call(u,f),toGlobalTime:Z(d=f._toGlobalTime).call(d,f)}},this.range=new g3(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Y3(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new H6(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new L7(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null;function h(e,t){f.hasListeners(e)&&f.emit(e,f.getEventProperties(t))}this.dom.root.onclick=e=>h(`click`,e),this.dom.root.ondblclick=e=>h(`doubleClick`,e),this.dom.root.oncontextmenu=e=>h(`contextmenu`,e),this.dom.root.onmouseover=e=>h(`mouseOver`,e),window.PointerEvent?(this.dom.root.onpointerdown=e=>h(`mouseDown`,e),this.dom.root.onpointermove=e=>h(`mouseMove`,e),this.dom.root.onpointerup=e=>h(`mouseUp`,e)):(this.dom.root.onmousemove=e=>h(`mouseMove`,e),this.dom.root.onmousedown=e=>h(`mouseDown`,e),this.dom.root.onmouseup=e=>h(`mouseUp`,e)),this.initialFitDone=!1,this.on(`changed`,()=>{if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();let t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.itemSet.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&$L(()=>f.options.onInitialDrawComplete(),0))}}),this.on(`destroyTimeline`,()=>{f.destroy()}),i&&this.setOptions(i),this.body.emitter.on(`fit`,e=>{this._onFit(e),this.redraw()}),r&&this.setGroups(r),n&&this.setItems(n),this._redraw()}_createConfigurator(){return new X7(this,this.dom.container,mre)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(e){if(V7.validate(e,pre)===!0&&console.log(`%cErrors have been found in the supplied options object.`,B7),V6.prototype.setOptions.call(this,e),`type`in e&&e.type!==this.options.type){this.options.type=e.type;let t=this.itemsData;if(t){let e=this.getSelection();this.setItems(null),this.setItems(t.rawDS),this.setSelection(e)}}}setItems(e){this.itemsDone=!1;let t;t=e?H2(e)?K2(e):K2(new PD(e)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=t,this.itemSet&&this.itemSet.setItems(t==null?null:t.rawDS)}setGroups(e){let t;e?(iL(e)&&(e=new PD(e)),t=new Ste(e,{filter:e=>e.visible!==!1})):t=null,this.groupsData!=null&&typeof this.groupsData.setData==`function`&&this.groupsData.setData(null),this.groupsData=t,this.itemSet.setGroups(t)}setData(e){e&&e.groups&&this.setGroups(e.groups),e&&e.items&&this.setItems(e.items)}setSelection(e,t){this.itemSet&&this.itemSet.setSelection(e),t&&t.focus&&this.focus(e,t)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(e,t){if(!this.itemsData||e==null)return;let n=iL(e)?e:[e],r=this.itemsData.get(n),i=null,a=null;if(Q(r).call(r,e=>{let t=e.start.valueOf(),n=`end`in e?e.end.valueOf():e.start.valueOf();(i===null||t<i)&&(i=t),(a===null||n>a)&&(a=n)}),i!==null&&a!==null){let e=this,r=this.itemSet.items[n[0]],o=this._getScrollTop()*-1,s=null,c=(t,n,i)=>{let a=$7(e,r);if(a===!1||(s||=a,s.itemTop==a.itemTop&&!s.shouldScroll))return;s.itemTop!=a.itemTop&&a.shouldScroll&&(s=a,o=e._getScrollTop()*-1);let c=o,l=s.scrollOffset,u=i?l:c+(l-c)*t;e._setScrollTop(-u),n||e._redraw()},l=()=>{let t=$7(e,r);t.shouldScroll&&t.itemTop!=s.itemTop&&(e._setScrollTop(-t.scrollOffset),e._redraw())},u=()=>{l(),$L(l,100)},d=t&&t.zoom!==void 0?t.zoom:!0,f=(i+a)/2,p=d?(a-i)*1.1:Math.max(this.range.end-this.range.start,(a-i)*1.1),m=t&&t.animation!==void 0?t.animation:!0;m||(s={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(f-p/2,f+p/2,{animation:m},u,c)}}fit(e,t){let n=e&&e.animation!==void 0?e.animation:!0,r;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(r=this.getDataRange(),this.moveTo(r.min.valueOf(),{animation:n},t)):(r=this.getItemRange(),this.range.setRange(r.min,r.max,{animation:n},t))}getItemRange(){let e=this.getDataRange(),t=e.min===null?null:e.min.valueOf(),n=e.max===null?null:e.max.valueOf(),r=null,i=null;if(t!=null&&n!=null){let e=n-t;e<=0&&(e=10);let a=e/this.props.center.width,o={},s=0;if(Q($).call($,this.itemSet.items,(e,t)=>{e.groupShowing&&(o[t]=e.redraw(!0),s=o[t].length)}),s>0)for(let e=0;e<s;e++)Q($).call($,o,t=>{t[e]()});if(Q($).call($,this.itemSet.items,e=>{let o=Z7(e),s=Q7(e),c,l;this.options.rtl?(c=o-(e.getWidthRight()+10)*a,l=s+(e.getWidthLeft()+10)*a):(c=o-(e.getWidthLeft()+10)*a,l=s+(e.getWidthRight()+10)*a),c<t&&(t=c,r=e),l>n&&(n=l,i=e)}),r&&i){let a=r.getWidthLeft()+10,o=i.getWidthRight()+10,s=this.props.center.width-a-o;s>0&&(this.options.rtl?(t=Z7(r)-o*e/s,n=Q7(i)+a*e/s):(t=Z7(r)-a*e/s,n=Q7(i)+o*e/s))}}return{min:t==null?null:new Date(t),max:n==null?null:new Date(n)}}getDataRange(){let e=null,t=null;if(this.itemsData){var n;Q(n=this.itemsData).call(n,n=>{let r=$.convert(n.start,`Date`).valueOf(),i=$.convert(n.end==null?n.start:n.end,`Date`).valueOf();(e===null||r<e)&&(e=r),(t===null||i>t)&&(t=i)})}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}}getEventProperties(e){let t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=this.dom.centerContainer.getBoundingClientRect(),i=this.options.rtl?r.right-t:t-r.left,a=n-r.top,o=this.itemSet.itemFromTarget(e),s=this.itemSet.groupFromTarget(e),c=B6.customTimeFromTarget(e),l=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),f=this._toTime(i),p=l?l(f,u,d):f,m=$.getTarget(e),h=null;return o==null?c==null?$.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&$.hasParent(m,this.timeAxis2.dom.foreground)?h=`axis`:$.hasParent(m,this.itemSet.dom.labelSet)?h=`group-label`:$.hasParent(m,this.currentTime.bar)?h=`current-time`:$.hasParent(m,this.dom.center)&&(h=`background`):h=`custom-time`:h=`item`,{event:e,item:o?o.id:null,isCluster:o?!!o.isCluster:!1,items:o?o.items||[]:null,group:s?s.groupId:null,customTime:c?c.options.id:null,what:h,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:i,y:a,time:f,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode??this.setOptions(this.options),this.range.startRolling())}_redraw(){V6.prototype._redraw.call(this)}_onFit(e){let{start:t,end:n,animation:r}=e;n?this.range.setRange(t,n,{animation:r}):this.moveTo(t.valueOf(),{animation:r})}};function Z7(e){return $.convert(e.data.start,`Date`).valueOf()}function Q7(e){let t=e.data.end==null?e.data.start:e.data.end;return $.convert(t,`Date`).valueOf()}function $7(e,t){if(!t.parent)return!1;let n=e.options.rtl?e.props.rightContainer.height:e.props.leftContainer.height,r=e.props.center.height,i=t.parent,a=i.top,o=!0,s=e.timeAxis.options.orientation.axis,c=()=>s==`bottom`?i.height-t.top-t.height:t.top,l=e._getScrollTop()*-1,u=a+c(),d=t.height;return u<l?a+n<=a+c()+d&&(a+=c()-e.itemSet.options.margin.item.vertical):u+d>l+n?a+=c()+d-n+e.itemSet.options.margin.item.vertical:o=!1,a=Math.min(a,r-n),{shouldScroll:o,scrollOffset:a,itemTop:u}}function e9(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].redundant=e[t].used,e[t].used=[])}function t9(e){for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;let r=e[t];for(var n=0;n<r.redundant.length;n++)r.redundant[n].parentNode.removeChild(r.redundant[n]);r.redundant=[]}}function vre(e){e9(e),t9(e),e9(e)}function n9(e,t,n){var r;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(r=t[e].redundant[0],t[e].redundant.shift()):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),n.appendChild(r)):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),t[e]={used:[],redundant:[]},n.appendChild(r)),t[e].used.push(r),r}function r9(e,t,n,r){var i;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(i=t[e].redundant[0],t[e].redundant.shift()):(i=document.createElement(e),n.appendChild(i)):(i=document.createElement(e),t[e]={used:[],redundant:[]},n.appendChild(i)),t[e].used.push(i),i}function i9(e,t,n,r,i,a){var o;if(n.style==`circle`?(o=n9(`circle`,r,i),o.setAttributeNS(null,`cx`,e),o.setAttributeNS(null,`cy`,t),o.setAttributeNS(null,`r`,.5*n.size)):(o=n9(`rect`,r,i),o.setAttributeNS(null,`x`,e-.5*n.size),o.setAttributeNS(null,`y`,t-.5*n.size),o.setAttributeNS(null,`width`,n.size),o.setAttributeNS(null,`height`,n.size)),n.styles!==void 0&&o.setAttributeNS(null,`style`,n.styles),o.setAttributeNS(null,`class`,n.className+` vis-point`),a){var s=n9(`text`,r,i);a.xOffset&&(e+=a.xOffset),a.yOffset&&(t+=a.yOffset),a.content&&(s.textContent=a.content),a.className&&s.setAttributeNS(null,`class`,a.className+` vis-label`),s.setAttributeNS(null,`x`,e),s.setAttributeNS(null,`y`,t)}return o}function a9(e,t,n,r,i,a,o,s){if(r!=0){r<0&&(r*=-1,t-=r);var c=n9(`rect`,a,o);c.setAttributeNS(null,`x`,e-.5*n),c.setAttributeNS(null,`y`,t),c.setAttributeNS(null,`width`,n),c.setAttributeNS(null,`height`,r),c.setAttributeNS(null,`class`,i),s&&c.setAttributeNS(null,`style`,s)}}function yre(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||`en`:`en`}catch{return`en`}}var bre=class{constructor(e,t,n,r,i,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=i,this.majorCharHeight=a,this._start=e,this._end=t,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=o,this.autoScaleStart=n,this.autoScaleEnd=r,this.formattingFunction=s,n||r){let e=this,t=t=>{let n=t-t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx]);return t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx])>.5*(e.magnitudefactor*e.minorSteps[e.minorStepIdx])?n+e.magnitudefactor*e.minorSteps[e.minorStepIdx]:n};n&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=t(this._start)),r&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=t(this._end)),this.determineScale()}}setCharHeight(e){this.majorCharHeight=e}setHeight(e){this.containerHeight=e}determineScale(){let e=this._end-this._start;this.scale=this.containerHeight/e;let t=this.majorCharHeight/this.scale,n=e>0?Math.round(Math.log(e)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=10**n;let r=0;n<0&&(r=n);let i=!1;for(let e=r;Math.abs(e)<=Math.abs(n);e++){this.magnitudefactor=10**e;for(let e=0;e<this.minorSteps.length;e++)if(this.magnitudefactor*this.minorSteps[e]>=t){i=!0,this.minorStepIdx=e;break}if(i===!0)break}}is_major(e){return e%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){let e=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(e-this._start%e)%e)}formatValue(e){let t=e.toPrecision(5);return typeof this.formattingFunction==`function`&&(t=this.formattingFunction(e)),typeof t==`number`?`${t}`:typeof t==`string`?t:e.toPrecision(5)}getLines(){let e=[],t=this.getStep(),n=(t-this._start%t)%t;for(let r=this._start+n;this._end-r>1e-5;r+=t)r!=this._start&&e.push({major:this.is_major(r),y:this.convertValue(r),val:this.formatValue(r)});return e}followScale(e){let t=this.minorStepIdx,n=this._start,r=this._end,i=this,a=()=>{i.magnitudefactor*=2},o=()=>{i.magnitudefactor/=2};e.minorStepIdx<=1&&this.minorStepIdx<=1||e.minorStepIdx>1&&this.minorStepIdx>1||(e.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,t==2||a(),a()):(this.minorStepIdx=2,t==1||o(),o()));let s=e.convertValue(0),c=e.getStep()*e.scale,l=!1,u=0;for(;!l&&u++<5;){this.scale=c/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);let t=this.containerHeight/this.scale;this._start=n,this._end=this._start+t;let i=this._end*this.scale,u=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=this.getFirstMajor()-e.getFirstMajor();if(this.zeroAlign){let e=s-i;this._end+=e/this.scale,this._start=this._end-t}else this.autoScaleStart?(this._start-=d/this.scale,this._end=this._start+t):(this._start+=u-d/this.scale,this._end=this._start+t);if(!this.autoScaleEnd&&this._end>r+1e-5){o(),l=!1;continue}if(!this.autoScaleStart&&this._start<n-1e-5)if(this.zeroAlign&&n>=0)console.warn(`Can't adhere to given 'min' range, due to zeroalign`);else{o(),l=!1;continue}if(this.autoScaleStart&&this.autoScaleEnd&&t<r-n){a(),l=!1;continue}l=!0}}convertValue(e){return this.containerHeight-(e-this._start)*this.scale}screenToValue(e){return(this.containerHeight-e)/this.scale+this._start}},o9=class extends f4{constructor(e,t,n,r){super(),this.id=z2(),this.body=e,this.defaultOptions={orientation:`left`,showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:`40px`,visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format(e){return`${d4(e.toPrecision(3))}`},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format(e){return`${d4(e.toPrecision(3))}`},title:{text:void 0,style:void 0}}},this.linegraphOptions=r,this.linegraphSVG=n,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=$.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(t),this.width=Number(`${this.options.width}`.replace(`px`,``)),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),this.scale??this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};let i=this;this.body.emitter.on(`verticalDrag`,()=>{i.dom.lineContainer.style.top=`${i.body.domProps.scrollTop}px`})}addGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1}updateGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.amountOfGroups+=1),this.groups[e]=t}removeGroup(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)}setOptions(e){if(e){let t=!1;this.options.orientation!=e.orientation&&e.orientation!==void 0&&(t=!0),$.selectiveDeepExtend([`orientation`,`showMinorLabels`,`showMajorLabels`,`icons`,`majorLinesOffset`,`minorLinesOffset`,`labelOffsetX`,`labelOffsetY`,`iconWidth`,`width`,`visible`,`left`,`right`,`alignZeros`],this.options,e),this.minWidth=Number(`${this.options.width}`.replace(`px`,``)),t===!0&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement(`div`),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement(`div`),this.dom.lineContainer.style.width=`100%`,this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position=`relative`,this.dom.lineContainer.style.visibility=`visible`,this.dom.lineContainer.style.display=`block`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.height=`100%`,this.svg.style.width=`100%`,this.svg.style.display=`block`,this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){e9(this.svgElements);let e,t=this.options.iconWidth,n=11.5;e=this.options.orientation===`left`?4:this.width-t-4;let r=WK(this.groups);n3(r).call(r,(e,t)=>e<t?-1:1);for(let i of r)this.groups[i].visible===!0&&(this.linegraphOptions.visibility[i]===void 0||this.linegraphOptions.visibility[i]===!0)&&(this.groups[i].getLegend(t,15,this.framework,e,n),n+=19);t9(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){this.iconsRemoved===!1&&(e9(this.svgElements),t9(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||(this.options.orientation===`left`?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display=`block`}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display=`none`}setRange(e,t){this.range.start=e,this.range.end=t}redraw(){let e=!1,t=0;this.dom.lineContainer.style.top=`${this.body.domProps.scrollTop}px`;for(let e in this.groups)Object.prototype.hasOwnProperty.call(this.groups,e)&&this.groups[e].visible===!0&&(this.linegraphOptions.visibility[e]===void 0||this.linegraphOptions.visibility[e]===!0)&&t++;if(this.amountOfGroups===0||t===0)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace(`px`,``)),this.dom.lineContainer.style.height=`${this.height}px`,this.width=this.options.visible===!0?Number(`${this.options.width}`.replace(`px`,``)):0;let t=this.props,n=this.dom.frame;n.className=`vis-data-axis`,this._calculateCharSize();let r=this.options.orientation,i=this.options.showMinorLabels,a=this.options.showMajorLabels,o=this.body.dom.backgroundHorizontal.offsetWidth;t.minorLabelHeight=i?t.minorCharHeight:0,t.majorLabelHeight=a?t.majorCharHeight:0,t.minorLineWidth=o-this.lineOffset-this.width+2*this.options.minorLinesOffset,t.minorLineHeight=1,t.majorLineWidth=o-this.lineOffset-this.width+2*this.options.majorLinesOffset,t.majorLineHeight=1,r===`left`?(n.style.top=`0`,n.style.left=`0`,n.style.bottom=``,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top=``,n.style.bottom=`0`,n.style.left=`0`,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),e=this._redrawLabels(),e=this._isResized()||e,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return e}_redrawLabels(){let e=!1;e9(this.DOMelements.lines),e9(this.DOMelements.labels);let t=this.options.orientation,n=this.options[t].range==null?{}:this.options[t].range,r=!0;n.max!=null&&(this.range.end=n.max,r=!1);let i=!0;n.min!=null&&(this.range.start=n.min,i=!1),this.scale=new bre(this.range.start,this.range.end,i,r,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[t].format),this.master===!1&&this.masterAxis!=null?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display=`none`):this.dom.lineContainer.style.display=`block`,this.maxLabelSize=0;let a=this.scale.getLines();Q(a).call(a,e=>{let n=e.y,r=e.major;this.options.showMinorLabels&&r===!1&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-minor`,this.props.minorCharHeight),r&&n>=0&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-major`,this.props.majorCharHeight),this.master===!0&&(r?this._redrawLine(n,t,`vis-grid vis-horizontal vis-major`,this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(n,t,`vis-grid vis-horizontal vis-minor`,this.options.minorLinesOffset,this.props.minorLineWidth))});let o=0;this.options[t].title!==void 0&&this.options[t].title.text!==void 0&&(o=this.props.titleCharHeight);let s=this.options.icons===!0?Math.max(this.options.iconWidth,o)+this.options.labelOffsetX+15:o+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-s&&this.options.visible===!0?(this.width=this.maxLabelSize+s,this.options.width=`${this.width}px`,t9(this.DOMelements.lines),t9(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-s&&this.options.visible===!0&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+s),this.options.width=`${this.width}px`,t9(this.DOMelements.lines),t9(this.DOMelements.labels),this.redraw(),e=!0):(t9(this.DOMelements.lines),t9(this.DOMelements.labels),e=!1),e}convertValue(e){return this.scale.convertValue(e)}screenToValue(e){return this.scale.screenToValue(e)}_redrawLabel(e,t,n,r,i){let a=r9(`div`,this.DOMelements.labels,this.dom.frame);a.className=r,a.innerHTML=$.xss(t),n===`left`?(a.style.left=`-${this.options.labelOffsetX}px`,a.style.textAlign=`right`):(a.style.right=`-${this.options.labelOffsetX}px`,a.style.textAlign=`left`),a.style.top=`${e-.5*i+this.options.labelOffsetY}px`,t+=``;let o=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<t.length*o&&(this.maxLabelSize=t.length*o)}_redrawLine(e,t,n,r,i){if(this.master===!0){let a=r9(`div`,this.DOMelements.lines,this.dom.lineContainer);a.className=n,a.innerHTML=``,t===`left`?a.style.left=`${this.width-r}px`:a.style.right=`${this.width-r}px`,a.style.width=`${i}px`,a.style.top=`${e}px`}}_redrawTitle(e){if(e9(this.DOMelements.title),this.options[e].title!==void 0&&this.options[e].title.text!==void 0){let t=r9(`div`,this.DOMelements.title,this.dom.frame);t.className=`vis-y-axis vis-title vis-${e}`,t.innerHTML=$.xss(this.options[e].title.text),this.options[e].title.style!==void 0&&$.addCssText(t,this.options[e].title.style),e===`left`?t.style.left=`${this.props.titleCharHeight}px`:t.style.right=`${this.props.titleCharHeight}px`,t.style.width=`${this.height}px`}t9(this.DOMelements.title)}_calculateCharSize(){if(!(`minorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-minor vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.minorCharHeight=t.clientHeight,this.props.minorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`majorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-major vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.majorCharHeight=t.clientHeight,this.props.majorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`titleCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-title vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.titleCharHeight=t.clientHeight,this.props.titleCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}}};function s9(){}s9.draw=function(e,t,n,r){r||=0;for(var i=xre(n,t),a=0;a<e.length;a++)if(!i)i9(e[a].screen_x+r,e[a].screen_y,c9(t),n.svgElements,n.svg,e[a].label);else{var o=i(e[a],t);(o===!0||typeof o==`object`)&&i9(e[a].screen_x+r,e[a].screen_y,c9(t,o),n.svgElements,n.svg,e[a].label)}},s9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=n9(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`),i9(t+.5*r,n,c9(e),a.svgElements,a.svg)};function c9(e,t){return t=t===void 0?{}:t,{style:t.style||e.options.drawPoints.style,styles:t.styles||e.options.drawPoints.styles,size:t.size||e.options.drawPoints.size,className:t.className||e.className}}function xre(e,t){var n=void 0;return e.options&&e.options.drawPoints&&e.options.drawPoints.onRender&&typeof e.options.drawPoints.onRender==`function`&&(n=e.options.drawPoints.onRender),t.group.options&&t.group.options.drawPoints&&t.group.options.drawPoints.onRender&&typeof t.group.options.drawPoints.onRender==`function`&&(n=t.group.options.drawPoints.onRender),n}function l9(){}l9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=n9(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`);var c=Math.round(.3*r),l=e.options.barChart.width/c,u=Math.round(.4*i),d=Math.round(.75*i),f=Math.round((r-2*c)/3);if(a9(t+.5*c+f,n+o-u-1,c,u,e.className+` vis-bar`,a.svgElements,a.svg,e.style),a9(t+1.5*c+f+2,n+o-d-1,c,d,e.className+` vis-bar`,a.svgElements,a.svg,e.style),e.options.drawPoints.enabled==1){var p={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size/l,className:e.className};i9(t+.5*c+f,n+o-u-1,p,a.svgElements,a.svg),i9(t+1.5*c+f+2,n+o-d-1,p,a.svgElements,a.svg)}},l9.draw=function(e,t,n){var r=[],i={},a,o,s,c,l,u,d=0;for(l=0;l<e.length;l++)if(c=n.groups[e[l]],c.options.style===`bar`&&c.visible===!0&&(n.options.groups.visibility[e[l]]===void 0||n.options.groups.visibility[e[l]]===!0))for(u=0;u<t[e[l]].length;u++)r.push({screen_x:t[e[l]][u].screen_x,screen_end:t[e[l]][u].screen_end,screen_y:t[e[l]][u].screen_y,x:t[e[l]][u].x,end:t[e[l]][u].end,y:t[e[l]][u].y,groupId:e[l],label:t[e[l]][u].label}),d+=1;if(d!==0)for(n3(r).call(r,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x}),l9._getDataIntersections(i,r),l=0;l<r.length;l++){c=n.groups[r[l].groupId];var f=c.options.barChart.minWidth==null?.1*c.options.barChart.width:c.options.barChart.minWidth;o=r[l].screen_x;var p=0;if(i[o]===void 0)l+1<r.length&&(a=Math.abs(r[l+1].screen_x-o)),s=l9._getSafeDrawData(a,c,f);else{var m=l+(i[o].amount-i[o].resolved);m<r.length&&(a=Math.abs(r[m].screen_x-o)),s=l9._getSafeDrawData(a,c,f),i[o].resolved+=1,c.options.stack===!0&&c.options.excludeFromStacking!==!0?r[l].screen_y<c.zeroPosition?(p=i[o].accumulatedNegative,i[o].accumulatedNegative+=c.zeroPosition-r[l].screen_y):(p=i[o].accumulatedPositive,i[o].accumulatedPositive+=c.zeroPosition-r[l].screen_y):c.options.barChart.sideBySide===!0&&(s.width/=i[o].amount,s.offset+=i[o].resolved*s.width-.5*s.width*(i[o].amount+1))}let e=s.width,t=r[l].screen_x;if(r[l].screen_end==null?t+=s.offset:(e=r[l].screen_end-r[l].screen_x,t+=e*.5),a9(t,r[l].screen_y-p,e,c.zeroPosition-r[l].screen_y,c.className+` vis-bar`,n.svgElements,n.svg,c.style),c.options.drawPoints.enabled===!0){let e={screen_x:r[l].screen_x,screen_y:r[l].screen_y-p,x:r[l].x,y:r[l].y,groupId:r[l].groupId,label:r[l].label};s9.draw([e],c,n,s.offset)}}},l9._getDataIntersections=function(e,t){for(var n,r=0;r<t.length;r++)r+1<t.length&&(n=Math.abs(t[r+1].screen_x-t[r].screen_x)),r>0&&(n=Math.min(n,Math.abs(t[r-1].screen_x-t[r].screen_x))),n===0&&(e[t[r].screen_x]===void 0&&(e[t[r].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),e[t[r].screen_x].amount+=1)},l9._getSafeDrawData=function(e,t,n){var r,i;return e<t.options.barChart.width&&e>0?(r=e<n?n:e,i=0,t.options.barChart.align===`left`?i-=.5*e:t.options.barChart.align===`right`&&(i+=.5*e)):(r=t.options.barChart.width,i=0,t.options.barChart.align===`left`?i-=.5*t.options.barChart.width:t.options.barChart.align===`right`&&(i+=.5*t.options.barChart.width)),{width:r,offset:i}},l9.getStackedYRange=function(e,t,n,r,i){if(e.length>0){n3(e).call(e,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x});var a={};l9._getDataIntersections(a,e),t[r]=l9._getStackedYRange(a,e),t[r].yAxisOrientation=i,n.push(r)}},l9._getStackedYRange=function(e,t){for(var n,r=t[0].screen_y,i=t[0].screen_y,a=0;a<t.length;a++)n=t[a].screen_x,e[n]===void 0?(r=r>t[a].screen_y?t[a].screen_y:r,i=i<t[a].screen_y?t[a].screen_y:i):t[a].screen_y<0?e[n].accumulatedNegative+=t[a].screen_y:e[n].accumulatedPositive+=t[a].screen_y;for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r=r>e[o].accumulatedNegative?e[o].accumulatedNegative:r,r=r>e[o].accumulatedPositive?e[o].accumulatedPositive:r,i=i<e[o].accumulatedNegative?e[o].accumulatedNegative:i,i=i<e[o].accumulatedPositive?e[o].accumulatedPositive:i);return{min:r,max:i}};function u9(){}u9.calcPath=function(e,t){if(e!=null&&e.length>0){var n=[];return n=t.options.interpolation.enabled==1?u9._catmullRom(e,t):u9._linear(e),n}},u9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s,c,l=n9(`rect`,a.svgElements,a.svg);if(l.setAttributeNS(null,`x`,t),l.setAttributeNS(null,`y`,n-o),l.setAttributeNS(null,`width`,r),l.setAttributeNS(null,`height`,2*o),l.setAttributeNS(null,`class`,`vis-outline`),s=n9(`path`,a.svgElements,a.svg),s.setAttributeNS(null,`class`,e.className),e.style!==void 0&&s.setAttributeNS(null,`style`,e.style),s.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+(t+r)+`,`+n),e.options.shaded.enabled==1&&(c=n9(`path`,a.svgElements,a.svg),e.options.shaded.orientation==`top`?c.setAttributeNS(null,`d`,`M`+t+`, `+(n-o)+`L`+t+`,`+n+` L`+(t+r)+`,`+n+` L`+(t+r)+`,`+(n-o)):c.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+t+`,`+(n+o)+` L`+(t+r)+`,`+(n+o)+`L`+(t+r)+`,`+n),c.setAttributeNS(null,`class`,e.className+` vis-icon-fill`),e.options.shaded.style!==void 0&&e.options.shaded.style!==``&&c.setAttributeNS(null,`style`,e.options.shaded.style)),e.options.drawPoints.enabled==1){var u={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size,className:e.className};i9(t+.5*r,n,u,a.svgElements,a.svg)}},u9.drawShading=function(e,t,n,r){if(t.options.shaded.enabled==1){var i=Number(r.svg.style.height.replace(`px`,``)),a=n9(`path`,r.svgElements,r.svg),o=`L`;t.options.interpolation.enabled==1&&(o=`C`);var s,c=0;c=t.options.shaded.orientation==`top`?0:t.options.shaded.orientation==`bottom`?i:Math.min(Math.max(0,t.zeroPosition),i),s=t.options.shaded.orientation==`group`&&n!=null&&n!=null?`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` L`+n[n.length-1][0]+`,`+n[n.length-1][1]+` `+this.serializePath(n,o,!0)+n[0][0]+`,`+n[0][1]+` Z`:`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` V`+c+` H`+e[0][0]+` Z`,a.setAttributeNS(null,`class`,t.className+` vis-fill`),t.options.shaded.style!==void 0&&a.setAttributeNS(null,`style`,t.options.shaded.style),a.setAttributeNS(null,`d`,s)}},u9.draw=function(e,t,n){if(e!=null&&e!=null){var r=n9(`path`,n.svgElements,n.svg);r.setAttributeNS(null,`class`,t.className),t.style!==void 0&&r.setAttributeNS(null,`style`,t.style);var i=`L`;t.options.interpolation.enabled==1&&(i=`C`),r.setAttributeNS(null,`d`,`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,i,!1))}},u9.serializePath=function(e,t,n){if(e.length<2)return``;var r=t,i;if(n)for(i=e.length-2;i>0;i--)r+=e[i][0]+`,`+e[i][1]+` `;else for(i=1;i<e.length;i++)r+=e[i][0]+`,`+e[i][1]+` `;return r},u9._catmullRomUniform=function(e){var t,n,r,i,a,o,s=[];s.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var c=1/6,l=e.length,u=0;u<l-1;u++)t=u==0?e[0]:e[u-1],n=e[u],r=e[u+1],i=u+2<l?e[u+2]:r,a={screen_x:(-t.screen_x+6*n.screen_x+r.screen_x)*c,screen_y:(-t.screen_y+6*n.screen_y+r.screen_y)*c},o={screen_x:(n.screen_x+6*r.screen_x-i.screen_x)*c,screen_y:(n.screen_y+6*r.screen_y-i.screen_y)*c},s.push([a.screen_x,a.screen_y]),s.push([o.screen_x,o.screen_y]),s.push([r.screen_x,r.screen_y]);return s},u9._catmullRom=function(e,t){var n=t.options.interpolation.alpha;if(n==0||n===void 0)return this._catmullRomUniform(e);var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[];S.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var C=e.length,w=0;w<C-1;w++)r=w==0?e[0]:e[w-1],i=e[w],a=e[w+1],o=w+2<C?e[w+2]:a,l=Math.sqrt((r.screen_x-i.screen_x)**2+(r.screen_y-i.screen_y)**2),u=Math.sqrt((i.screen_x-a.screen_x)**2+(i.screen_y-a.screen_y)**2),d=Math.sqrt((a.screen_x-o.screen_x)**2+(a.screen_y-o.screen_y)**2),g=d**+n,v=d**(2*n),_=u**+n,y=u**(2*n),x=l**+n,b=l**(2*n),f=2*b+3*x*_+y,p=2*v+3*g*_+y,m=3*x*(x+_),m>0&&(m=1/m),h=3*g*(g+_),h>0&&(h=1/h),s={screen_x:(-y*r.screen_x+f*i.screen_x+b*a.screen_x)*m,screen_y:(-y*r.screen_y+f*i.screen_y+b*a.screen_y)*m},c={screen_x:(v*i.screen_x+p*a.screen_x-y*o.screen_x)*h,screen_y:(v*i.screen_y+p*a.screen_y-y*o.screen_y)*h},s.screen_x==0&&s.screen_y==0&&(s=i),c.screen_x==0&&c.screen_y==0&&(c=a),S.push([s.screen_x,s.screen_y]),S.push([c.screen_x,c.screen_y]),S.push([a.screen_x,a.screen_y]);return S},u9._linear=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n].screen_x,e[n].screen_y]);return t};function d9(e,t,n,r){this.id=t,this.options=$.selectiveBridgeObject([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`drawPoints`,`shaded`,`interpolation`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],n),this.usingDefaultStyle=e.className===void 0,this.groupsUsingDefaultStyles=r,this.zeroPosition=0,this.update(e),this.usingDefaultStyle==1&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=e.visible===void 0?!0:e.visible}d9.prototype.setItems=function(e){e==null?this.itemsData=[]:(this.itemsData=e,n3(this.options)==1&&$.insertSort(this.itemsData,function(e,t){return e.x>t.x?1:-1}))},d9.prototype.getItems=function(){return this.itemsData},d9.prototype.setZeroPosition=function(e){this.zeroPosition=e},d9.prototype.setOptions=function(e){e!==void 0&&($.selectiveDeepExtend([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],this.options,e),typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),$.mergeOptions(this.options,e,`interpolation`),$.mergeOptions(this.options,e,`drawPoints`),$.mergeOptions(this.options,e,`shaded`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)))},d9.prototype.update=function(e){this.group=e,this.content=e.content||`graph`,this.className=e.className||this.className||`vis-graph-group`+this.groupsUsingDefaultStyles[0]%10,this.visible=e.visible===void 0?!0:e.visible,this.style=e.style,this.setOptions(e.options)},d9.prototype.getLegend=function(e,t,n,r,i){switch((n==null||n==null)&&(n={svg:document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),svgElements:{},options:this.options,groups:[this]}),(r==null||r==null)&&(r=0),(i==null||i==null)&&(i=.5*t),this.options.style){case`line`:u9.drawIcon(this,r,i,e,t,n);break;case`points`:case`point`:s9.drawIcon(this,r,i,e,t,n);break;case`bar`:l9.drawIcon(this,r,i,e,t,n);break}return{icon:n.svg,label:this.content,orientation:this.options.yAxisOrientation}},d9.prototype.getYRange=function(e){for(var t=e[0].y,n=e[0].y,r=0;r<e.length;r++)t=t>e[r].y?e[r].y:t,n=n<e[r].y?e[r].y:n;return{min:t,max:n,yAxisOrientation:this.options.yAxisOrientation}};function f9(e,t,n,r){this.body=e,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:`top-left`},right:{visible:!0,position:`top-right`}},this.side=n,this.options=$.extend({},this.defaultOptions),this.linegraphOptions=r,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(t)}f9.prototype=new f4,f9.prototype.clear=function(){this.groups={},this.amountOfGroups=0},f9.prototype.addGroup=function(e,t){t.options.excludeFromLegend!=1&&(Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1)},f9.prototype.updateGroup=function(e,t){this.groups[e]=t},f9.prototype.removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)},f9.prototype._create=function(){this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-legend`,this.dom.frame.style.position=`absolute`,this.dom.frame.style.top=`10px`,this.dom.frame.style.display=`block`,this.dom.textArea=document.createElement(`div`),this.dom.textArea.className=`vis-legend-text`,this.dom.textArea.style.position=`relative`,this.dom.textArea.style.top=`0px`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.width=this.options.iconSize+5+`px`,this.svg.style.height=`100%`,this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},f9.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},f9.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},f9.prototype.setOptions=function(e){$.selectiveDeepExtend([`enabled`,`orientation`,`icons`,`left`,`right`],this.options,e)},f9.prototype.redraw=function(){var e=0,t=WK(this.groups);n3(t).call(t,function(e,t){return e<t?-1:1});for(var n=0;n<t.length;n++){var r=t[n];this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&e++}if(this.options[this.side].visible==0||this.amountOfGroups==0||this.options.enabled==0||e==0)this.hide();else{if(this.show(),this.options[this.side].position==`top-left`||this.options[this.side].position==`bottom-left`?(this.dom.frame.style.left=`4px`,this.dom.frame.style.textAlign=`left`,this.dom.textArea.style.textAlign=`left`,this.dom.textArea.style.left=this.options.iconSize+15+`px`,this.dom.textArea.style.right=``,this.svg.style.left=`0px`,this.svg.style.right=``):(this.dom.frame.style.right=`4px`,this.dom.frame.style.textAlign=`right`,this.dom.textArea.style.textAlign=`right`,this.dom.textArea.style.right=this.options.iconSize+15+`px`,this.dom.textArea.style.left=``,this.svg.style.right=`0px`,this.svg.style.left=``),this.options[this.side].position==`top-left`||this.options[this.side].position==`top-right`)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.bottom=``;else{var i=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+i+Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.top=``}this.options.icons==0?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+`px`,this.dom.textArea.style.right=``,this.dom.textArea.style.left=``,this.svg.style.width=`0px`):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+`px`,this.drawLegendIcons());var a=``;for(n=0;n<t.length;n++)r=t[n],this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&(a+=this.groups[r].content+`<br />`);this.dom.textArea.innerHTML=$.xss(a),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+`px`}},f9.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var e=WK(this.groups);n3(e).call(e,function(e,t){return e<t?-1:1}),vre(this.svgElements);var t=window.getComputedStyle(this.dom.frame).paddingTop,n=Number(t.replace(`px`,``)),r=n,i=this.options.iconSize,a=.75*this.options.iconSize,o=n+.5*a+3;this.svg.style.width=i+5+n+`px`;for(var s=0;s<e.length;s++){var c=e[s];this.groups[c].visible==1&&(this.linegraphOptions.visibility[c]===void 0||this.linegraphOptions.visibility[c]==1)&&(this.groups[c].getLegend(i,a,this.framework,r,o),o+=a+this.options.iconSpacing)}}};var p9=`__ungrouped__`;function m9(e,t){this.id=z2(),this.body=e,this.defaultOptions={yAxisOrientation:`left`,defaultGroup:`default`,sort:!0,sampling:!0,stack:!1,graphHeight:`400px`,shaded:{enabled:!1,orientation:`bottom`},style:`line`,barChart:{width:50,sideBySide:!1,align:`center`},interpolation:{enabled:!0,parametrization:`centripetal`,alpha:.5},drawPoints:{enabled:!0,size:6,style:`square`},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=$.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(e,t){n._onAdd(t.items)},update:function(e,t){n._onUpdate(t.items)},remove:function(e,t){n._onRemove(t.items)}},this.groupListeners={add:function(e,t){n._onAddGroups(t.items)},update:function(e,t){n._onUpdateGroups(t.items)},remove:function(e,t){n._onRemoveGroups(t.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(t),this.groupsUsingDefaultStyles=[0],this.body.emitter.on(`rangechanged`,function(){n.svg.style.left=$.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}m9.prototype=new f4,m9.prototype._create=function(){var e=document.createElement(`div`);e.className=`vis-line-graph`,this.dom.frame=e,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`relative`,this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,this.svg.style.display=`block`,e.appendChild(this.svg),this.options.dataAxis.orientation=`left`,this.yAxisLeft=new o9(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation=`right`,this.yAxisRight=new o9(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new f9(this.body,this.options.legend,`left`,this.options.groups),this.legendRight=new f9(this.body,this.options.legend,`right`,this.options.groups),this.show()},m9.prototype.setOptions=function(e){e&&(e.graphHeight===void 0&&e.height!==void 0?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):this.body.domProps.centerContainer.height!==void 0&&e.graphHeight!==void 0&&DX((e.graphHeight+``).replace(`px`,``))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),$.selectiveDeepExtend([`sampling`,`defaultGroup`,`stack`,`height`,`graphHeight`,`yAxisOrientation`,`style`,`barChart`,`dataAxis`,`sort`,`groups`],this.options,e),$.mergeOptions(this.options,e,`interpolation`),$.mergeOptions(this.options,e,`drawPoints`),$.mergeOptions(this.options,e,`shaded`),$.mergeOptions(this.options,e,`legend`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)),this.yAxisLeft&&e.dataAxis!==void 0&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&e.legend!==void 0&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,p9)&&this.groups[p9].setOptions(e)),this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0}))},m9.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},m9.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},m9.prototype.setItems=function(e){var t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(H2(e))this.itemsData=K2(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(Q($).call($,this.itemListeners,function(e,t){r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){var i=this.id;Q($).call($,this.itemListeners,function(e,n){t.itemsData.on(n,e,i)}),n=this.itemsData.getIds(),this._onAdd(n)}},m9.prototype.setGroups=function(e){var t=this,n;if(this.groupsData){Q($).call($,this.groupListeners,function(e,n){t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null;for(var r=0;r<n.length;r++)this._removeGroup(n[r])}if(!e)this.groupsData=null;else if(H2(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var i=this.id;Q($).call($,this.groupListeners,function(e,n){t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}},m9.prototype._onUpdate=function(e){this._updateAllGroupData(e)},m9.prototype._onAdd=function(e){this._onUpdate(e)},m9.prototype._onRemove=function(e){this._onUpdate(e)},m9.prototype._onUpdateGroups=function(e){this._updateAllGroupData(null,e)},m9.prototype._onAddGroups=function(e){this._onUpdateGroups(e)},m9.prototype._onRemoveGroups=function(e){for(var t=0;t<e.length;t++)this._removeGroup(e[t]);this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})},m9.prototype._removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(this.groups[e].options.yAxisOrientation==`right`?(this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e),this.legendLeft.redraw()),delete this.groups[e])},m9.prototype._updateGroup=function(e,t){Object.prototype.hasOwnProperty.call(this.groups,t)?(this.groups[t].update(e),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.updateGroup(t,this.groups[t]),this.legendRight.updateGroup(t,this.groups[t]),this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t)):(this.yAxisLeft.updateGroup(t,this.groups[t]),this.legendLeft.updateGroup(t,this.groups[t]),this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t))):(this.groups[t]=new d9(e,t,this.options,this.groupsUsingDefaultStyles),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.addGroup(t,this.groups[t]),this.legendRight.addGroup(t,this.groups[t])):(this.yAxisLeft.addGroup(t,this.groups[t]),this.legendLeft.addGroup(t,this.groups[t]))),this.legendLeft.redraw(),this.legendRight.redraw()},m9.prototype._updateAllGroupData=function(e,t){if(this.itemsData!=null){var n={},r=this.itemsData.get(),i=this.itemsData.idProp,a={};e&&lK(e).call(e,function(e){a[e]=e});for(var o={},s=0;s<r.length;s++){var c=r[s],l=c.group;l??=p9,Object.prototype.hasOwnProperty.call(o,l)?o[l]++:o[l]=1}var u={};if(!t&&e){for(l in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,l)){h=this.groups[l];var d=h.getItems();n[l]=mV(d).call(d,function(e){return u[e[i]]=e[i],e[i]!==a[e[i]]});var f=o[l];o[l]-=n[l].length,n[l].length<f&&(n[l][f-1]={})}}for(s=0;s<r.length;s++)if(c=r[s],l=c.group,l??=p9,!(!t&&e&&c[i]!==a[c[i]]&&Object.prototype.hasOwnProperty.call(u,c[i]))){Object.prototype.hasOwnProperty.call(n,l)||(n[l]=Array(o[l]));var p=$.bridgeObject(c);p.x=$.convert(c.x,`Date`),p.end=$.convert(c.end,`Date`),p.orginalY=c.y,p.y=Number(c.y),p[i]=c[i];var m=n[l].length- o[l]--;n[l][m]=p}for(l in this.groups)!Object.prototype.hasOwnProperty.call(this.groups,l)||Object.prototype.hasOwnProperty.call(n,l)||(n[l]=[]);for(l in n)if(Object.prototype.hasOwnProperty.call(n,l))if(n[l].length==0)Object.prototype.hasOwnProperty.call(this.groups,l)&&this._removeGroup(l);else{var h=void 0;this.groupsData!=null&&(h=this.groupsData.get(l)),h??={id:l,content:this.options.defaultGroup+l},this._updateGroup(h,l),this.groups[l].setItems(n[l])}this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})}},m9.prototype.redraw=function(){var e=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,e=this._isResized()||e;var t=this.body.range.end-this.body.range.start,n=t!=this.lastVisibleInterval;if(this.lastVisibleInterval=t,e==1){var r;this.svg.style.width=$.option.asSize(3*this.props.width),this.svg.style.left=$.option.asSize(-this.props.width),(UX(r=this.options.height+``).call(r,`%`)!=-1||this.updateSVGheightOnResize==1)&&(this.updateSVGheight=!0)}if(this.updateSVGheight==1?(this.options.graphHeight!=this.props.height+`px`&&(this.options.graphHeight=this.props.height+`px`,this.svg.style.height=this.props.height+`px`),this.updateSVGheight=!1):this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,e==1||n==1||this.abortedGraphUpdate==1||this.forceGraphUpdate==1)e=this._updateGraph()||e,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+`px`;else if(this.lastStart!=0){var i=this.body.range.start-this.lastStart,a=this.body.range.end-this.body.range.start;if(this.props.width!=0){var o=i*(this.props.width/a);this.svg.style.left=-this.props.width-o+`px`}}return this.legendLeft.redraw(),this.legendRight.redraw(),e},m9.prototype._getSortedGroupIds=function(){var e=[];for(var t in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,t)){var n=this.groups[t];n.visible==1&&(this.options.groups.visibility[t]===void 0||this.options.groups.visibility[t]==1)&&e.push({id:t,zIndex:n.options.zIndex})}$.insertSort(e,function(e,t){var n=e.zIndex,r=t.zIndex;return n===void 0&&(n=0),r===void 0&&(r=0),n==r?0:n<r?-1:1});for(var r=Array(e.length),i=0;i<e.length;i++)r[i]=e[i].id;return r},m9.prototype._updateGraph=function(){if(e9(this.svgElements),this.props.width!=0&&this.itemsData!=null){var e,t,n={},r=!1,i=this.body.util.toGlobalTime(-this.body.domProps.root.width),a=this.body.util.toGlobalTime(2*this.body.domProps.root.width),o=this._getSortedGroupIds();if(o.length>0){var s={};for(this._getRelevantData(o,s,i,a),this._applySampling(o,s),t=0;t<o.length;t++)this._convertXcoordinates(s[o[t]]);if(this._getYRanges(o,s,n),r=this._updateYAxis(o,n),r==1)return t9(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var c=void 0;for(t=0;t<o.length;t++)e=this.groups[o[t]],this.options.stack===!0&&this.options.style===`line`&&(e.options.excludeFromStacking==null||!e.options.excludeFromStacking)&&(c!=null&&(this._stack(s[e.id],s[c.id]),e.options.shaded.enabled==1&&e.options.shaded.orientation!==`group`&&(e.options.shaded.orientation==`top`&&c.options.shaded.orientation!==`group`?(c.options.shaded.orientation=`group`,c.options.shaded.groupId=e.id):(e.options.shaded.orientation=`group`,e.options.shaded.groupId=c.id))),c=e),this._convertYcoordinates(s[o[t]],e);var l={};for(t=0;t<o.length;t++)if(e=this.groups[o[t]],e.options.style===`line`&&e.options.shaded.enabled==1){var u=s[o[t]];if(u==null||u.length==0)continue;if(Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=u9.calcPath(u,e)),e.options.shaded.orientation===`group`){var d=e.options.shaded.groupId;if(UX(o).call(o,d)===-1){console.log(e.id+`: Unknown shading group target given:`+d);continue}Object.prototype.hasOwnProperty.call(l,d)||(l[d]=u9.calcPath(s[d],this.groups[d])),u9.drawShading(l[o[t]],e,l[d],this.framework)}else u9.drawShading(l[o[t]],e,void 0,this.framework)}for(l9.draw(o,s,this.framework),t=0;t<o.length;t++)if(e=this.groups[o[t]],s[o[t]].length>0)switch(e.options.style){case`line`:Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=u9.calcPath(s[o[t]],e)),u9.draw(l[o[t]],e,this.framework);case`point`:case`points`:(e.options.style==`point`||e.options.style==`points`||e.options.drawPoints.enabled==1)&&s9.draw(s[o[t]],e,this.framework);break}}}return t9(this.svgElements),!1},m9.prototype._stack=function(e,t){for(var n=0,r,i,a,o,s=0;s<e.length;s++){a=void 0,o=void 0;for(var c=n;c<t.length;c++)if(t[c].x===e[s].x){a=t[c],o=t[c],n=c;break}else if(t[c].x>e[s].x){o=t[c],a=c==0?o:t[c-1],n=c;break}o===void 0&&(a=t[t.length-1],o=t[t.length-1]),r=o.x-a.x,i=o.y-a.y,r==0?e[s].y=e[s].orginalY+o.y:e[s].y=e[s].orginalY+i/r*(e[s].x-a.x)+a.y}},m9.prototype._getRelevantData=function(e,t,n,r){var i,a,o,s;if(e.length>0)for(a=0;a<e.length;a++){i=this.groups[e[a]];var c=i.getItems();if(n3(i.options)==1){var l=function(e,t){return e.getTime()==t.getTime()?0:e<t?-1:1},u=Math.max(0,$.binarySearchValue(c,n,`x`,`before`,l)),d=Math.min(c.length,$.binarySearchValue(c,r,`x`,`after`,l)+1);d<=0&&(d=c.length);var f=Array(d-u);for(o=u;o<d;o++)s=i.itemsData[o],f[o-u]=s;t[e[a]]=f}else t[e[a]]=i.itemsData}},m9.prototype._applySampling=function(e,t){var n;if(e.length>0){for(var r=0;r<e.length;r++)if(n=this.groups[e[r]],n.options.sampling==1){var i=t[e[r]];if(i.length>0){var a=1,o=i.length,s=o/(this.body.util.toGlobalScreen(i[i.length-1].x)-this.body.util.toGlobalScreen(i[0].x));a=Math.min(Math.ceil(.2*o),Math.max(1,Math.round(s)));for(var c=Array(o),l=0;l<o;l+=a){var u=Math.round(l/a);c[u]=i[l]}t[e[r]]=wJ(c).call(c,0,Math.round(o/a))}}}},m9.prototype._getYRanges=function(e,t,n){var r,i,a,o=[],s=[],c;if(e.length>0){for(a=0;a<e.length;a++)r=t[e[a]],c=this.groups[e[a]].options,r.length>0&&(i=this.groups[e[a]],c.stack===!0&&c.style===`bar`?c.yAxisOrientation===`left`?o=UY(o).call(o,r):s=UY(s).call(s,r):n[e[a]]=i.getYRange(r,e[a]));l9.getStackedYRange(o,n,e,`__barStackLeft`,`left`),l9.getStackedYRange(s,n,e,`__barStackRight`,`right`)}},m9.prototype._updateYAxis=function(e,t){var n=!1,r=!1,i=!1,a=1e9,o=1e9,s=-1e9,c=-1e9,l,u;if(e.length>0){for(var d=0;d<e.length;d++){var f=this.groups[e[d]];f&&f.options.yAxisOrientation!=`right`?(r=!0,a=1e9,s=-1e9):f&&f.options.yAxisOrientation&&(i=!0,o=1e9,c=-1e9)}for(d=0;d<e.length;d++)!Object.prototype.hasOwnProperty.call(t,e[d])||t[e[d]].ignore===!0||(l=t[e[d]].min,u=t[e[d]].max,t[e[d]].yAxisOrientation==`right`?(i=!0,o=o>l?l:o,c=c<u?u:c):(r=!0,a=a>l?l:a,s=s<u?u:s));r==1&&this.yAxisLeft.setRange(a,s),i==1&&this.yAxisRight.setRange(o,c)}n=this._toggleAxisVisiblity(r,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(i,this.yAxisRight)||n,i==1&&r==1?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,this.yAxisRight.master==0?(i==1?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;var p=[`__barStackLeft`,`__barStackRight`,`__lineStackLeft`,`__lineStackRight`];for(d=0;d<p.length;d++)UX(e).call(e,p[d])!=-1&&wJ(e).call(e,UX(e).call(e,p[d]),1);return n},m9.prototype._toggleAxisVisiblity=function(e,t){var n=!1;return e==0?t.dom.frame.parentNode&&t.hidden==0&&(t.hide(),n=!0):!t.dom.frame.parentNode&&t.hidden==1&&(t.show(),n=!0),n},m9.prototype._convertXcoordinates=function(e){for(var t=this.body.util.toScreen,n=0;n<e.length;n++)e[n].screen_x=t(e[n].x)+this.props.width,e[n].screen_y=e[n].y,e[n].end==null?e[n].screen_end=void 0:e[n].screen_end=t(e[n].end)+this.props.width},m9.prototype._convertYcoordinates=function(e,t){var n=this.yAxisLeft,r=Number(this.svg.style.height.replace(`px`,``));t.options.yAxisOrientation==`right`&&(n=this.yAxisRight);for(var i=0;i<e.length;i++)e[i].screen_y=Math.round(n.convertValue(e[i].y));t.setZeroPosition(Math.min(r,n.convertValue(0)))};var h9=`string`,g9=`boolean`,_9=`number`,Sre=`array`,v9=`date`,y9=`object`,Cre=`dom`,b9=`moment`,x9=`any`,wre={configure:{enabled:{boolean:g9},filter:{boolean:g9,function:`function`},container:{dom:Cre},__type__:{object:y9,boolean:g9,function:`function`}},alignCurrentTime:{string:h9,undefined:`undefined`},yAxisOrientation:{string:[`left`,`right`]},defaultGroup:{string:h9},sort:{boolean:g9},sampling:{boolean:g9},stack:{boolean:g9},graphHeight:{string:h9,number:_9},shaded:{enabled:{boolean:g9},orientation:{string:[`bottom`,`top`,`zero`,`group`]},groupId:{object:y9},__type__:{boolean:g9,object:y9}},style:{string:[`line`,`bar`,`points`]},barChart:{width:{number:_9},minWidth:{number:_9},sideBySide:{boolean:g9},align:{string:[`left`,`center`,`right`]},__type__:{object:y9}},interpolation:{enabled:{boolean:g9},parametrization:{string:[`centripetal`,`chordal`,`uniform`]},alpha:{number:_9},__type__:{object:y9,boolean:g9}},drawPoints:{enabled:{boolean:g9},onRender:{function:`function`},size:{number:_9},style:{string:[`square`,`circle`]},__type__:{object:y9,boolean:g9,function:`function`}},dataAxis:{showMinorLabels:{boolean:g9},showMajorLabels:{boolean:g9},showWeekScale:{boolean:g9},icons:{boolean:g9},width:{string:h9,number:_9},visible:{boolean:g9},alignZeros:{boolean:g9},left:{range:{min:{number:_9,undefined:`undefined`},max:{number:_9,undefined:`undefined`},__type__:{object:y9}},format:{function:`function`},title:{text:{string:h9,number:_9,undefined:`undefined`},style:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},right:{range:{min:{number:_9,undefined:`undefined`},max:{number:_9,undefined:`undefined`},__type__:{object:y9}},format:{function:`function`},title:{text:{string:h9,number:_9,undefined:`undefined`},style:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},__type__:{object:y9}},legend:{enabled:{boolean:g9},icons:{boolean:g9},left:{visible:{boolean:g9},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:y9}},right:{visible:{boolean:g9},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:y9}},__type__:{object:y9,boolean:g9}},groups:{visibility:{any:x9},__type__:{object:y9}},autoResize:{boolean:g9},throttleRedraw:{number:_9},clickToUse:{boolean:g9},end:{number:_9,date:v9,string:h9,moment:b9},format:{minorLabels:{millisecond:{string:h9,undefined:`undefined`},second:{string:h9,undefined:`undefined`},minute:{string:h9,undefined:`undefined`},hour:{string:h9,undefined:`undefined`},weekday:{string:h9,undefined:`undefined`},day:{string:h9,undefined:`undefined`},week:{string:h9,undefined:`undefined`},month:{string:h9,undefined:`undefined`},quarter:{string:h9,undefined:`undefined`},year:{string:h9,undefined:`undefined`},__type__:{object:y9}},majorLabels:{millisecond:{string:h9,undefined:`undefined`},second:{string:h9,undefined:`undefined`},minute:{string:h9,undefined:`undefined`},hour:{string:h9,undefined:`undefined`},weekday:{string:h9,undefined:`undefined`},day:{string:h9,undefined:`undefined`},week:{string:h9,undefined:`undefined`},month:{string:h9,undefined:`undefined`},quarter:{string:h9,undefined:`undefined`},year:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},moment:{function:`function`},height:{string:h9,number:_9},hiddenDates:{start:{date:v9,number:_9,string:h9,moment:b9},end:{date:v9,number:_9,string:h9,moment:b9},repeat:{string:h9},__type__:{object:y9,array:Sre}},locale:{string:h9},locales:{__any__:{any:x9},__type__:{object:y9}},max:{date:v9,number:_9,string:h9,moment:b9},maxHeight:{number:_9,string:h9},maxMinorChars:{number:_9},min:{date:v9,number:_9,string:h9,moment:b9},minHeight:{number:_9,string:h9},moveable:{boolean:g9},multiselect:{boolean:g9},orientation:{string:h9},showCurrentTime:{boolean:g9},showMajorLabels:{boolean:g9},showMinorLabels:{boolean:g9},showWeekScale:{boolean:g9},snap:{function:`function`,null:`null`},start:{date:v9,number:_9,string:h9,moment:b9},timeAxis:{scale:{string:h9,undefined:`undefined`},step:{number:_9,undefined:`undefined`},__type__:{object:y9}},width:{string:h9,number:_9},zoomable:{boolean:g9},zoomKey:{string:[`ctrlKey`,`altKey`,`metaKey`,``]},zoomMax:{number:_9},zoomMin:{number:_9},zIndex:{number:_9},__type__:{object:y9}},Tre={global:{alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:[`zero`,`top`,`bottom`,`group`]},style:[`line`,`bar`,`points`],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:[`left`,`center`,`right`]},interpolation:{enabled:!0,parametrization:[`centripetal`,`chordal`,`uniform`]},drawPoints:{enabled:!0,size:[6,2,30,1],style:[`square`,`circle`]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:``,style:``}},right:{title:{text:``,style:``}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},right:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]}},autoResize:!0,clickToUse:!1,end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,quarter:`[Q]Q`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,quarter:`YYYY`,year:``}},height:``,locale:``,max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!0,orientation:[`both`,`bottom`,`top`],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:``,width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function S9(e,t,n,r){var i,a,o,s,c,l,u;if(!(iL(n)||H2(n))&&n instanceof Object){var d=r;r=n,n=d}r&&r.throttleRedraw&&console.warn(`Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:`bottom`,item:`bottom`},moment:ez,width:null,height:null,maxHeight:null,minHeight:null},this.options=$.deepExtend({},this.defaultOptions),this._create(e),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Z(i=this.on).call(i,this),off:Z(a=this.off).call(a,this),emit:Z(o=this.emit).call(o,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:Z(s=f._toScreen).call(s,f),toGlobalScreen:Z(c=f._toGlobalScreen).call(c,f),toTime:Z(l=f._toTime).call(l,f),toGlobalTime:Z(u=f._toGlobalTime).call(u,f)}},this.range=new g3(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Y3(this.body),this.components.push(this.timeAxis),this.currentTime=new H6(this.body),this.components.push(this.currentTime),this.linegraph=new m9(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on(`tap`,function(e){f.emit(`click`,f.getEventProperties(e))}),this.on(`doubletap`,function(e){f.emit(`doubleClick`,f.getEventProperties(e))}),this.dom.root.oncontextmenu=function(e){f.emit(`contextmenu`,f.getEventProperties(e))},this.initialFitDone=!1,this.on(`changed`,function(){if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();var t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&$L(()=>f.options.onInitialDrawComplete(),0))}}),r&&this.setOptions(r),n&&this.setGroups(n),t&&this.setItems(t),this._redraw()}S9.prototype=new V6,S9.prototype.setOptions=function(e){V7.validate(e,wre)===!0&&console.log(`%cErrors have been found in the supplied options object.`,B7),V6.prototype.setOptions.call(this,e)},S9.prototype.setItems=function(e){var t=this.itemsData==null,n=e?H2(e)?K2(e):K2(new PD(e)):null;if(this.itemsData&&this.itemsData.dispose(),this.itemsData=n,this.linegraph&&this.linegraph.setItems(n==null?null:n.rawDS),t)if(this.options.start!=null||this.options.end!=null){var r=this.options.start==null?null:this.options.start,i=this.options.end==null?null:this.options.end;this.setWindow(r,i,{animation:!1})}else this.fit({animation:!1})},S9.prototype.setGroups=function(e){var t=e?H2(e)?e:new PD(e):null;this.groupsData=t,this.linegraph.setGroups(t)},S9.prototype.getLegend=function(e,t,n){return t===void 0&&(t=15),n===void 0&&(n=15),this.linegraph.groups[e]===void 0?`cannot find group:'`+e+`'`:this.linegraph.groups[e].getLegend(t,n)},S9.prototype.isGroupVisible=function(e){return this.linegraph.groups[e]===void 0?!1:this.linegraph.groups[e].visible&&(this.linegraph.options.groups.visibility[e]===void 0||this.linegraph.options.groups.visibility[e]==1)},S9.prototype.getDataRange=function(){var e=null,t=null;for(var n in this.linegraph.groups)if(!(!Object.prototype.hasOwnProperty.call(this.linegraph.groups,n)||this.linegraph.groups[n].visible!==!0))for(var r=0;r<this.linegraph.groups[n].itemsData.length;r++){var i=this.linegraph.groups[n].itemsData[r],a=$.convert(i.x,`Date`).valueOf();e=e==null||e>a?a:e,t=t==null||t<a?a:t}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}},S9.prototype.getEventProperties=function(e){var t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=t-$.getAbsoluteLeft(this.dom.centerContainer),i=n-$.getAbsoluteTop(this.dom.centerContainer),a=this._toTime(r),o=B6.customTimeFromTarget(e),s=$.getTarget(e),c=null;$.hasParent(s,this.timeAxis.dom.foreground)||this.timeAxis2&&$.hasParent(s,this.timeAxis2.dom.foreground)?c=`axis`:$.hasParent(s,this.linegraph.yAxisLeft.dom.frame)||$.hasParent(s,this.linegraph.yAxisRight.dom.frame)?c=`data-axis`:$.hasParent(s,this.linegraph.legendLeft.dom.frame)||$.hasParent(s,this.linegraph.legendRight.dom.frame)?c=`legend`:o==null?$.hasParent(s,this.currentTime.bar)?c=`current-time`:$.hasParent(s,this.dom.center)&&(c=`background`):c=`custom-time`;var l=[],u=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!u.hidden&&this.itemsData.length>0&&l.push(u.screenToValue(i)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(i)),{event:e,customTime:o?o.options.id:null,what:c,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:r,y:i,time:a,value:l}},S9.prototype._createConfigurator=function(){return new X7(this,this.dom.container,Tre)};var Ere=yre();K.locale(Ere);var C9=new Date(`1970-01-01T00:00:00Z`),Dre=new Date(`2030-01-01T00:00:00Z`),w9=`playhead`,Ore=500,kre=6,Are=`+ .sem-timeline-wrap .vis-timeline { border: none !important; background: transparent !important; overflow: visible !important; }+ .sem-timeline-wrap .vis-panel.vis-background, .sem-timeline-wrap .vis-panel.vis-center { background: transparent !important; }+ .sem-timeline-wrap .vis-panel { border-color: rgba(88, 166, 255, 0.15) !important; }+ .sem-timeline-wrap .vis-time-axis .vis-text {+ color: #8b949e !important;+ font-size: 11px !important;+ font-family: 'JetBrains Mono', 'Fira Code', monospace !important;+ padding-top: 3px !important;+ }+ .sem-timeline-wrap .vis-time-axis .vis-text.vis-major {+ color: #c9d1d9 !important;+ font-weight: 700 !important;+ font-size: 12px !important;+ }+ .sem-timeline-wrap .vis-time-axis .vis-grid.vis-minor { border-color: rgba(88, 166, 255, 0.07) !important; }+ .sem-timeline-wrap .vis-time-axis .vis-grid.vis-major { border-color: rgba(88, 166, 255, 0.18) !important; }+ .sem-timeline-wrap .vis-custom-time.${w9} {+ background: rgba(88, 166, 255, 0.15) !important;+ width: 2px !important;+ cursor: ew-resize !important;+ z-index: 5 !important;+ }+ .sem-timeline-wrap .vis-custom-time.${w9} > .vis-custom-time-marker {+ background: #58a6ff !important;+ color: #0d1117 !important;+ font-size: 10px !important;+ font-weight: 700 !important;+ border-radius: 3px !important;+ padding: 1px 5px !important;+ white-space: nowrap !important;+ box-shadow: 0 0 8px rgba(88, 166, 255, 0.7) !important;+ }+ .sem-timeline-wrap .vis-current-time { display: none !important; }+ .sem-timeline-wrap .vis-panel.vis-left { display: none !important; }+`;function T9(e,t){if(!e)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:n}function E9(e){return`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`}function jre(e){let t=(0,u.c)(56),{onTimeChange:n,minDate:r,maxDate:i}=e,a=(0,l.useRef)(null),o=(0,l.useRef)(null),s=(0,l.useRef)(C9),c=(0,l.useRef)(null),[d,f]=(0,l.useState)(!1),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=E9(C9),t[0]=p):p=t[0];let[m,h]=(0,l.useState)(p),g;t[1]===r?g=t[2]:(g=T9(r,C9),t[1]=r,t[2]=g);let _=g,v=T9(i,Dre),y;t[3]!==v||t[4]!==_?(y=new Date(Math.round((_.getTime()+v.getTime())/2)),t[3]=v,t[4]=_,t[5]=y):y=t[5];let b=y,x,S;t[6]!==b||t[7]!==v||t[8]!==_||t[9]!==n?(x=()=>{if(!a.current)return;let e=o.current;if(!e){let e=new PD([]),t={height:`100%`,min:_,max:v,start:_,end:v,showCurrentTime:!1,zoomable:!0,moveable:!0,zoomMin:31536e6,zoomMax:252288e7,showMajorLabels:!0,showMinorLabels:!0,timeAxis:{scale:`year`,step:5},format:{minorLabels:{year:`YYYY`},majorLabels:{year:`YYYY`}},orientation:{axis:`bottom`},margin:{item:0,axis:0},selectable:!1,stack:!1},r=new _re(a.current,e,t);return o.current=r,s.current=b,r.addCustomTime(b,w9),r.on(`timechange`,e=>{e.id===w9&&(s.current=e.time,r.setCustomTime(e.time,w9),n(e.time),h(E9(e.time)))}),n(b),h(E9(b)),()=>{r.destroy(),o.current=null}}e.setOptions({min:_,max:v,start:_,end:v}),s.current=b,e.setCustomTime(b,w9),n(b),h(E9(b))},S=[b,v,_,n],t[6]=b,t[7]=v,t[8]=_,t[9]=n,t[10]=x,t[11]=S):(x=t[10],S=t[11]),(0,l.useEffect)(x,S);let C;t[12]!==v||t[13]!==_||t[14]!==n?(C=()=>{c.current||=setInterval(()=>{let e=o.current;if(!e)return;let t=new Date(s.current);t.setMonth(t.getMonth()+kre),t>=v&&t.setTime(_.getTime()),s.current=t,e.setCustomTime(t,w9),n(t),h(E9(t))},Ore)},t[12]=v,t[13]=_,t[14]=n,t[15]=C):C=t[15];let w=C,T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{c.current&&=(clearInterval(c.current),null)},t[16]=T):T=t[16];let E=T,D;t[17]===w?D=t[18]:(D=()=>{f(e=>e?(E(),!1):(w(),!0))},t[17]=w,t[18]=D);let O=D,ee,k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>()=>E(),ee=[E],t[19]=ee,t[20]=k):(ee=t[19],k=t[20]),(0,l.useEffect)(k,ee);let A,j,M;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(A={position:`relative`,width:`100%`,height:`90px`,borderTop:`1px solid rgba(88, 166, 255, 0.2)`,background:`rgba(1, 4, 9, 0.88)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,display:`flex`,alignItems:`stretch`,flexShrink:0},j=(0,G.jsx)(`style`,{children:Are}),M={display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`0 16px`,borderRight:`1px solid rgba(88, 166, 255, 0.15)`,minWidth:80,flexShrink:0},t[21]=A,t[22]=j,t[23]=M):(A=t[21],j=t[22],M=t[23]);let N=d?`Pause Evolution`:`Play Evolution`,P=`1.5px solid ${d?`#58a6ff`:`rgba(88, 166, 255, 0.35)`}`,te=d?`rgba(88, 166, 255, 0.2)`:`rgba(88, 166, 255, 0.06)`,F=d?`0 0 10px rgba(88, 166, 255, 0.4)`:`none`,I;t[24]!==P||t[25]!==te||t[26]!==F?(I={width:34,height:34,borderRadius:`50%`,border:P,background:te,color:`#58a6ff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`,boxShadow:F},t[24]=P,t[25]=te,t[26]=F,t[27]=I):I=t[27];let ne;t[28]===d?ne=t[29]:(ne=d?(0,G.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,G.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,G.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}):(0,G.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,G.jsx)(`polygon`,{points:`5,3 19,12 5,21`})}),t[28]=d,t[29]=ne);let re;t[30]!==N||t[31]!==I||t[32]!==ne||t[33]!==O?(re=(0,G.jsx)(`button`,{id:`temporal-play-btn`,onClick:O,title:N,style:I,children:ne}),t[30]=N,t[31]=I,t[32]=ne,t[33]=O,t[34]=re):re=t[34];let ie=d?`#58a6ff`:`#8b949e`,ae;t[35]===ie?ae=t[36]:(ae={fontSize:10,color:ie,fontFamily:`monospace`,letterSpacing:`0.04em`,transition:`color 0.2s`},t[35]=ie,t[36]=ae);let oe;t[37]!==m||t[38]!==ae?(oe=(0,G.jsx)(`span`,{style:ae,children:m}),t[37]=m,t[38]=ae,t[39]=oe):oe=t[39];let se;t[40]!==re||t[41]!==oe?(se=(0,G.jsxs)(`div`,{style:M,children:[re,oe]}),t[40]=re,t[41]=oe,t[42]=se):se=t[42];let ce;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(ce={position:`absolute`,top:5,left:100,fontSize:10,fontWeight:600,letterSpacing:`0.1em`,color:`rgba(88, 166, 255, 0.55)`,textTransform:`uppercase`,pointerEvents:`none`,zIndex:2},t[43]=ce):ce=t[43];let L;t[44]===_?L=t[45]:(L=_.getFullYear(),t[44]=_,t[45]=L);let R;t[46]===v?R=t[47]:(R=v.getFullYear(),t[46]=v,t[47]=R);let le;t[48]!==L||t[49]!==R?(le=(0,G.jsxs)(`div`,{style:ce,children:[`Temporal Scrubber · `,L,`-`,R]}),t[48]=L,t[49]=R,t[50]=le):le=t[50];let z;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(z={flex:1,overflow:`hidden`,position:`relative`},t[51]=z):z=t[51];let B;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,G.jsx)(`div`,{className:`sem-timeline-wrap`,style:z,children:(0,G.jsx)(`div`,{ref:a,style:{width:`100%`,height:`100%`,position:`relative`}})}),t[52]=B):B=t[52];let V;return t[53]!==se||t[54]!==le?(V=(0,G.jsxs)(`div`,{style:A,children:[j,se,le,B]}),t[53]=se,t[54]=le,t[55]=V):V=t[55],V}var Mre=[`community`,`cluster`,`module`,`group`,`category`,`domain`,`layer`,`source`,`nodeType`],Nre=[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`];function D9(e,t){if(t===`nodeType`){let t=e.nodeType;return typeof t==`string`&&t.trim()?t:null}let n=e.properties?.[t];return typeof n==`string`&&n.trim()?n:null}function Pre(e,t){if(e.length<=1||t<=0)return 0;let n=0;for(let r of e){let e=r/t;n-=e*Math.log(e)}return n/Math.log(e.length)}function Fre(e){let t=null,n=0;for(let r of Mre){let i=new Map,a=0;for(let t of e){let e=D9(t.attributes,r);e&&(a+=1,i.set(e,(i.get(e)??0)+1))}let o=i.size;if(a===0||o<=1)continue;let s=[...i.values()],c=a/e.length,l=Math.max(...s)/a,u=Pre(s,a),d=Math.min(o,W.palette.semantic.length)/W.palette.semantic.length,f=u*.65+d*.2+c*.15;c>=.45&&u>=.45&&l<=.88&&f>n&&(t=r,n=f)}return t?(e,n)=>D9(n,t)??O9(e,n):(e,t)=>O9(e,t)}function O9(e,t){let n=ci(e)%W.palette.semantic.length;return`${t.nodeType||`entity`}:${n}`}function Ire(e){return Nre.reduce((t,n)=>e[n]!==void 0&&e[n]!==null?t+1:t,0)}function Lre(e,t,n,r){let i=`default`,a,o;n?(i=`temporal`,a=`temporal`):r>0&&(i=`provenance`,a=`provenance`,o=r);let s=`none`;return t>=.86?s=`always`:a?s=`local`:t>=.56&&(s=`priority`),{nodeVariant:i,nodeShapeVariant:i,badgeKind:a,badgeCount:o,ringColor:W.nodes.selectedRing.color,haloColor:ui(e,.38),labelVisibilityPolicy:s}}function Rre(e,t,n,r){let i=li(.12,.18+Math.log(Math.max(Number(e.weight)||1,1))/Math.log(12),1),a=`line`;return r?a=`bidirectionalCurve`:Math.max(t,n,i)>=.58&&(a=`directional`),{edgeVariant:a,arrowVisibilityPolicy:a===`line`?`hidden`:`contextual`,relationshipStrength:i,isParallelPair:!1,parallelIndex:0,parallelCount:1}}var k9=1e3;async function zre(e,t){let n=null,r=[],i=null;for(;;){let a=new URL(`/api/graph/nodes`,window.location.origin);a.searchParams.set(`limit`,String(k9)),n&&a.searchParams.set(`cursor`,n);let o=await fetch(a.toString(),{signal:e});if(!o.ok)throw Error(`Fetch failed: ${o.status}`);let s=await o.json();if(!s.nodes?.length||(i=s.total??i,r.push(...s.nodes),t?.({phase:`nodes`,nodesLoaded:r.length,nodesTotal:i,edgesLoaded:0,edgesTotal:null,message:i?`Loading nodes ${r.length.toLocaleString()} of ${i.toLocaleString()}`:`Loading nodes ${r.length.toLocaleString()}`,progress:i?Math.min(r.length/Math.max(i,1),.45):.18}),!s.next_cursor))break;n=s.next_cursor,await A9()}return r}async function Bre(e,t,n,r){let i=null,a=[],o=null;for(;;){let s=new URL(`/api/graph/edges`,window.location.origin);s.searchParams.set(`limit`,String(k9)),i&&s.searchParams.set(`cursor`,i);let c=await fetch(s.toString(),{signal:e});if(!c.ok)throw Error(`Fetch failed: ${c.status}`);let l=await c.json();if(!l.edges?.length)break;o=l.total??o;let u=l.edges.filter(e=>t.has(e.source)&&t.has(e.target));if(a.push(...u),r?.({phase:`edges`,nodesLoaded:n.loaded,nodesTotal:n.total,edgesLoaded:a.length,edgesTotal:o,message:o?`Loading edges ${a.length.toLocaleString()} of ${o.toLocaleString()}`:`Loading edges ${a.length.toLocaleString()}`,progress:o?.45+Math.min(a.length/Math.max(o,1),1)*.35:.62}),!l.next_cursor)break;i=l.next_cursor,await A9()}return a}function A9(){return`scheduler`in window&&typeof window.scheduler?.yield==`function`?window.scheduler.yield():new Promise(e=>setTimeout(e,0))}function Vre(e){let t=(0,u.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{enabled:r,onGraphReady:i,onProgress:o}=n,s=r===void 0?!0:r,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=[`graph`,`full-load`],t[2]=c):c=t[2];let l;t[3]!==i||t[4]!==o?(l=async e=>{let{signal:t}=e,n=performance.now();o?.({phase:`nodes`,nodesLoaded:0,nodesTotal:null,edgesLoaded:0,edgesTotal:null,message:`Preparing graph load`,progress:.06});let r=await zre(t,o),a=new Set(r.map(Wre)),s=await Bre(t,a,{loaded:r.length,total:r.length},o),c=new Map;for(let e of a)c.set(e,0);for(let e of s)c.set(e.source,(c.get(e.source)??0)+1),c.set(e.target,(c.get(e.target)??0)+1);let l=Math.max(...c.values(),1),u=r.map(Ure);o?.({phase:`styling`,nodesLoaded:r.length,nodesTotal:r.length,edgesLoaded:s.length,edgesTotal:s.length,message:`Computing graph styling`,progress:.86});let d=Fre(u),f=new Map;for(let e of a){let t=c.get(e)??0,n=Math.log(t+1)/Math.log(l+1);f.set(e,n)}let p=u.map(e=>{let{id:t,attributes:n}=e,r=d(t,n),i=ci(r)%W.palette.semantic.length,a=W.palette.semantic[i],o=f.get(t)??0,s=li(2.6,2.6+12.4*o,15.8),c=!!(n.valid_from||n.valid_until),l=Ire(n.properties??{});return{id:t,attributes:{...n,semanticGroup:r,color:a,baseColor:a,mutedColor:ui(a,W.nodes.mutedAlpha),glowColor:ui(a,.34),size:s,baseSize:s,visualPriority:o,labelPriority:o,strokeColor:di(a,112),borderColor:di(a,112),borderSize:.85,...Lre(a,o,c,l)}}}),m=new Set(s.map(Hre)),h=s.map(e=>{let t=f.get(e.source)??0,n=f.get(e.target)??0,r=m.has(`${e.target}::${e.source}`);return{source:e.source,target:e.target,attributes:{weight:e.weight,edgeType:e.type,properties:e.properties,size:li(.45,.5+Math.sqrt(Math.max(Number(e.weight)||1,1))*.38,1.8),baseSize:li(.45,.5+Math.sqrt(Math.max(Number(e.weight)||1,1))*.38,1.8),color:W.palette.muted.edgeStructure,baseColor:W.palette.muted.edgeStructure,mutedColor:W.palette.muted.edgeOverview,visualPriority:Math.max(t,n),isBidirectional:r,edgeFamily:r?`bidirectional`:`line`,curveGroup:r?[e.source,e.target].sort().join(`::`):null,type:`line`,...Rre(e,t,n,r)}}});o?.({phase:`rendering`,nodesLoaded:p.length,nodesTotal:p.length,edgesLoaded:h.length,edgesTotal:h.length,message:`Rendering graph`,progress:.96}),_t(),ht(p),gt(h);let g={nodeCount:p.length,edgeCount:h.length,loadTimeMs:Math.round(performance.now()-n)};return o?.({phase:`rendering`,nodesLoaded:g.nodeCount,nodesTotal:g.nodeCount,edgesLoaded:g.edgeCount,edgesTotal:g.edgeCount,message:`Graph ready`,progress:1}),i?.(g),g},t[3]=i,t[4]=o,t[5]=l):l=t[5];let d;return t[6]!==s||t[7]!==l?(d={queryKey:c,enabled:s,staleTime:1/0,queryFn:l},t[6]=s,t[7]=l,t[8]=d):d=t[8],a(d)}function Hre(e){return`${e.source}::${e.target}`}function Ure(e){let t=Number(e.properties?.x??Math.random()*1e3-500),n=Number(e.properties?.y??Math.random()*1e3-500);return{id:e.id,attributes:{label:e.content||e.id,x:t,y:n,nodeType:e.type,content:e.content,valid_from:e.valid_from,valid_until:e.valid_until,properties:e.properties}}}function Wre(e){return e.id}function Gre(){let e=(0,u.c)(2),t=s(),n;return e[0]===t?n=e[1]:(n=()=>t.invalidateQueries({queryKey:[`graph`,`full-load`]}),e[0]=t,e[1]=n),n}var j9=`legend-panel`,Kre=8,qre={id:`legend`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`legend-toggle`,label:`Legend`,title:`Toggle semantic legend`,active:e.isPanelOpen(j9),order:20,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:j9})}],renderPanel:e=>{if(!e.isPanelOpen(j9))return null;let t=new Map;e.graph.forEachNode((n,r)=>{let i=String(r.semanticGroup||r.nodeType||`entity`),a=String(r.baseColor||e.theme.palette.semantic[0]),o=t.get(i);t.set(i,{count:(o?.count??0)+1,color:a})});let n=[...t.entries()].map(([e,t])=>({group:e,...t})).sort((e,t)=>t.count-e.count).slice(0,Kre);return{id:j9,title:`Legend`,placement:`bottom`,order:10,content:(0,G.jsxs)(`div`,{style:Jre,children:[(0,G.jsx)(`div`,{style:Yre,children:`Semantic groups`}),n.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:n.map(e=>(0,G.jsxs)(`div`,{style:Xre,children:[(0,G.jsx)(`span`,{style:{...Zre,background:e.color,boxShadow:`0 0 0 1px rgba(255,255,255,0.06), 0 0 18px ${e.color}44`}}),(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,G.jsx)(`div`,{style:Qre,children:e.group}),(0,G.jsxs)(`div`,{style:$re,children:[e.count.toLocaleString(),` nodes`]})]})]},e.group))}):(0,G.jsx)(`div`,{style:eie,children:`Legend will populate when the graph metadata is available.`})]})}}},Jre={display:`flex`,flexDirection:`column`,gap:12},Yre={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},Xre={display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},Zre={width:10,height:10,borderRadius:999,flexShrink:0},Qre={color:`#f3f7fd`,fontSize:13,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},$re={color:`#8ea4be`,fontSize:12},eie={color:`#8ea4be`,fontSize:12,lineHeight:1.5},M9=`neighborhood-panel`,tie=10,nie={id:`neighborhood-panel`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`neighborhood-toggle`,label:`Neighbors`,title:`Toggle neighborhood panel`,active:e.isPanelOpen(M9),order:30,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:M9})}],renderPanel:e=>{if(!e.isPanelOpen(M9))return null;let t=e.getSelectedNodeState();if(!t)return{id:M9,title:`Neighborhood`,placement:`bottom`,order:20,content:(0,G.jsx)(`div`,{style:N9,children:`Select a node to inspect its local neighborhood.`})};let n=e.graph.neighbors(t.id).map(n=>{let r=e.graph.getNodeAttributes(n),i=0;if(e.graph.hasDirectedEdge(t.id,n)){let r=e.graph.getDirectedEdgeAttributes(t.id,n);i=Math.max(i,Number(r.weight??0))}if(e.graph.hasDirectedEdge(n,t.id)){let r=e.graph.getDirectedEdgeAttributes(n,t.id);i=Math.max(i,Number(r.weight??0))}return{id:n,label:String(r.label||n),nodeType:String(r.nodeType||`Entity`),color:String(r.baseColor||r.color||e.theme.palette.semantic[0]),weight:i,degree:e.graph.degree(n)}}).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.label.localeCompare(t.label):t.degree-e.degree:t.weight-e.weight).slice(0,tie);return{id:M9,title:`Neighborhood`,placement:`bottom`,order:20,content:(0,G.jsxs)(`div`,{style:rie,children:[(0,G.jsx)(`div`,{style:iie,children:t.label}),(0,G.jsxs)(`div`,{style:aie,children:[t.neighborCount.toLocaleString(),` direct neighbors in the full graph`]}),n.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:n.map(t=>(0,G.jsxs)(`button`,{type:`button`,onClick:()=>e.dispatchAction({type:`selectNode`,nodeId:t.id}),style:oie,children:[(0,G.jsx)(`span`,{style:{...sie,background:t.color,boxShadow:`0 0 16px ${t.color}40`}}),(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1,textAlign:`left`},children:[(0,G.jsx)(`div`,{style:cie,children:t.label}),(0,G.jsxs)(`div`,{style:lie,children:[t.nodeType,` · degree `,t.degree,t.weight>0?` · weight ${t.weight.toFixed(2)}`:``]})]})]},t.id))}):(0,G.jsx)(`div`,{style:N9,children:`No direct neighbors are available for this node.`})]})}}},rie={display:`flex`,flexDirection:`column`,gap:12},iie={color:`#f3f7fd`,fontSize:14,fontWeight:700},aie={color:`#8ea4be`,fontSize:12,lineHeight:1.5},oie={display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`8px 10px`,background:`rgba(255,255,255,0.025)`,border:`1px solid rgba(255,255,255,0.06)`,borderRadius:12,cursor:`pointer`},sie={width:10,height:10,borderRadius:999,flexShrink:0},cie={color:`#f3f7fd`,fontSize:13,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},lie={color:`#8ea4be`,fontSize:12},N9={color:`#8ea4be`,fontSize:12,lineHeight:1.5},P9=`temporal-panel`;function F9(e){return e?`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`:`No time selected`}var uie={id:`temporal-overlay`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`temporal-toggle`,label:`Temporal`,title:`Toggle temporal context panel`,active:e.isPanelOpen(P9),order:40,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:P9})}],renderOverlay:e=>{let t=e.getTemporalState();if(!t?.currentTime)return null;let n=F9(t.currentTime);return{id:`temporal-overlay-chip`,layer:1,order:10,element:(0,G.jsxs)(`div`,{style:{position:`absolute`,left:140,bottom:26,display:`inline-flex`,alignItems:`center`,gap:10,padding:`8px 12px`,borderRadius:999,border:`1px solid rgba(127, 208, 255, 0.18)`,background:`linear-gradient(135deg, rgba(6, 15, 27, 0.88), rgba(11, 22, 39, 0.76))`,boxShadow:`0 12px 30px rgba(0, 0, 0, 0.28)`,color:`#dce9f8`,fontSize:11,letterSpacing:`0.05em`,textTransform:`uppercase`,pointerEvents:`none`},children:[(0,G.jsx)(`span`,{style:{color:`#7fc6ff`,fontWeight:700},children:`Temporal`}),(0,G.jsx)(`span`,{children:n}),typeof t.activeNodeCount==`number`?(0,G.jsxs)(`span`,{style:{color:`#8ea4be`},children:[t.activeNodeCount.toLocaleString(),` active`]}):null]})}},renderPanel:e=>{if(!e.isPanelOpen(P9))return null;let t=e.getTemporalState();return{id:P9,title:`Temporal Context`,placement:`bottom`,order:30,content:(0,G.jsxs)(`div`,{style:die,children:[(0,G.jsx)(`div`,{style:fie,children:`Current scrubber state`}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Current`}),(0,G.jsx)(`span`,{style:R9,children:F9(t?.currentTime??null)})]}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Bounds`}),(0,G.jsxs)(`span`,{style:R9,children:[t?.minDate??`1970`,` → `,t?.maxDate??`2030`]})]}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Active nodes`}),(0,G.jsx)(`span`,{style:R9,children:typeof t?.activeNodeCount==`number`?t.activeNodeCount.toLocaleString():`All`})]})]})}}},die={display:`flex`,flexDirection:`column`,gap:10},fie={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},I9={display:`flex`,justifyContent:`space-between`,gap:16,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},L9={color:`#8ea4be`,fontSize:12},R9={color:`#f3f7fd`,fontSize:12,fontWeight:600},z9=[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`];function pie(e,t){let n=(0,u.c)(4),[r,i]=(0,l.useState)(e),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=setTimeout(()=>i(e),t);return()=>clearTimeout(n)},o=[t,e],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,l.useEffect)(a,o),r}var mie=`+ .palantir-bg {+ background:+ radial-gradient(circle at top, rgba(77, 157, 255, 0.08), transparent 22%),+ linear-gradient(180deg, #060b17 0%, #02060d 100%);+ }+ .palantir-grid {+ position: absolute;+ inset: 0;+ background-image:+ linear-gradient(rgba(88, 166, 255, 0.038) 1px, transparent 1px),+ linear-gradient(90deg, rgba(88, 166, 255, 0.038) 1px, transparent 1px);+ background-size: 42px 42px;+ pointer-events: none;+ z-index: 1;+ }+ .palantir-vignette {+ position: absolute;+ inset: 0;+ background: radial-gradient(ellipse at center, transparent 34%, rgba(1, 4, 10, 0.78) 100%);+ pointer-events: none;+ z-index: 2;+ }+ .glass-header {+ background: linear-gradient(180deg, rgba(7, 14, 25, 0.88) 0%, rgba(10, 18, 31, 0.62) 100%);+ border-bottom: 1px solid rgba(112, 196, 255, 0.1);+ backdrop-filter: blur(12px);+ -webkit-backdrop-filter: blur(12px);+ }+ .glass-hud {+ background: linear-gradient(135deg, rgba(8, 15, 27, 0.76), rgba(10, 19, 32, 0.58));+ backdrop-filter: blur(14px) saturate(1.08);+ -webkit-backdrop-filter: blur(14px) saturate(1.08);+ border-left: 1px solid rgba(112, 196, 255, 0.14);+ box-shadow: -10px 0 28px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(255, 255, 255, 0.04);+ }+ .hud-scrollbar::-webkit-scrollbar { width: 6px; }+ .hud-scrollbar::-webkit-scrollbar-track { background: transparent; }+ .hud-scrollbar::-webkit-scrollbar-thumb { background: rgba(88, 166, 255, 0.25); border-radius: 6px; }+ .node-panel-collapse {+ border: 1px solid rgba(255, 255, 255, 0.05);+ border-radius: 12px;+ background: rgba(0, 0, 0, 0.14);+ overflow: hidden;+ }+ .node-panel-collapse + .node-panel-collapse {+ margin-top: 12px;+ }+ .node-panel-summary {+ list-style: none;+ cursor: pointer;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 12px;+ padding: 12px 14px;+ color: #c6d4e3;+ font-size: 12px;+ font-weight: 700;+ letter-spacing: 0.04em;+ text-transform: uppercase;+ }+ .node-panel-summary::-webkit-details-marker {+ display: none;+ }+ .node-panel-summary::after {+ content: "+";+ color: rgba(127, 208, 255, 0.8);+ font-size: 16px;+ line-height: 1;+ }+ .node-panel-collapse[open] .node-panel-summary::after {+ content: "−";+ }+ .node-panel-body {+ padding: 0 14px 14px;+ }+ .graph-loading-overlay {+ position: absolute;+ inset: 0;+ z-index: 9;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ .graph-loading-card {+ width: min(460px, calc(100% - 48px));+ border-radius: 20px;+ padding: 22px 22px 18px;+ background: linear-gradient(135deg, rgba(7, 17, 31, 0.9), rgba(14, 28, 48, 0.78));+ border: 1px solid rgba(127, 208, 255, 0.16);+ box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.04);+ backdrop-filter: blur(18px);+ -webkit-backdrop-filter: blur(18px);+ }+ .graph-loading-dots {+ display: inline-flex;+ gap: 8px;+ align-items: center;+ }+ .graph-loading-dot {+ width: 10px;+ height: 10px;+ border-radius: 999px;+ background: linear-gradient(135deg, rgba(127, 208, 255, 0.96), rgba(242, 182, 109, 0.96));+ box-shadow: 0 0 18px rgba(127, 208, 255, 0.35);+ animation: sem-loader-pulse 1.2s ease-in-out infinite;+ }+ .graph-loading-dot:nth-child(2) {+ animation-delay: 0.14s;+ }+ .graph-loading-dot:nth-child(3) {+ animation-delay: 0.28s;+ }+ @keyframes sem-loader-pulse {+ 0%, 100% {+ transform: translateY(0) scale(0.92);+ opacity: 0.55;+ }+ 50% {+ transform: translateY(-4px) scale(1.08);+ opacity: 1;+ }+ }+ .graph-loading-bar {+ width: 100%;+ height: 10px;+ border-radius: 999px;+ overflow: hidden;+ background: rgba(255, 255, 255, 0.06);+ border: 1px solid rgba(127, 208, 255, 0.1);+ }+ .graph-loading-bar > span {+ display: block;+ height: 100%;+ border-radius: 999px;+ background: linear-gradient(90deg, rgba(74, 163, 255, 0.9), rgba(127, 208, 255, 0.95), rgba(242, 182, 109, 0.92));+ box-shadow: 0 0 28px rgba(74, 163, 255, 0.3);+ transition: width 180ms ease;+ }+`;function B9(e){switch(e){case`nodes`:return`Loading nodes`;case`edges`:return`Loading edges`;case`styling`:return`Computing layout and styling`;case`rendering`:return`Rendering graph`;default:return`Loading graph`}}function hie(e){let t=(0,u.c)(48),{progress:n,showGraphBehind:r}=e,i;t[0]===n?i=t[1]:(i=n??{phase:`nodes`,nodesLoaded:0,nodesTotal:null,edgesLoaded:0,edgesTotal:null,message:`Preparing graph load`,progress:.06},t[0]=n,t[1]=i);let a=i,o=r?`linear-gradient(180deg, rgba(1,4,9,0.08), rgba(1,4,9,0.28))`:`linear-gradient(180deg, rgba(1,4,9,0.32), rgba(1,4,9,0.58))`,s;t[2]===o?s=t[3]:(s={background:o},t[2]=o,t[3]=s);let c,l,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c={display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:14,marginBottom:14},l=(0,G.jsx)(`div`,{style:{color:`#ffffff`,fontSize:18,fontWeight:700,marginBottom:4},children:`Loading Graph`}),d={color:`#8fa8c6`,fontSize:13},t[4]=c,t[5]=l,t[6]=d):(c=t[4],l=t[5],d=t[6]);let f;t[7]===a.phase?f=t[8]:(f=B9(a.phase),t[7]=a.phase,t[8]=f);let p;t[9]===f?p=t[10]:(p=(0,G.jsxs)(`div`,{children:[l,(0,G.jsx)(`div`,{style:d,children:f})]}),t[9]=f,t[10]=p);let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsxs)(`div`,{className:`graph-loading-dots`,"aria-hidden":`true`,children:[(0,G.jsx)(`span`,{className:`graph-loading-dot`}),(0,G.jsx)(`span`,{className:`graph-loading-dot`}),(0,G.jsx)(`span`,{className:`graph-loading-dot`})]}),t[11]=m):m=t[11];let h;t[12]===p?h=t[13]:(h=(0,G.jsxs)(`div`,{style:c,children:[p,m]}),t[12]=p,t[13]=h);let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g={color:`#c6d4e3`,fontSize:13,marginBottom:12},t[14]=g):g=t[14];let _;t[15]===a.message?_=t[16]:(_=(0,G.jsx)(`div`,{style:g,children:a.message}),t[15]=a.message,t[16]=_);let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v={marginBottom:14},t[17]=v):v=t[17];let y;t[18]===a.progress?y=t[19]:(y=Math.round(Math.max(6,a.progress*100)),t[18]=a.progress,t[19]=y);let b=`${y}%`,x;t[20]===b?x=t[21]:(x=(0,G.jsx)(`div`,{className:`graph-loading-bar`,style:v,children:(0,G.jsx)(`span`,{style:{width:b}})}),t[20]=b,t[21]=x);let S;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(S={display:`flex`,gap:10,flexWrap:`wrap`},t[22]=S):S=t[22];let C;t[23]===a.nodesLoaded?C=t[24]:(C=a.nodesLoaded.toLocaleString(),t[23]=a.nodesLoaded,t[24]=C);let w;t[25]===a.nodesTotal?w=t[26]:(w=a.nodesTotal?` / ${a.nodesTotal.toLocaleString()}`:``,t[25]=a.nodesTotal,t[26]=w);let T;t[27]!==C||t[28]!==w?(T=(0,G.jsxs)(`span`,{style:$9,children:[C,w,` nodes`]}),t[27]=C,t[28]=w,t[29]=T):T=t[29];let E;t[30]===a.edgesLoaded?E=t[31]:(E=a.edgesLoaded.toLocaleString(),t[30]=a.edgesLoaded,t[31]=E);let D;t[32]===a.edgesTotal?D=t[33]:(D=a.edgesTotal?` / ${a.edgesTotal.toLocaleString()}`:``,t[32]=a.edgesTotal,t[33]=D);let O;t[34]!==E||t[35]!==D?(O=(0,G.jsxs)(`span`,{style:$9,children:[E,D,` edges`]}),t[34]=E,t[35]=D,t[36]=O):O=t[36];let ee;t[37]!==T||t[38]!==O?(ee=(0,G.jsxs)(`div`,{style:S,children:[T,O]}),t[37]=T,t[38]=O,t[39]=ee):ee=t[39];let k;t[40]!==h||t[41]!==_||t[42]!==x||t[43]!==ee?(k=(0,G.jsxs)(`div`,{className:`graph-loading-card`,children:[h,_,x,ee]}),t[40]=h,t[41]=_,t[42]=x,t[43]=ee,t[44]=k):k=t[44];let A;return t[45]!==k||t[46]!==s?(A=(0,G.jsx)(`div`,{className:`graph-loading-overlay`,style:s,children:k}),t[45]=k,t[46]=s,t[47]=A):A=t[47],A}function gie(e){return z9.filter(t=>t in e).map(t=>({key:t,value:e[t]}))}function _ie(e){return z9.reduce((t,n)=>e[n]!==void 0&&e[n]!==null?t+1:t,0)}function vie(e){let t=e.properties||{},n=String(t.content||e.id),r=W.palette.accent.path,i=!!(t.valid_from||t.valid_until),a=_ie(t);return{label:n,x:Number(t.x??Math.random()*1e3-500),y:Number(t.y??Math.random()*1e3-500),nodeType:e.type||`inferred`,content:n,valid_from:t.valid_from??null,valid_until:t.valid_until??null,properties:t,size:8,baseSize:8,semanticGroup:e.type||`inferred`,color:r,baseColor:r,mutedColor:ui(r,W.nodes.mutedAlpha),glowColor:ui(r,.36),visualPriority:.82,labelPriority:.82,strokeColor:W.palette.background.nodeBorder,borderColor:W.palette.background.nodeBorder,borderSize:.85,nodeVariant:`inferred`,nodeShapeVariant:`inferred`,badgeKind:i?`temporal`:a>0?`provenance`:`inferred`,badgeCount:a||void 0,ringColor:W.nodes.selectedRing.color,haloColor:ui(r,.42),labelVisibilityPolicy:`local`}}function yie(e){let t=e.properties||{},n=!!t.inferred,r=mt.hasDirectedEdge(e.target_id,e.source_id),i=n?W.palette.accent.path:W.palette.muted.edgeStructure;return{weight:Number(e.weight??1),edgeType:e.type||`related_to`,properties:t,size:1,baseSize:1,color:i,baseColor:i,mutedColor:W.palette.muted.edgeOverview,visualPriority:n?.95:.5,isBidirectional:r,edgeFamily:n?`path`:r?`bidirectional`:`line`,curveGroup:r?[e.source_id,e.target_id].sort().join(`::`):null,type:`line`,edgeVariant:n?`pathSignal`:r?`bidirectionalCurve`:`directional`,arrowVisibilityPolicy:n?`always`:`contextual`,relationshipStrength:n?.95:.52,isParallelPair:!1,parallelIndex:0,parallelCount:1}}function bie(e){if(!e||!mt.hasNode(e))return null;let t=mt.getNodeAttributes(e);return{id:e,label:String(t.label??e),content:String(t.content??t.label??e),nodeType:String(t.nodeType??`Entity`),color:typeof t.color==`string`?t.color:void 0,valid_from:t.valid_from??null,valid_until:t.valid_until??null,properties:t.properties??{},neighborCount:mt.neighbors(e).length}}function xie(e,t){let n=[];for(let r of e)try{let e=r.toolbarItems?.(t)??[];n.push(...e)}catch(e){console.error(`[GraphPlugin:${r.id}] toolbar collection failed`,e)}return n.sort((e,t)=>(e.order??0)-(t.order??0))}function Sie(e,t){let n=[];for(let r of e)try{let e=r.renderPanel?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] panel render failed`,e)}return n.sort((e,t)=>(e.order??0)-(t.order??0))}function Cie(e,t){let n=[];for(let r of e)try{let e=r.renderOverlay?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] overlay render failed`,e)}return n.sort((e,t)=>(e.layer??0)===(t.layer??0)?(e.order??0)-(t.order??0):(e.layer??0)-(t.layer??0))}function wie(e){let t=(0,u.c)(108),{nodeId:n,predictions:r,predictionType:i,onPredictionTypeChange:a,onRunPredictions:o,pathTargetId:s,onPathTargetChange:c,onTracePath:l,pathResult:d,onDownloadProvenance:f}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{style:{padding:32,textAlign:`center`},children:(0,G.jsx)(`p`,{style:{color:`#8b949e`,fontSize:14,margin:0},children:`Search for a node or click one in the canvas to inspect its properties.`})}),t[0]=e):e=t[0],e}let p,m,h,g,_,v,y,b,x,S,C;if(t[1]!==n||t[2]!==f||t[3]!==c||t[4]!==a||t[5]!==o||t[6]!==l||t[7]!==d||t[8]!==s||t[9]!==i||t[10]!==r){let e=mt.getNodeAttributes(n),u=e?.properties??{},w=gie(u),T=e?.color||`#58a6ff`,E=Object.entries(u).filter(Oie),D,O;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(y={padding:24,display:`flex`,flexDirection:`column`,gap:18},D={borderBottom:`1px solid rgba(88, 166, 255, 0.2)`,paddingBottom:16},O={display:`flex`,alignItems:`center`,gap:10,marginBottom:8},t[22]=D,t[23]=O,t[24]=y):(D=t[22],O=t[23],y=t[24]);let ee=(0,G.jsxs)(`div`,{style:O,children:[(0,G.jsx)(`span`,{style:{background:T,boxShadow:`0 0 10px ${T}`,width:8,height:8,borderRadius:`50%`}}),(0,G.jsx)(`span`,{style:{color:T,fontSize:12,fontWeight:700},children:e?.nodeType||`Entity`})]}),k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k={margin:0,color:`#fff`,fontSize:20,fontWeight:700,wordBreak:`break-word`},t[25]=k):k=t[25];let A=String(e?.label??n),j;t[26]===A?j=t[27]:(j=(0,G.jsx)(`h3`,{style:k,children:A}),t[26]=A,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M={color:`#8b949e`,fontSize:12,marginTop:6},t[28]=M):M=t[28];let N;t[29]===n?N=t[30]:(N=(0,G.jsx)(`div`,{style:M,children:n}),t[29]=n,t[30]=N);let P;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(P={display:`flex`,gap:8,flexWrap:`wrap`,marginTop:12},t[31]=P):P=t[31];let te=e?.valid_from||e?.valid_until?(0,G.jsx)(`span`,{style:X9,children:`temporal`}):null,F=w.length?(0,G.jsxs)(`span`,{style:X9,children:[w.length,` source fields`]}):null,I;t[32]===r.length?I=t[33]:(I=r.length?(0,G.jsxs)(`span`,{style:X9,children:[r.length,` candidate links`]}):null,t[32]=r.length,t[33]=I);let ne;t[34]!==te||t[35]!==F||t[36]!==I?(ne=(0,G.jsxs)(`div`,{style:P,children:[te,F,I]}),t[34]=te,t[35]=F,t[36]=I,t[37]=ne):ne=t[37],t[38]!==ee||t[39]!==j||t[40]!==N||t[41]!==ne?(b=(0,G.jsxs)(`div`,{style:D,children:[ee,j,N,ne]}),t[38]=ee,t[39]=j,t[40]=N,t[41]=ne,t[42]=b):b=t[42],x=(e?.valid_from||e?.valid_until)&&(0,G.jsxs)(`div`,{style:{padding:`10px 12px`,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.2)`,borderRadius:8,fontSize:12,color:`#79c0ff`,fontFamily:`monospace`},children:[e?.valid_from?(0,G.jsxs)(`div`,{children:[`from: `,e.valid_from]}):null,e?.valid_until?(0,G.jsxs)(`div`,{children:[`until: `,e.valid_until]}):null]});let re,ie,ae;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,G.jsx)(`div`,{style:U9,children:`Actions`}),ie={display:`flex`,flexDirection:`column`,gap:10},ae={...G9,width:`100%`,justifyContent:`center`},t[43]=re,t[44]=ie,t[45]=ae):(re=t[43],ie=t[44],ae=t[45]);let oe;t[46]===o?oe=t[47]:(oe=(0,G.jsx)(`button`,{style:ae,onClick:o,children:`Run Link Prediction`}),t[46]=o,t[47]=oe);let se;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(se={display:`flex`,gap:8,flexWrap:`wrap`},t[48]=se):se=t[48];let ce;t[49]===f?ce=t[50]:(ce=(0,G.jsx)(`button`,{style:K9,onClick:()=>f(`json`),children:`Provenance JSON`}),t[49]=f,t[50]=ce);let L;t[51]===f?L=t[52]:(L=(0,G.jsx)(`button`,{style:K9,onClick:()=>f(`markdown`),children:`Provenance MD`}),t[51]=f,t[52]=L);let R;t[53]!==ce||t[54]!==L?(R=(0,G.jsxs)(`div`,{style:se,children:[ce,L]}),t[53]=ce,t[54]=L,t[55]=R):R=t[55];let le;t[56]!==oe||t[57]!==R?(le=(0,G.jsxs)(`div`,{style:ie,children:[oe,R]}),t[56]=oe,t[57]=R,t[58]=le):le=t[58];let z;t[59]===a?z=t[60]:(z=e=>a(e.target.value),t[59]=a,t[60]=z);let B;t[61]!==i||t[62]!==z?(B=(0,G.jsx)(`input`,{value:i,onChange:z,placeholder:`Optional candidate type filter, e.g. disease`,style:W9}),t[61]=i,t[62]=z,t[63]=B):B=t[63],t[64]!==le||t[65]!==B?(S=(0,G.jsxs)(`section`,{style:H9,children:[re,le,B]}),t[64]=le,t[65]=B,t[66]=S):S=t[66];let V;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,G.jsx)(`div`,{style:U9,children:`Trace Path`}),t[67]=V):V=t[67];let ue;t[68]===c?ue=t[69]:(ue=e=>c(e.target.value),t[68]=c,t[69]=ue);let de;t[70]!==s||t[71]!==ue?(de=(0,G.jsx)(`input`,{value:s,onChange:ue,placeholder:`Target node ID`,style:W9}),t[70]=s,t[71]=ue,t[72]=de):de=t[72];let fe;t[73]===l?fe=t[74]:(fe=(0,G.jsx)(`button`,{style:G9,onClick:l,children:`Trace Causal Path`}),t[73]=l,t[74]=fe);let pe;t[75]===d?pe=t[76]:(pe=d?.path?.length?(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:10},children:[d.path.map(Die),(0,G.jsxs)(`div`,{style:{color:`#79c0ff`,fontSize:12,marginTop:4},children:[`total weight: `,d.total_weight.toFixed(3)]})]}):(0,G.jsx)(`div`,{style:Y9,children:`Choose a target or click a candidate prediction to prepare a path trace.`}),t[75]=d,t[76]=pe),t[77]!==de||t[78]!==fe||t[79]!==pe?(C=(0,G.jsxs)(`section`,{style:H9,children:[V,de,fe,pe]}),t[77]=de,t[78]=fe,t[79]=pe,t[80]=C):C=t[80];let me=r.length>0,he;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Candidate Links`}),t[81]=he):he=t[81];let ge;t[82]!==c||t[83]!==r?(ge=(0,G.jsx)(`div`,{className:`node-panel-body`,children:r.length>0?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:r.map(e=>(0,G.jsxs)(`button`,{style:q9,onClick:()=>c(e.target),children:[(0,G.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.label||e.target}),(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.type}),(0,G.jsxs)(`div`,{style:{color:`#58a6ff`,fontSize:12,marginTop:4},children:[`confidence `,e.score.toFixed(3)]})]},`${e.target}-${e.type}`))}):(0,G.jsx)(`div`,{style:Y9,children:`Run link prediction to surface likely next-hop relationships.`})}),t[82]=c,t[83]=r,t[84]=ge):ge=t[84],t[85]!==me||t[86]!==ge?(m=(0,G.jsxs)(`details`,{className:`node-panel-collapse`,open:me,children:[he,ge]}),t[85]=me,t[86]=ge,t[87]=m):m=t[87];let _e;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Source Attribution`}),t[88]=_e):_e=t[88];let ve=w.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:w.map(Eie)}):(0,G.jsx)(`div`,{style:Y9,children:`No explicit attribution metadata was found on this node.`});t[89]===ve?h=t[90]:(h=(0,G.jsxs)(`details`,{className:`node-panel-collapse`,children:[_e,(0,G.jsx)(`div`,{className:`node-panel-body`,children:ve})]}),t[89]=ve,t[90]=h),_=`node-panel-collapse`,t[91]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Properties`}),t[91]=v):v=t[91],p=`node-panel-body`,g=E.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:E.map(Tie)}):(0,G.jsx)(`div`,{style:Y9,children:`No additional properties are attached to this node.`}),t[1]=n,t[2]=f,t[3]=c,t[4]=a,t[5]=o,t[6]=l,t[7]=d,t[8]=s,t[9]=i,t[10]=r,t[11]=p,t[12]=m,t[13]=h,t[14]=g,t[15]=_,t[16]=v,t[17]=y,t[18]=b,t[19]=x,t[20]=S,t[21]=C}else p=t[11],m=t[12],h=t[13],g=t[14],_=t[15],v=t[16],y=t[17],b=t[18],x=t[19],S=t[20],C=t[21];let w;t[92]!==p||t[93]!==g?(w=(0,G.jsx)(`div`,{className:p,children:g}),t[92]=p,t[93]=g,t[94]=w):w=t[94];let T;t[95]!==w||t[96]!==_||t[97]!==v?(T=(0,G.jsxs)(`details`,{className:_,children:[v,w]}),t[95]=w,t[96]=_,t[97]=v,t[98]=T):T=t[98];let E;return t[99]!==m||t[100]!==h||t[101]!==T||t[102]!==y||t[103]!==b||t[104]!==x||t[105]!==S||t[106]!==C?(E=(0,G.jsxs)(`aside`,{style:y,children:[b,x,S,C,m,h,T]}),t[99]=m,t[100]=h,t[101]=T,t[102]=y,t[103]=b,t[104]=x,t[105]=S,t[106]=C,t[107]=E):E=t[107],E}function Tie(e){let[t,n]=e;return(0,G.jsxs)(`div`,{style:J9,children:[(0,G.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,G.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function Eie(e){let{key:t,value:n}=e;return(0,G.jsxs)(`div`,{style:J9,children:[(0,G.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,G.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function Die(e,t){return(0,G.jsxs)(`div`,{style:Aie,children:[t+1,`. `,e]},`${e}-${t}`)}function Oie(e){let[t]=e;return![`x`,`y`,`valid_from`,`valid_until`,`content`,`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`].includes(t)}function kie(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`focused`),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)([]),[d,f]=(0,l.useState)(``),[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(null),[ee,k]=(0,l.useState)({"legend-panel":!1,"neighborhood-panel":!1,"temporal-panel":!1}),[A,j]=(0,l.useState)(0),M=pie(T,150),N=(0,l.useRef)(new Set),P=(0,l.useRef)(null),te=(0,l.useRef)(null),F=(0,l.useRef)({hoveredNodeId:null,selectedNodeId:``,focusedNodeId:``,activePath:[],viewMode:`focused`,zoomTier:`overview`,isLayoutRunning:!1}),I=Gre(),{data:ne,isLoading:re,isFetching:ie,isError:ae,error:oe}=Vre({enabled:!0,onGraphReady:()=>{r(!0),O(null)},onProgress:O});(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/temporal/bounds`);if(!t.ok||e)return;let n=await t.json();e||w(n)}catch{e||w(null)}})(),()=>{e=!0}},[ne?.nodeCount,ne?.edgeCount]),(0,l.useEffect)(()=>{if(!M||re)return;let e=!1;return(async()=>{try{let t=M.toISOString(),n=await fetch(`/api/temporal/snapshot?at=${encodeURIComponent(t)}`);if(!n.ok||e)return;let r=await n.json();if(e)return;let i=new Set(r.active_node_ids);requestAnimationFrame(()=>{e||(N.current.forEach(e=>{!i.has(e)&&mt.hasNode(e)&&mt.setNodeAttribute(e,`hidden`,!0)}),i.forEach(e=>{mt.hasNode(e)&&mt.setNodeAttribute(e,`hidden`,!1)}),N.current=i,S(r.active_node_count),P.current?.getSigma()?.refresh())})}catch(t){e||console.error(`[Temporal] Snapshot fetch failed`,t)}})(),()=>{e=!0}},[M,re]);let se=(0,l.useCallback)(e=>{t(e),b(null),e&&r(!1)},[]),ce=(0,l.useCallback)(async()=>{if(!o.trim()){u([]);return}f(``);try{let e=await fetch(`/api/graph/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:o,limit:8})});if(!e.ok)throw Error(`Search failed with status ${e.status}`);let t=await e.json();u(t.results||[]),t.results?.length&&se(t.results[0].node.id)}catch(e){f(e instanceof Error?e.message:`Search failed`)}},[se,o]),L=(0,l.useCallback)(async()=>{if(e)try{let t=await fetch(`/api/enrich/links`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({node_id:e,top_n:6,candidate_type:p||void 0,min_score:0})});if(!t.ok)throw Error(`Link prediction failed with status ${t.status}`);g((await t.json()).predictions||[])}catch(e){console.error(`[GraphWorkspace] prediction failed`,e),g([])}},[p,e]),R=(0,l.useCallback)(async()=>{if(!(!e||!_.trim()))try{let t=await fetch(`/api/graph/node/${encodeURIComponent(e)}/path?target=${encodeURIComponent(_.trim())}&algorithm=dijkstra`);if(!t.ok)throw Error(`Path lookup failed with status ${t.status}`);let n=await t.json();if(b(n),n.path?.length){let e=n.path[n.path.length-1];mt.hasNode(e)&&P.current?.focusNode(e)}}catch(e){console.error(`[GraphWorkspace] path trace failed`,e),b(null)}},[_,e]),le=(0,l.useCallback)(async t=>{if(!e)return;let n=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(e)}&format=${t===`markdown`?`markdown`:`json`}`);if(!n.ok)throw Error(`Provenance report failed with status ${n.status}`);let r=await n.blob(),i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${e}_provenance.${t===`markdown`?`md`:`json`}`,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)},[e]);(0,l.useEffect)(()=>{let e=window.location.protocol===`https:`?`wss:`:`ws:`,t=new WebSocket(`${e}//${window.location.host}/ws/graph-updates`);return t.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.event===`connection_ack`||t.event!==`graph_mutation`)return;let n=t.data?.event_type,r=t.data?.payload;n===`ADD_NODE`&&r?.id&&(ht([{id:r.id,attributes:vie(r)}]),P.current?.getSigma()?.refresh()),n===`ADD_EDGE`&&(gt([{source:r.source_id,target:r.target_id,attributes:yie(r)}]),P.current?.getSigma()?.refresh())}catch(e){console.error(`[GraphWorkspace] websocket update failed`,e)}},()=>{t.close()}},[]);let z=(0,l.useMemo)(()=>c.length?`${c.length} search result${c.length===1?``:`s`}`:null,[c.length]),B=(0,l.useMemo)(()=>{if(!e||!mt.hasNode(e))return null;let t=mt.neighbors(e).length;return i===`focused`?`${Math.min(t,16)+1} nodes in focused view`:`${t} direct neighbors highlighted`},[e,i]),V=re||ie,ue=!!ne?.nodeCount,de=y?.path??[],fe=ne,pe=(0,l.useMemo)(()=>bie(e),[e,ne?.nodeCount,ne?.edgeCount]),me=(0,l.useMemo)(()=>({currentTime:T,activeNodeCount:x,minDate:C?.min??void 0,maxDate:C?.max??void 0}),[x,T,C?.max,C?.min]),he=(0,l.useMemo)(()=>[{plugin:qre,enabled:!0},{plugin:nie,enabled:!0},{plugin:uie,enabled:!0}],[]),ge=(0,l.useMemo)(()=>he.filter(e=>e.enabled!==!1).map(e=>e.plugin),[he]),_e=(0,l.useCallback)(e=>{switch(e.type){case`fitView`:P.current?.fitView();return;case`focusNode`:P.current?.focusNode(e.nodeId);return;case`selectNode`:se(e.nodeId);return;case`setViewMode`:a(e.viewMode);return;case`togglePanel`:k(t=>({...t,[e.panelId]:!t[e.panelId]}));return;case`openPanel`:k(t=>({...t,[e.panelId]:!0}));return;case`closePanel`:k(t=>({...t,[e.panelId]:!1}));return}},[se]),ve=(0,l.useMemo)(()=>({get sigma(){return te.current?.sigma??null},get graph(){return mt},get displayGraph(){return te.current?.displayGraph??mt},theme:W,getInteractionState:()=>F.current,getSelectedNodeState:()=>pe,getGraphSummary:()=>fe,getTemporalState:()=>me,isPanelOpen:e=>!!ee[e],dispatchAction:_e}),[fe,_e,ee,pe,me]),ye=(0,l.useCallback)(e=>{te.current=e,j(e=>e+1)},[]),be=(0,l.useCallback)(e=>{F.current=e;for(let t of ge)try{t.onStateChange(ve,e)}catch(e){console.error(`[GraphPlugin:${t.id}] state update failed`,e)}},[ge,ve]);(0,l.useEffect)(()=>{if(!te.current)return;let e=[];for(let t of ge)try{t.mount(ve),e.push(t)}catch(e){console.error(`[GraphPlugin:${t.id}] mount failed`,e)}return()=>{for(let t of e.reverse())try{t.unmount(ve)}catch(e){console.error(`[GraphPlugin:${t.id}] unmount failed`,e)}}},[ge,ve,A]);let xe=(0,l.useMemo)(()=>xie(ge,ve),[ge,ve]),Se=(0,l.useMemo)(()=>Sie(ge,ve),[ge,ve]),Ce=(0,l.useMemo)(()=>Cie(ge,ve),[ge,ve]),we=Se.filter(e=>e.placement===`side`),Te=Se.filter(e=>e.placement===`bottom`);return(0,G.jsxs)(`div`,{className:`palantir-bg`,style:{position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,G.jsx)(`style`,{children:mie}),(0,G.jsx)(`div`,{className:`palantir-grid`}),(0,G.jsx)(`div`,{className:`palantir-vignette`}),(0,G.jsxs)(`div`,{style:{flex:1,position:`relative`,zIndex:3,minHeight:0},children:[(0,G.jsx)(Ii,{ref:P,onNodeClick:se,selectedNodeId:e,activePath:de,isLayoutRunning:n,viewMode:i,pluginOverlays:Ce.map(e=>e.element),onPluginRuntimeChange:ye,onInteractionStateChange:be}),V?(0,G.jsx)(hie,{progress:D,showGraphBehind:ue}):null]}),(0,G.jsx)(jre,{onTimeChange:E,minDate:C?.min??void 0,maxDate:C?.max??void 0}),(0,G.jsxs)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,zIndex:10},children:[(0,G.jsxs)(`header`,{className:`glass-header`,style:{pointerEvents:`auto`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`14px 24px`,gap:20},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`,flexWrap:`wrap`},children:[V&&D?(0,G.jsx)(`span`,{style:{color:`rgba(127, 208, 255, 0.9)`,fontSize:13},children:B9(D.phase)}):null,ne?(0,G.jsxs)(`span`,{style:V9,children:[ne.nodeCount.toLocaleString(),` nodes · `,ne.edgeCount.toLocaleString(),` edges`]}):null,x===null?null:(0,G.jsxs)(`span`,{style:{...V9,color:`#3fb950`,borderColor:`rgba(63, 185, 80, 0.25)`},children:[x.toLocaleString(),` active at selected time`]}),z?(0,G.jsx)(`span`,{style:V9,children:z}):null,B?(0,G.jsx)(`span`,{style:{...V9,color:`#f2b66d`,borderColor:`rgba(242, 182, 109, 0.24)`},children:B}):null,ae?(0,G.jsx)(`span`,{style:{color:`#ff7b72`,fontSize:13},children:oe.message}):null]}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,flexWrap:`wrap`,justifyContent:`flex-end`},children:[e?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,G.jsx)(`button`,{onClick:()=>a(`focused`),style:{...G9,background:i===`focused`?`rgba(31, 111, 235, 0.38)`:G9.background,borderColor:i===`focused`?`rgba(127, 208, 255, 0.42)`:`rgba(88, 166, 255, 0.3)`},title:`Inspect the selected node in a local focused graph`,children:`Focused View`}),(0,G.jsx)(`button`,{onClick:()=>a(`full`),style:{...G9,background:i===`full`?`rgba(31, 111, 235, 0.38)`:G9.background,borderColor:i===`full`?`rgba(127, 208, 255, 0.42)`:`rgba(88, 166, 255, 0.3)`},children:`Full Graph`})]}):null,(0,G.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&ce()},placeholder:`Search a node, e.g. Metformin`,style:{...W9,minWidth:280,margin:0}}),(0,G.jsx)(`button`,{onClick:()=>void ce(),style:G9,disabled:V,children:`Search`}),(0,G.jsx)(`button`,{onClick:()=>r(e=>!e),style:G9,disabled:V,children:n?`Pause Layout`:`Run Layout`}),(0,G.jsx)(`button`,{onClick:I,style:G9,disabled:V,children:`Reload`}),xe.length?(0,G.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:xe.map(e=>(0,G.jsx)(`button`,{onClick:e.onClick,title:e.title,style:{...K9,background:e.active?`rgba(31, 111, 235, 0.28)`:K9.background,borderColor:e.active?`rgba(127, 208, 255, 0.35)`:`rgba(255, 255, 255, 0.08)`,color:e.active?`#e6f2ff`:K9.color},children:e.label},e.id))}):null]})]}),d?(0,G.jsx)(`div`,{style:{position:`absolute`,top:70,left:24,color:`#ff7b72`,fontSize:12,pointerEvents:`auto`},children:d}):null,c.length?(0,G.jsxs)(`div`,{className:`glass-hud hud-scrollbar`,style:{position:`absolute`,top:72,left:24,width:320,maxHeight:280,overflowY:`auto`,pointerEvents:`auto`,borderRadius:12,border:`1px solid rgba(88, 166, 255, 0.14)`,padding:12},children:[(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12,marginBottom:8},children:`Search results`}),(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:c.map(e=>(0,G.jsxs)(`button`,{style:q9,onClick:()=>se(e.node.id),children:[(0,G.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.node.content||e.node.id}),(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.node.type}),(0,G.jsxs)(`div`,{style:{color:`#58a6ff`,fontSize:12,marginTop:4},children:[`score `,e.score.toFixed(3)]})]},e.node.id))})]}):null,we.length?(0,G.jsx)(`div`,{className:`glass-hud hud-scrollbar`,style:{pointerEvents:`auto`,position:`absolute`,left:24,top:c.length?370:72,width:320,maxHeight:e?280:340,overflowY:`auto`,borderRadius:14,border:`1px solid rgba(88, 166, 255, 0.14)`,padding:12,display:`flex`,flexDirection:`column`,gap:12},children:we.map(e=>(0,G.jsxs)(`div`,{style:Z9,children:[(0,G.jsx)(`div`,{style:Q9,children:e.title}),e.content]},e.id))}):null,Te.length?(0,G.jsx)(`div`,{style:{position:`absolute`,left:24,bottom:104,width:340,display:`flex`,flexDirection:`column`,gap:12,pointerEvents:`auto`},children:Te.map(e=>(0,G.jsxs)(`div`,{className:`glass-hud`,style:{...Z9,padding:14},children:[(0,G.jsx)(`div`,{style:Q9,children:e.title}),e.content]},e.id))}):null,(0,G.jsx)(`div`,{className:`glass-hud hud-scrollbar`,style:{pointerEvents:`auto`,position:`absolute`,right:0,top:52,bottom:90,width:380,overflowY:`auto`,transition:`transform 0.3s cubic-bezier(0.16,1,0.3,1)`,transform:e?`translateX(0)`:`translateX(100%)`},children:(0,G.jsx)(wie,{nodeId:e,predictions:h,predictionType:p,onPredictionTypeChange:m,onRunPredictions:()=>void L(),pathTargetId:_,onPathTargetChange:v,onTracePath:()=>void R(),pathResult:y,onDownloadProvenance:e=>void le(e)})})]})]})}var V9={background:`rgba(77, 157, 255, 0.09)`,color:`#7fc6ff`,padding:`4px 10px`,borderRadius:999,fontSize:11,border:`1px solid ${W.palette.background.shellBorder}`,backdropFilter:`blur(8px)`},H9={display:`flex`,flexDirection:`column`,gap:10,padding:14,background:`linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015))`,border:`1px solid rgba(255, 255, 255, 0.06)`,borderRadius:14},U9={color:`#8b949e`,fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.08em`},W9={width:`100%`,background:`rgba(4, 10, 18, 0.5)`,border:`1px solid ${W.palette.background.shellBorder}`,color:`#edf5ff`,borderRadius:12,padding:`11px 13px`,fontSize:13,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.03)`},G9={background:`linear-gradient(135deg, rgba(24, 63, 133, 0.42), rgba(35, 85, 176, 0.28))`,color:`#fff`,border:`1px solid ${W.palette.background.shellBorder}`,borderRadius:12,padding:`9px 12px`,cursor:`pointer`,fontWeight:700,fontSize:12,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 22px ${W.palette.background.shellGlow}`},K9={...G9,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.08)`,color:`#c6d4e3`,fontWeight:600},q9={textAlign:`left`,padding:12,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.12)`,borderRadius:10,cursor:`pointer`},Aie={color:`#e6edf3`,fontSize:13,padding:`8px 10px`,background:`rgba(255, 255, 255, 0.03)`,borderRadius:8},J9={background:`rgba(0, 0, 0, 0.2)`,padding:`10px 12px`,borderRadius:10,border:`1px solid rgba(255, 255, 255, 0.05)`},Y9={color:`#8b949e`,fontSize:12,lineHeight:1.5},X9={background:`rgba(255, 255, 255, 0.04)`,color:`#9fb6d2`,padding:`4px 8px`,borderRadius:999,fontSize:11,border:`1px solid rgba(255, 255, 255, 0.06)`},Z9={borderRadius:14,border:`1px solid rgba(88, 166, 255, 0.14)`,background:`linear-gradient(180deg, rgba(7, 14, 25, 0.76), rgba(10, 18, 31, 0.66))`,boxShadow:`0 14px 38px rgba(0, 0, 0, 0.24)`,padding:14,display:`flex`,flexDirection:`column`,gap:12},Q9={color:`#f3f7fd`,fontSize:12,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},$9={background:`rgba(255, 255, 255, 0.04)`,color:`#cfe3ff`,padding:`6px 10px`,borderRadius:999,fontSize:12,border:`1px solid rgba(127, 208, 255, 0.12)`};export{kie as GraphWorkspace};\ No newline at end of filediff --git a/semantica/static/assets/GraphWorkspace-G8ODR8eq.js b/semantica/static/assets/GraphWorkspace-G8ODR8eq.jsdeleted file mode 100644index 58d9c427..00000000--- a/semantica/static/assets/GraphWorkspace-G8ODR8eq.js+++ /dev/null@@ -1,519 +0,0 @@-import{a as e,n as t,o as n,r,t as i}from"./jsx-runtime-B3dmMxJS.js";import{t as a}from"./useQuery-DY70wuIi.js";import{i as o,n as s}from"./index-BaPyswgU.js";var c=r(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),l=n(t(),1),u=o(),d=c();function f(){let e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(let n in arguments[t])e[n]=arguments[t][n];return e}var p=f;typeof Object.assign==`function`&&(p=Object.assign);function m(e,t,n,r){let i=e._nodes.get(t),a=null;return i&&(a=r===`mixed`?i.out&&i.out[n]||i.undirected&&i.undirected[n]:r===`directed`?i.out&&i.out[n]:i.undirected&&i.undirected[n]),a}function h(e){return typeof e==`object`&&!!e}function g(e){let t;for(t in e)return!1;return!0}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function v(e,t,n){let r={enumerable:!0,configurable:!0};typeof n==`function`?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function y(e){return!(!h(e)||e.attributes&&!Array.isArray(e.attributes))}function b(){let e=Math.floor(Math.random()*256)&255;return()=>e++}function x(){let e=arguments,t=null,n=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(r=t.next(),r.done){t=null;continue}break}while(!0);return r}}}function S(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}var C=class extends Error{constructor(e){super(),this.name=`GraphError`,this.message=e}},w=class e extends C{constructor(t){super(t),this.name=`InvalidArgumentsGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},T=class e extends C{constructor(t){super(t),this.name=`NotFoundGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},E=class e extends C{constructor(t){super(t),this.name=`UsageGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}};function D(e,t){this.key=e,this.attributes=t,this.clear()}D.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function O(e,t){this.key=e,this.attributes=t,this.clear()}O.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function ee(e,t){this.key=e,this.attributes=t,this.clear()}ee.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function k(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}k.prototype.attach=function(){let e=`out`,t=`in`;this.undirected&&(e=t=`undirected`);let n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)},k.prototype.attachMulti=function(){let e=`out`,t=`in`,n=this.source.key,r=this.target.key;this.undirected&&(e=t=`undirected`);let i=this.source[e],a=i[r];if(a===void 0){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}a.previous=this,this.next=a,i[r]=this,this.target[t][n]=this},k.prototype.detach=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),delete this.source[n][t],delete this.target[r][e]},k.prototype.detachMulti=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};var A=0,j=1,M=2,N=3;function P(e,t,n,r,i,a,o){let s,c,l,u;if(r=``+r,n===A){if(s=e._nodes.get(r),!s)throw new T(`Graph.${t}: could not find the "${r}" node in the graph.`);l=i,u=a}else if(n===N){if(i=``+i,c=e._edges.get(i),!c)throw new T(`Graph.${t}: could not find the "${i}" edge in the graph.`);let n=c.source.key,d=c.target.key;if(r===n)s=c.target;else if(r===d)s=c.source;else throw new T(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${n}, ${d}).`);l=a,u=o}else{if(c=e._edges.get(r),!c)throw new T(`Graph.${t}: could not find the "${r}" edge in the graph.`);s=n===j?c.source:c.target,l=i,u=a}return[s,l,u]}function te(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return a.attributes[o]}}function F(e,t,n){e.prototype[t]=function(e,r){let[i]=P(this,t,n,e,r);return i.attributes}}function I(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return a.attributes.hasOwnProperty(o)}}function ne(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=P(this,t,n,e,r,i,a);return o.attributes[s]=c,this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function re(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=P(this,t,n,e,r,i,a);if(typeof c!=`function`)throw new w(`Graph.${t}: updater should be a function.`);let l=o.attributes;return l[s]=c(l[s]),this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function ie(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);return delete a.attributes[o],this.emit(`nodeAttributesUpdated`,{key:a.key,type:`remove`,attributes:a.attributes,name:o}),this}}function ae(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(!h(o))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return a.attributes=o,this.emit(`nodeAttributesUpdated`,{key:a.key,type:`replace`,attributes:a.attributes}),this}}function oe(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(!h(o))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return p(a.attributes,o),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`merge`,attributes:a.attributes,data:o}),this}}function se(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=P(this,t,n,e,r,i);if(typeof o!=`function`)throw new w(`Graph.${t}: provided updater is not a function.`);return a.attributes=o(a.attributes),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`update`,attributes:a.attributes}),this}}var ce=[{name:e=>`get${e}Attribute`,attacher:te},{name:e=>`get${e}Attributes`,attacher:F},{name:e=>`has${e}Attribute`,attacher:I},{name:e=>`set${e}Attribute`,attacher:ne},{name:e=>`update${e}Attribute`,attacher:re},{name:e=>`remove${e}Attribute`,attacher:ie},{name:e=>`replace${e}Attributes`,attacher:ae},{name:e=>`merge${e}Attributes`,attacher:oe},{name:e=>`update${e}Attributes`,attacher:se}];function L(e){ce.forEach(function({name:t,attacher:n}){n(e,t(`Node`),A),n(e,t(`Source`),j),n(e,t(`Target`),M),n(e,t(`Opposite`),N)})}function R(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes[r]}}function le(e,t,n){e.prototype[t]=function(e){let r;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let i=``+e,a=``+arguments[1];if(r=m(this,i,a,n),!r)throw new T(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,r=this._edges.get(e),!r)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function z(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes.hasOwnProperty(r)}}function B(e,t,n){e.prototype[t]=function(e,r,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=arguments[3],a=m(this,o,s,n),!a)throw new T(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]=i,this.emit(`edgeAttributesUpdated`,{key:a.key,type:`set`,attributes:a.attributes,name:r}),this}}function V(e,t,n){e.prototype[t]=function(e,r,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=arguments[3],a=m(this,o,s,n),!a)throw new T(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof i!=`function`)throw new w(`Graph.${t}: updater should be a function.`);return a.attributes[r]=i(a.attributes[r]),this.emit(`edgeAttributesUpdated`,{key:a.key,type:`set`,attributes:a.attributes,name:r}),this}}function ue(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete i.attributes[r],this.emit(`edgeAttributesUpdated`,{key:i.key,type:`remove`,attributes:i.attributes,name:r}),this}}function de(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!h(r))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return i.attributes=r,this.emit(`edgeAttributesUpdated`,{key:i.key,type:`replace`,attributes:i.attributes}),this}}function fe(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!h(r))throw new w(`Graph.${t}: provided attributes are not a plain object.`);return p(i.attributes,r),this.emit(`edgeAttributesUpdated`,{key:i.key,type:`merge`,attributes:i.attributes,data:r}),this}}function pe(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new E(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new E(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+r;if(r=arguments[2],i=m(this,a,o,n),!i)throw new T(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new E(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new T(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof r!=`function`)throw new w(`Graph.${t}: provided updater is not a function.`);return i.attributes=r(i.attributes),this.emit(`edgeAttributesUpdated`,{key:i.key,type:`update`,attributes:i.attributes}),this}}var me=[{name:e=>`get${e}Attribute`,attacher:R},{name:e=>`get${e}Attributes`,attacher:le},{name:e=>`has${e}Attribute`,attacher:z},{name:e=>`set${e}Attribute`,attacher:B},{name:e=>`update${e}Attribute`,attacher:V},{name:e=>`remove${e}Attribute`,attacher:ue},{name:e=>`replace${e}Attributes`,attacher:de},{name:e=>`merge${e}Attributes`,attacher:fe},{name:e=>`update${e}Attributes`,attacher:pe}];function he(e){me.forEach(function({name:t,attacher:n}){n(e,t(`Edge`),`mixed`),n(e,t(`DirectedEdge`),`directed`),n(e,t(`UndirectedEdge`),`undirected`)})}var ge=[{name:`edges`,type:`mixed`},{name:`inEdges`,type:`directed`,direction:`in`},{name:`outEdges`,type:`directed`,direction:`out`},{name:`inboundEdges`,type:`mixed`,direction:`in`},{name:`outboundEdges`,type:`mixed`,direction:`out`},{name:`directedEdges`,type:`directed`},{name:`undirectedEdges`,type:`undirected`}];function _e(e,t,n,r){let i=!1;for(let a in t){if(a===r)continue;let o=t[a];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function ve(e,t,n,r){let i,a,o,s=!1;for(let c in t)if(c!==r){i=t[c];do{if(a=i.source,o=i.target,s=n(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}}function ye(e,t){let n=Object.keys(e),r=n.length,i,a=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(a>=r)return{done:!0};let o=n[a++];if(o===t){i=void 0;continue}i=e[o]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function be(e,t,n,r){let i=t[n];if(!i)return;let a=i.source,o=i.target;if(r(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected)&&e)return i.key}function xe(e,t,n,r){let i=t[n];if(!i)return;let a=!1;do{if(a=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&a)return i.key;i=i.next}while(i!==void 0)}function Se(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};let e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function Ce(e,t){if(e.size===0)return[];if(t===`mixed`||t===e.type)return Array.from(e._edges.keys());let n=t===`undirected`?e.undirectedSize:e.directedSize,r=Array(n),i=t===`undirected`,a=e._edges.values(),o=0,s,c;for(;s=a.next(),s.done!==!0;)c=s.value,c.undirected===i&&(r[o++]=c.key);return r}function we(e,t,n,r){if(t.size===0)return;let i=n!==`mixed`&&n!==t.type,a=n===`undirected`,o,s,c=!1,l=t._edges.values();for(;o=l.next(),o.done!==!0;){if(s=o.value,i&&s.undirected!==a)continue;let{key:t,attributes:n,source:l,target:u}=s;if(c=r(t,n,l.key,u.key,l.attributes,u.attributes,s.undirected),e&&c)return t}}function Te(e,t){if(e.size===0)return S();let n=t!==`mixed`&&t!==e.type,r=t===`undirected`,i=e._edges.values();return{[Symbol.iterator](){return this},next(){let e,t;for(;;){if(e=i.next(),e.done)return e;if(t=e.value,!(n&&t.undirected!==r))break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}}}function Ee(e,t,n,r,i,a){let o=t?ve:_e,s;if(n!==`undirected`&&(r!==`out`&&(s=o(e,i.in,a),e&&s)||r!==`in`&&(s=o(e,i.out,a,r?void 0:i.key),e&&s))||n!==`directed`&&(s=o(e,i.undirected,a),e&&s))return s}function De(e,t,n,r){let i=[];return Ee(!1,e,t,n,r,function(e){i.push(e)}),i}function Oe(e,t,n){let r=S();return e!==`undirected`&&(t!==`out`&&n.in!==void 0&&(r=x(r,ye(n.in))),t!==`in`&&n.out!==void 0&&(r=x(r,ye(n.out,t?void 0:n.key)))),e!==`directed`&&n.undirected!==void 0&&(r=x(r,ye(n.undirected))),r}function ke(e,t,n,r,i,a,o){let s=n?xe:be,c;if(t!==`undirected`&&(i.in!==void 0&&r!==`out`&&(c=s(e,i.in,a,o),e&&c)||i.out!==void 0&&r!==`in`&&(r||i.key!==a)&&(c=s(e,i.out,a,o),e&&c))||t!==`directed`&&i.undirected!==void 0&&(c=s(e,i.undirected,a,o),e&&c))return c}function Ae(e,t,n,r,i){let a=[];return ke(!1,e,t,n,r,i,function(e){a.push(e)}),a}function je(e,t,n,r){let i=S();return e!==`undirected`&&(n.in!==void 0&&t!==`out`&&r in n.in&&(i=x(i,Se(n.in,r))),n.out!==void 0&&t!==`in`&&r in n.out&&(t||n.key!==r)&&(i=x(i,Se(n.out,r)))),e!==`directed`&&n.undirected!==void 0&&r in n.undirected&&(i=x(i,Se(n.undirected,r))),i}function Me(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];if(!arguments.length)return Ce(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${n}: could not find the "${e}" node in the graph.`);return De(this.multi,r===`mixed`?this.type:r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let a=this._nodes.get(e);if(!a)throw new T(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${n}: could not find the "${t}" target node in the graph.`);return Ae(r,this.multi,i,a,t)}throw new w(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Ne(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(!(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)){if(arguments.length===1)return n=e,we(!1,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Ee(!1,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return ke(!1,r,this.multi,i,o,t,n)}throw new w(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n;if(e.length===0){let i=0;r!==`directed`&&(i+=this.undirectedSize),r!==`undirected`&&(i+=this.directedSize),n=Array(i);let a=0;e.push((e,r,i,o,s,c,l)=>{n[a++]=t(e,r,i,o,s,c,l)})}else n=[],e.push((e,r,i,a,o,s,c)=>{n.push(t(e,r,i,a,o,s,c))});return this[a].apply(this,e),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((e,r,i,a,o,s,c)=>{t(e,r,i,a,o,s,c)&&n.push(e)}),this[a].apply(this,e),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let e=Array.prototype.slice.call(arguments);if(e.length<2||e.length>4)throw new w(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${e.length}).`);if(typeof e[e.length-1]==`function`&&typeof e[e.length-2]!=`function`)throw new w(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let t,n;e.length===2?(t=e[0],n=e[1],e=[]):e.length===3?(t=e[1],n=e[2],e=[e[0]]):e.length===4&&(t=e[2],n=e[3],e=[e[0],e[1]]);let r=n;return e.push((e,n,i,a,o,s,c)=>{r=t(r,e,n,i,a,o,s,c)}),this[a].apply(this,e),r}}function Pe(e,t){let{name:n,type:r,direction:i}=t,a=`find`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return!1;if(arguments.length===1)return n=e,we(!0,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Ee(!0,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return ke(!0,r,this.multi,i,o,t,n)}throw new w(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};let o=`some`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>t(e,n,r,i,a,o,s)),!!this[a].apply(this,e)};let s=`every`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>!t(e,n,r,i,a,o,s)),!this[a].apply(this,e)}}function eee(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return S();if(!arguments.length)return Te(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return Oe(r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.${a}: could not find the "${t}" target node in the graph.`);return je(r,i,n,t)}throw new w(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function tee(e){ge.forEach(t=>{Me(e,t),Ne(e,t),Pe(e,t),eee(e,t)})}var Fe=[{name:`neighbors`,type:`mixed`},{name:`inNeighbors`,type:`directed`,direction:`in`},{name:`outNeighbors`,type:`directed`,direction:`out`},{name:`inboundNeighbors`,type:`mixed`,direction:`in`},{name:`outboundNeighbors`,type:`mixed`,direction:`out`},{name:`directedNeighbors`,type:`directed`},{name:`undirectedNeighbors`,type:`undirected`}];function Ie(){this.A=null,this.B=null}Ie.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)},Ie.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function Le(e,t,n,r,i){for(let a in r){let o=r[a],s=o.source,c=o.target,l=s===n?c:s;if(t&&t.has(l.key))continue;let u=i(l.key,l.attributes);if(e&&u)return l.key}}function Re(e,t,n,r,i){if(t!==`mixed`){if(t===`undirected`)return Le(e,null,r,r.undirected,i);if(typeof n==`string`)return Le(e,null,r,r[n],i)}let a=new Ie,o;if(t!==`undirected`){if(n!==`out`){if(o=Le(e,null,r,r.in,i),e&&o)return o;a.wrap(r.in)}if(n!==`in`){if(o=Le(e,a,r,r.out,i),e&&o)return o;a.wrap(r.out)}}if(t!==`directed`&&(o=Le(e,a,r,r.undirected,i),e&&o))return o}function nee(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Object.keys(n.undirected);if(typeof t==`string`)return Object.keys(n[t])}let r=[];return Re(!1,e,t,n,function(e){r.push(e)}),r}function ze(e,t,n){let r=Object.keys(n),i=r.length,a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=i)return e&&e.wrap(n),{done:!0};let s=n[r[a++]],c=s.source,l=s.target;if(o=c===t?l:c,e&&e.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function ree(e,t,n){if(e!==`mixed`){if(e===`undirected`)return ze(null,n,n.undirected);if(typeof t==`string`)return ze(null,n,n[t])}let r=S(),i=new Ie;return e!==`undirected`&&(t!==`out`&&(r=x(r,ze(i,n,n.in))),t!==`in`&&(r=x(r,ze(i,n,n.out)))),e!==`directed`&&(r=x(r,ze(i,n,n.undirected))),r}function iee(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${n}: could not find the "${e}" node in the graph.`);return nee(r===`mixed`?this.type:r,i,t)}}function Be(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);Re(!1,r===`mixed`?this.type:r,i,n,t)};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(e,t){let n=[];return this[a](e,(e,r)=>{n.push(t(e,r))}),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){let n=[];return this[a](e,(e,r)=>{t(e,r)&&n.push(e)}),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(e,t,n){if(arguments.length<3)throw new w(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let r=n;return this[a](e,(e,n)=>{r=t(r,e,n)}),r}}function Ve(e,t){let{name:n,type:r,direction:i}=t,a=n[0].toUpperCase()+n.slice(1,-1),o=`find`+a;e.prototype[o]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new T(`Graph.${o}: could not find the "${e}" node in the graph.`);return Re(!0,r===`mixed`?this.type:r,i,n,t)};let s=`some`+a;e.prototype[s]=function(e,t){return!!this[o](e,t)};let c=`every`+a;e.prototype[c]=function(e,t){return!this[o](e,(e,n)=>!t(e,n))}}function He(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return S();e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new T(`Graph.${a}: could not find the "${e}" node in the graph.`);return ree(r===`mixed`?this.type:r,i,t)}}function Ue(e){Fe.forEach(t=>{iee(e,t),Be(e,t),Ve(e,t),He(e,t)})}function We(e,t,n,r,i){let a=r._nodes.values(),o=r.type,s,c,l,u,d,f,p;for(;s=a.next(),s.done!==!0;){let r=!1;if(c=s.value,o!==`undirected`)for(l in u=c.out,u){d=u[l];do{if(f=d.target,r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}if(o!==`directed`){for(l in u=c.undirected,u)if(!(t&&c.key>l)){d=u[l];do{if(f=d.target,f.key!==l&&(f=d.source),r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}}if(n&&!r&&(p=i(c.key,null,c.attributes,null,null,null,null),e&&p))return null}}function Ge(e,t){let n={key:e};return g(t.attributes)||(n.attributes=p({},t.attributes)),n}function Ke(e,t,n){let r={key:t,source:n.source.key,target:n.target.key};return g(n.attributes)||(r.attributes=p({},n.attributes)),e===`mixed`&&n.undirected&&(r.undirected=!0),r}function qe(e){if(!h(e))throw new w(`Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.`);if(!(`key`in e))throw new w(`Graph.import: serialized node is missing its key.`);if(`attributes`in e&&(!h(e.attributes)||e.attributes===null))throw new w(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`)}function Je(e){if(!h(e))throw new w(`Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.`);if(!(`source`in e))throw new w(`Graph.import: serialized edge is missing its source.`);if(!(`target`in e))throw new w(`Graph.import: serialized edge is missing its target.`);if(`attributes`in e&&(!h(e.attributes)||e.attributes===null))throw new w(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`);if(`undirected`in e&&typeof e.undirected!=`boolean`)throw new w(`Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.`)}var Ye=b(),aee=new Set([`directed`,`undirected`,`mixed`]),Xe=new Set([`domain`,`_events`,`_eventsCount`,`_maxListeners`]),Ze=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:`directed`},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:`undirected`},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:`directed`},{name:e=>`${e}UndirectedEdgeWithKey`,type:`undirected`}],Qe={allowSelfLoops:!0,multi:!1,type:`mixed`};function $e(e,t,n){if(n&&!h(n))throw new w(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=``+t,n||={},e._nodes.has(t))throw new E(`Graph.addNode: the "${t}" node already exist in the graph.`);let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function et(e,t,n){let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function tt(e,t,n,r,i,a,o,s){if(!r&&e.type===`undirected`)throw new E(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new E(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!h(s))throw new w(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);if(a=``+a,o=``+o,s||={},!e.allowSelfLoops&&a===o)throw new E(`Graph.${t}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let c=e._nodes.get(a),l=e._nodes.get(o);if(!c)throw new T(`Graph.${t}: source node "${a}" not found.`);if(!l)throw new T(`Graph.${t}: target node "${o}" not found.`);let u={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=``+i,e._edges.has(i))throw new E(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?c.undirected[o]!==void 0:c.out[o]!==void 0))throw new E(`Graph.${t}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);let d=new k(r,i,c,l,s);e._edges.set(i,d);let f=a===o;return r?(c.undirectedDegree++,l.undirectedDegree++,f&&(c.undirectedLoops++,e._undirectedSelfLoopCount++)):(c.outDegree++,l.inDegree++,f&&(c.directedLoops++,e._directedSelfLoopCount++)),e.multi?d.attachMulti():d.attach(),r?e._undirectedSize++:e._directedSize++,u.key=i,e.emit(`edgeAdded`,u),i}function nt(e,t,n,r,i,a,o,s,c){if(!r&&e.type===`undirected`)throw new E(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new E(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(c){if(typeof s!=`function`)throw new w(`Graph.${t}: invalid updater function. Expecting a function but got "${s}"`)}else if(!h(s))throw new w(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`)}a=``+a,o=``+o;let l;if(c&&(l=s,s=void 0),!e.allowSelfLoops&&a===o)throw new E(`Graph.${t}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let u=e._nodes.get(a),d=e._nodes.get(o),f,m;if(!n&&(f=e._edges.get(i),f)){if((f.source.key!==a||f.target.key!==o)&&(!r||f.source.key!==o||f.target.key!==a))throw new E(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${a}" source & "${o}" target vs. ("${f.source.key}", "${f.target.key}").`);m=f}if(!m&&!e.multi&&u&&(m=r?u.undirected[o]:u.out[o]),m){let t=[m.key,!1,!1,!1];if(c?!l:!s)return t;if(c){let t=m.attributes;m.attributes=l(t),e.emit(`edgeAttributesUpdated`,{type:`replace`,key:m.key,attributes:m.attributes})}else p(m.attributes,s),e.emit(`edgeAttributesUpdated`,{type:`merge`,key:m.key,attributes:m.attributes,data:s});return t}s||={},c&&l&&(s=l(s));let g={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=``+i,e._edges.has(i))throw new E(`Graph.${t}: the "${i}" edge already exists in the graph.`);let _=!1,v=!1;u||(u=et(e,a,{}),_=!0,a===o&&(d=u,v=!0)),d||(d=et(e,o,{}),v=!0),f=new k(r,i,u,d,s),e._edges.set(i,f);let y=a===o;return r?(u.undirectedDegree++,d.undirectedDegree++,y&&(u.undirectedLoops++,e._undirectedSelfLoopCount++)):(u.outDegree++,d.inDegree++,y&&(u.directedLoops++,e._directedSelfLoopCount++)),e.multi?f.attachMulti():f.attach(),r?e._undirectedSize++:e._directedSize++,g.key=i,e.emit(`edgeAdded`,g),[i,!0,_,v]}function rt(e,t){e._edges.delete(t.key);let{source:n,target:r,attributes:i}=t,a=t.undirected,o=n===r;a?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),a?e._undirectedSize--:e._directedSize--,e.emit(`edgeDropped`,{key:t.key,attributes:i,source:n.key,target:r.key,undirected:a})}var it=class e extends d.EventEmitter{constructor(e){if(super(),e=p({},Qe,e),typeof e.multi!=`boolean`)throw new w(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!aee.has(e.type))throw new w(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!=`boolean`)throw new w(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);let t=e.type===`mixed`?D:e.type===`directed`?O:ee;_(this,`NodeDataClass`,t);let n=`geid_`+Ye()+`_`,r=0;_(this,`_attributes`,{}),_(this,`_nodes`,new Map),_(this,`_edges`,new Map),_(this,`_directedSize`,0),_(this,`_undirectedSize`,0),_(this,`_directedSelfLoopCount`,0),_(this,`_undirectedSelfLoopCount`,0),_(this,`_edgeKeyGenerator`,()=>{let e;do e=n+ r++;while(this._edges.has(e));return e}),_(this,`_options`,e),Xe.forEach(e=>_(this,e,this[e])),v(this,`order`,()=>this._nodes.size),v(this,`size`,()=>this._edges.size),v(this,`directedSize`,()=>this._directedSize),v(this,`undirectedSize`,()=>this._undirectedSize),v(this,`selfLoopCount`,()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),v(this,`directedSelfLoopCount`,()=>this._directedSelfLoopCount),v(this,`undirectedSelfLoopCount`,()=>this._undirectedSelfLoopCount),v(this,`multi`,this._options.multi),v(this,`type`,this._options.type),v(this,`allowSelfLoops`,this._options.allowSelfLoops),v(this,`implementation`,()=>`graphology`)}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(``+e)}hasDirectedEdge(e,t){if(this.type===`undirected`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&!n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out.hasOwnProperty(t):!1}throw new w(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type===`directed`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(t):!1}throw new w(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){let t=``+e;return this._edges.has(t)}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out!==void 0&&n.out.hasOwnProperty(t)||n.undirected!==void 0&&n.undirected.hasOwnProperty(t):!1}throw new w(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type===`undirected`)return;if(e=``+e,t=``+t,this.multi)throw new E(`Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new T(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||void 0;if(r)return r.key}undirectedEdge(e,t){if(this.type===`directed`)return;if(e=``+e,t=``+t,this.multi)throw new E(`Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new T(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);let r=n.undirected&&n.undirected[t]||void 0;if(r)return r.key}edge(e,t){if(this.multi)throw new E(`Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.`);e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new T(`Graph.edge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in||t in n.out}areOutNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.out}areInNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in}areUndirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`directed`?!1:t in n.undirected}areNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&(t in n.in||t in n.out)||this.type!==`directed`&&t in n.undirected}areInboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.in||this.type!==`directed`&&t in n.undirected}areOutboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new T(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.out||this.type!==`directed`&&t in n.undirected}inDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree}outDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree}directedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree}undirectedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree}inboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree),n}outboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.outDegree),n}degree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree,r+=t.directedLoops),n-r}outboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.outDegree,r+=t.directedLoops),n-r}degreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree,r+=t.directedLoops*2),n-r}source(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=``+e,t=``+t;let n=this._edges.get(t);if(!n)throw new T(`Graph.opposite: could not find the "${t}" edge in the graph.`);let r=n.source.key,i=n.target.key;if(e===r)return i;if(e===i)return r;throw new T(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${r}, ${i}).`)}hasExtremity(e,t){e=``+e,t=``+t;let n=this._edges.get(e);if(!n)throw new T(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=``+e;let t=this._edges.get(e);if(!t)throw new T(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return $e(this,e,t).key}mergeNode(e,t){if(t&&!h(t))throw new w(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=``+e,t||={};let n=this._nodes.get(e);return n?(t&&(p(n.attributes,t),this.emit(`nodeAttributesUpdated`,{type:`merge`,key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!=`function`)throw new w(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=``+e;let n=this._nodes.get(e);if(n){if(t){let r=n.attributes;n.attributes=t(r),this.emit(`nodeAttributesUpdated`,{type:`replace`,key:e,attributes:n.attributes})}return[e,!1]}let r=t?t({}):{};return n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:r}),[e,!0]}dropNode(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new T(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!==`undirected`){for(let e in t.out){n=t.out[e];do rt(this,n),n=n.next;while(n)}for(let e in t.in){n=t.in[e];do rt(this,n),n=n.next;while(n)}}if(this.type!==`directed`)for(let e in t.undirected){n=t.undirected[e];do rt(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit(`nodeDropped`,{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){let e=``+arguments[0],n=``+arguments[1];if(t=m(this,e,n,this.type),!t)throw new T(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=``+e,t=this._edges.get(e),!t)throw new T(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return rt(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new E(`Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new E(`Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);e=``+e,t=``+t;let n=m(this,e,t,`directed`);if(!n)throw new T(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return rt(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new E(`Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new E(`Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);let n=m(this,e,t,`undirected`);if(!n)throw new T(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return rt(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit(`cleared`)}clearEdges(){let e=this._nodes.values(),t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit(`edgesCleared`)}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!=`function`)throw new w(`Graph.updateAttribute: updater should be a function.`);let n=this._attributes[e];return this._attributes[e]=t(n),this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit(`attributesUpdated`,{type:`remove`,attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!h(e))throw new w(`Graph.replaceAttributes: provided attributes are not a plain object.`);return this._attributes=e,this.emit(`attributesUpdated`,{type:`replace`,attributes:this._attributes}),this}mergeAttributes(e){if(!h(e))throw new w(`Graph.mergeAttributes: provided attributes are not a plain object.`);return p(this._attributes,e),this.emit(`attributesUpdated`,{type:`merge`,attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!=`function`)throw new w(`Graph.updateAttributes: provided updater is not a function.`);return this._attributes=e(this._attributes),this.emit(`attributesUpdated`,{type:`update`,attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!=`function`)throw new w(`Graph.updateEachNodeAttributes: expecting an updater function.`);if(t&&!y(t))throw new w(`Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._nodes.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,i.attributes=e(i.key,i.attributes);this.emit(`eachNodeAttributesUpdated`,{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!=`function`)throw new w(`Graph.updateEachEdgeAttributes: expecting an updater function.`);if(t&&!y(t))throw new w(`Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._edges.values(),r,i,a,o;for(;r=n.next(),r.done!==!0;)i=r.value,a=i.source,o=i.target,i.attributes=e(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected);this.emit(`eachEdgeAttributesUpdated`,{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!=`function`)throw new w(`Graph.forEachAdjacencyEntry: expecting a callback.`);We(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new w(`Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.`);We(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=`function`)throw new w(`Graph.forEachAssymetricAdjacencyEntry: expecting a callback.`);We(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new w(`Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.`);We(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!=`function`)throw new w(`Graph.forEachNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)}findNode(e){if(typeof e!=`function`)throw new w(`Graph.findNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return r.key}mapNodes(e){if(typeof e!=`function`)throw new w(`Graph.mapNode: expecting a callback.`);let t=this._nodes.values(),n,r,i=Array(this.order),a=0;for(;n=t.next(),n.done!==!0;)r=n.value,i[a++]=e(r.key,r.attributes);return i}someNode(e){if(typeof e!=`function`)throw new w(`Graph.someNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return!0;return!1}everyNode(e){if(typeof e!=`function`)throw new w(`Graph.everyNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,!e(r.key,r.attributes))return!1;return!0}filterNodes(e){if(typeof e!=`function`)throw new w(`Graph.filterNodes: expecting a callback.`);let t=this._nodes.values(),n,r,i=[];for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)&&i.push(r.key);return i}reduceNodes(e,t){if(typeof e!=`function`)throw new w(`Graph.reduceNodes: expecting a callback.`);if(arguments.length<2)throw new w(`Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let n=t,r=this._nodes.values(),i,a;for(;i=r.next(),i.done!==!0;)a=i.value,n=e(n,a.key,a.attributes);return n}nodeEntries(){let e=this._nodes.values();return{[Symbol.iterator](){return this},next(){let t=e.next();if(t.done)return t;let n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){let e=Array(this._nodes.size),t=0;this._nodes.forEach((n,r)=>{e[t++]=Ge(r,n)});let n=Array(this._edges.size);return t=0,this._edges.forEach((e,r)=>{n[t++]=Ke(this.type,r,e)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(t,n=!1){if(t instanceof e)return t.forEachNode((e,t)=>{n?this.mergeNode(e,t):this.addNode(e,t)}),t.forEachEdge((e,t,r,i,a,o,s)=>{n?s?this.mergeUndirectedEdgeWithKey(e,r,i,t):this.mergeDirectedEdgeWithKey(e,r,i,t):s?this.addUndirectedEdgeWithKey(e,r,i,t):this.addDirectedEdgeWithKey(e,r,i,t)}),this;if(!h(t))throw new w(`Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.`);if(t.attributes){if(!h(t.attributes))throw new w(`Graph.import: invalid attributes. Expecting a plain object.`);n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,a,o,s;if(t.nodes){if(a=t.nodes,!Array.isArray(a))throw new w(`Graph.import: invalid nodes. Expecting an array.`);for(r=0,i=a.length;r<i;r++){o=a[r],qe(o);let{key:e,attributes:t}=o;n?this.mergeNode(e,t):this.addNode(e,t)}}if(t.edges){let e=!1;if(this.type===`undirected`&&(e=!0),a=t.edges,!Array.isArray(a))throw new w(`Graph.import: invalid edges. Expecting an array.`);for(r=0,i=a.length;r<i;r++){s=a[r],Je(s);let{source:t,target:i,attributes:o,undirected:c=e}=s,l;`key`in s?(l=n?c?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:c?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,l.call(this,s.key,t,i,o)):(l=n?c?this.mergeUndirectedEdge:this.mergeDirectedEdge:c?this.addUndirectedEdge:this.addDirectedEdge,l.call(this,t,i,o))}}return this}nullCopy(t){let n=new e(p({},this._options,t));return n.replaceAttributes(p({},this.getAttributes())),n}emptyCopy(e){let t=this.nullCopy(e);return this._nodes.forEach((e,n)=>{let r=p({},e.attributes);e=new t.NodeDataClass(n,r),t._nodes.set(n,e)}),t}copy(e){if(e||={},typeof e.type==`string`&&e.type!==this.type&&e.type!==`mixed`)throw new E(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi==`boolean`&&e.multi!==this.multi&&e.multi!==!0)throw new E(`Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.`);if(typeof e.allowSelfLoops==`boolean`&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new E(`Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.`);let t=this.emptyCopy(e),n=this._edges.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,tt(t,`copy`,!1,i.undirected,i.key,i.source.key,i.target.key,p({},i.attributes));return t}toJSON(){return this.export()}toString(){return`[object Graph]`}inspect(){let e={};this._nodes.forEach((t,n)=>{e[n]=t.attributes});let t={},n={};this._edges.forEach((e,r)=>{let i=e.undirected?`--`:`->`,a=``,o=e.source.key,s=e.target.key,c;e.undirected&&o>s&&(c=o,o=s,s=c);let l=`(${o})${i}(${s})`;r.startsWith(`geid_`)?this.multi&&(n[l]===void 0?n[l]=0:n[l]++,a+=`${n[l]}. `):a+=`[${r}]: `,a+=l,t[a]=e.attributes});let r={};for(let e in this)this.hasOwnProperty(e)&&!Xe.has(e)&&typeof this[e]!=`function`&&typeof e!=`symbol`&&(r[e]=this[e]);return r.attributes=this._attributes,r.nodes=e,r.edges=t,_(r,`constructor`,this.constructor),r}};typeof Symbol<`u`&&(it.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=it.prototype.inspect),Ze.forEach(e=>{[`add`,`merge`,`update`].forEach(t=>{let n=e.name(t),r=t===`add`?tt:nt;e.generateKey?it.prototype[n]=function(i,a,o){return r(this,n,!0,(e.type||this.type)===`undirected`,null,i,a,o,t===`update`)}:it.prototype[n]=function(i,a,o,s){return r(this,n,!1,(e.type||this.type)===`undirected`,i,a,o,s,t===`update`)}})}),L(it),he(it),tee(it),Ue(it);var at=class extends it{constructor(e){let t=p({type:`directed`},e);if(`multi`in t&&t.multi!==!1)throw new w(`DirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`directed`)throw new w(`DirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},ot=class extends it{constructor(e){let t=p({type:`undirected`},e);if(`multi`in t&&t.multi!==!1)throw new w(`UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`undirected`)throw new w(`UndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},st=class extends it{constructor(e){let t=p({multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiGraph.from: inconsistent indication that the graph should be simple in given options!`);super(t)}},ct=class extends it{constructor(e){let t=p({type:`directed`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`directed`)throw new w(`MultiDirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},lt=class extends it{constructor(e){let t=p({type:`undirected`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new w(`MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`undirected`)throw new w(`MultiUndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}};function ut(e){e.from=function(t,n){let r=new e(p({},t.options,n));return r.import(t),r}}ut(it),ut(at),ut(ot),ut(st),ut(ct),ut(lt),it.Graph=it,it.DirectedGraph=at,it.UndirectedGraph=ot,it.MultiGraph=st,it.MultiDirectedGraph=ct,it.MultiUndirectedGraph=lt,it.InvalidArgumentsGraphError=w,it.NotFoundGraphError=T,it.UsageGraphError=E;var dt=new it({type:`directed`,multi:!1,allowSelfLoops:!1});function ft(e){for(let{id:t,attributes:n}of e)dt.mergeNode(t,n)}function pt(e){for(let{source:t,target:n,attributes:r}of e)dt.hasNode(t)&&dt.hasNode(n)&&dt.mergeDirectedEdge(t,n,r)}function mt(){dt.clear()}function ht(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gt(e){var t=ht(e,`string`);return typeof t==`symbol`?t:t+``}function _t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,gt(r.key),r)}}function yt(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function bt(e){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bt(e)}function xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xt=function(){return!!e})()}function St(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function oee(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return St(e)}function Ct(e,t,n){return t=bt(t),oee(e,xt()?Reflect.construct(t,n||[],bt(e).constructor):t.apply(e,n))}function wt(e,t){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wt(e,t)}function Tt(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&wt(e,t)}function see(e){if(Array.isArray(e))return e}function cee(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Et(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Dt(e,t){if(e){if(typeof e==`string`)return Et(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Et(e,t):void 0}}function Ot(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kt(e,t){return see(e)||cee(e,t)||Dt(e,t)||Ot()}var At={black:`#000000`,silver:`#C0C0C0`,gray:`#808080`,grey:`#808080`,white:`#FFFFFF`,maroon:`#800000`,red:`#FF0000`,purple:`#800080`,fuchsia:`#FF00FF`,green:`#008000`,lime:`#00FF00`,olive:`#808000`,yellow:`#FFFF00`,navy:`#000080`,blue:`#0000FF`,teal:`#008080`,aqua:`#00FFFF`,darkblue:`#00008B`,mediumblue:`#0000CD`,darkgreen:`#006400`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,springgreen:`#00FF7F`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,rebeccapurple:`#663399`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,dimgrey:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,slategrey:`#708090`,lightslategray:`#778899`,lightslategrey:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370DB`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,palevioletred:`#DB7093`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`},jt=new Int8Array(4),Mt=new Int32Array(jt.buffer,0,1),Nt=new Float32Array(jt.buffer,0,1),Pt=/^\s*rgba?\s*\(/,Ft=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function It(e){var t=0,n=0,r=0,i=1;if(e[0]===`#`)e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(Pt.test(e)){var a=e.match(Ft);a&&(t=+a[1],n=+a[2],r=+a[3],a[4]&&(i=+a[4]))}return{r:t,g:n,b:r,a:i}}var Lt={};for(var Rt in At)Lt[Rt]=Bt(At[Rt]),Lt[At[Rt]]=Lt[Rt];function zt(e,t,n,r,i){return Mt[0]=r<<24|n<<16|t<<8|e,i&&(Mt[0]&=4278190079),Nt[0]}function Bt(e){if(e=e.toLowerCase(),Lt[e]!==void 0)return Lt[e];var t=It(e),n=t.r,r=t.g,i=t.b,a=t.a;a=a*255|0;var o=zt(n,r,i,a,!0);return Lt[e]=o,o}var Vt={};function Ht(e){if(Vt[e]!==void 0)return Vt[e];var t=zt((e&16711680)>>>16,(e&65280)>>>8,e&255,255,!0);return Vt[e]=t,t}function Ut(e,t,n,r){return n+(t<<8)+(e<<16)}function Wt(e,t,n,r,i,a){var o=Math.floor(n/a*i),s=Math.floor(e.drawingBufferHeight/a-r/a*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(o,s,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var l=kt(c,4);return[l[0],l[1],l[2],l[3]]}function H(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gt(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kt(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=bt(e))!==null;);return e}function qt(){return qt=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Kt(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qt.apply(null,arguments)}function Jt(e,t,n,r){var i=qt(bt(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}function Yt(e){return e.normalized?1:e.size}function Xt(e){var t=0;return e.forEach(function(e){return t+=Yt(e)}),t}function Zt(e,t,n){var r=e===`VERTEX`?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw Error(`loadShader: error while creating the shader`);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(i);throw t.deleteShader(i),Error(`loadShader: error while compiling the shader:-${a}-${n}`)}return i}function Qt(e,t){return Zt(`VERTEX`,e,t)}function $t(e,t){return Zt(`FRAGMENT`,e,t)}function en(e,t){var n=e.createProgram();if(n===null)throw Error(`loadProgram: error while creating the program.`);var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS))throw e.deleteProgram(n),Error(`loadProgram: error while linking the program.`);return n}function tn(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,a=e.fragmentShader;t.deleteShader(i),t.deleteShader(a),t.deleteProgram(r),t.deleteBuffer(n)}var nn=`#define PICKING_MODE-`,rn=H(H(H(H(H(H(H(H({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),an=function(){function e(t,n,r){_t(this,e),H(this,`array`,new Float32Array),H(this,`constantArray`,new Float32Array),H(this,`capacity`,0),H(this,`verticesCount`,0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES=`CONSTANT_ATTRIBUTES`in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA=`CONSTANT_DATA`in i?i.CONSTANT_DATA:[],this.isInstanced=`CONSTANT_ATTRIBUTES`in i,this.ATTRIBUTES_ITEMS_COUNT=Xt(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=r,this.normalProgram=this.getProgramInfo(`normal`,t,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo(`pick`,t,nn+i.VERTEX_SHADER_SOURCE,nn+i.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var a=Xt(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw Error(`Program: error while getting constant data (expected ${this.VERTICES} items, received ${this.CONSTANT_DATA.length} instead)`);this.constantArray=new Float32Array(this.CONSTANT_DATA.length*a);for(var o=0;o<this.CONSTANT_DATA.length;o++){var s=this.CONSTANT_DATA[o];if(s.length!==a)throw Error(`Program: error while getting constant data (one vector has ${s.length} items instead of ${a})`);for(var c=0;c<s.length;c++)this.constantArray[o*a+c]=s[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return yt(e,[{key:`kill`,value:function(){tn(this.normalProgram),this.pickProgram&&=(tn(this.pickProgram),null)}},{key:`getProgramInfo`,value:function(e,t,n,r,i){var a=this.getDefinition(),o=t.createBuffer();if(o===null)throw Error(`Program: error while creating the WebGL buffer.`);var s=Qt(t,n),c=$t(t,r),l=en(t,[s,c]),u={};a.UNIFORMS.forEach(function(e){var n=t.getUniformLocation(l,e);n&&(u[e]=n)});var d={};a.ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)});var f;if(`CONSTANT_ATTRIBUTES`in a&&(a.CONSTANT_ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)}),f=t.createBuffer(),f===null))throw Error(`Program: error while creating the WebGL constant buffer.`);return{name:e,program:l,gl:t,frameBuffer:i,buffer:o,constantBuffer:f||{},uniformLocations:u,attributeLocations:d,isPicking:e===`pick`,vertexShader:s,fragmentShader:c}}},{key:`bindProgram`,value:function(e){var t=this,n=0,r=e.gl,i=e.buffer;this.isInstanced?(r.bindBuffer(r.ARRAY_BUFFER,e.constantBuffer),n=0,this.CONSTANT_ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!1)}),r.bufferData(r.ARRAY_BUFFER,this.constantArray,r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,e.buffer),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!0)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,i),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)),r.bindBuffer(r.ARRAY_BUFFER,null)}},{key:`unbindProgram`,value:function(e){var t=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!1)}),this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!0)})):this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e)})}},{key:`bindAttribute`,value:function(e,t,n,r){var i=rn[e.type];if(typeof i!=`number`)throw Error(`Program.bind: yet unsupported attribute type "${e.type}"`);var a=t.attributeLocations[e.name],o=t.gl;if(a!==-1){o.enableVertexAttribArray(a);var s=this.isInstanced?(r?this.ATTRIBUTES_ITEMS_COUNT:Xt(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(o.vertexAttribPointer(a,e.size,e.type,e.normalized||!1,s,n),this.isInstanced&&r)if(o instanceof WebGL2RenderingContext)o.vertexAttribDivisor(a,1);else{var c=o.getExtension(`ANGLE_instanced_arrays`);c&&c.vertexAttribDivisorANGLE(a,1)}}return e.size*i}},{key:`unbindAttribute`,value:function(e,t,n){var r=t.attributeLocations[e.name],i=t.gl;if(r!==-1&&(i.disableVertexAttribArray(r),this.isInstanced&&n))if(i instanceof WebGL2RenderingContext)i.vertexAttribDivisor(r,0);else{var a=i.getExtension(`ANGLE_instanced_arrays`);a&&a.vertexAttribDivisorANGLE(r,0)}}},{key:`reallocate`,value:function(e){e!==this.capacity&&(this.capacity=e,this.verticesCount=this.VERTICES*e,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:`hasNothingToRender`,value:function(){return this.verticesCount===0}},{key:`renderProgram`,value:function(e,t){var n=t.gl,r=t.program;n.enable(n.BLEND),n.useProgram(r),this.setUniforms(e,t),this.drawWebGL(this.METHOD,t)}},{key:`render`,value:function(e){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,e.width*e.pixelRatio/e.downSizingRatio,e.height*e.pixelRatio/e.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(U(U({},e),{},{pixelRatio:e.pixelRatio/e.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,e.width*e.pixelRatio,e.height*e.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(e,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:`drawWebGL`,value:function(e,t){var n=t.gl,r=t.frameBuffer;if(n.bindFramebuffer(n.FRAMEBUFFER,r),!this.isInstanced)n.drawArrays(e,0,this.verticesCount);else if(n instanceof WebGL2RenderingContext)n.drawArraysInstanced(e,0,this.VERTICES,this.capacity);else{var i=n.getExtension(`ANGLE_instanced_arrays`);i&&i.drawArraysInstancedANGLE(e,0,this.VERTICES,this.capacity)}}}])}(),lee=function(e){function t(){return _t(this,t),Ct(this,t,arguments)}return Tt(t,e),yt(t,[{key:`kill`,value:function(){Jt(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n){var r=t*this.STRIDE;if(n.hidden){for(var i=r+this.STRIDE;r<i;r++)this.array[r]=0;return}return this.processVisibleItem(Ht(e),r,n)}}])}(an),on=function(e){function t(){var e;_t(this,t);var n=[...arguments];return e=Ct(this,t,[].concat(n)),H(e,`drawLabel`,void 0),e}return Tt(t,e),yt(t,[{key:`kill`,value:function(){Jt(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n,r,i){var a=t*this.STRIDE;if(i.hidden||n.hidden||r.hidden){for(var o=a+this.STRIDE;a<o;a++)this.array[a]=0;return}return this.processVisibleItem(Ht(e),a,n,r,i)}}])}(an);function uee(e,t){return function(){function n(r,i,a){_t(this,n),H(this,`drawLabel`,t),this.programs=e.map(function(e){return new e(r,i,a)})}return yt(n,[{key:`reallocate`,value:function(e){this.programs.forEach(function(t){return t.reallocate(e)})}},{key:`process`,value:function(e,t,n,r,i){this.programs.forEach(function(a){return a.process(e,t,n,r,i)})}},{key:`render`,value:function(e){this.programs.forEach(function(t){return t.render(e)})}},{key:`kill`,value:function(){this.programs.forEach(function(e){return e.kill()})}}])}()}function dee(e,t,n,r,i){var a=i.edgeLabelSize,o=i.edgeLabelFont,s=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?t[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||`#000`:i.edgeLabelColor.color,l=t.label;if(l){e.fillStyle=c,e.font=`${s} ${a}px ${o}`;var u=n.size,d=r.size,f=n.x,p=n.y,m=r.x,h=r.y,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);if(!(b<u+d)){f+=v*u/b,p+=y*u/b,m-=v*d/b,h-=y*d/b,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);var x=e.measureText(l).width;if(x>b){var S=`…`;for(l+=S,x=e.measureText(l).width;x>b&&l.length>1;)l=l.slice(0,-2)+S,x=e.measureText(l).width;if(l.length<4)return}var C=v>0?y>0?Math.acos(v/b):Math.asin(y/b):y>0?Math.acos(v/b)+Math.PI:Math.asin(v/b)+Math.PI/2;e.save(),e.translate(g,_),e.rotate(C),e.fillText(l,-x/2,t.size/2+a),e.restore()}}}function sn(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,a=n.labelWeight;e.fillStyle=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||`#000`:n.labelColor.color,e.font=`${a} ${r}px ${i}`,e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function cn(e,t,n){var r=n.labelSize,i=n.labelFont;e.font=`${n.labelWeight} ${r}px ${i}`,e.fillStyle=`#FFF`,e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor=`#000`;var a=2;if(typeof t.label==`string`){var o=e.measureText(t.label).width,s=Math.round(o+5),c=Math.round(r+2*a),l=Math.max(t.size,r/2)+a,u=Math.asin(c/2/l),d=Math.sqrt(Math.abs(l**2-(c/2)**2));e.beginPath(),e.moveTo(t.x+d,t.y+c/2),e.lineTo(t.x+l+s,t.y+c/2),e.lineTo(t.x+l+s,t.y-c/2),e.lineTo(t.x+d,t.y-c/2),e.arc(t.x,t.y,l,u,-u),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+a,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,sn(e,t,n)}var ln=`-precision highp float;--varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;--uniform float u_correctionRatio;--const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--void main(void) {- float border = u_correctionRatio * 2.0;- float dist = length(v_diffVector) - v_radius + border;-- // No antialiasing for picking mode:- #ifdef PICKING_MODE- if (dist > border)- gl_FragColor = transparent;- else- gl_FragColor = v_color;-- #else- float t = 0.0;- if (dist > border)- t = 1.0;- else if (dist > 0.0)- t = dist / border;-- gl_FragColor = mix(v_color, transparent, t);- #endif-}-`,un=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_position;-attribute float a_size;-attribute float a_angle;--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_correctionRatio;--varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;-varying float v_border;--const float bias = 255.0 / 254.0;--void main() {- float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;- vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));- vec2 position = a_position + diffVector;- gl_Position = vec4(- (u_matrix * vec3(position, 1)).xy,- 0,- 1- );-- v_diffVector = diffVector;- v_radius = size / 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,dn=WebGLRenderingContext,fn=dn.UNSIGNED_BYTE,pn=dn.FLOAT,mn=[`u_sizeRatio`,`u_correctionRatio`,`u_matrix`],hn=function(e){function t(){return _t(this,t),Ct(this,t,arguments)}return Tt(t,e),yt(t,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:un,FRAGMENT_SHADER_SOURCE:ln,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:mn,ATTRIBUTES:[{name:`a_position`,size:2,type:pn},{name:`a_size`,size:1,type:pn},{name:`a_color`,size:4,type:fn,normalized:!0},{name:`a_id`,size:4,type:fn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_angle`,size:1,type:pn}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:`processVisibleItem`,value:function(e,t,n){var r=this.array,i=Bt(n.color);r[t++]=n.x,r[t++]=n.y,r[t++]=n.size,r[t++]=i,r[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_sizeRatio,a=r.u_correctionRatio,o=r.u_matrix;n.uniform1f(a,e.correctionRatio),n.uniform1f(i,e.sizeRatio),n.uniformMatrix3fv(o,!1,e.matrix)}}])}(lee);H(hn,`ANGLE_1`,0),H(hn,`ANGLE_2`,2*Math.PI/3),H(hn,`ANGLE_3`,4*Math.PI/3);var gn=`-precision mediump float;--varying vec4 v_color;--void main(void) {- gl_FragColor = v_color;-}-`,_n=`-attribute vec2 a_position;-attribute vec2 a_normal;-attribute float a_radius;-attribute vec3 a_barycentric;--#ifdef PICKING_MODE-attribute vec4 a_id;-#else-attribute vec4 a_color;-#endif--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_lengthToThicknessRatio;-uniform float u_widenessToThicknessRatio;--varying vec4 v_color;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- float normalLength = length(a_normal);- vec2 unitNormal = a_normal / normalLength;-- // These first computations are taken from edge.vert.glsl and- // edge.clamped.vert.glsl. Please read it to get better comments on what's- // happening:- float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);- float webGLThickness = pixelsThickness * u_correctionRatio;- float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;- float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;- float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;-- float da = a_barycentric.x;- float db = a_barycentric.y;- float dc = a_barycentric.z;-- vec2 delta = vec2(- da * (webGLNodeRadius * unitNormal.y)- + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)- + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),-- da * (-webGLNodeRadius * unitNormal.x)- + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)- + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)- );-- vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;-- gl_Position = vec4(position, 0, 1);-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,vn=WebGLRenderingContext,yn=vn.UNSIGNED_BYTE,bn=vn.FLOAT,xn=[`u_matrix`,`u_sizeRatio`,`u_correctionRatio`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`,`u_widenessToThicknessRatio`],Sn={extremity:`target`,lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function Cn(e){var t=U(U({},Sn),e||{});return function(e){function n(){return _t(this,n),Ct(this,n,arguments)}return Tt(n,e),yt(n,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:_n,FRAGMENT_SHADER_SOURCE:gn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:xn,ATTRIBUTES:[{name:`a_position`,size:2,type:bn},{name:`a_normal`,size:2,type:bn},{name:`a_radius`,size:1,type:bn},{name:`a_color`,size:4,type:yn,normalized:!0},{name:`a_id`,size:4,type:yn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_barycentric`,size:3,type:bn}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:`processVisibleItem`,value:function(e,n,r,i,a){if(t.extremity===`source`){var o=[i,r];r=o[0],i=o[1]}var s=a.size||1,c=i.size||1,l=r.x,u=r.y,d=i.x,f=i.y,p=Bt(a.color),m=d-l,h=f-u,g=m*m+h*h,_=0,v=0;g&&(g=1/Math.sqrt(g),_=-h*g*s,v=m*g*s);var y=this.array;y[n++]=d,y[n++]=f,y[n++]=-_,y[n++]=-v,y[n++]=c,y[n++]=p,y[n++]=e}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_sizeRatio,s=i.u_correctionRatio,c=i.u_minEdgeThickness,l=i.u_lengthToThicknessRatio,u=i.u_widenessToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.sizeRatio),r.uniform1f(s,e.correctionRatio),r.uniform1f(c,e.minEdgeThickness),r.uniform1f(l,t.lengthToThicknessRatio),r.uniform1f(u,t.widenessToThicknessRatio)}}])}(on)}Cn();var wn=`-precision mediump float;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--void main(void) {- // We only handle antialiasing for normal mode:- #ifdef PICKING_MODE- gl_FragColor = v_color;- #else- float dist = length(v_normal) * v_thickness;-- float t = smoothstep(- v_thickness - v_feather,- v_thickness,- dist- );-- gl_FragColor = mix(v_color, transparent, t);- #endif-}-`,Tn=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_normal;-attribute float a_normalCoef;-attribute vec2 a_positionStart;-attribute vec2 a_positionEnd;-attribute float a_positionCoef;-attribute float a_radius;-attribute float a_radiusCoef;--uniform mat3 u_matrix;-uniform float u_zoomRatio;-uniform float u_sizeRatio;-uniform float u_pixelRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_lengthToThicknessRatio;-uniform float u_feather;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- float radius = a_radius * a_radiusCoef;- vec2 normal = a_normal * a_normalCoef;- vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;-- float normalLength = length(normal);- vec2 unitNormal = normal / normalLength;-- // These first computations are taken from edge.vert.glsl. Please read it to- // get better comments on what's happening:- float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);- float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;-- // Here, we move the point to leave space for the arrow head:- float direction = sign(radius);- float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;- float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;-- vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);-- // Here is the proper position of the vertex- gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);-- v_thickness = webGLThickness / u_zoomRatio;-- v_normal = unitNormal;-- v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,En=WebGLRenderingContext,Dn=En.UNSIGNED_BYTE,On=En.FLOAT,kn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`],An={lengthToThicknessRatio:Sn.lengthToThicknessRatio};function jn(e){var t=U(U({},An),e||{});return function(e){function n(){return _t(this,n),Ct(this,n,arguments)}return Tt(n,e),yt(n,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Tn,FRAGMENT_SHADER_SOURCE:wn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:kn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:On},{name:`a_positionEnd`,size:2,type:On},{name:`a_normal`,size:2,type:On},{name:`a_color`,size:4,type:Dn,normalized:!0},{name:`a_id`,size:4,type:Dn,normalized:!0},{name:`a_radius`,size:1,type:On}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:On},{name:`a_normalCoef`,size:1,type:On},{name:`a_radiusCoef`,size:1,type:On}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Bt(i.color),d=c-o,f=l-s,p=r.size||1,m=d*d+f*f,h=0,g=0;m&&(m=1/Math.sqrt(m),h=-f*m*a,g=d*m*a);var _=this.array;_[t++]=o,_[t++]=s,_[t++]=c,_[t++]=l,_[t++]=h,_[t++]=g,_[t++]=u,_[t++]=e,_[t++]=p}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_zoomRatio,s=i.u_feather,c=i.u_pixelRatio,l=i.u_correctionRatio,u=i.u_sizeRatio,d=i.u_minEdgeThickness,f=i.u_lengthToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.zoomRatio),r.uniform1f(u,e.sizeRatio),r.uniform1f(l,e.correctionRatio),r.uniform1f(c,e.pixelRatio),r.uniform1f(s,e.antiAliasingFeather),r.uniform1f(d,e.minEdgeThickness),r.uniform1f(f,t.lengthToThicknessRatio)}}])}(on)}jn();function Mn(e){return uee([jn(e),Cn(e)])}var Nn=Mn(),Pn=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_normal;-attribute float a_normalCoef;-attribute vec2 a_positionStart;-attribute vec2 a_positionEnd;-attribute float a_positionCoef;--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_zoomRatio;-uniform float u_pixelRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_feather;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- vec2 normal = a_normal * a_normalCoef;- vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;-- float normalLength = length(normal);- vec2 unitNormal = normal / normalLength;-- // We require edges to be at least "minThickness" pixels thick *on screen*- // (so we need to compensate the size ratio):- float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);-- // Then, we need to retrieve the normalized thickness of the edge in the WebGL- // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction- // ratio:- float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;-- // Here is the proper position of the vertex- gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);-- // For the fragment shader though, we need a thickness that takes the "magic"- // correction ratio into account (as in webGLThickness), but so that the- // antialiasing effect does not depend on the zoom level. So here's yet- // another thickness version:- v_thickness = webGLThickness / u_zoomRatio;-- v_normal = unitNormal;-- v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,Fn=WebGLRenderingContext,In=Fn.UNSIGNED_BYTE,Ln=Fn.FLOAT,Rn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`],zn=function(e){function t(){return _t(this,t),Ct(this,t,arguments)}return Tt(t,e),yt(t,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Pn,FRAGMENT_SHADER_SOURCE:wn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Rn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:Ln},{name:`a_positionEnd`,size:2,type:Ln},{name:`a_normal`,size:2,type:Ln},{name:`a_color`,size:4,type:In,normalized:!0},{name:`a_id`,size:4,type:In,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:Ln},{name:`a_normalCoef`,size:1,type:Ln}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Bt(i.color),d=c-o,f=l-s,p=d*d+f*f,m=0,h=0;p&&(p=1/Math.sqrt(p),m=-f*p*a,h=d*p*a);var g=this.array;g[t++]=o,g[t++]=s,g[t++]=c,g[t++]=l,g[t++]=m,g[t++]=h,g[t++]=u,g[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_matrix,a=r.u_zoomRatio,o=r.u_feather,s=r.u_pixelRatio,c=r.u_correctionRatio,l=r.u_sizeRatio,u=r.u_minEdgeThickness;n.uniformMatrix3fv(i,!1,e.matrix),n.uniform1f(a,e.zoomRatio),n.uniform1f(l,e.sizeRatio),n.uniform1f(c,e.correctionRatio),n.uniform1f(s,e.pixelRatio),n.uniform1f(o,e.antiAliasingFeather),n.uniform1f(u,e.minEdgeThickness)}}])}(on),Bn=function(e){function t(){var e;return _t(this,t),e=Ct(this,t),e.rawEmitter=e,e}return Tt(t,e),yt(t)}(d.EventEmitter),Vn=r(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),Hn=n(Vn()),Un={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Wn={easing:`quadraticInOut`,duration:150};function Gn(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Kn(e,t,n){return e[0]=t,e[4]=typeof n==`number`?n:t,e}function qn(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function Jn(e,t,n){return e[6]=t,e[7]=n,e}function Yn(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],d=t[0],f=t[1],p=t[2],m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8];return e[0]=d*n+f*a+p*c,e[1]=d*r+f*o+p*l,e[2]=d*i+f*s+p*u,e[3]=m*n+h*a+g*c,e[4]=m*r+h*o+g*l,e[5]=m*i+h*s+g*u,e[6]=_*n+v*a+y*c,e[7]=_*r+v*o+y*l,e[8]=_*i+v*s+y*u,e}function Xn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],a=e[3],o=e[4],s=e[6],c=e[7],l=t.x,u=t.y;return{x:l*r+u*a+s*n,y:l*i+u*o+c*n}}function Zn(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function Qn(e,t,n,r,i){var a=e.angle,o=e.ratio,s=e.x,c=e.y,l=t.width,u=t.height,d=Gn(),f=Math.min(l,u)-2*r,p=Zn(t,n);return i?(Yn(d,Jn(Gn(),s,c)),Yn(d,Kn(Gn(),o)),Yn(d,qn(Gn(),a)),Yn(d,Kn(Gn(),l/f/2/p,u/f/2/p))):(Yn(d,Kn(Gn(),f/l*2*p,f/u*2*p)),Yn(d,qn(Gn(),-a)),Yn(d,Kn(Gn(),1/o)),Yn(d,Jn(Gn(),-s,-c))),d}function $n(e,t,n){var r=Xn(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,a=r.y;return 1/Math.sqrt(i**2+a**2)/n.width}function er(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEachNode(function(e,a){var o=a.x,s=a.y;o<t&&(t=o),o>n&&(n=o),s<r&&(r=s),s>i&&(i=s)}),{x:[t,n],y:[r,i]}}function tr(e){if(!(0,Hn.default)(e))throw Error(`Sigma: invalid graph instance.`);e.forEachNode(function(e,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw Error(`Sigma: Coordinates of node ${e} are invalid. A node must have a numeric 'x' and 'y' attribute.`)})}function nr(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var a in n)r.setAttribute(a,n[a]);return r}function rr(){return window.devicePixelRatio===void 0?1:window.devicePixelRatio}function ir(e,t,n){return n.sort(function(e,n){var r=t(e)||0,i=t(n)||0;return r<i?-1:r>i?1:0})}function ar(e){var t=kt(e.x,2),n=t[0],r=t[1],i=kt(e.y,2),a=i[0],o=i[1],s=Math.max(r-n,o-a),c=(r+n)/2,l=(o+a)/2;(s===0||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(l)&&(l=0);var u=function(e){return{x:.5+(e.x-c)/s,y:.5+(e.y-l)/s}};return u.applyTo=function(e){e.x=.5+(e.x-c)/s,e.y=.5+(e.y-l)/s},u.inverse=function(e){return{x:c+s*(e.x-.5),y:l+s*(e.y-.5)}},u.ratio=s,u}function or(e){"@babel/helpers - typeof";return or=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},or(e)}function sr(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(t){e[r+i]=t,i++})}}function cr(e){e||={};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t<n;t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];r&&Object.assign(e,r)}return e}var lr={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:`#999`,defaultNodeType:`circle`,defaultEdgeColor:`#ccc`,defaultEdgeType:`line`,labelFont:`Arial`,labelSize:14,labelWeight:`normal`,labelColor:{color:`#000`},edgeLabelFont:`Arial`,edgeLabelSize:14,edgeLabelWeight:`normal`,edgeLabelColor:{attribute:`color`},stagePadding:30,defaultDrawEdgeLabel:dee,defaultDrawNodeLabel:sn,defaultDrawNodeHover:cn,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:`screen`,autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},fee={circle:hn},pee={arrow:Nn,line:zn};function ur(e){if(typeof e.labelDensity!=`number`||e.labelDensity<0)throw Error("Settings: invalid `labelDensity`. Expecting a positive number.");var t=e.minCameraRatio,n=e.maxCameraRatio;if(typeof t==`number`&&typeof n==`number`&&n<t)throw Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function mee(e){var t=cr({},lr,e);return t.nodeProgramClasses=cr({},fee,t.nodeProgramClasses),t.edgeProgramClasses=cr({},pee,t.edgeProgramClasses),t}var dr=1.5,fr=function(e){function t(){var e;return _t(this,t),e=Ct(this,t),H(e,`x`,.5),H(e,`y`,.5),H(e,`angle`,0),H(e,`ratio`,1),H(e,`minRatio`,null),H(e,`maxRatio`,null),H(e,`enabledZooming`,!0),H(e,`enabledPanning`,!0),H(e,`enabledRotation`,!0),H(e,`clean`,null),H(e,`nextFrame`,null),H(e,`previousState`,null),H(e,`enabled`,!0),e.previousState=e.getState(),e}return Tt(t,e),yt(t,[{key:`enable`,value:function(){return this.enabled=!0,this}},{key:`disable`,value:function(){return this.enabled=!1,this}},{key:`getState`,value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:`hasState`,value:function(e){return this.x===e.x&&this.y===e.y&&this.ratio===e.ratio&&this.angle===e.angle}},{key:`getPreviousState`,value:function(){var e=this.previousState;return e?{x:e.x,y:e.y,angle:e.angle,ratio:e.ratio}:null}},{key:`getBoundedRatio`,value:function(e){var t=e;return typeof this.minRatio==`number`&&(t=Math.max(t,this.minRatio)),typeof this.maxRatio==`number`&&(t=Math.min(t,this.maxRatio)),t}},{key:`validateState`,value:function(e){var t={};return this.enabledPanning&&typeof e.x==`number`&&(t.x=e.x),this.enabledPanning&&typeof e.y==`number`&&(t.y=e.y),this.enabledZooming&&typeof e.ratio==`number`&&(t.ratio=this.getBoundedRatio(e.ratio)),this.enabledRotation&&typeof e.angle==`number`&&(t.angle=e.angle),this.clean?this.clean(U(U({},this.getState()),t)):t}},{key:`isAnimated`,value:function(){return!!this.nextFrame}},{key:`setState`,value:function(e){if(!this.enabled)return this;this.previousState=this.getState();var t=this.validateState(e);return typeof t.x==`number`&&(this.x=t.x),typeof t.y==`number`&&(this.y=t.y),typeof t.ratio==`number`&&(this.ratio=t.ratio),typeof t.angle==`number`&&(this.angle=t.angle),this.hasState(this.previousState)||this.emit(`updated`,this.getState()),this}},{key:`updateState`,value:function(e){return this.setState(e(this.getState())),this}},{key:`animate`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!r)return new Promise(function(r){return t.animate(e,n,r)});if(this.enabled){var i=U(U({},Wn),n),a=this.validateState(e),o=typeof i.easing==`function`?i.easing:Un[i.easing],s=Date.now(),c=this.getState(),l=function(){var e=(Date.now()-s)/i.duration;if(e>=1){t.nextFrame=null,t.setState(a),t.animationCallback&&=(t.animationCallback.call(null),void 0);return}var n=o(e),r={};typeof a.x==`number`&&(r.x=c.x+(a.x-c.x)*n),typeof a.y==`number`&&(r.y=c.y+(a.y-c.y)*n),t.enabledRotation&&typeof a.angle==`number`&&(r.angle=c.angle+(a.angle-c.angle)*n),typeof a.ratio==`number`&&(r.ratio=c.ratio+(a.ratio-c.ratio)*n),t.setState(r),t.nextFrame=requestAnimationFrame(l)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(l)):l(),this.animationCallback=r}}},{key:`animatedZoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||dr)},e):this.animate({ratio:this.ratio/dr})}},{key:`animatedUnzoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||dr)},e):this.animate({ratio:this.ratio*dr})}},{key:`animatedReset`,value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:`copy`,value:function(){return t.from(this.getState())}}],[{key:`from`,value:function(e){return new t().setState(e)}}])}(Bn);function pr(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function mr(e,t){var n=U(U({},pr(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function hr(e){var t=`x`in e?e:U(U({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function gr(e,t){return U(U({},mr(e,t)),{},{delta:br(e)})}var _r=2;function vr(e){for(var t=[],n=0,r=Math.min(e.length,_r);n<r;n++)t.push(e[n]);return t}function yr(e,t,n){var r={touches:vr(e.touches).map(function(e){return pr(e,n)}),previousTouches:t.map(function(e){return pr(e,n)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:e};return r}function br(e){if(e.deltaY!==void 0)return e.deltaY*-3/360;if(e.detail!==void 0)return e.detail/-9;throw Error(`Captor: could not extract delta from event.`)}var xr=function(e){function t(e,n){var r;return _t(this,t),r=Ct(this,t),r.container=e,r.renderer=n,r}return Tt(t,e),yt(t)}(Bn),hee=[`doubleClickTimeout`,`doubleClickZoomingDuration`,`doubleClickZoomingRatio`,`dragTimeout`,`draggedEventsTolerance`,`inertiaDuration`,`inertiaRatio`,`zoomDuration`,`zoomingRatio`].reduce(function(e,t){return U(U({},e),{},H({},t,lr[t]))},{}),Sr=function(e){function t(e,n){var r;return _t(this,t),r=Ct(this,t,[e,n]),H(r,`enabled`,!0),H(r,`draggedEvents`,0),H(r,`downStartTime`,null),H(r,`lastMouseX`,null),H(r,`lastMouseY`,null),H(r,`isMouseDown`,!1),H(r,`isMoving`,!1),H(r,`movingTimeout`,null),H(r,`startCameraState`,null),H(r,`clicks`,0),H(r,`doubleClickTimeout`,null),H(r,`currentWheelDirection`,0),H(r,`settings`,hee),r.handleClick=r.handleClick.bind(r),r.handleRightClick=r.handleRightClick.bind(r),r.handleDown=r.handleDown.bind(r),r.handleUp=r.handleUp.bind(r),r.handleMove=r.handleMove.bind(r),r.handleWheel=r.handleWheel.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleEnter=r.handleEnter.bind(r),e.addEventListener(`click`,r.handleClick,{capture:!1}),e.addEventListener(`contextmenu`,r.handleRightClick,{capture:!1}),e.addEventListener(`mousedown`,r.handleDown,{capture:!1}),e.addEventListener(`wheel`,r.handleWheel,{capture:!1}),e.addEventListener(`mouseleave`,r.handleLeave,{capture:!1}),e.addEventListener(`mouseenter`,r.handleEnter,{capture:!1}),document.addEventListener(`mousemove`,r.handleMove,{capture:!1}),document.addEventListener(`mouseup`,r.handleUp,{capture:!1}),r}return Tt(t,e),yt(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`click`,this.handleClick),e.removeEventListener(`contextmenu`,this.handleRightClick),e.removeEventListener(`mousedown`,this.handleDown),e.removeEventListener(`wheel`,this.handleWheel),e.removeEventListener(`mouseleave`,this.handleLeave),e.removeEventListener(`mouseenter`,this.handleEnter),document.removeEventListener(`mousemove`,this.handleMove),document.removeEventListener(`mouseup`,this.handleUp)}},{key:`handleClick`,value:function(e){var t=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout==`number`&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(e);setTimeout(function(){t.clicks=0,t.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit(`click`,mr(e,this.container))}}},{key:`handleRightClick`,value:function(e){this.enabled&&this.emit(`rightClick`,mr(e,this.container))}},{key:`handleDoubleClick`,value:function(e){if(this.enabled){e.preventDefault(),e.stopPropagation();var t=mr(e,this.container);if(this.emit(`doubleClick`,t),!t.sigmaDefaultPrevented){var n=this.renderer.getCamera(),r=n.getBoundedRatio(n.getState().ratio/this.settings.doubleClickZoomingRatio);n.animate(this.renderer.getViewportZoomedState(pr(e,this.container),r),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}}},{key:`handleDown`,value:function(e){if(this.enabled){if(e.button===0){this.startCameraState=this.renderer.getCamera().getState();var t=pr(e,this.container),n=t.x,r=t.y;this.lastMouseX=n,this.lastMouseY=r,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit(`mousedown`,mr(e,this.container))}}},{key:`handleUp`,value:function(e){var t=this;if(!(!this.enabled||!this.isMouseDown)){var n=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout==`number`&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var r=pr(e,this.container),i=r.x,a=r.y,o=n.getState(),s=n.getPreviousState()||{x:0,y:0};this.isMoving?n.animate({x:o.x+this.settings.inertiaRatio*(o.x-s.x),y:o.y+this.settings.inertiaRatio*(o.y-s.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`}):(this.lastMouseX!==i||this.lastMouseY!==a)&&n.setState({x:o.x,y:o.y}),this.isMoving=!1,setTimeout(function(){var e=t.draggedEvents>0;t.draggedEvents=0,e&&t.renderer.getSetting(`hideEdgesOnMove`)&&t.renderer.refresh()},0),this.emit(`mouseup`,mr(e,this.container))}}},{key:`handleMove`,value:function(e){var t=this;if(this.enabled){var n=mr(e,this.container);if(this.emit(`mousemovebody`,n),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit(`mousemove`,n),!n.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout==`number`&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.movingTimeout=null,t.isMoving=!1},this.settings.dragTimeout);var r=this.renderer.getCamera(),i=pr(e,this.container),a=i.x,o=i.y,s=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:a,y:o}),l=s.x-c.x,u=s.y-c.y,d=r.getState(),f=d.x+l,p=d.y+u;r.setState({x:f,y:p}),this.lastMouseX=a,this.lastMouseY=o,e.preventDefault(),e.stopPropagation()}}}},{key:`handleLeave`,value:function(e){this.emit(`mouseleave`,mr(e,this.container))}},{key:`handleEnter`,value:function(e){this.emit(`mouseenter`,mr(e,this.container))}},{key:`handleWheel`,value:function(e){var t=this,n=this.renderer.getCamera();if(!(!this.enabled||!n.enabledZooming)){var r=br(e);if(r){var i=gr(e,this.container);if(this.emit(`wheel`,i),i.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var a=n.getState().ratio,o=r>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,s=n.getBoundedRatio(a*o),c=r>0?1:-1,l=Date.now();a!==s&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===c&&this.lastWheelTriggerTime&&l-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(n.animate(this.renderer.getViewportZoomedState(pr(e,this.container),s),{easing:`quadraticOut`,duration:this.settings.zoomDuration},function(){t.currentWheelDirection=0}),this.currentWheelDirection=c,this.lastWheelTriggerTime=l))}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(xr),Cr=[`dragTimeout`,`inertiaDuration`,`inertiaRatio`,`doubleClickTimeout`,`doubleClickZoomingRatio`,`doubleClickZoomingDuration`,`tapMoveTolerance`].reduce(function(e,t){return U(U({},e),{},H({},t,lr[t]))},{}),wr=function(e){function t(e,n){var r;return _t(this,t),r=Ct(this,t,[e,n]),H(r,`enabled`,!0),H(r,`isMoving`,!1),H(r,`hasMoved`,!1),H(r,`touchMode`,0),H(r,`startTouchesPositions`,[]),H(r,`lastTouches`,[]),H(r,`lastTap`,null),H(r,`settings`,Cr),r.handleStart=r.handleStart.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleMove=r.handleMove.bind(r),e.addEventListener(`touchstart`,r.handleStart,{capture:!1}),e.addEventListener(`touchcancel`,r.handleLeave,{capture:!1}),document.addEventListener(`touchend`,r.handleLeave,{capture:!1,passive:!1}),document.addEventListener(`touchmove`,r.handleMove,{capture:!1,passive:!1}),r}return Tt(t,e),yt(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`touchstart`,this.handleStart),e.removeEventListener(`touchcancel`,this.handleLeave),document.removeEventListener(`touchend`,this.handleLeave),document.removeEventListener(`touchmove`,this.handleMove)}},{key:`getDimensions`,value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:`handleStart`,value:function(e){var t=this;if(this.enabled){e.preventDefault();var n=vr(e.touches);if(this.touchMode=n.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=n.map(function(e){return pr(e,t.container)}),this.touchMode===2){var r=kt(this.startTouchesPositions,2),i=r[0],a=i.x,o=i.y,s=r[1],c=s.x,l=s.y;this.startTouchesAngle=Math.atan2(l-o,c-a),this.startTouchesDistance=Math.sqrt((c-a)**2+(l-o)**2)}this.emit(`touchdown`,yr(e,this.lastTouches,this.container)),this.lastTouches=n,this.lastTouchesPositions=this.startTouchesPositions}}},{key:`handleLeave`,value:function(e){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(e.cancelable&&e.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(e.touches.length===1){this.handleStart(e),e.preventDefault();break}case 1:if(this.isMoving){var t=this.renderer.getCamera(),n=t.getState(),r=t.getPreviousState()||{x:0,y:0};t.animate({x:n.x+this.settings.inertiaRatio*(n.x-r.x),y:n.y+this.settings.inertiaRatio*(n.y-r.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit(`touchup`,yr(e,this.lastTouches,this.container)),!e.touches.length){var i=pr(this.lastTouches[0],this.container),a=this.startTouchesPositions[0],o=(i.x-a.x)**2+(i.y-a.y)**2;if(!e.touches.length&&o<this.settings.tapMoveTolerance**2)if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var s=yr(e,this.lastTouches,this.container);if(this.emit(`doubletap`,s),this.lastTap=null,!s.sigmaDefaultPrevented){var c=this.renderer.getCamera(),l=c.getBoundedRatio(c.getState().ratio/this.settings.doubleClickZoomingRatio);c.animate(this.renderer.getViewportZoomedState(i,l),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}else{var u=yr(e,this.lastTouches,this.container);this.emit(`tap`,u),this.lastTap={time:Date.now(),position:u.touches[0]||u.previousTouches[0]}}}this.lastTouches=vr(e.touches),this.startTouchesPositions=[]}}},{key:`handleMove`,value:function(e){var t=this;if(!(!this.enabled||!this.startTouchesPositions.length)){e.preventDefault();var n=vr(e.touches),r=n.map(function(e){return pr(e,t.container)}),i=this.lastTouches;this.lastTouches=n,this.lastTouchesPositions=r;var a=yr(e,i,this.container);if(this.emit(`touchmove`,a),!a.sigmaDefaultPrevented&&(this.hasMoved||=r.some(function(e,n){var r=t.startTouchesPositions[n];return r&&(e.x!==r.x||e.y!==r.y)}),this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.isMoving=!1},this.settings.dragTimeout);var o=this.renderer.getCamera(),s=this.startCameraState,c=this.renderer.getSetting(`stagePadding`);switch(this.touchMode){case 1:var l=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=l.x,d=l.y,f=this.renderer.viewportToFramedGraph(r[0]),p=f.x,m=f.y;o.setState({x:s.x+u-p,y:s.y+d-m});break;case 2:var h={x:.5,y:.5,angle:0,ratio:1},g=r[0],_=g.x,v=g.y,y=r[1],b=y.x,x=y.y,S=Math.atan2(x-v,b-_)-this.startTouchesAngle,C=Math.hypot(x-v,b-_)/this.startTouchesDistance,w=o.getBoundedRatio(s.ratio/C);h.ratio=w,h.angle=s.angle+S;var T=this.getDimensions(),E=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:s}),D=Math.min(T.width,T.height)-2*c,O=D/T.width,ee=D/T.height,k=w/D,A=_-D/2/O,j=v-D/2/ee,M=[A*Math.cos(-h.angle)-j*Math.sin(-h.angle),j*Math.cos(-h.angle)+A*Math.sin(-h.angle)];A=M[0],j=M[1],h.x=E.x-A*k,h.y=E.y+j*k,o.setState(h);break}}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(xr);function Tr(e){if(Array.isArray(e))return Et(e)}function Er(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Dr(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Or(e){return Tr(e)||Er(e)||Dt(e)||Dr()}function kr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ar(e,t){if(e==null)return{};var n,r,i=kr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var jr=function(){function e(t,n){_t(this,e),this.key=t,this.size=n}return yt(e,null,[{key:`compare`,value:function(e,t){return e.size>t.size?-1:e.size<t.size||e.key>t.key?1:-1}}])}(),Mr=function(){function e(){_t(this,e),H(this,`width`,0),H(this,`height`,0),H(this,`cellSize`,0),H(this,`columns`,0),H(this,`rows`,0),H(this,`cells`,{})}return yt(e,[{key:`resizeAndClear`,value:function(e,t){this.width=e.width,this.height=e.height,this.cellSize=t,this.columns=Math.ceil(e.width/t),this.rows=Math.ceil(e.height/t),this.cells={}}},{key:`getIndex`,value:function(e){var t=Math.floor(e.x/this.cellSize);return Math.floor(e.y/this.cellSize)*this.columns+t}},{key:`add`,value:function(e,t,n){var r=new jr(e,t),i=this.getIndex(n),a=this.cells[i];a||(a=[],this.cells[i]=a),a.push(r)}},{key:`organize`,value:function(){for(var e in this.cells)this.cells[e].sort(jr.compare)}},{key:`getLabelsToDisplay`,value:function(e,t){var n=this.cellSize*this.cellSize,r=n/e/e*t/n,i=Math.ceil(r),a=[];for(var o in this.cells)for(var s=this.cells[o],c=0;c<Math.min(i,s.length);c++)a.push(s[c].key);return a}}])}();function Nr(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,i=e.displayedNodeLabels,a=[];return t.forEachEdge(function(e,t,o,s){(o===n||s===n||r.has(o)||r.has(s)||i.has(o)&&i.has(s))&&a.push(e)}),a}var Pr=150,Fr=50,Ir=Object.prototype.hasOwnProperty;function Lr(e,t,n){if(!Ir.call(n,`x`)||!Ir.call(n,`y`))throw Error(`Sigma: could not find a valid position (x, y) for node "${t}". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?`);return n.color||=e.defaultNodeColor,!n.label&&n.label!==``&&(n.label=null),n.label!==void 0&&n.label!==null?n.label=``+n.label:n.label=null,n.size||=2,Ir.call(n,`hidden`)||(n.hidden=!1),Ir.call(n,`highlighted`)||(n.highlighted=!1),Ir.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultNodeType),n.zIndex||=0,n}function gee(e,t,n){return n.color||=e.defaultEdgeColor,n.label||=``,n.size||=.5,Ir.call(n,`hidden`)||(n.hidden=!1),Ir.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultEdgeType),n.zIndex||=0,n}var _ee=function(e){function t(e,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(_t(this,t),r=Ct(this,t),H(r,`elements`,{}),H(r,`canvasContexts`,{}),H(r,`webGLContexts`,{}),H(r,`pickingLayers`,new Set),H(r,`textures`,{}),H(r,`frameBuffers`,{}),H(r,`activeListeners`,{}),H(r,`labelGrid`,new Mr),H(r,`nodeDataCache`,{}),H(r,`edgeDataCache`,{}),H(r,`nodeProgramIndex`,{}),H(r,`edgeProgramIndex`,{}),H(r,`nodesWithForcedLabels`,new Set),H(r,`edgesWithForcedLabels`,new Set),H(r,`nodeExtent`,{x:[0,1],y:[0,1]}),H(r,`nodeZExtent`,[1/0,-1/0]),H(r,`edgeZExtent`,[1/0,-1/0]),H(r,`matrix`,Gn()),H(r,`invMatrix`,Gn()),H(r,`correctionRatio`,1),H(r,`customBBox`,null),H(r,`normalizationFunction`,ar({x:[0,1],y:[0,1]})),H(r,`graphToViewportRatio`,1),H(r,`itemIDsIndex`,{}),H(r,`nodeIndices`,{}),H(r,`edgeIndices`,{}),H(r,`width`,0),H(r,`height`,0),H(r,`pixelRatio`,rr()),H(r,`pickingDownSizingRatio`,2*r.pixelRatio),H(r,`displayedNodeLabels`,new Set),H(r,`displayedEdgeLabels`,new Set),H(r,`highlightedNodes`,new Set),H(r,`hoveredNode`,null),H(r,`hoveredEdge`,null),H(r,`renderFrame`,null),H(r,`renderHighlightedNodesFrame`,null),H(r,`needToProcess`,!1),H(r,`checkEdgesEventsFrame`,null),H(r,`nodePrograms`,{}),H(r,`nodeHoverPrograms`,{}),H(r,`edgePrograms`,{}),r.settings=mee(i),ur(r.settings),tr(e),!(n instanceof HTMLElement))throw Error(`Sigma: container should be an html element.`);for(var a in r.graph=e,r.container=n,r.createWebGLContext(`edges`,{picking:i.enableEdgeEvents}),r.createCanvasContext(`edgeLabels`),r.createWebGLContext(`nodes`,{picking:!0}),r.createCanvasContext(`labels`),r.createCanvasContext(`hovers`),r.createWebGLContext(`hoverNodes`),r.createCanvasContext(`mouse`,{style:{touchAction:`none`,userSelect:`none`}}),r.resize(),r.settings.nodeProgramClasses)r.registerNodeProgram(a,r.settings.nodeProgramClasses[a],r.settings.nodeHoverProgramClasses[a]);for(var o in r.settings.edgeProgramClasses)r.registerEdgeProgram(o,r.settings.edgeProgramClasses[o]);return r.camera=new fr,r.bindCameraHandlers(),r.mouseCaptor=new Sr(r.elements.mouse,r),r.mouseCaptor.setSettings(r.settings),r.touchCaptor=new wr(r.elements.mouse,r),r.touchCaptor.setSettings(r.settings),r.bindEventHandlers(),r.bindGraphHandlers(),r.handleSettingsUpdate(),r.refresh(),r}return Tt(t,e),yt(t,[{key:`registerNodeProgram`,value:function(e,t,n){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new t(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(n||t)(this.webGLContexts.hoverNodes,null,this),this}},{key:`registerEdgeProgram`,value:function(e,t){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new t(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:`unregisterNodeProgram`,value:function(e){if(this.nodePrograms[e]){var t=this.nodePrograms,n=t[e],r=Ar(t,[e].map(gt));n.kill(),this.nodePrograms=r}if(this.nodeHoverPrograms[e]){var i=this.nodeHoverPrograms,a=i[e],o=Ar(i,[e].map(gt));a.kill(),this.nodePrograms=o}return this}},{key:`unregisterEdgeProgram`,value:function(e){if(this.edgePrograms[e]){var t=this.edgePrograms,n=t[e],r=Ar(t,[e].map(gt));n.kill(),this.edgePrograms=r}return this}},{key:`resetWebGLTexture`,value:function(e){var t=this.webGLContexts[e],n=this.frameBuffers[e],r=this.textures[e];r&&t.deleteTexture(r);var i=t.createTexture();return t.bindFramebuffer(t.FRAMEBUFFER,n),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),this.textures[e]=i,this}},{key:`bindCameraHandlers`,value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on(`updated`,this.activeListeners.camera),this}},{key:`unbindCameraHandlers`,value:function(){return this.camera.removeListener(`updated`,this.activeListeners.camera),this}},{key:`getNodeAtPosition`,value:function(e){var t=e.x,n=e.y,r=Wt(this.webGLContexts.nodes,this.frameBuffers.nodes,t,n,this.pixelRatio,this.pickingDownSizingRatio),i=Ut.apply(void 0,Or(r)),a=this.itemIDsIndex[i];return a&&a.type===`node`?a.id:null}},{key:`bindEventHandlers`,value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener(`resize`,this.activeListeners.handleResize),this.activeListeners.handleMove=function(t){var n=hr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}},i=e.getNodeAtPosition(n);if(i&&e.hoveredNode!==i&&!e.nodeDataCache[i].hidden){e.hoveredNode&&e.emit(`leaveNode`,U(U({},r),{},{node:e.hoveredNode})),e.hoveredNode=i,e.emit(`enterNode`,U(U({},r),{},{node:i})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(n)!==e.hoveredNode){var a=e.hoveredNode;e.hoveredNode=null,e.emit(`leaveNode`,U(U({},r),{},{node:a})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var o=e.hoveredNode?null:e.getEdgeAtPoint(r.event.x,r.event.y);o!==e.hoveredEdge&&(e.hoveredEdge&&e.emit(`leaveEdge`,U(U({},r),{},{edge:e.hoveredEdge})),o&&e.emit(`enterEdge`,U(U({},r),{},{edge:o})),e.hoveredEdge=o)}},this.activeListeners.handleMoveBody=function(t){var n=hr(t);e.emit(`moveBody`,{event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(t){var n=hr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.hoveredNode&&(e.emit(`leaveNode`,U(U({},r),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit(`leaveEdge`,U(U({},r),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit(`leaveStage`,U({},r))},this.activeListeners.handleEnter=function(t){var n=hr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.emit(`enterStage`,U({},r))};var t=function(t){return function(n){var r=hr(n),i={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},a=e.getNodeAtPosition(r);if(a)return e.emit(`${t}Node`,U(U({},i),{},{node:a}));if(e.settings.enableEdgeEvents){var o=e.getEdgeAtPoint(r.x,r.y);if(o)return e.emit(`${t}Edge`,U(U({},i),{},{edge:o}))}return e.emit(`${t}Stage`,i)}};return this.activeListeners.handleClick=t(`click`),this.activeListeners.handleRightClick=t(`rightClick`),this.activeListeners.handleDoubleClick=t(`doubleClick`),this.activeListeners.handleWheel=t(`wheel`),this.activeListeners.handleDown=t(`down`),this.activeListeners.handleUp=t(`up`),this.mouseCaptor.on(`mousemove`,this.activeListeners.handleMove),this.mouseCaptor.on(`mousemovebody`,this.activeListeners.handleMoveBody),this.mouseCaptor.on(`click`,this.activeListeners.handleClick),this.mouseCaptor.on(`rightClick`,this.activeListeners.handleRightClick),this.mouseCaptor.on(`doubleClick`,this.activeListeners.handleDoubleClick),this.mouseCaptor.on(`wheel`,this.activeListeners.handleWheel),this.mouseCaptor.on(`mousedown`,this.activeListeners.handleDown),this.mouseCaptor.on(`mouseup`,this.activeListeners.handleUp),this.mouseCaptor.on(`mouseleave`,this.activeListeners.handleLeave),this.mouseCaptor.on(`mouseenter`,this.activeListeners.handleEnter),this.touchCaptor.on(`touchdown`,this.activeListeners.handleDown),this.touchCaptor.on(`touchdown`,this.activeListeners.handleMove),this.touchCaptor.on(`touchup`,this.activeListeners.handleUp),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMove),this.touchCaptor.on(`tap`,this.activeListeners.handleClick),this.touchCaptor.on(`doubletap`,this.activeListeners.handleDoubleClick),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMoveBody),this}},{key:`bindGraphHandlers`,value:function(){var e=this,t=this.graph,n=new Set([`x`,`y`,`zIndex`,`type`]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(r){var i=r.hints?.attributes;e.graph.forEachNode(function(t){return e.updateNode(t)});var a=!i||i.some(function(e){return n.has(e)});e.refresh({partialGraph:{nodes:t.nodes()},skipIndexation:!a,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(n){var r=n.hints?.attributes;e.graph.forEachEdge(function(t){return e.updateEdge(t)});var i=r&&[`zIndex`,`type`].some(function(e){return r?.includes(e)});e.refresh({partialGraph:{edges:t.edges()},skipIndexation:!i,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(t){var n=t.key;e.addNode(n),e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(t){var n=t.key;e.removeNode(n),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(t){var n=t.key;e.addEdge(n),e.refresh({partialGraph:{edges:[n]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{edges:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(t){var n=t.key;e.removeEdge(n),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},t.on(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),t.on(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),t.on(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),t.on(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),t.on(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),t.on(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),t.on(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),t.on(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),t.on(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),t.on(`cleared`,this.activeListeners.clearGraphUpdate),this}},{key:`unbindGraphHandlers`,value:function(){var e=this.graph;e.removeListener(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),e.removeListener(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),e.removeListener(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),e.removeListener(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),e.removeListener(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),e.removeListener(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),e.removeListener(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),e.removeListener(`cleared`,this.activeListeners.clearGraphUpdate)}},{key:`getEdgeAtPoint`,value:function(e,t){var n=Wt(this.webGLContexts.edges,this.frameBuffers.edges,e,t,this.pixelRatio,this.pickingDownSizingRatio),r=Ut.apply(void 0,Or(n)),i=this.itemIDsIndex[r];return i&&i.type===`edge`?i.id:null}},{key:`process`,value:function(){var e=this;this.emit(`beforeProcess`);var t=this.graph,n=this.settings,r=this.getDimensions();if(this.nodeExtent=er(this.graph),!this.settings.autoRescale){var i=r.width,a=r.height,o=this.nodeExtent,s=o.x,c=o.y;this.nodeExtent={x:[(s[0]+s[1])/2-i/2,(s[0]+s[1])/2+i/2],y:[(c[0]+c[1])/2-a/2,(c[0]+c[1])/2+a/2]}}this.normalizationFunction=ar(this.customBBox||this.nodeExtent);var l=Qn(new fr().getState(),r,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(r,n.labelGridCellSize);for(var u={},d={},f={},p={},m=1,h=t.nodes(),g=0,_=h.length;g<_;g++){var v=h[g],y=this.nodeDataCache[v],b=t.getNodeAttributes(v);y.x=b.x,y.y=b.y,this.normalizationFunction.applyTo(y),typeof y.label==`string`&&!y.hidden&&this.labelGrid.add(v,y.size,this.framedGraphToViewport(y,{matrix:l})),u[y.type]=(u[y.type]||0)+1}for(var x in this.labelGrid.organize(),this.nodePrograms){if(!Ir.call(this.nodePrograms,x))throw Error(`Sigma: could not find a suitable program for node type "${x}"!`);this.nodePrograms[x].reallocate(u[x]||0),u[x]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(h=ir(this.nodeZExtent,function(t){return e.nodeDataCache[t].zIndex},h));for(var S=0,C=h.length;S<C;S++){var w=h[S];d[w]=m,p[d[w]]={type:`node`,id:w},m++;var T=this.nodeDataCache[w];this.addNodeToProgram(w,d[w],u[T.type]++)}for(var E={},D=t.edges(),O=0,ee=D.length;O<ee;O++){var k=D[O],A=this.edgeDataCache[k];E[A.type]=(E[A.type]||0)+1}for(var j in this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(D=ir(this.edgeZExtent,function(t){return e.edgeDataCache[t].zIndex},D)),this.edgePrograms){if(!Ir.call(this.edgePrograms,j))throw Error(`Sigma: could not find a suitable program for edge type "${j}"!`);this.edgePrograms[j].reallocate(E[j]||0),E[j]=0}for(var M=0,N=D.length;M<N;M++){var P=D[M];f[P]=m,p[f[P]]={type:`edge`,id:P},m++;var te=this.edgeDataCache[P];this.addEdgeToProgram(P,f[P],E[te.type]++)}return this.itemIDsIndex=p,this.nodeIndices=d,this.edgeIndices=f,this.emit(`afterProcess`),this}},{key:`handleSettingsUpdate`,value:function(e){var t=this,n=this.settings;if(this.camera.minRatio=n.minCameraRatio,this.camera.maxRatio=n.maxCameraRatio,this.camera.enabledZooming=n.enableCameraZooming,this.camera.enabledPanning=n.enableCameraPanning,this.camera.enabledRotation=n.enableCameraRotation,n.cameraPanBoundaries?this.camera.clean=function(e){return t.cleanCameraState(e,n.cameraPanBoundaries&&or(n.cameraPanBoundaries)===`object`?n.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),e){if(e.edgeProgramClasses!==n.edgeProgramClasses){for(var r in n.edgeProgramClasses)n.edgeProgramClasses[r]!==e.edgeProgramClasses[r]&&this.registerEdgeProgram(r,n.edgeProgramClasses[r]);for(var i in e.edgeProgramClasses)n.edgeProgramClasses[i]||this.unregisterEdgeProgram(i)}if(e.nodeProgramClasses!==n.nodeProgramClasses||e.nodeHoverProgramClasses!==n.nodeHoverProgramClasses){for(var a in n.nodeProgramClasses)(n.nodeProgramClasses[a]!==e.nodeProgramClasses[a]||n.nodeHoverProgramClasses[a]!==e.nodeHoverProgramClasses[a])&&this.registerNodeProgram(a,n.nodeProgramClasses[a],n.nodeHoverProgramClasses[a]);for(var o in e.nodeProgramClasses)n.nodeProgramClasses[o]||this.unregisterNodeProgram(o)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:`cleanCameraState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.tolerance,r=n===void 0?0:n,i=t.boundaries,a=U({},e),o=i||this.nodeExtent,s=kt(o.x,2),c=s[0],l=s[1],u=kt(o.y,2),d=u[0],f=u[1],p=[this.graphToViewport({x:c,y:d},{cameraState:e}),this.graphToViewport({x:l,y:d},{cameraState:e}),this.graphToViewport({x:c,y:f},{cameraState:e}),this.graphToViewport({x:l,y:f},{cameraState:e})],m=1/0,h=-1/0,g=1/0,_=-1/0;p.forEach(function(e){var t=e.x,n=e.y;m=Math.min(m,t),h=Math.max(h,t),g=Math.min(g,n),_=Math.max(_,n)});var v=h-m,y=_-g,b=this.getDimensions(),x=b.width,S=b.height,C=0,w=0;if(v>=x?h<x-r?C=h-(x-r):m>r&&(C=m-r):h>x+r?C=h-(x+r):m<-r&&(C=m+r),y>=S?_<S-r?w=_-(S-r):g>r&&(w=g-r):_>S+r?w=_-(S+r):g<-r&&(w=g+r),C||w){var T=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),E=this.viewportToFramedGraph({x:C,y:w},{cameraState:e});C=E.x-T.x,w=E.y-T.y,a.x+=C,a.y+=w}return a}},{key:`renderLabels`,value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),t=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);sr(t,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var n=this.canvasContexts.labels,r=0,i=t.length;r<i;r++){var a=t[r],o=this.nodeDataCache[a];if(!this.displayedNodeLabels.has(a)&&!o.hidden){var s=this.framedGraphToViewport(o),c=s.x,l=s.y,u=this.scaleSize(o.size);if(!(!o.forceLabel&&u<this.settings.labelRenderedSizeThreshold)&&!(c<-Pr||c>this.width+Pr||l<-Fr||l>this.height+Fr)){this.displayedNodeLabels.add(a);var d=this.settings.defaultDrawNodeLabel;(this.nodePrograms[o.type]?.drawLabel||d)(n,U(U({key:a},o),{},{size:u,x:c,y:l}),this.settings)}}}return this}},{key:`renderEdgeLabels`,value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var t=Nr({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});sr(t,this.edgesWithForcedLabels);for(var n=new Set,r=0,i=t.length;r<i;r++){var a=t[r],o=this.graph.extremities(a),s=this.nodeDataCache[o[0]],c=this.nodeDataCache[o[1]],l=this.edgeDataCache[a];if(!n.has(a)&&!(l.hidden||s.hidden||c.hidden)){var u=this.settings.defaultDrawEdgeLabel;(this.edgePrograms[l.type]?.drawLabel||u)(e,U(U({key:a},l),{},{size:this.scaleSize(l.size)}),U(U(U({key:o[0]},s),this.framedGraphToViewport(s)),{},{size:this.scaleSize(s.size)}),U(U(U({key:o[1]},c),this.framedGraphToViewport(c)),{},{size:this.scaleSize(c.size)}),this.settings),n.add(a)}}return this.displayedEdgeLabels=n,this}},{key:`renderHighlightedNodes`,value:function(){var e=this,t=this.canvasContexts.hovers;t.clearRect(0,0,this.width,this.height);var n=function(n){var r=e.nodeDataCache[n],i=e.framedGraphToViewport(r),a=i.x,o=i.y,s=e.scaleSize(r.size),c=e.settings.defaultDrawNodeHover;(e.nodePrograms[r.type]?.drawHover||c)(t,U(U({key:n},r),{},{size:s,x:a,y:o}),e.settings)},r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach(function(t){t!==e.hoveredNode&&r.push(t)}),r.forEach(function(e){return n(e)});var i={};for(var a in r.forEach(function(t){var n=e.nodeDataCache[t].type;i[n]=(i[n]||0)+1}),this.nodeHoverPrograms)this.nodeHoverPrograms[a].reallocate(i[a]||0),i[a]=0;r.forEach(function(t){var n=e.nodeDataCache[t];e.nodeHoverPrograms[n.type].process(0,i[n.type]++,n)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var o=this.getRenderParams();for(var s in this.nodeHoverPrograms)this.nodeHoverPrograms[s].render(o)}},{key:`scheduleHighlightedNodesRender`,value:function(){var e=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){e.renderHighlightedNodesFrame=null,e.renderHighlightedNodes(),e.renderEdgeLabels()}))}},{key:`render`,value:function(){var e=this;this.emit(`beforeRender`);var t=function(){return e.emit(`afterRender`),e};if(this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(t){return e.resetWebGLTexture(t)}),!this.graph.order)return t();var n=this.mouseCaptor,r=this.camera.isAnimated()||n.isMoving||n.draggedEvents||n.currentWheelDirection,i=this.camera.getState(),a=this.getDimensions(),o=this.getGraphDimensions(),s=this.getStagePadding();this.matrix=Qn(i,a,o,s),this.invMatrix=Qn(i,a,o,s,!0),this.correctionRatio=$n(this.matrix,i,a),this.graphToViewportRatio=this.getGraphToViewportRatio();var c=this.getRenderParams();for(var l in this.nodePrograms)this.nodePrograms[l].render(c);if(!this.settings.hideEdgesOnMove||!r)for(var u in this.edgePrograms)this.edgePrograms[u].render(c);return this.settings.hideLabelsOnMove&&r?t():(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes(),t())}},{key:`addNode`,value:function(e){var t=Object.assign({},this.graph.getNodeAttributes(e));this.settings.nodeReducer&&(t=this.settings.nodeReducer(e,t));var n=Lr(this.settings,e,t);this.nodeDataCache[e]=n,this.nodesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.nodesWithForcedLabels.add(e),this.highlightedNodes.delete(e),n.highlighted&&!n.hidden&&this.highlightedNodes.add(e),this.settings.zIndex&&(n.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=n.zIndex),n.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=n.zIndex))}},{key:`updateNode`,value:function(e){this.addNode(e);var t=this.nodeDataCache[e];this.normalizationFunction.applyTo(t)}},{key:`removeNode`,value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:`addEdge`,value:function(e){var t=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(t=this.settings.edgeReducer(e,t));var n=gee(this.settings,e,t);this.edgeDataCache[e]=n,this.edgesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(n.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=n.zIndex),n.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=n.zIndex))}},{key:`updateEdge`,value:function(e){this.addEdge(e)}},{key:`removeEdge`,value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:`clearNodeIndices`,value:function(){this.labelGrid=new Mr,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:`clearEdgeIndices`,value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:`clearIndices`,value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:`clearNodeState`,value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:`clearEdgeState`,value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:`clearState`,value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:`addNodeToProgram`,value:function(e,t,n){var r=this.nodeDataCache[e],i=this.nodePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for node type "${r.type}"!`);i.process(t,n,r),this.nodeProgramIndex[e]=n}},{key:`addEdgeToProgram`,value:function(e,t,n){var r=this.edgeDataCache[e],i=this.edgePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for edge type "${r.type}"!`);var a=this.graph.extremities(e),o=this.nodeDataCache[a[0]],s=this.nodeDataCache[a[1]];i.process(t,n,o,s,r),this.edgeProgramIndex[e]=n}},{key:`getRenderParams`,value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:`getStagePadding`,value:function(){var e=this.settings,t=e.stagePadding;return e.autoRescale&&t||0}},{key:`createLayer`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw Error(`Sigma: a layer named "${e}" already exists`);var r=nr(t,{position:`absolute`},{class:`sigma-${e}`});return n.style&&Object.assign(r.style,n.style),this.elements[e]=r,`beforeLayer`in n&&n.beforeLayer?this.elements[n.beforeLayer].before(r):`afterLayer`in n&&n.afterLayer?this.elements[n.afterLayer].after(r):this.container.appendChild(r),r}},{key:`createCanvas`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,`canvas`,t)}},{key:`createCanvasContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.createCanvas(e,t),r={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=n.getContext(`2d`,r),this}},{key:`createWebGLContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t?.canvas||this.createCanvas(e,t);t.hidden&&n.remove();var r=U({preserveDrawingBuffer:!1,antialias:!1},t),i=n.getContext(`webgl2`,r);i||=n.getContext(`webgl`,r),i||=n.getContext(`experimental-webgl`,r);var a=i;if(this.webGLContexts[e]=a,a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),t.picking){this.pickingLayers.add(e);var o=a.createFramebuffer();if(!o)throw Error(`Sigma: cannot create a new frame buffer for layer ${e}`);this.frameBuffers[e]=o}return a}},{key:`killLayer`,value:function(e){var t=this.elements[e];if(!t)throw Error(`Sigma: cannot kill layer ${e}, which does not exist`);if(this.webGLContexts[e]){var n;(n=this.webGLContexts[e].getExtension(`WEBGL_lose_context`))==null||n.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return t.remove(),delete this.elements[e],this}},{key:`getCamera`,value:function(){return this.camera}},{key:`setCamera`,value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:`getContainer`,value:function(){return this.container}},{key:`getGraph`,value:function(){return this.graph}},{key:`setGraph`,value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:`getMouseCaptor`,value:function(){return this.mouseCaptor}},{key:`getTouchCaptor`,value:function(){return this.touchCaptor}},{key:`getDimensions`,value:function(){return{width:this.width,height:this.height}}},{key:`getGraphDimensions`,value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:`getNodeDisplayData`,value:function(e){var t=this.nodeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getEdgeDisplayData`,value:function(e){var t=this.edgeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getNodeDisplayedLabels`,value:function(){return new Set(this.displayedNodeLabels)}},{key:`getEdgeDisplayedLabels`,value:function(){return new Set(this.displayedEdgeLabels)}},{key:`getSettings`,value:function(){return U({},this.settings)}},{key:`getSetting`,value:function(e){return this.settings[e]}},{key:`setSetting`,value:function(e,t){var n=U({},this.settings);return this.settings[e]=t,ur(this.settings),this.handleSettingsUpdate(n),this.scheduleRefresh(),this}},{key:`updateSetting`,value:function(e,t){return this.setSetting(e,t(this.settings[e])),this}},{key:`setSettings`,value:function(e){var t=U({},this.settings);return this.settings=U(U({},this.settings),e),ur(this.settings),this.handleSettingsUpdate(t),this.scheduleRefresh(),this}},{key:`resize`,value:function(e){var t=this.width,n=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=rr(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw Error(`Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw Error(`Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(!e&&t===this.width&&n===this.height)return this;for(var r in this.elements){var i=this.elements[r];i.style.width=this.width+`px`,i.style.height=this.height+`px`}for(var a in this.canvasContexts)this.elements[a].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[a].setAttribute(`height`,this.height*this.pixelRatio+`px`),this.pixelRatio!==1&&this.canvasContexts[a].scale(this.pixelRatio,this.pixelRatio);for(var o in this.webGLContexts){this.elements[o].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[o].setAttribute(`height`,this.height*this.pixelRatio+`px`);var s=this.webGLContexts[o];if(s.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(o)){var c=this.textures[o];c&&s.deleteTexture(c)}}return this.emit(`resize`),this}},{key:`clear`,value:function(){return this.emit(`beforeClear`),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit(`afterClear`),this}},{key:`refresh`,value:function(e){var t=this,n=e?.skipIndexation===void 0?!1:e?.skipIndexation,r=e?.schedule===void 0?!1:e.schedule,i=!e||!e.partialGraph;if(i)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(e){return t.addNode(e)}),this.graph.forEachEdge(function(e){return t.addEdge(e)});else{for(var a,o=e.partialGraph?.nodes||[],s=0,c=o?.length||0;s<c;s++){var l=o[s];if(this.updateNode(l),n){var u=this.nodeProgramIndex[l];if(u===void 0)throw Error(`Sigma: node "${l}" can't be repaint`);this.addNodeToProgram(l,this.nodeIndices[l],u)}}for(var d=(e==null||(a=e.partialGraph)==null?void 0:a.edges)||[],f=0,p=d.length;f<p;f++){var m=d[f];if(this.updateEdge(m),n){var h=this.edgeProgramIndex[m];if(h===void 0)throw Error(`Sigma: edge "${m}" can't be repaint`);this.addEdgeToProgram(m,this.edgeIndices[m],h)}}}return(i||!n)&&(this.needToProcess=!0),r?this.scheduleRender():this.render(),this}},{key:`scheduleRender`,value:function(){var e=this;return this.renderFrame||=requestAnimationFrame(function(){e.render()}),this}},{key:`scheduleRefresh`,value:function(e){return this.refresh(U(U({},e),{},{schedule:!0}))}},{key:`getViewportZoomedState`,value:function(e,t){var n=this.camera.getState(),r=n.ratio,i=n.angle,a=n.x,o=n.y,s=this.settings,c=s.minCameraRatio,l=s.maxCameraRatio;typeof l==`number`&&(t=Math.min(t,l)),typeof c==`number`&&(t=Math.max(t,c));var u=t/r,d={x:this.width/2,y:this.height/2},f=this.viewportToFramedGraph(e),p=this.viewportToFramedGraph(d);return{angle:i,x:(f.x-p.x)*(1-u)+a,y:(f.y-p.y)*(1-u)+o,ratio:t}}},{key:`viewRectangle`,value:function(){var e=this.viewportToFramedGraph({x:0,y:0}),t=this.viewportToFramedGraph({x:this.width,y:0}),n=this.viewportToFramedGraph({x:0,y:this.height});return{x1:e.x,y1:e.y,x2:t.x,y2:t.y,height:t.y-n.y}}},{key:`framedGraphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!!t.graphDimensions,r=Xn(t.matrix?t.matrix:n?Qn(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding()):this.matrix,e);return{x:(1+r.x)*this.width/2,y:(1-r.y)*this.height/2}}},{key:`viewportToFramedGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!t.graphDimensions,r=Xn(t.matrix?t.matrix:n?Qn(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding(),!0):this.invMatrix,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(r.x)&&(r.x=0),isNaN(r.y)&&(r.y=0),r}},{key:`viewportToGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,t))}},{key:`graphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),t)}},{key:`getGraphToViewportRatio`,value:function(){var e={x:0,y:0},t={x:1,y:1},n=Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),r=this.graphToViewport(e),i=this.graphToViewport(t);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)/n}},{key:`getBBox`,value:function(){return this.nodeExtent}},{key:`getCustomBBox`,value:function(){return this.customBBox}},{key:`setCustomBBox`,value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:`kill`,value:function(){this.emit(`kill`),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener(`resize`,this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.renderHighlightedNodesFrame&&=(cancelAnimationFrame(this.renderHighlightedNodesFrame),null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);for(var t in this.nodePrograms)this.nodePrograms[t].kill();for(var n in this.nodeHoverPrograms)this.nodeHoverPrograms[n].kill();for(var r in this.edgePrograms)this.edgePrograms[r].kill();for(var i in this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={},this.elements)this.killLayer(i);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:`scaleSize`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(t)*(this.getSetting(`itemSizesReference`)===`positions`?t*this.graphToViewportRatio:1)}},{key:`getCanvases`,value:function(){var e={};for(var t in this.elements)this.elements[t]instanceof HTMLCanvasElement&&(e[t]=this.elements[t]);return e}}])}(Bn),Rr=r(((e,t)=>{t.exports=function(){var e,t,n={};(function(){var e=0,t=1,r=2,i=3,a=4,o=5,s=6,c=7,l=8,u=9,d=0,f=1,p=2,m=0,h=1,g=2,_=3,v=4,y=5,b=6,x=7,S=8,C=3,w=10,T=3,E=9,D=10;n.exports=function(n,O,ee){var k,A,j,M,N,P,te,F,I,ne,re=O.length,ie=ee.length,ae=n.adjustSizes,oe=n.barnesHutTheta*n.barnesHutTheta,se,ce,L,R,le,z,B,V=[];for(j=0;j<re;j+=w)O[j+a]=O[j+r],O[j+o]=O[j+i],O[j+r]=0,O[j+i]=0;if(n.outboundAttractionDistribution){for(se=0,j=0;j<re;j+=w)se+=O[j+s];se/=re/w}if(n.barnesHutOptimize){var ue=1/0,de=-1/0,fe=1/0,pe=-1/0,me,he,ge;for(j=0;j<re;j+=w)ue=Math.min(ue,O[j+e]),de=Math.max(de,O[j+e]),fe=Math.min(fe,O[j+t]),pe=Math.max(pe,O[j+t]);var _e=de-ue,ve=pe-fe;for(_e>ve?(fe-=(_e-ve)/2,pe=fe+_e):(ue-=(ve-_e)/2,de=ue+ve),V[0+m]=-1,V[0+h]=(ue+de)/2,V[0+g]=(fe+pe)/2,V[0+_]=Math.max(de-ue,pe-fe),V[0+v]=-1,V[0+y]=-1,V[0+b]=0,V[0+x]=0,V[0+S]=0,k=1,j=0;j<re;j+=w)for(A=0,ge=C;;)if(V[A+y]>=0){me=O[j+e]<V[A+h]?O[j+t]<V[A+g]?V[A+y]:V[A+y]+E:O[j+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,V[A+x]=(V[A+x]*V[A+b]+O[j+e]*O[j+s])/(V[A+b]+O[j+s]),V[A+S]=(V[A+S]*V[A+b]+O[j+t]*O[j+s])/(V[A+b]+O[j+s]),V[A+b]+=O[j+s],A=me;continue}else if(V[A+m]<0){V[A+m]=j;break}else{if(V[A+y]=k*E,F=V[A+_]/2,I=V[A+y],V[I+m]=-1,V[I+h]=V[A+h]-F,V[I+g]=V[A+g]-F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]-F,V[I+g]=V[A+g]+F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]+F,V[I+g]=V[A+g]-F,V[I+_]=F,V[I+v]=I+E,V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,I+=E,V[I+m]=-1,V[I+h]=V[A+h]+F,V[I+g]=V[A+g]+F,V[I+_]=F,V[I+v]=V[A+v],V[I+y]=-1,V[I+b]=0,V[I+x]=0,V[I+S]=0,k+=4,me=O[V[A+m]+e]<V[A+h]?O[V[A+m]+t]<V[A+g]?V[A+y]:V[A+y]+E:O[V[A+m]+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,V[A+b]=O[V[A+m]+s],V[A+x]=O[V[A+m]+e],V[A+S]=O[V[A+m]+t],V[me+m]=V[A+m],V[A+m]=-1,he=O[j+e]<V[A+h]?O[j+t]<V[A+g]?V[A+y]:V[A+y]+E:O[j+t]<V[A+g]?V[A+y]+E*2:V[A+y]+E*3,me===he)if(ge--){A=me;continue}else{ge=C;break}V[he+m]=j;break}}if(n.barnesHutOptimize)for(ce=n.scalingRatio,j=0;j<re;j+=w)for(A=0;;)if(V[A+y]>=0)if(z=(O[j+e]-V[A+x])**2+(O[j+t]-V[A+S])**2,ne=V[A+_],4*ne*ne/z<oe){if(L=O[j+e]-V[A+x],R=O[j+t]-V[A+S],ae===!0?z>0?(B=ce*O[j+s]*V[A+b]/z,O[j+r]+=L*B,O[j+i]+=R*B):z<0&&(B=-ce*O[j+s]*V[A+b]/Math.sqrt(z),O[j+r]+=L*B,O[j+i]+=R*B):z>0&&(B=ce*O[j+s]*V[A+b]/z,O[j+r]+=L*B,O[j+i]+=R*B),A=V[A+v],A<0)break;continue}else{A=V[A+y];continue}else{if(P=V[A+m],P>=0&&P!==j&&(L=O[j+e]-O[P+e],R=O[j+t]-O[P+t],z=L*L+R*R,ae===!0?z>0?(B=ce*O[j+s]*O[P+s]/z,O[j+r]+=L*B,O[j+i]+=R*B):z<0&&(B=-ce*O[j+s]*O[P+s]/Math.sqrt(z),O[j+r]+=L*B,O[j+i]+=R*B):z>0&&(B=ce*O[j+s]*O[P+s]/z,O[j+r]+=L*B,O[j+i]+=R*B)),A=V[A+v],A<0)break;continue}else for(ce=n.scalingRatio,M=0;M<re;M+=w)for(N=0;N<M;N+=w)L=O[M+e]-O[N+e],R=O[M+t]-O[N+t],ae===!0?(z=Math.sqrt(L*L+R*R)-O[M+l]-O[N+l],z>0?(B=ce*O[M+s]*O[N+s]/z/z,O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B):z<0&&(B=100*ce*O[M+s]*O[N+s],O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B)):(z=Math.sqrt(L*L+R*R),z>0&&(B=ce*O[M+s]*O[N+s]/z/z,O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B));for(I=n.gravity/n.scalingRatio,ce=n.scalingRatio,j=0;j<re;j+=w)B=0,L=O[j+e],R=O[j+t],z=Math.sqrt(L**2+R**2),n.strongGravityMode?z>0&&(B=ce*O[j+s]*I):z>0&&(B=ce*O[j+s]*I/z),O[j+r]-=L*B,O[j+i]-=R*B;for(ce=1*(n.outboundAttractionDistribution?se:1),te=0;te<ie;te+=T)M=ee[te+d],N=ee[te+f],F=ee[te+p],le=F**+n.edgeWeightInfluence,L=O[M+e]-O[N+e],R=O[M+t]-O[N+t],ae===!0?(z=Math.sqrt(L*L+R*R)-O[M+l]-O[N+l],n.linLogMode?n.outboundAttractionDistribution?z>0&&(B=-ce*le*Math.log(1+z)/z/O[M+s]):z>0&&(B=-ce*le*Math.log(1+z)/z):n.outboundAttractionDistribution?z>0&&(B=-ce*le/O[M+s]):z>0&&(B=-ce*le)):(z=Math.sqrt(L**2+R**2),n.linLogMode?n.outboundAttractionDistribution?z>0&&(B=-ce*le*Math.log(1+z)/z/O[M+s]):z>0&&(B=-ce*le*Math.log(1+z)/z):n.outboundAttractionDistribution?(z=1,B=-ce*le/O[M+s]):(z=1,B=-ce*le)),z>0&&(O[M+r]+=L*B,O[M+i]+=R*B,O[N+r]-=L*B,O[N+i]-=R*B);var ye,be,xe,Se,Ce,we;if(ae===!0)for(j=0;j<re;j+=w)O[j+u]!==1&&(ye=Math.sqrt(O[j+r]**2+O[j+i]**2),ye>D&&(O[j+r]=O[j+r]*D/ye,O[j+i]=O[j+i]*D/ye),be=O[j+s]*Math.sqrt((O[j+a]-O[j+r])*(O[j+a]-O[j+r])+(O[j+o]-O[j+i])*(O[j+o]-O[j+i])),xe=Math.sqrt((O[j+a]+O[j+r])*(O[j+a]+O[j+r])+(O[j+o]+O[j+i])*(O[j+o]+O[j+i]))/2,Se=.1*Math.log(1+xe)/(1+Math.sqrt(be)),Ce=O[j+e]+O[j+r]*(Se/n.slowDown),O[j+e]=Ce,we=O[j+t]+O[j+i]*(Se/n.slowDown),O[j+t]=we);else for(j=0;j<re;j+=w)O[j+u]!==1&&(be=O[j+s]*Math.sqrt((O[j+a]-O[j+r])*(O[j+a]-O[j+r])+(O[j+o]-O[j+i])*(O[j+o]-O[j+i])),xe=Math.sqrt((O[j+a]+O[j+r])*(O[j+a]+O[j+r])+(O[j+o]+O[j+i])*(O[j+o]+O[j+i]))/2,Se=O[j+c]*Math.log(1+xe)/(1+Math.sqrt(be)),O[j+c]=Math.min(1,Math.sqrt(Se*(O[j+r]**2+O[j+i]**2)/(1+Math.sqrt(be)))),Ce=O[j+e]+O[j+r]*(Se/n.slowDown),O[j+e]=Ce,we=O[j+t]+O[j+i]*(Se/n.slowDown),O[j+t]=we);return{}}})();var r=n.exports;self.addEventListener(`message`,function(n){var i=n.data;e=new Float32Array(i.nodes),i.edges&&(t=new Float32Array(i.edges)),r(i.settings,e,t),self.postMessage({nodes:e.buffer},[e.buffer])})}})),zr=r((e=>{function t(e){return typeof e!=`number`||isNaN(e)?1:e}function n(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getNodeAttributes(t))},n.fromEntry=function(e,t){return i(t)}):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createNodeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){return r(e(n,t.getNodeAttributes(n)))},n.fromEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a),n}function r(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getEdgeAttributes(t))},n.fromEntry=function(e,t){return i(t)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createEdgeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){var i=t.extremities(n);return r(e(n,t.getEdgeAttributes(n),i[0],i[1],t.getNodeAttributes(i[0]),t.getNodeAttributes(i[1]),t.isUndirected(n)))},n.fromEntry=function(t,n,i,a,o,s,c){return r(e(t,n,i,a,o,s,c))},n.fromPartialEntry=function(t,n,i,a){return r(e(t,n,i,a))},n.fromMinimalEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a,n.fromMinimalEntry=a),n}e.createNodeValueGetter=n,e.createEdgeValueGetter=r,e.createEdgeWeightGetter=function(e){return r(e,t)}})),Br=r((e=>{var t=10,n=3;e.assign=function(e){e||={};var t=Array.prototype.slice.call(arguments).slice(1),n,r,i;for(n=0,i=t.length;n<i;n++)if(t[n])for(r in t[n])e[r]=t[n][r];return e},e.validateSettings=function(e){return`linLogMode`in e&&typeof e.linLogMode!=`boolean`?{message:"the `linLogMode` setting should be a boolean."}:`outboundAttractionDistribution`in e&&typeof e.outboundAttractionDistribution!=`boolean`?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:`adjustSizes`in e&&typeof e.adjustSizes!=`boolean`?{message:"the `adjustSizes` setting should be a boolean."}:`edgeWeightInfluence`in e&&typeof e.edgeWeightInfluence!=`number`?{message:"the `edgeWeightInfluence` setting should be a number."}:`scalingRatio`in e&&!(typeof e.scalingRatio==`number`&&e.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:`strongGravityMode`in e&&typeof e.strongGravityMode!=`boolean`?{message:"the `strongGravityMode` setting should be a boolean."}:`gravity`in e&&!(typeof e.gravity==`number`&&e.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:`slowDown`in e&&!(typeof e.slowDown==`number`||e.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:`barnesHutOptimize`in e&&typeof e.barnesHutOptimize!=`boolean`?{message:"the `barnesHutOptimize` setting should be a boolean."}:`barnesHutTheta`in e&&!(typeof e.barnesHutTheta==`number`&&e.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},e.graphToByteArrays=function(e,r){var i=e.order,a=e.size,o={},s,c=new Float32Array(i*t),l=new Float32Array(a*n);return s=0,e.forEachNode(function(e,n){o[e]=s,c[s]=n.x,c[s+1]=n.y,c[s+2]=0,c[s+3]=0,c[s+4]=0,c[s+5]=0,c[s+6]=1,c[s+7]=1,c[s+8]=n.size||1,c[s+9]=n.fixed?1:0,s+=t}),s=0,e.forEachEdge(function(e,t,i,a,u,d,f){var p=o[i],m=o[a],h=r(e,t,i,a,u,d,f);c[p+6]+=h,c[m+6]+=h,l[s]=p,l[s+1]=m,l[s+2]=h,s+=n}),{nodes:c,edges:l}},e.assignLayoutChanges=function(e,n,r){var i=0;e.updateEachNodeAttributes(function(e,a){return a.x=n[i],a.y=n[i+1],i+=t,r?r(e,a):a})},e.readGraphPositions=function(e,n){var r=0;e.forEachNode(function(e,i){n[r]=i.x,n[r+1]=i.y,r+=t})},e.collectLayoutChanges=function(e,n,r){for(var i=e.nodes(),a={},o=0,s=0,c=n.length;o<c;o+=t){if(r){var l=Object.assign({},e.getNodeAttributes(i[s]));l.x=n[o],l.y=n[o+1],l=r(i[s],l),a[i[s]]={x:l.x,y:l.y}}else a[i[s]]={x:n[o],y:n[o+1]};s++}return a},e.createWorker=function(e){var t=window.URL||window.webkitURL,n=e.toString(),r=t.createObjectURL(new Blob([`(`+n+`).call(this);`],{type:`text/javascript`})),i=new Worker(r);return t.revokeObjectURL(r),i}})),Vr=r(((e,t)=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}})),Hr=n(r(((e,t)=>{var n=Rr(),r=Vn(),i=zr().createEdgeWeightGetter,a=Br(),o=Vr();function s(e,t){if(t||={},!r(e))throw Error(`graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.`);var n=i(`getEdgeWeight`in t?t.getEdgeWeight:`weight`).fromEntry,s=a.assign({},o,t.settings),c=a.validateSettings(s);if(c)throw Error(`graphology-layout-forceatlas2/worker: `+c.message);this.worker=null,this.graph=e,this.settings=s,this.getEdgeWeight=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer=typeof t.outputReducer==`function`?t.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var l=void 0,u=this;this.handleGraphUpdate=function(){u.worker&&u.worker.terminate(),l&&clearTimeout(l),l=setTimeout(function(){l=void 0,u.spawnWorker()},0)},e.on(`nodeAdded`,this.handleGraphUpdate),e.on(`edgeAdded`,this.handleGraphUpdate),e.on(`nodeDropped`,this.handleGraphUpdate),e.on(`edgeDropped`,this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener(`message`,this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(e){if(this.running){var t=new Float32Array(e.data.nodes);a.assignLayoutChanges(this.graph,t,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,t),this.matrices.nodes=t,this.askForIterations()}},s.prototype.askForIterations=function(e){var t=this.matrices,n={settings:this.settings,nodes:t.nodes.buffer},r=[t.nodes.buffer];return e&&(n.edges=t.edges.buffer,r.push(t.edges.buffer)),this.worker.postMessage(n,r),this},s.prototype.start=function(){if(this.killed)throw Error(`graphology-layout-forceatlas2/worker.start: layout was killed.`);return this.running?this:(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0),this)},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener(`nodeAdded`,this.handleGraphUpdate),this.graph.removeListener(`edgeAdded`,this.handleGraphUpdate),this.graph.removeListener(`nodeDropped`,this.handleGraphUpdate),this.graph.removeListener(`edgeDropped`,this.handleGraphUpdate)},t.exports=s}))(),1),Ur={id:`hover-activation`,attach:()=>{},detach:()=>{},onNodeEnter:(e,t)=>{e.setHoveredNodeId(t)},onNodeLeave:(e,t)=>{e.getInteractionState().hoveredNodeId===t&&e.setHoveredNodeId(null)}},Wr={id:`click-selection`,attach:()=>{},detach:()=>{},onNodeClick:(e,t)=>{e.setHoveredNodeId(t),e.onNodeSelectionChange(t)},onStageClick:e=>{e.setHoveredNodeId(null),e.onNodeSelectionChange(``)}},Gr={id:`focus-camera`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`focusNode`?(e.focusNodeInView(t.nodeId),!0):!1};function Kr(){let e=``;return{id:`search-focus`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.focusedNodeId;if(!r||r===e){e=r;return}e=r,t.dispatchAction({type:`focusNode`,nodeId:r})}}}function qr(){let e=``;return{id:`path-highlight`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.activePath.join(`::`);r!==e&&(e=r,t.sigma.refresh())}}}var Jr={id:`fit-view`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`fitView`?(e.fitCurrentView(),!0):!1};function Yr(){let e=null;return{id:`view-mode-switch`,attach:()=>{},detach:()=>{e=null},onStateChange:(t,n)=>{if(n.viewMode!==e){if(e=n.viewMode,n.focusedNodeId){t.dispatchAction({type:`focusNode`,nodeId:n.focusedNodeId});return}t.dispatchAction({type:`fitView`})}}}}var W={palette:{semantic:[`#63E6FF`,`#30D4C7`,`#72A8FF`,`#8D7CFF`,`#C07CFF`,`#FF67D4`,`#FFB24D`,`#C5F55A`],accent:{selected:`#FFC857`,hovered:`#7FE0FF`,path:`#FFB870`},muted:{fallback:`rgba(130, 145, 165, 0.12)`,nodeAlpha:.12,edgeOverview:`rgba(116, 166, 255, 0.05)`,edgeStructure:`rgba(109, 164, 255, 0.11)`,edgeInspection:`rgba(146, 194, 255, 0.18)`,edgeFocus:`rgba(162, 184, 255, 0.34)`},background:{canvas:`#060B17`,shell:`rgba(6, 13, 24, 0.76)`,shellBorder:`rgba(112, 196, 255, 0.14)`,shellGlow:`rgba(53, 123, 255, 0.16)`,grid:`rgba(88, 166, 255, 0.038)`,vignette:`rgba(1, 4, 10, 0.82)`,nodeBorder:`#07111C`}},zoomTiers:{overview:{maxRatio:1/0,nodeScale:.9,labelThreshold:.985,labelBudget:18,edgePriorityThreshold:.72,arrowPriorityThreshold:1/0,edgeSizeScale:.72},structure:{maxRatio:1.2,nodeScale:.98,labelThreshold:.88,labelBudget:36,edgePriorityThreshold:.4,arrowPriorityThreshold:.75,edgeSizeScale:.92},inspection:{maxRatio:.5,nodeScale:1,labelThreshold:.7,labelBudget:80,edgePriorityThreshold:0,arrowPriorityThreshold:.58,edgeSizeScale:1.04}},labels:{forceVisibleStates:[`hovered`,`selected`,`neighbor`,`path`]},nodes:{backgroundScale:.52,mutedAlpha:.12,states:{default:{color:`base`,sizeMultiplier:1,minSize:1.45,forceLabel:!1,zIndex:0},hovered:{color:`hovered`,sizeMultiplier:1.34,minSize:16,forceLabel:!0,zIndex:4},selected:{color:`selected`,sizeMultiplier:1.18,minSize:12,forceLabel:!0,zIndex:3},neighbor:{color:`base`,sizeMultiplier:1.08,minSize:7.2,forceLabel:!0,zIndex:2},path:{color:`path`,sizeMultiplier:1.08,minSize:7.2,forceLabel:!0,zIndex:2},inactive:{color:`muted`,sizeMultiplier:.52,minSize:.8,forceLabel:!1,zIndex:0},muted:{color:`muted`,sizeMultiplier:.52,minSize:.8,forceLabel:!1,zIndex:0}}},edges:{states:{default:{color:`inspection`,sizeMultiplier:1,minSize:.72,zIndex:0,forceArrow:!1,hide:!1},hovered:{color:`hover`,sizeMultiplier:1.55,minSize:1.8,zIndex:3,forceArrow:!0,hide:!1},selected:{color:`hover`,sizeMultiplier:1.55,minSize:1.8,zIndex:3,forceArrow:!0,hide:!1},neighbor:{color:`focus`,sizeMultiplier:1.08,minSize:.95,zIndex:1,forceArrow:!1,hide:!1},path:{color:`path`,sizeMultiplier:1.7,minSize:2.2,zIndex:4,forceArrow:!0,hide:!1},inactive:{color:`muted`,sizeMultiplier:1,minSize:.45,zIndex:0,forceArrow:!1,hide:!0},muted:{color:`muted`,sizeMultiplier:1,minSize:.45,zIndex:0,forceArrow:!1,hide:!0}}},overlays:{hoverGlowAlpha:.26,pathGlowAlpha:.2,glowRadiusMultiplier:4.8,minGlowRadius:16,pulseRadius:11},focus:{maxNeighbors:16,ringCapacity:6,ringGap:250,primaryLabels:6},motion:{cameraMs:380}};function Xr(e){let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function Zr(e,t,n){return Math.min(n,Math.max(e,t))}function Qr(e,t){if(!e)return`rgba(130, 145, 165, ${t})`;if(e.startsWith(`#`)){let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length===6)return`rgba(${Number.parseInt(r.slice(0,2),16)}, ${Number.parseInt(r.slice(2,4),16)}, ${Number.parseInt(r.slice(4,6),16)}, ${t})`}return e.startsWith(`rgba(`)?e.replace(/rgba\(([^)]+),\s*[\d.]+\)/,`rgba($1, ${t})`):e.startsWith(`rgb(`)?e.replace(`rgb(`,`rgba(`).replace(`)`,`, ${t})`):`rgba(130, 145, 165, ${t})`}function $r(e,t){if(!e.startsWith(`#`))return e;let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length!==6)return e;let i=e=>Zr(0,e,255);return`#${[i(Number.parseInt(r.slice(0,2),16)-t),i(Number.parseInt(r.slice(2,4),16)-t),i(Number.parseInt(r.slice(4,6),16)-t)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function ei(e){return e<=W.zoomTiers.inspection.maxRatio?`inspection`:e<=W.zoomTiers.structure.maxRatio?`structure`:`overview`}var G=i(),ti={iterations:50,settings:{barnesHutOptimize:!0,barnesHutTheta:.5,adjustSizes:!1,gravity:1,slowDown:10}},ni={allowInvalidContainer:!0,labelRenderedSizeThreshold:3,defaultNodeType:`circle`,defaultEdgeType:`line`,hideEdgesOnMove:!0,webGLTarget:`webgl2`},ri=W.focus.maxNeighbors,ii=W.focus.ringCapacity,vee=W.focus.ringGap,yee=W.focus.primaryLabels;function ai(e){let t=new Set;for(let n=0;n<e.length-1;n+=1)t.add(`${e[n]}::${e[n+1]}`),t.add(`${e[n+1]}::${e[n]}`);return t}function bee(e,t){let n=0;if(dt.hasDirectedEdge(e,t)){let r=dt.getDirectedEdgeAttributes(e,t);n=Math.max(n,Number(r?.weight??0))}if(dt.hasDirectedEdge(t,e)){let r=dt.getDirectedEdgeAttributes(t,e);n=Math.max(n,Number(r?.weight??0))}return n}function oi(e){return dt.neighbors(e).map(t=>({id:t,weight:bee(e,t),degree:dt.degree(t)})).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.id.localeCompare(t.id):t.degree-e.degree:t.weight-e.weight).map(e=>e.id)}function si(e){let t=oi(e).slice(0,ri);return new Set([e,...t])}function ci(e,t,n,r){let i=String(n.baseColor||r||e.palette.semantic[0]);switch(e.nodes.states[t].color){case`selected`:return e.palette.accent.selected;case`hovered`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`muted`:return String(n.mutedColor||Qr(i,e.nodes.mutedAlpha));default:return i}}function li(e,t,n,r){let i=String(n.baseColor||r||e.palette.muted.edgeInspection);switch(e.edges.states[t].color){case`hover`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`focus`:return e.palette.muted.edgeFocus;case`overview`:return e.palette.muted.edgeOverview;case`structure`:return e.palette.muted.edgeStructure;case`inspection`:return e.palette.muted.edgeInspection;case`muted`:return String(n.mutedColor||e.palette.muted.edgeOverview);default:return i}}function ui(e,t,n,r,i){return t&&e===t?`hovered`:n&&e===n?`selected`:i.has(e)?`path`:r.has(e)?`neighbor`:t||n||i.size>0?`muted`:`default`}function di(e,t,n,r,i,a){let o=`${e}::${t}`,s=n||r;return a.has(o)?`path`:s&&(e===s||t===s)?n?`hovered`:`selected`:i.has(e)&&i.has(t)?`neighbor`:n||r||a.size>0?`muted`:`default`}function fi(e,t,n,r,i){let a=e.zoomTiers[t],o=e.nodes.states[n],s=Number(r.baseSize||r.size||4),c=Number(r.labelPriority??0),l=e.labels.forceVisibleStates.includes(n),u=ci(e,n,r,r.color),d=n===`default`?a.nodeScale:o.sizeMultiplier,f=l||o.forceLabel||c>=a.labelThreshold;return{color:u,size:Math.max(s*d,o.minSize),forceLabel:f,label:f?i:``,zIndex:f&&o.zIndex===0?1:o.zIndex,hidden:!1,borderColor:r.strokeColor||r.borderColor||e.palette.background.nodeBorder,borderSize:r.borderSize}}function pi(e,t,n,r){return e.edges.states[n].forceArrow?`arrow`:n===`neighbor`?t===`inspection`||r.isBidirectional?`arrow`:`line`:n===`default`?Number(r.visualPriority??0)>=e.zoomTiers[t].arrowPriorityThreshold||r.isBidirectional?`arrow`:`line`:r.type||`line`}function mi(e,t,n,r){let i=e.zoomTiers[t],a=e.edges.states[n],o=Number(r.baseSize||r.size||.9),s=Number(r.visualPriority??0),c=n===`default`&&s<i.edgePriorityThreshold&&!r.isBidirectional;if(a.hide||c)return{hidden:!0,zIndex:0};let l=n===`default`?i.edgeSizeScale:a.sizeMultiplier;return{hidden:!1,type:pi(e,t,n,r),color:li(e,n,r,r.color),size:Math.max(o*l,a.minSize),zIndex:a.zIndex}}function hi(e,t){let n=new it({type:`directed`,multi:!1,allowSelfLoops:!1}),r=oi(e).slice(0,ri),i=new Set([e,...r]),a=new Set(r.slice(0,yee)),o=new Set(t),s=ai(t),c=(e,t)=>{n.hasNode(e)||n.addNode(e,t)},l=dt.getNodeAttributes(e),u=fi(W,`inspection`,`selected`,l,l.label);c(e,{...l,x:0,y:0,color:u.color,size:Math.max(u.size,22),label:u.label}),r.forEach((e,t)=>{let n=dt.getNodeAttributes(e),i=Math.floor(t/ii),s=t%ii,l=Math.min(ii,r.length-i*ii),u=vee*(i+1),d=Math.PI*2*s/l-Math.PI/2,f=fi(W,`inspection`,o.has(e)?`path`:a.has(e)?`neighbor`:`default`,{...n,labelPriority:a.has(e)||o.has(e)?Math.max(Number(n.labelPriority??0),1):0},n.label);c(e,{...n,x:Math.cos(d)*u,y:Math.sin(d)*u,color:f.color,size:Math.max(f.size,8.5),label:f.label})});for(let t of i)for(let r of i){if(t===r||!dt.hasDirectedEdge(t,r))continue;let i=dt.getDirectedEdgeAttributes(t,r),a=mi(W,`inspection`,s.has(`${t}::${r}`)?`path`:t===e||r===e?`selected`:`neighbor`,i);n.mergeDirectedEdge(t,r,{...i,type:a.type,size:a.size,color:a.color})}return n}function gi(e,t){let{zoomTier:n,hoveredNodeId:r,selectedNodeId:i,activePath:a}=t,o=r||i,s=o&&dt.hasNode(o)?si(o):new Set,c=new Set(a),l=ai(a);e.setSetting(`nodeReducer`,(e,t)=>{let a=t,o=fi(W,n,ui(e,r,i,s,c),a,t.label);return{...t,color:o.color,size:o.size,forceLabel:o.forceLabel,label:o.label,zIndex:o.zIndex,hidden:o.hidden,borderColor:o.borderColor,borderSize:o.borderSize}}),e.setSetting(`edgeReducer`,(e,t)=>{let a=t,[o,c]=dt.extremities(e),u=mi(W,n,di(o,c,r,i,s,l),a);return{...t,hidden:u.hidden,type:u.type,color:u.color,size:u.size,zIndex:u.zIndex}}),e.refresh()}function _i(e,t,n,r,i,a){return{hoveredNodeId:e,selectedNodeId:t,focusedNodeId:t,activePath:n,viewMode:r,zoomTier:i,isLayoutRunning:a}}function vi(e,t,n){for(let r of e)if(r.performAction?.(t,n))return}var xee=(0,l.forwardRef)(function({onNodeClick:e,selectedNodeId:t,activePath:n=[],isLayoutRunning:r,viewMode:i,className:a,pluginOverlays:o=[],onPluginRuntimeChange:s,onInteractionStateChange:c},u){let d=(0,l.useRef)(null),f=(0,l.useRef)(null),p=(0,l.useRef)(null),m=(0,l.useRef)(null),h=(0,l.useRef)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(`overview`),b=(0,l.useMemo)(()=>[Ur,Wr,Gr,Kr(),qr(),Jr,Yr()],[]),x=i===`focused`&&!!t&&dt.hasNode(t),S=(0,l.useMemo)(()=>x&&t?hi(t,n):dt,[n,x,t]),C=(0,l.useMemo)(()=>_i(g,t,n,i,v,r),[n,g,r,t,i,v]),w=(0,l.useRef)(C);w.current=C;let T=(0,l.useCallback)(e=>{let t=p.current;if(!t)return;if(x){t.getCamera().animatedReset({duration:W.motion.cameraMs}),t.refresh();return}let n=t.getNodeDisplayData(e);if(!n){t.getCamera().animatedReset({duration:W.motion.cameraMs});return}t.getCamera().animate({x:n.x,y:n.y,ratio:.3},{duration:W.motion.cameraMs,easing:`quadraticOut`})},[x]),E=(0,l.useCallback)(()=>{let e=p.current;if(e){if(t){T(t);return}e.getCamera().animatedReset({duration:W.motion.cameraMs})}},[T,t]),D=(0,l.useCallback)(e=>{let t=h.current;t&&vi(b,t,e)},[b]),O=(0,l.useCallback)(t=>{let n=t??p.current;if(!n)return null;let r={sigma:n,graph:dt,displayGraph:S,getInteractionState:()=>w.current,setHoveredNodeId:_,onNodeSelectionChange:e,focusNodeInView:T,fitCurrentView:E,dispatchAction:D};return h.current=r,r},[S,D,E,T,e]),ee=(0,l.useCallback)((e,...t)=>{let n=O();if(n)for(let r of b){let i=r[e];typeof i==`function`&&i(n,...t)}},[b,O]);(0,l.useImperativeHandle)(u,()=>({getSigma:()=>p.current,fitView:()=>D({type:`fitView`}),focusNode:e=>D({type:`focusNode`,nodeId:e})}),[D]),(0,l.useEffect)(()=>{if(!d.current)return;let e=new _ee(S,d.current,ni);p.current=e,s?.({sigma:e,graph:dt,displayGraph:S});let t=e.getCamera(),n=O(e);if(n)for(let e of b)e.attach(n);let r=()=>{let e={x:t.getState().x,y:t.getState().y,ratio:t.getState().ratio},n=ei(e.ratio);y(e=>e===n?e:n),ee(`onCameraChange`,e)},i=new ResizeObserver(()=>{d.current&&d.current.offsetWidth>0&&e.refresh()});return i.observe(d.current),t.on(`updated`,r),e.on(`clickNode`,({node:e})=>ee(`onNodeClick`,e)),e.on(`clickStage`,()=>ee(`onStageClick`)),e.on(`enterNode`,({node:e})=>ee(`onNodeEnter`,e)),e.on(`leaveNode`,({node:e})=>ee(`onNodeLeave`,e)),requestAnimationFrame(()=>{r(),D({type:`fitView`})}),()=>{if(n)for(let e of b)e.detach(n);t.off(`updated`,r),i.disconnect(),e.kill(),h.current=null,p.current=null,s?.(null)}},[b,D,ee,S,O,s]),(0,l.useEffect)(()=>{let e=O();if(e){for(let t of b)t.onStateChange?.(e,C);for(let t of b)t.apply?.(e,C);c?.(C)}},[b,O,C,c]),(0,l.useEffect)(()=>{let e=p.current;!e||S!==dt||gi(e,C)},[S,C]),(0,l.useEffect)(()=>{let e=p.current,t=f.current,n=d.current;if(!e||!t||!n)return;let r=0,i=()=>{let a=n.getBoundingClientRect(),o=window.devicePixelRatio||1;(t.width!==Math.floor(a.width*o)||t.height!==Math.floor(a.height*o))&&(t.width=Math.floor(a.width*o),t.height=Math.floor(a.height*o),t.style.width=`${a.width}px`,t.style.height=`${a.height}px`);let s=t.getContext(`2d`);if(!s){r=window.requestAnimationFrame(i);return}s.setTransform(o,0,0,o,0,0),s.clearRect(0,0,a.width,a.height);let c=C.hoveredNodeId||C.selectedNodeId,l=new Set([...C.activePath,...c?[c]:[]]),u=ai(C.activePath),d=performance.now()/1e3;if(l.forEach(t=>{let n=e.getNodeDisplayData(t);if(!n)return;let r=e.graphToViewport({x:n.x,y:n.y}),i=t===c?Qr(W.palette.accent.hovered,W.overlays.hoverGlowAlpha):Qr(W.palette.accent.path,W.overlays.pathGlowAlpha),a=Math.max(n.size*W.overlays.glowRadiusMultiplier,W.overlays.minGlowRadius),o=s.createRadialGradient(r.x,r.y,0,r.x,r.y,a);o.addColorStop(0,i),o.addColorStop(1,`rgba(0,0,0,0)`),s.fillStyle=o,s.beginPath(),s.arc(r.x,r.y,a,0,Math.PI*2),s.fill()}),C.activePath.length>1)for(let t=0;t<C.activePath.length-1;t+=1){let n=C.activePath[t],r=C.activePath[t+1];if(!u.has(`${n}::${r}`))continue;let i=e.getNodeDisplayData(n),a=e.getNodeDisplayData(r);if(!i||!a)continue;let o=e.graphToViewport({x:i.x,y:i.y}),c=e.graphToViewport({x:a.x,y:a.y}),l=(d*.22+t*.17)%1,f=o.x+(c.x-o.x)*l,p=o.y+(c.y-o.y)*l,m=s.createRadialGradient(f,p,0,f,p,W.overlays.pulseRadius);m.addColorStop(0,W.palette.accent.path),m.addColorStop(1,`rgba(0,0,0,0)`),s.fillStyle=m,s.beginPath(),s.arc(f,p,W.overlays.pulseRadius,0,Math.PI*2),s.fill()}r=window.requestAnimationFrame(i)};return i(),()=>{window.cancelAnimationFrame(r)}},[C]),(0,l.useEffect)(()=>{if(t||x){m.current?.stop();return}return r?(m.current||=new Hr.default(dt,ti),m.current.start()):m.current?.stop(),()=>{m.current?.stop()}},[x,r,t]),(0,l.useEffect)(()=>()=>{m.current?.kill(),m.current=null},[]);let k=(0,l.useCallback)(()=>{E()},[E]);return(0,G.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`},children:[(0,G.jsx)(`div`,{ref:d,className:a,style:{width:`100%`,height:`100%`,background:`transparent`}}),(0,G.jsx)(`canvas`,{ref:f,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:4}}),o.length?(0,G.jsx)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,zIndex:6},children:o.map((e,t)=>(0,G.jsx)(`div`,{style:{position:`absolute`,inset:0},children:e},`graph-plugin-overlay-${t}`))}):null,(0,G.jsx)(`button`,{id:`graph-fit-view-btn`,onClick:k,style:{position:`absolute`,bottom:24,left:24,padding:`8px 16px`,background:`linear-gradient(135deg, rgba(27, 79, 170, 0.9), rgba(53, 123, 255, 0.84))`,color:`#fff`,border:`1px solid ${W.palette.background.shellBorder}`,borderRadius:10,cursor:`pointer`,fontWeight:700,zIndex:10,backdropFilter:`blur(10px)`,boxShadow:`0 10px 28px ${W.palette.background.shellGlow}`,fontSize:12,letterSpacing:`0.01em`},children:`Fit View`})]})}),yi=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var xi={exports:{}},Si={},Ci,wi;function Ti(){if(wi)return Ci;wi=1;var e=function(e){return e&&e.Math===Math&&e};return Ci=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof yi==`object`&&yi)||e(typeof Ci==`object`&&Ci)||(function(){return this})()||Function(`return this`)(),Ci}var Ei,Di;function Oi(){return Di?Ei:(Di=1,Ei=function(e){try{return!!e()}catch{return!0}},Ei)}var ki,Ai;function ji(){return Ai?ki:(Ai=1,ki=!Oi()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),ki)}var Mi,Ni;function Pi(){if(Ni)return Mi;Ni=1;var e=ji(),t=Function.prototype,n=t.apply,r=t.call;return Mi=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Mi}var Fi,Ii;function Li(){if(Ii)return Fi;Ii=1;var e=ji(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Fi=e?r:function(e){return function(){return n.apply(e,arguments)}},Fi}var Ri,zi;function Bi(){if(zi)return Ri;zi=1;var e=Li(),t=e({}.toString),n=e(``.slice);return Ri=function(e){return n(t(e),8,-1)},Ri}var Vi,Hi;function Ui(){if(Hi)return Vi;Hi=1;var e=Bi(),t=Li();return Vi=function(n){if(e(n)===`Function`)return t(n)},Vi}var Wi,Gi;function Ki(){if(Gi)return Wi;Gi=1;var e=typeof document==`object`&&document.all;return Wi=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},Wi}var qi={},Ji,Yi;function Xi(){return Yi?Ji:(Yi=1,Ji=!Oi()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ji)}var Zi,Qi;function $i(){if(Qi)return Zi;Qi=1;var e=ji(),t=Function.prototype.call;return Zi=e?t.bind(t):function(){return t.apply(t,arguments)},Zi}var ea={},ta;function na(){if(ta)return ea;ta=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return ea.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,ea}var ra,ia;function aa(){return ia?ra:(ia=1,ra=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ra)}var oa,sa;function ca(){if(sa)return oa;sa=1;var e=Li(),t=Oi(),n=Bi(),r=Object,i=e(``.split);return oa=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,oa}var la,ua;function da(){return ua?la:(ua=1,la=function(e){return e==null},la)}var fa,pa;function ma(){if(pa)return fa;pa=1;var e=da(),t=TypeError;return fa=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},fa}var ha,ga;function _a(){if(ga)return ha;ga=1;var e=ca(),t=ma();return ha=function(n){return e(t(n))},ha}var va,ya;function ba(){if(ya)return va;ya=1;var e=Ki();return va=function(t){return typeof t==`object`?t!==null:e(t)},va}var xa,Sa;function Ca(){return Sa?xa:(Sa=1,xa={},xa)}var wa,Ta;function Ea(){if(Ta)return wa;Ta=1;var e=Ca(),t=Ti(),n=Ki(),r=function(e){return n(e)?e:void 0};return wa=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},wa}var Da,Oa;function ka(){return Oa?Da:(Oa=1,Da=Li()({}.isPrototypeOf),Da)}var Aa,ja;function Ma(){if(ja)return Aa;ja=1;var e=Ti().navigator,t=e&&e.userAgent;return Aa=t?String(t):``,Aa}var Na,Pa;function Fa(){if(Pa)return Na;Pa=1;var e=Ti(),t=Ma(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Na=s,Na}var Ia,La;function Ra(){if(La)return Ia;La=1;var e=Fa(),t=Oi(),n=Ti().String;return Ia=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ia}var za,Ba;function Va(){return Ba?za:(Ba=1,za=Ra()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,za)}var Ha,Ua;function Wa(){if(Ua)return Ha;Ua=1;var e=Ea(),t=Ki(),n=ka(),r=Va(),i=Object;return Ha=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},Ha}var Ga,Ka;function qa(){if(Ka)return Ga;Ka=1;var e=String;return Ga=function(t){try{return e(t)}catch{return`Object`}},Ga}var Ja,Ya;function Xa(){if(Ya)return Ja;Ya=1;var e=Ki(),t=qa(),n=TypeError;return Ja=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Ja}var Za,Qa;function $a(){if(Qa)return Za;Qa=1;var e=Xa(),t=da();return Za=function(n,r){var i=n[r];return t(i)?void 0:e(i)},Za}var eo,to;function no(){if(to)return eo;to=1;var e=$i(),t=Ki(),n=ba(),r=TypeError;return eo=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},eo}var ro={exports:{}},io,ao;function oo(){return ao?io:(ao=1,io=!0,io)}var so,co;function lo(){if(co)return so;co=1;var e=Ti(),t=Object.defineProperty;return so=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},so}var uo;function fo(){if(uo)return ro.exports;uo=1;var e=oo(),t=Ti(),n=lo(),r=`__core-js_shared__`,i=ro.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),ro.exports}var po,mo;function ho(){if(mo)return po;mo=1;var e=fo();return po=function(t,n){return e[t]||(e[t]=n||{})},po}var go,_o;function vo(){if(_o)return go;_o=1;var e=ma(),t=Object;return go=function(n){return t(e(n))},go}var yo,bo;function xo(){if(bo)return yo;bo=1;var e=Li(),t=vo(),n=e({}.hasOwnProperty);return yo=Object.hasOwn||function(e,r){return n(t(e),r)},yo}var So,Co;function wo(){if(Co)return So;Co=1;var e=Li(),t=0,n=Math.random(),r=e(1.1.toString);return So=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},So}var To,Eo;function Do(){if(Eo)return To;Eo=1;var e=Ti(),t=ho(),n=xo(),r=wo(),i=Ra(),a=Va(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return To=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},To}var Oo,ko;function Ao(){if(ko)return Oo;ko=1;var e=$i(),t=ba(),n=Wa(),r=$a(),i=no(),a=Do(),o=TypeError,s=a(`toPrimitive`);return Oo=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},Oo}var jo,Mo;function No(){if(Mo)return jo;Mo=1;var e=Ao(),t=Wa();return jo=function(n){var r=e(n,`string`);return t(r)?r:r+``},jo}var Po,Fo;function Io(){if(Fo)return Po;Fo=1;var e=Ti(),t=ba(),n=e.document,r=t(n)&&t(n.createElement);return Po=function(e){return r?n.createElement(e):{}},Po}var Lo,Ro;function zo(){if(Ro)return Lo;Ro=1;var e=Xi(),t=Oi(),n=Io();return Lo=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),Lo}var Bo;function Vo(){if(Bo)return qi;Bo=1;var e=Xi(),t=$i(),n=na(),r=aa(),i=_a(),a=No(),o=xo(),s=zo(),c=Object.getOwnPropertyDescriptor;return qi.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},qi}var Ho,Uo;function Wo(){if(Uo)return Ho;Uo=1;var e=Oi(),t=Ki(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return Ho=r,Ho}var Go,Ko;function qo(){if(Ko)return Go;Ko=1;var e=Ui(),t=Xa(),n=ji(),r=e(e.bind);return Go=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},Go}var Jo={},Yo,Xo;function Zo(){return Xo?Yo:(Xo=1,Yo=Xi()&&Oi()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Yo)}var Qo,$o;function es(){if($o)return Qo;$o=1;var e=ba(),t=String,n=TypeError;return Qo=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},Qo}var ts;function ns(){if(ts)return Jo;ts=1;var e=Xi(),t=zo(),n=Zo(),r=es(),i=No(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return Jo.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},Jo}var rs,is;function as(){if(is)return rs;is=1;var e=Xi(),t=ns(),n=aa();return rs=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},rs}var os,ss;function cs(){if(ss)return os;ss=1;var e=Ti(),t=Pi(),n=Ui(),r=Ki(),i=Vo().f,a=Wo(),o=Ca(),s=qo(),c=as(),l=xo(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return os=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},os}var ls;function us(){if(ls)return Si;ls=1;var e=cs(),t=Xi(),n=ns().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),Si}var ds;function fs(){if(ds)return xi.exports;ds=1,us();var e=Ca().Object,t=xi.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),xi.exports}var ps,ms;function hs(){return ms?ps:(ms=1,ps=fs(),ps)}var gs,_s;function vs(){return _s?gs:(_s=1,gs=hs(),gs)}var ys,bs;function xs(){return bs?ys:(bs=1,ys=vs(),ys)}var Ss,Cs;function ws(){return Cs?Ss:(Cs=1,Ss=xs(),Ss)}var Ts=bi(ws()),Es={},Ds,Os;function ks(){if(Os)return Ds;Os=1;var e=Bi();return Ds=Array.isArray||function(t){return e(t)===`Array`},Ds}var As,js;function See(){if(js)return As;js=1;var e=Math.ceil,t=Math.floor;return As=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},As}var Ms,Ns;function Ps(){if(Ns)return Ms;Ns=1;var e=See();return Ms=function(t){var n=+t;return n!==n||n===0?0:e(n)},Ms}var Fs,Is;function Ls(){if(Is)return Fs;Is=1;var e=Ps(),t=Math.min;return Fs=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},Fs}var Rs,zs;function Bs(){if(zs)return Rs;zs=1;var e=Ls();return Rs=function(t){return e(t.length)},Rs}var Vs,Hs;function Us(){if(Hs)return Vs;Hs=1;var e=TypeError,t=9007199254740991;return Vs=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},Vs}var Ws,Gs;function Ks(){if(Gs)return Ws;Gs=1;var e=Xi(),t=ns(),n=aa();return Ws=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},Ws}var qs,Js;function Ys(){if(Js)return qs;Js=1;var e=Do()(`toStringTag`),t={};return t[e]=`z`,qs=String(t)===`[object z]`,qs}var Xs,Zs;function Qs(){if(Zs)return Xs;Zs=1;var e=Ys(),t=Ki(),n=Bi(),r=Do()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return Xs=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},Xs}var $s,ec;function tc(){if(ec)return $s;ec=1;var e=Li(),t=Ki(),n=fo(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),$s=n.inspectSource,$s}var nc,rc;function ic(){if(rc)return nc;rc=1;var e=Li(),t=Oi(),n=Ki(),r=Qs(),i=Ea(),a=tc(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,nc=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,nc}var ac,oc;function sc(){if(oc)return ac;oc=1;var e=ks(),t=ic(),n=ba(),r=Do()(`species`),i=Array;return ac=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},ac}var cc,lc;function uc(){if(lc)return cc;lc=1;var e=sc();return cc=function(t,n){return new(e(t))(n===0?0:n)},cc}var dc,fc;function pc(){if(fc)return dc;fc=1;var e=Oi(),t=Do(),n=Fa(),r=t(`species`);return dc=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},dc}var mc;function hc(){if(mc)return Es;mc=1;var e=cs(),t=Oi(),n=ks(),r=ba(),i=vo(),a=Bs(),o=Us(),s=Ks(),c=uc(),l=pc(),u=Do(),d=Fa(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),Es}var gc={},_c={},vc,yc;function bc(){if(yc)return vc;yc=1;var e=Qs(),t=String;return vc=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},vc}var xc={},Sc,Cc;function wc(){if(Cc)return Sc;Cc=1;var e=Ps(),t=Math.max,n=Math.min;return Sc=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},Sc}var Tc,Ec;function Dc(){if(Ec)return Tc;Ec=1;var e=_a(),t=wc(),n=Bs(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return Tc={includes:r(!0),indexOf:r(!1)},Tc}var Oc,kc;function Ac(){return kc?Oc:(kc=1,Oc={},Oc)}var jc,Mc;function Nc(){if(Mc)return jc;Mc=1;var e=Li(),t=xo(),n=_a(),r=Dc().indexOf,i=Ac(),a=e([].push);return jc=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},jc}var Pc,Fc;function Ic(){return Fc?Pc:(Fc=1,Pc=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Pc)}var Lc,Rc;function zc(){if(Rc)return Lc;Rc=1;var e=Nc(),t=Ic();return Lc=Object.keys||function(n){return e(n,t)},Lc}var Bc;function Vc(){if(Bc)return xc;Bc=1;var e=Xi(),t=Zo(),n=ns(),r=es(),i=_a(),a=zc();return xc.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},xc}var Hc,Uc;function Wc(){return Uc?Hc:(Uc=1,Hc=Ea()(`document`,`documentElement`),Hc)}var Gc,Kc;function qc(){if(Kc)return Gc;Kc=1;var e=ho(),t=wo(),n=e(`keys`);return Gc=function(e){return n[e]||(n[e]=t(e))},Gc}var Jc,Yc;function Xc(){if(Yc)return Jc;Yc=1;var e=es(),t=Vc(),n=Ic(),r=Ac(),i=Wc(),a=Io(),o=qc(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,Jc=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},Jc}var Zc={},Qc;function $c(){if(Qc)return Zc;Qc=1;var e=Nc(),t=Ic().concat(`length`,`prototype`);return Zc.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Zc}var el={},tl,nl;function rl(){return nl?tl:(nl=1,tl=Li()([].slice),tl)}var il;function al(){if(il)return el;il=1;var e=Bi(),t=_a(),n=$c().f,r=rl(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return el.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},el}var ol={},sl;function cl(){return sl?ol:(sl=1,ol.f=Object.getOwnPropertySymbols,ol)}var ll,ul;function dl(){if(ul)return ll;ul=1;var e=as();return ll=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},ll}var fl,pl;function ml(){if(pl)return fl;pl=1;var e=ns();return fl=function(t,n,r){return e.f(t,n,r)},fl}var hl={},gl;function _l(){return gl?hl:(gl=1,hl.f=Do(),hl)}var vl,yl;function bl(){if(yl)return vl;yl=1;var e=Ca(),t=xo(),n=_l(),r=ns().f;return vl=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},vl}var xl,Sl;function Cl(){if(Sl)return xl;Sl=1;var e=$i(),t=Ea(),n=Do(),r=dl();return xl=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},xl}var wl,Tl;function Cee(){if(Tl)return wl;Tl=1;var e=Ys(),t=Qs();return wl=e?{}.toString:function(){return`[object `+t(this)+`]`},wl}var El,Dl;function Ol(){if(Dl)return El;Dl=1;var e=Ys(),t=ns().f,n=as(),r=xo(),i=Cee(),a=Do()(`toStringTag`);return El=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},El}var kl,Al;function wee(){if(Al)return kl;Al=1;var e=Ti(),t=Ki(),n=e.WeakMap;return kl=t(n)&&/native code/.test(String(n)),kl}var jl,Ml;function Nl(){if(Ml)return jl;Ml=1;var e=wee(),t=Ti(),n=ba(),r=as(),i=xo(),a=fo(),o=qc(),s=Ac(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return jl={set:d,get:f,has:p,enforce:m,getterFor:h},jl}var Pl,Fl;function Il(){if(Fl)return Pl;Fl=1;var e=qo(),t=Li(),n=ca(),r=vo(),i=Bs(),a=uc(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return Pl={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Pl}var Ll;function Rl(){if(Ll)return _c;Ll=1;var e=cs(),t=Ti(),n=$i(),r=Li(),i=oo(),a=Xi(),o=Ra(),s=Oi(),c=xo(),l=ka(),u=es(),d=_a(),f=No(),p=bc(),m=aa(),h=Xc(),g=zc(),_=$c(),v=al(),y=cl(),b=Vo(),x=ns(),S=Vc(),C=na(),w=dl(),T=ml(),E=ho(),D=qc(),O=Ac(),ee=wo(),k=Do(),A=_l(),j=bl(),M=Cl(),N=Ol(),P=Nl(),te=Il().forEach,F=D(`hidden`),I=`Symbol`,ne=`prototype`,re=P.set,ie=P.getterFor(I),ae=Object[ne],oe=t.Symbol,se=oe&&oe[ne],ce=t.RangeError,L=t.TypeError,R=t.QObject,le=b.f,z=x.f,B=v.f,V=C.f,ue=r([].push),de=E(`symbols`),fe=E(`op-symbols`),pe=E(`wks`),me=!R||!R[ne]||!R[ne].findChild,he=function(e,t,n){var r=le(ae,t);r&&delete ae[t],z(e,t,n),r&&e!==ae&&z(ae,t,r)},ge=a&&s(function(){return h(z({},`a`,{get:function(){return z(this,`a`,{value:7}).a}})).a!==7})?he:z,_e=function(e,t){var n=de[e]=h(se);return re(n,{type:I,tag:e,description:t}),a||(n.description=t),n},ve=function(e,t,n){e===ae&&ve(fe,t,n),u(e);var r=f(t);return u(n),c(de,r)?(n.enumerable?(c(e,F)&&e[F][r]&&(e[F][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,F)||z(e,F,m(1,h(null))),e[F][r]=!0),ge(e,r,n)):z(e,r,n)},ye=function(e,t){u(e);var r=d(t);return te(g(r).concat(we(r)),function(t){(!a||n(xe,r,t))&&ve(e,t,r[t])}),e},be=function(e,t){return t===void 0?h(e):ye(h(e),t)},xe=function(e){var t=f(e),r=n(V,this,t);return this===ae&&c(de,t)&&!c(fe,t)?!1:r||!c(this,t)||!c(de,t)||c(this,F)&&this[F][t]?r:!0},Se=function(e,t){var n=d(e),r=f(t);if(!(n===ae&&c(de,r)&&!c(fe,r))){var i=le(n,r);return i&&c(de,r)&&!(c(n,F)&&n[F][r])&&(i.enumerable=!0),i}},Ce=function(e){var t=B(d(e)),n=[];return te(t,function(e){!c(de,e)&&!c(O,e)&&ue(n,e)}),n},we=function(e){var t=e===ae,n=B(t?fe:d(e)),r=[];return te(n,function(e){c(de,e)&&(!t||c(ae,e))&&ue(r,de[e])}),r};return o||(oe=function(){if(l(se,this))throw new L(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=ee(e),i=function(e){var a=this===void 0?t:this;a===ae&&n(i,fe,e),c(a,F)&&c(a[F],r)&&(a[F][r]=!1);var o=m(1,e);try{ge(a,r,o)}catch(e){if(!(e instanceof ce))throw e;he(a,r,o)}};return a&&me&&ge(ae,r,{configurable:!0,set:i}),_e(r,e)},se=oe[ne],w(se,`toString`,function(){return ie(this).tag}),w(oe,`withoutSetter`,function(e){return _e(ee(e),e)}),C.f=xe,x.f=ve,S.f=ye,b.f=Se,_.f=v.f=Ce,y.f=we,A.f=function(e){return _e(k(e),e)},a&&(T(se,`description`,{configurable:!0,get:function(){return ie(this).description}}),i||w(ae,`propertyIsEnumerable`,xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:oe}),te(g(pe),function(e){j(e)}),e({target:I,stat:!0,forced:!o},{useSetter:function(){me=!0},useSimple:function(){me=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:be,defineProperty:ve,defineProperties:ye,getOwnPropertyDescriptor:Se}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:Ce}),M(),N(oe,I),O[F]=!0,_c}var zl={},Bl,Vl;function Hl(){return Vl?Bl:(Vl=1,Bl=Ra()&&!!Symbol.for&&!!Symbol.keyFor,Bl)}var Ul;function Wl(){if(Ul)return zl;Ul=1;var e=cs(),t=Ea(),n=xo(),r=bc(),i=ho(),a=Hl(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),zl}var Gl={},Kl;function ql(){if(Kl)return Gl;Kl=1;var e=cs(),t=xo(),n=Wa(),r=qa(),i=ho(),a=Hl(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Gl}var Jl={},Yl,Xl;function Zl(){if(Xl)return Yl;Xl=1;var e=Li(),t=ks(),n=Ki(),r=Bi(),i=bc(),a=e([].push);return Yl=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},Yl}var Ql;function $l(){if(Ql)return Jl;Ql=1;var e=cs(),t=Ea(),n=Pi(),r=$i(),i=Li(),a=Oi(),o=Ki(),s=Wa(),c=rl(),l=Zl(),u=Ra(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),Jl}var eu={},tu;function nu(){if(tu)return eu;tu=1;var e=cs(),t=Ra(),n=Oi(),r=cl(),i=vo();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),eu}var ru;function iu(){return ru?gc:(ru=1,Rl(),Wl(),ql(),$l(),nu(),gc)}var au={},ou;function su(){return ou?au:(ou=1,bl()(`asyncDispose`),au)}var cu={},lu;function uu(){return lu?cu:(lu=1,bl()(`asyncIterator`),cu)}var du={},fu;function pu(){return fu?du:(fu=1,bl()(`dispose`),du)}var mu={},hu;function gu(){return hu?mu:(hu=1,bl()(`hasInstance`),mu)}var _u={},vu;function yu(){return vu?_u:(vu=1,bl()(`isConcatSpreadable`),_u)}var bu={},xu;function Su(){return xu?bu:(xu=1,bl()(`iterator`),bu)}var Cu={},wu;function Tu(){return wu?Cu:(wu=1,bl()(`match`),Cu)}var Eu={},Du;function Ou(){return Du?Eu:(Du=1,bl()(`matchAll`),Eu)}var ku={},Au;function ju(){return Au?ku:(Au=1,bl()(`replace`),ku)}var Mu={},Nu;function Pu(){return Nu?Mu:(Nu=1,bl()(`search`),Mu)}var Fu={},Iu;function Lu(){return Iu?Fu:(Iu=1,bl()(`species`),Fu)}var Ru={},zu;function Bu(){return zu?Ru:(zu=1,bl()(`split`),Ru)}var Vu={},Hu;function Uu(){if(Hu)return Vu;Hu=1;var e=bl(),t=Cl();return e(`toPrimitive`),t(),Vu}var Wu={},Gu;function Ku(){if(Gu)return Wu;Gu=1;var e=Ea(),t=bl(),n=Ol();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),Wu}var qu={},Ju;function Yu(){return Ju?qu:(Ju=1,bl()(`unscopables`),qu)}var Xu={},Zu;function Qu(){return Zu?Xu:(Zu=1,Ol()(Ti().JSON,`JSON`,!0),Xu)}var $u,ed;function td(){return ed?$u:(ed=1,hc(),iu(),su(),uu(),pu(),gu(),yu(),Su(),Tu(),Ou(),ju(),Pu(),Lu(),Bu(),Uu(),Ku(),Yu(),Qu(),$u=Ca().Symbol,$u)}var nd={},rd,id;function ad(){return id?rd:(id=1,rd=function(){},rd)}var od,sd;function cd(){return sd?od:(sd=1,od={},od)}var ld,ud;function dd(){if(ud)return ld;ud=1;var e=Xi(),t=xo(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return ld={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},ld}var fd,pd;function md(){return pd?fd:(pd=1,fd=!Oi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),fd)}var hd,gd;function _d(){if(gd)return hd;gd=1;var e=xo(),t=Ki(),n=vo(),r=qc(),i=md(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return hd=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},hd}var vd,yd;function bd(){if(yd)return vd;yd=1;var e=Oi(),t=Ki(),n=ba(),r=Xc(),i=_d(),a=dl(),o=Do(),s=oo(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),vd={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},vd}var xd,Sd;function Cd(){if(Sd)return xd;Sd=1;var e=bd().IteratorPrototype,t=Xc(),n=aa(),r=Ol(),i=cd(),a=function(){return this};return xd=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},xd}var wd,Td;function Tee(){if(Td)return wd;Td=1;var e=Li(),t=Xa();return wd=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},wd}var Ed,Dd;function Eee(){if(Dd)return Ed;Dd=1;var e=ba();return Ed=function(t){return e(t)||t===null},Ed}var Od,kd;function Dee(){if(kd)return Od;kd=1;var e=Eee(),t=String,n=TypeError;return Od=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Od}var Ad,jd;function Oee(){if(jd)return Ad;jd=1;var e=Tee(),t=ba(),n=ma(),r=Dee();return Ad=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),Ad}var Md,Nd;function Pd(){if(Nd)return Md;Nd=1;var e=cs(),t=$i(),n=oo(),r=dd(),i=Ki(),a=Cd(),o=_d(),s=Oee(),c=Ol(),l=as(),u=dl(),d=Do(),f=cd(),p=bd(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return Md=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),M=d===`Array`&&k.entries||A,N,P,te;if(M&&(N=o(M.call(new r)),N!==Object.prototype&&N.next&&(!n&&o(N)!==g&&(s?s(N,g):i(N[v])||u(N,v,S)),c(N,O,!0,!0),n&&(f[O]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,j=function(){return t(A,this)})),w)if(P={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(te in P)(_||ee||!(te in k))&&u(k,te,P[te]);else e({target:d,proto:!0,forced:_||ee},P);return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,P},Md}var Fd,Id;function Ld(){return Id?Fd:(Id=1,Fd=function(e,t){return{value:e,done:t}},Fd)}var Rd,zd;function Bd(){if(zd)return Rd;zd=1;var e=_a(),t=ad(),n=cd(),r=Nl(),i=ns().f,a=Pd(),o=Ld(),s=oo(),c=Xi(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Rd=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return Rd}var Vd,Hd;function kee(){return Hd?Vd:(Hd=1,Vd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vd)}var Ud;function Wd(){if(Ud)return nd;Ud=1,Bd();var e=kee(),t=Ti(),n=Ol(),r=cd();for(var i in e)n(t[i],i),r[i]=r.Array;return nd}var Gd,Kd;function qd(){if(Kd)return Gd;Kd=1;var e=td();return Wd(),Gd=e,Gd}var Jd={},Yd;function Xd(){if(Yd)return Jd;Yd=1;var e=Do(),t=ns().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),Jd}var Zd={},Qd;function $d(){return Qd?Zd:(Qd=1,su(),Zd)}var ef={},tf;function nf(){return tf?ef:(tf=1,pu(),ef)}var rf={},af;function of(){return af?rf:(af=1,bl()(`metadata`),rf)}var sf,cf;function lf(){if(cf)return sf;cf=1;var e=qd();return Xd(),$d(),nf(),of(),sf=e,sf}var uf={},df,ff;function pf(){if(ff)return df;ff=1;var e=Ea(),t=Li(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return df=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},df}var mf;function hf(){return mf?uf:(mf=1,cs()({target:`Symbol`,stat:!0},{isRegisteredSymbol:pf()}),uf)}var gf={},_f,vf;function yf(){if(vf)return _f;vf=1;for(var e=ho(),t=Ea(),n=Li(),r=Wa(),i=Do(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return _f=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},_f}var bf;function xf(){return bf?gf:(bf=1,cs()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:yf()}),gf)}var Sf={},Cf;function wf(){return Cf?Sf:(Cf=1,bl()(`customMatcher`),Sf)}var Tf={},Ef;function Df(){return Ef?Tf:(Ef=1,bl()(`observable`),Tf)}var Of={},kf;function Af(){return kf?Of:(kf=1,cs()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:pf()}),Of)}var jf={},Mf;function Nf(){return Mf?jf:(Mf=1,cs()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:yf()}),jf)}var Pf={},Ff;function If(){return Ff?Pf:(Ff=1,bl()(`matcher`),Pf)}var Lf={},Rf;function zf(){return Rf?Lf:(Rf=1,bl()(`metadataKey`),Lf)}var Bf={},Vf;function Hf(){return Vf?Bf:(Vf=1,bl()(`patternMatch`),Bf)}var Uf={},Wf;function Gf(){return Wf?Uf:(Wf=1,bl()(`replaceAll`),Uf)}var Kf,qf;function Jf(){if(qf)return Kf;qf=1;var e=lf();return hf(),xf(),wf(),Df(),Af(),Nf(),If(),zf(),Hf(),Gf(),Kf=e,Kf}var Yf,Xf;function Zf(){return Xf?Yf:(Xf=1,Yf=Jf(),Yf)}var Qf=bi(Zf()),$f={},ep,tp;function np(){if(tp)return ep;tp=1;var e=Li(),t=Ps(),n=bc(),r=ma(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return ep={codeAt:s(!1),charAt:s(!0)},ep}var rp;function ip(){if(rp)return $f;rp=1;var e=np().charAt,t=bc(),n=Nl(),r=Pd(),i=Ld(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),$f}var ap,op;function sp(){return op?ap:(op=1,Bd(),ip(),Su(),ap=_l().f(`iterator`),ap)}var cp,lp;function up(){if(lp)return cp;lp=1;var e=sp();return Wd(),cp=e,cp}var dp,fp;function pp(){return fp?dp:(fp=1,dp=up(),dp)}var mp,hp;function gp(){return hp?mp:(hp=1,mp=pp(),mp)}var _p,vp;function yp(){return vp?_p:(vp=1,_p=gp(),_p)}var bp=bi(yp());function xp(e){"@babel/helpers - typeof";return xp=typeof Qf==`function`&&typeof bp==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Qf==`function`&&e.constructor===Qf&&e!==Qf.prototype?`symbol`:typeof e},xp(e)}var Sp,Cp;function wp(){return Cp?Sp:(Cp=1,Uu(),Sp=_l().f(`toPrimitive`),Sp)}var Tp,Ep;function Dp(){return Ep?Tp:(Ep=1,Tp=wp(),Tp)}var Op,kp;function Ap(){return kp?Op:(kp=1,Op=Dp(),Op)}var jp,Mp;function Np(){return Mp?jp:(Mp=1,jp=Ap(),jp)}var Pp,Fp;function Ip(){return Fp?Pp:(Fp=1,Pp=Np(),Pp)}var Lp=bi(Ip());function Rp(e,t){if(xp(e)!=`object`||!e)return e;var n=e[Lp];if(n!==void 0){var r=n.call(e,t);if(xp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zp(e){var t=Rp(e,`string`);return xp(t)==`symbol`?t:t+``}function Bp(e,t,n){return(t=zp(t))in e?Ts(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vp={},Hp,Up;function Wp(){if(Up)return Hp;Up=1;var e=Li(),t=Xa(),n=ba(),r=xo(),i=rl(),a=ji(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return Hp=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},Hp}var Gp;function Kp(){if(Gp)return Vp;Gp=1;var e=cs(),t=Wp();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),Vp}var qp,Jp;function Yp(){if(Jp)return qp;Jp=1;var e=Ti(),t=Ca();return qp=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},qp}var Xp,Zp;function Qp(){return Zp?Xp:(Zp=1,Kp(),Xp=Yp()(`Function`,`bind`),Xp)}var $p,em;function tm(){if(em)return $p;em=1;var e=ka(),t=Qp(),n=Function.prototype;return $p=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},$p}var nm,rm;function im(){return rm?nm:(rm=1,nm=tm(),nm)}var am,om;function sm(){return om?am:(om=1,am=im(),am)}var cm=bi(sm()),lm={},um,dm;function fm(){if(dm)return um;dm=1;var e=Xa(),t=vo(),n=ca(),r=Bs(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return um={left:o(!1),right:o(!0)},um}var pm,mm;function hm(){if(mm)return pm;mm=1;var e=Oi();return pm=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},pm}var gm,_m;function vm(){if(_m)return gm;_m=1;var e=Ti(),t=Ma(),n=Bi(),r=function(e){return t.slice(0,e.length)===e};return gm=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),gm}var ym,bm;function xm(){return bm?ym:(bm=1,ym=vm()===`NODE`,ym)}var Sm;function Cm(){if(Sm)return lm;Sm=1;var e=cs(),t=fm().left,n=hm(),r=Fa();return e({target:`Array`,proto:!0,forced:!xm()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),lm}var wm,Tm;function Em(){return Tm?wm:(Tm=1,Cm(),wm=Yp()(`Array`,`reduce`),wm)}var Dm,Om;function km(){if(Om)return Dm;Om=1;var e=ka(),t=Em(),n=Array.prototype;return Dm=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},Dm}var Am,jm;function Mm(){return jm?Am:(jm=1,Am=km(),Am)}var Nm,Pm;function Fm(){return Pm?Nm:(Pm=1,Nm=Mm(),Nm)}var Im=bi(Fm()),Lm={},Rm;function zm(){if(Rm)return Lm;Rm=1;var e=cs(),t=Il().filter;return e({target:`Array`,proto:!0,forced:!pc()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Lm}var Bm,Vm;function Hm(){return Vm?Bm:(Vm=1,zm(),Bm=Yp()(`Array`,`filter`),Bm)}var Um,Wm;function Gm(){if(Wm)return Um;Wm=1;var e=ka(),t=Hm(),n=Array.prototype;return Um=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},Um}var Km,qm;function Jm(){return qm?Km:(qm=1,Km=Gm(),Km)}var Ym,Xm;function Zm(){return Xm?Ym:(Xm=1,Ym=Jm(),Ym)}var Qm=bi(Zm()),$m={},eh;function th(){if(eh)return $m;eh=1;var e=cs(),t=Il().map;return e({target:`Array`,proto:!0,forced:!pc()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),$m}var nh,rh;function ih(){return rh?nh:(rh=1,th(),nh=Yp()(`Array`,`map`),nh)}var ah,oh;function sh(){if(oh)return ah;oh=1;var e=ka(),t=ih(),n=Array.prototype;return ah=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},ah}var ch,lh;function uh(){return lh?ch:(lh=1,ch=sh(),ch)}var dh,fh;function ph(){return fh?dh:(fh=1,dh=uh(),dh)}var mh=bi(ph()),hh={},gh,_h;function vh(){if(_h)return gh;_h=1;var e=ks(),t=Bs(),n=Us(),r=qo(),i=function(a,o,s,c,l,u,d,f){for(var p=l,m=0,h=d?r(d,f):!1,g,_;m<c;)m in s&&(g=h?h(s[m],m,o):s[m],u>0&&e(g)?(_=t(g),p=i(a,o,g,_,p,u-1)-1):(n(p+1),a[p]=g),p++),m++;return p};return gh=i,gh}var yh;function bh(){if(yh)return hh;yh=1;var e=cs(),t=vh(),n=Xa(),r=vo(),i=Bs(),a=uc();return e({target:`Array`,proto:!0},{flatMap:function(e){var o=r(this),s=i(o),c;return n(e),c=a(o,0),c.length=t(c,o,o,s,0,1,e,arguments.length>1?arguments[1]:void 0),c}}),hh}var xh={},Sh;function Ch(){return Sh?xh:(Sh=1,ad()(`flatMap`),xh)}var wh,Th;function Aee(){return Th?wh:(Th=1,bh(),Ch(),wh=Yp()(`Array`,`flatMap`),wh)}var Eh,Dh;function jee(){if(Dh)return Eh;Dh=1;var e=ka(),t=Aee(),n=Array.prototype;return Eh=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},Eh}var Oh,kh;function Mee(){return kh?Oh:(kh=1,Oh=jee(),Oh)}var Ah,jh;function Nee(){return jh?Ah:(jh=1,Ah=Mee(),Ah)}var Pee=bi(Nee());function Fee(e){return new Lee(e)}var Iee=class{constructor(e,t,n){var r,i,a;Bp(this,`_listeners`,{add:cm(r=this._add).call(r,this),remove:cm(i=this._remove).call(i,this),update:cm(a=this._update).call(a,this)}),this._source=e,this._transformers=t,this._target=n}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}stop(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}_transformItems(e){var t;return Im(t=this._transformers).call(t,(e,t)=>t(e),e)}_add(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}_update(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}_remove(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}},Lee=class{constructor(e){Bp(this,`_transformers`,[]),this._source=e}filter(e){return this._transformers.push(t=>Qm(t).call(t,e)),this}map(e){return this._transformers.push(t=>mh(t).call(t,e)),this}flatMap(e){return this._transformers.push(t=>Pee(t).call(t,e)),this}to(e){return new Iee(this._source,this._transformers,e)}},Mh,Nh;function Ree(){return Nh?Mh:(Nh=1,Mh=qd(),Mh)}var zee=bi(Ree()),Ph={},Fh;function Bee(){if(Fh)return Ph;Fh=1;var e=cs(),t=ks(),n=ic(),r=ba(),i=wc(),a=Bs(),o=_a(),s=Ks(),c=Do(),l=pc(),u=rl(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),Ph}var Ih,Lh;function Vee(){return Lh?Ih:(Lh=1,Bee(),Ih=Yp()(`Array`,`slice`),Ih)}var Rh,zh;function Bh(){if(zh)return Rh;zh=1;var e=ka(),t=Vee(),n=Array.prototype;return Rh=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},Rh}var Vh,Hh;function Uh(){return Hh?Vh:(Hh=1,Vh=Bh(),Vh)}var Wh,Gh;function Kh(){return Gh?Wh:(Gh=1,Wh=Uh(),Wh)}var qh=bi(Kh()),Jh={},Yh,Xh;function Zh(){if(Xh)return Yh;Xh=1;var e=Ea(),t=Li(),n=$c(),r=cl(),i=es(),a=t([].concat);return Yh=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},Yh}var Qh;function $h(){return Qh?Jh:(Qh=1,cs()({target:`Reflect`,stat:!0},{ownKeys:Zh()}),Jh)}var eg,tg;function ng(){return tg?eg:(tg=1,$h(),eg=Ca().Reflect.ownKeys,eg)}var rg,ig;function ag(){return ig?rg:(ig=1,rg=ng(),rg)}var og,sg;function cg(){return sg?og:(sg=1,og=ag(),og)}var lg=bi(cg()),ug={},dg;function fg(){return dg?ug:(dg=1,cs()({target:`Array`,stat:!0},{isArray:ks()}),ug)}var pg,mg;function hg(){return mg?pg:(mg=1,fg(),pg=Ca().Array.isArray,pg)}var gg,_g;function vg(){return _g?gg:(_g=1,gg=hg(),gg)}var yg,bg;function xg(){return bg?yg:(bg=1,yg=vg(),yg)}var Sg=bi(xg()),Cg={},wg;function Tg(){if(wg)return Cg;wg=1;var e=cs(),t=vo(),n=zc();return e({target:`Object`,stat:!0,forced:Oi()(function(){n(1)})},{keys:function(e){return n(t(e))}}),Cg}var Eg,Dg;function Og(){return Dg?Eg:(Dg=1,Tg(),Eg=Ca().Object.keys,Eg)}var kg,Ag;function jg(){return Ag?kg:(Ag=1,kg=Og(),kg)}var Mg,Ng;function Pg(){return Ng?Mg:(Ng=1,Mg=jg(),Mg)}var Fg=bi(Pg()),Ig={},Lg,Rg;function zg(){if(Rg)return Lg;Rg=1;var e=Il().forEach;return Lg=hm()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},Lg}var Bg;function Vg(){if(Bg)return Ig;Bg=1;var e=cs(),t=zg();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),Ig}var Hg,Ug;function Wg(){return Ug?Hg:(Ug=1,Vg(),Hg=Yp()(`Array`,`forEach`),Hg)}var Gg,Kg;function qg(){return Kg?Gg:(Kg=1,Gg=Wg(),Gg)}var Jg,Yg;function Xg(){if(Yg)return Jg;Yg=1;var e=Qs(),t=xo(),n=ka(),r=qg(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Jg=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},Jg}var Zg,Qg;function $g(){return Qg?Zg:(Qg=1,Zg=Xg(),Zg)}var e_=bi($g()),t_={},n_;function r_(){if(n_)return t_;n_=1;var e=cs(),t=Li(),n=ks(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),t_}var i_,a_;function o_(){return a_?i_:(a_=1,r_(),i_=Yp()(`Array`,`reverse`),i_)}var s_,c_;function l_(){if(c_)return s_;c_=1;var e=ka(),t=o_(),n=Array.prototype;return s_=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},s_}var u_,d_;function f_(){return d_?u_:(d_=1,u_=l_(),u_)}var p_,m_;function h_(){return m_?p_:(m_=1,p_=f_(),p_)}var g_=bi(h_()),__={},v_,y_;function b_(){if(y_)return v_;y_=1;var e=Xi(),t=ks(),n=TypeError,r=Object.getOwnPropertyDescriptor;return v_=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},v_}var x_,S_;function C_(){if(S_)return x_;S_=1;var e=qa(),t=TypeError;return x_=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},x_}var w_;function T_(){if(w_)return __;w_=1;var e=cs(),t=vo(),n=wc(),r=Ps(),i=Bs(),a=b_(),o=Us(),s=uc(),c=Ks(),l=C_(),u=pc()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),__}var E_,D_;function O_(){return D_?E_:(D_=1,T_(),E_=Yp()(`Array`,`splice`),E_)}var k_,A_;function j_(){if(A_)return k_;A_=1;var e=ka(),t=O_(),n=Array.prototype;return k_=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},k_}var M_,N_;function P_(){return N_?M_:(N_=1,M_=j_(),M_)}var F_,I_;function L_(){return I_?F_:(I_=1,F_=P_(),F_)}var R_=bi(L_()),z_={},B_,V_;function H_(){if(V_)return B_;V_=1;var e=Xi(),t=Li(),n=$i(),r=Oi(),i=zc(),a=cl(),o=na(),s=vo(),c=ca(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return B_=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,B_}var U_;function W_(){if(U_)return z_;U_=1;var e=cs(),t=H_();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),z_}var G_,K_;function q_(){return K_?G_:(K_=1,W_(),G_=Ca().Object.assign,G_)}var J_,Y_;function X_(){return Y_?J_:(Y_=1,J_=q_(),J_)}var Z_,Q_;function $_(){return Q_?Z_:(Q_=1,Z_=X_(),Z_)}var ev=bi($_()),tv,nv;function rv(){return nv?tv:(nv=1,hc(),tv=Yp()(`Array`,`concat`),tv)}var iv,av;function ov(){if(av)return iv;av=1;var e=ka(),t=rv(),n=Array.prototype;return iv=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},iv}var sv,cv;function lv(){return cv?sv:(cv=1,sv=ov(),sv)}var uv,dv;function fv(){return dv?uv:(dv=1,uv=lv(),uv)}var pv=bi(fv()),mv={},hv;function gv(){return hv?mv:(hv=1,cs()({target:`Object`,stat:!0,sham:!Xi()},{create:Xc()}),mv)}var _v,vv;function yv(){if(vv)return _v;vv=1,gv();var e=Ca().Object;return _v=function(t,n){return e.create(t,n)},_v}var bv,xv;function Sv(){return xv?bv:(xv=1,bv=yv(),bv)}var Cv,wv;function Tv(){return wv?Cv:(wv=1,Cv=Sv(),Cv)}var Ev=bi(Tv()),Dv={},Ov,kv;function Av(){if(kv)return Ov;kv=1;var e=Ps(),t=bc(),n=ma(),r=RangeError;return Ov=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},Ov}var jv,Mv;function Nv(){if(Mv)return jv;Mv=1;var e=Li(),t=Ls(),n=bc(),r=Av(),i=ma(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return jv={start:c(!1),end:c(!0)},jv}var Pv,Fv;function Iv(){if(Fv)return Pv;Fv=1;var e=Li(),t=Oi(),n=Nv().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return Pv=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,Pv}var Lv;function Rv(){if(Lv)return Dv;Lv=1;var e=cs(),t=$i(),n=vo(),r=Ao(),i=Iv(),a=Bi();return e({target:`Date`,proto:!0,forced:Oi()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),Dv}var zv,Bv;function Vv(){if(Bv)return zv;Bv=1,Rv(),$l();var e=Ca(),t=Pi();return e.JSON||={stringify:JSON.stringify},zv=function(n,r,i){return t(e.JSON.stringify,null,arguments)},zv}var Hv,Uv;function Wv(){return Uv?Hv:(Uv=1,Hv=Vv(),Hv)}var Gv,Kv;function qv(){return Kv?Gv:(Kv=1,Gv=Wv(),Gv)}var Jv=bi(qv()),Yv={},Xv={},Zv,Qv;function $v(){if(Qv)return Zv;Qv=1;var e=TypeError;return Zv=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},Zv}var ey,ty;function ny(){if(ty)return ey;ty=1;var e=Ti(),t=Pi(),n=Ki(),r=vm(),i=Ma(),a=rl(),o=$v(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return ey=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},ey}var ry;function iy(){if(ry)return Xv;ry=1;var e=cs(),t=Ti(),n=ny()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),Xv}var ay={},oy;function sy(){if(oy)return ay;oy=1;var e=cs(),t=Ti(),n=ny()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),ay}var cy;function ly(){return cy?Yv:(cy=1,iy(),sy(),Yv)}var uy,dy;function fy(){return dy?uy:(dy=1,ly(),uy=Ca().setTimeout,uy)}var py,my;function hy(){return my?py:(my=1,py=fy(),py)}var gy=bi(hy()),_y={exports:{}},vy;function yy(){return vy?_y.exports:(vy=1,(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(_y),_y.exports)}var by=bi(yy());function xy(){return xy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xy.apply(this,arguments)}function Sy(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Cy(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var wy=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},Ty=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Ey=typeof document>`u`?{style:{}}:document.createElement(`div`),Dy=`function`,Oy=Math.round,ky=Math.abs,Ay=Date.now;function jy(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Ty.length;){if(n=Ty[a],r=n?n+i:t,r in e)return r;a++}}var My=typeof window>`u`?{}:window,Ny=jy(Ey.style,`touchAction`),Py=Ny!==void 0;function Fy(){if(!Py)return!1;var e={},t=My.CSS&&My.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?My.CSS.supports(`touch-action`,n):!0}),e}var Iy=`compute`,Ly=`auto`,Ry=`manipulation`,zy=`none`,By=`pan-x`,Vy=`pan-y`,Hy=Fy(),Uy=/mobile|tablet|ip(ad|hone|od)|android/i,Wy=`ontouchstart`in My,Gy=jy(My,`PointerEvent`)!==void 0,Ky=Wy&&Uy.test(navigator.userAgent),qy=`touch`,Jy=`pen`,Yy=`mouse`,Xy=`kinect`,Zy=25,Qy=1,$y=2,eb=4,tb=8,nb=1,rb=2,ib=4,ab=8,ob=16,sb=rb|ib,cb=ab|ob,lb=sb|cb,ub=[`x`,`y`],db=[`clientX`,`clientY`];function fb(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function pb(e,t){return typeof e===Dy?e.apply(t&&t[0]||void 0,t):e}function mb(e,t){return e.indexOf(t)>-1}function hb(e){if(mb(e,zy))return zy;var t=mb(e,By),n=mb(e,Vy);return t&&n?zy:t||n?t?By:Vy:mb(e,Ry)?Ry:Ly}var gb=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Iy&&(e=this.compute()),Py&&this.manager.element.style&&Hy[e]&&(this.manager.element.style[Ny]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fb(this.manager.recognizers,function(t){pb(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),hb(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=mb(r,zy)&&!Hy[zy],a=mb(r,Vy)&&!Hy[Vy],o=mb(r,By)&&!Hy[By];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&sb||o&&n&cb))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function _b(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function vb(e){var t=e.length;if(t===1)return{x:Oy(e[0].clientX),y:Oy(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Oy(n/t),y:Oy(r/t)}}function yb(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Oy(e.pointers[n].clientX),clientY:Oy(e.pointers[n].clientY)},n++;return{timeStamp:Ay(),pointers:t,center:vb(t),deltaX:e.deltaX,deltaY:e.deltaY}}function bb(e,t,n){n||=ub;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function xb(e,t,n){n||=ub;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Sb(e,t){return e===t?nb:ky(e)>=ky(t)?e<0?rb:ib:t<0?ab:ob}function Cb(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Qy||a.eventType===eb)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function wb(e,t,n){return{x:t/e||0,y:n/e||0}}function Tb(e,t){return bb(t[0],t[1],db)/bb(e[0],e[1],db)}function Eb(e,t){return xb(t[1],t[0],db)+xb(e[1],e[0],db)}function Db(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==tb&&(r>Zy||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=wb(r,c,l);a=u.x,o=u.y,i=ky(u.x)>ky(u.y)?u.x:u.y,s=Sb(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Ob(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=yb(t),i>1&&!n.firstMultiple?n.firstMultiple=yb(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=vb(r);t.timeStamp=Ay(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=xb(s,c),t.distance=bb(s,c),Cb(n,t),t.offsetDirection=Sb(t.deltaX,t.deltaY);var l=wb(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=ky(l.x)>ky(l.y)?l.x:l.y,t.scale=o?Tb(o.pointers,r):1,t.rotation=o?Eb(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Db(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;_b(f,u)&&(u=f),t.target=u}function kb(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Qy&&r-i===0,o=t&(eb|tb)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ob(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Ab(e){return e.trim().split(/\s+/g)}function jb(e,t,n){fb(Ab(t),function(t){e.addEventListener(t,n,!1)})}function Mb(e,t,n){fb(Ab(t),function(t){e.removeEventListener(t,n,!1)})}function Nb(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Pb=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){pb(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&jb(this.element,this.evEl,this.domHandler),this.evTarget&&jb(this.target,this.evTarget,this.domHandler),this.evWin&&jb(Nb(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Mb(this.element,this.evEl,this.domHandler),this.evTarget&&Mb(this.target,this.evTarget,this.domHandler),this.evWin&&Mb(Nb(this.element),this.evWin,this.domHandler)},e}();function Fb(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Ib={pointerdown:Qy,pointermove:$y,pointerup:eb,pointercancel:tb,pointerout:tb},Lb={2:qy,3:Jy,4:Yy,5:Xy},Rb=`pointerdown`,zb=`pointermove pointerup pointercancel`;My.MSPointerEvent&&!My.PointerEvent&&(Rb=`MSPointerDown`,zb=`MSPointerMove MSPointerUp MSPointerCancel`);var Bb=function(e){Sy(t,e);function t(){var n,r=t.prototype;return r.evEl=Rb,r.evWin=zb,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Ib[e.type.toLowerCase().replace(`ms`,``)],i=Lb[e.pointerType]||e.pointerType,a=i===qy,o=Fb(t,e.pointerId,`pointerId`);r&Qy&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(eb|tb)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Pb);function Vb(e){return Array.prototype.slice.call(e,0)}function Hb(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Fb(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var Ub={touchstart:Qy,touchmove:$y,touchend:eb,touchcancel:tb},Wb=`touchstart touchmove touchend touchcancel`,Gb=function(e){Sy(t,e);function t(){var n;return t.prototype.evTarget=Wb,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Ub[e.type],n=Kb.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:qy,srcEvent:e})},t}(Pb);function Kb(e,t){var n=Vb(e.touches),r=this.targetIds;if(t&(Qy|$y)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Vb(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return _b(e.target,c)}),t===Qy)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(eb|tb)&&delete r[o[i].identifier],i++;if(s.length)return[Hb(a.concat(s),`identifier`,!0),s]}var qb={mousedown:Qy,mousemove:$y,mouseup:eb},Jb=`mousedown`,Yb=`mousemove mouseup`,Xb=function(e){Sy(t,e);function t(){var n,r=t.prototype;return r.evEl=Jb,r.evWin=Yb,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=qb[e.type];t&Qy&&e.button===0&&(this.pressed=!0),t&$y&&e.which!==1&&(t=eb),this.pressed&&(t&eb&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Yy,srcEvent:e}))},t}(Pb),Zb=2500,Qb=25;function $b(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Zb)}}function ex(e,t){e&Qy?(this.primaryTouch=t.changedPointers[0].identifier,$b.call(this,t)):e&(eb|tb)&&$b.call(this,t)}function tx(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Qb&&o<=Qb)return!0}return!1}var nx=function(){return function(e){Sy(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===qy,a=n.pointerType===Yy;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)ex.call(Cy(Cy(r)),t,n);else if(a&&tx.call(Cy(Cy(r)),n))return;r.callback(e,t,n)}},r.touch=new Gb(r.manager,r.handler),r.mouse=new Xb(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Pb)}();function rx(e){var t;return t=e.options.inputClass||(Gy?Bb:Ky?Gb:Wy?nx:Xb),new t(e,kb)}function ix(e,t,n){return Array.isArray(e)?(fb(e,n[t],n),!0):!1}var ax=1,ox=2,sx=4,cx=8,lx=cx,ux=16,dx=32,fx=1;function px(){return fx++}function mx(e,t){var n=t.manager;return n?n.get(e):e}function hx(e){return e&ux?`cancel`:e&cx?`end`:e&sx?`move`:e&ox?`start`:``}var gx=function(){function e(e){e===void 0&&(e={}),this.options=xy({enable:!0},e),this.id=px(),this.manager=null,this.state=ax,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return wy(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ix(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=mx(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ix(e,`dropRecognizeWith`,this)?this:(e=mx(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ix(e,`requireFailure`,this))return this;var t=this.requireFail;return e=mx(e,this),Fb(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ix(e,`dropRequireFailure`,this))return this;e=mx(e,this);var t=Fb(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<cx&&r(t.options.event+hx(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=cx&&r(t.options.event+hx(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=dx},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(dx|ax)))return!1;e++}return!0},t.recognize=function(e){var t=wy({},e);if(!pb(this.options.enable,[this,t])){this.reset(),this.state=dx;return}this.state&(lx|ux|dx)&&(this.state=ax),this.state=this.process(t),this.state&(ox|sx|cx|ux)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),_x=function(e){Sy(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,xy({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[Ry]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Qy&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==eb)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||bb(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=lx,t.tryEmit()},n.interval),ox):lx}return dx},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=dx},this.options.interval),dx},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===lx&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(gx),vx=function(e){Sy(t,e);function t(t){return t===void 0&&(t={}),e.call(this,xy({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(ox|sx),i=this.attrTest(e);return r&&(n&tb||!i)?t|ux:r||i?n&eb?t|cx:t&ox?t|sx:ox:dx},t}(gx);function yx(e){return e===ob?`down`:e===ab?`up`:e===rb?`left`:e===ib?`right`:``}var bx=function(e){Sy(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,xy({event:`pan`,threshold:10,pointers:1,direction:lb},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sb&&t.push(Vy),e&cb&&t.push(By),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&sb?(i=a===0?nb:a<0?rb:ib,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?nb:o<0?ab:ob,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return vx.prototype.attrTest.call(this,e)&&(this.state&ox||!(this.state&ox)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=yx(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(vx),xx=function(e){Sy(t,e);function t(t){return t===void 0&&(t={}),e.call(this,xy({event:`swipe`,threshold:10,velocity:.3,direction:sb|cb,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return bx.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(sb|cb)?r=t.overallVelocity:n&sb?r=t.overallVelocityX:n&cb&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&ky(r)>this.options.velocity&&t.eventType&eb},n.emit=function(e){var t=yx(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(vx),Sx=function(e){Sy(t,e);function t(t){return t===void 0&&(t={}),e.call(this,xy({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[zy]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ox)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(vx),Cx=function(e){Sy(t,e);function t(t){return t===void 0&&(t={}),e.call(this,xy({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[zy]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ox)},t}(vx),wx=function(e){Sy(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,xy({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[Ly]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(eb|tb)&&!a)this.reset();else if(e.eventType&Qy)this.reset(),this._timer=setTimeout(function(){t.state=lx,t.tryEmit()},n.time);else if(e.eventType&eb)return lx;return dx},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===lx&&(e&&e.eventType&eb?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Ay(),this.manager.emit(this.options.event,this._input)))},t}(gx),Tx={domEvents:!1,touchAction:Iy,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Ex=[[Cx,{enable:!1}],[Sx,{enable:!1},[`rotate`]],[xx,{direction:sb}],[bx,{direction:sb},[`swipe`]],[_x],[_x,{event:`doubletap`,taps:2},[`tap`]],[wx]],Hee=1,Dx=2;function Ox(e,t){var n=e.element;if(n.style){var r;fb(e.options.cssProps,function(i,a){r=jy(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Uee(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var kx=function(){function e(e,t){var n=this;this.options=wy({},Tx,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=rx(this),this.touchAction=new gb(this,this.options.touchAction),Ox(this,!0),fb(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return wy(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Dx:Hee},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&lx)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Dx&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(ox|sx|cx)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof gx)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ix(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ix(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Fb(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return fb(Ab(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return fb(Ab(e),function(e){t?n[e]&&n[e].splice(Fb(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Uee(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Ox(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Wee={touchstart:Qy,touchmove:$y,touchend:eb,touchcancel:tb},Gee=`touchstart`,Kee=`touchstart touchmove touchend touchcancel`,qee=function(e){Sy(t,e);function t(){var n,r=t.prototype;return r.evTarget=Gee,r.evWin=Kee,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=Wee[e.type];if(t===Qy&&(this.started=!0),this.started){var n=Jee.call(this,e,t);t&(eb|tb)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:qy,srcEvent:e})}},t}(Pb);function Jee(e,t){var n=Vb(e.touches),r=Vb(e.changedTouches);return t&(eb|tb)&&(n=Hb(n.concat(r),`identifier`,!0)),[n,r]}function Ax(e,t,n){var r=`DEPRECATED METHOD: `+t+`-`+n+` AT-`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var jx=Ax(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),Yee=Ax(function(e,t){return jx(e,t,!0)},`merge`,"Use `assign`.");function Xee(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&wy(i,n)}function Mx(e,t){return function(){return e.apply(t,arguments)}}var Zee=function(){var e=function(e,t){return t===void 0&&(t={}),new kx(e,xy({recognizers:Ex.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=lb,e.DIRECTION_DOWN=ob,e.DIRECTION_LEFT=rb,e.DIRECTION_RIGHT=ib,e.DIRECTION_UP=ab,e.DIRECTION_HORIZONTAL=sb,e.DIRECTION_VERTICAL=cb,e.DIRECTION_NONE=nb,e.DIRECTION_DOWN=ob,e.INPUT_START=Qy,e.INPUT_MOVE=$y,e.INPUT_END=eb,e.INPUT_CANCEL=tb,e.STATE_POSSIBLE=ax,e.STATE_BEGAN=ox,e.STATE_CHANGED=sx,e.STATE_ENDED=cx,e.STATE_RECOGNIZED=lx,e.STATE_CANCELLED=ux,e.STATE_FAILED=dx,e.Manager=kx,e.Input=Pb,e.TouchAction=gb,e.TouchInput=Gb,e.MouseInput=Xb,e.PointerEventInput=Bb,e.TouchMouseInput=nx,e.SingleTouchInput=qee,e.Recognizer=gx,e.AttrRecognizer=vx,e.Tap=_x,e.Pan=bx,e.Swipe=xx,e.Pinch=Sx,e.Rotate=Cx,e.Press=wx,e.on=jb,e.off=Mb,e.each=fb,e.merge=Yee,e.extend=jx,e.bindFn=Mx,e.assign=wy,e.inherit=Xee,e.bindFn=Mx,e.prefixed=jy,e.toArray=Vb,e.inArray=Fb,e.uniqueArray=Hb,e.splitStr=Ab,e.boolOrFn=pb,e.hasParent=_b,e.addEventListeners=jb,e.removeEventListeners=Mb,e.defaults=wy({},Tx,{preset:Ex}),e}(),Nx=zee(`DELETE`);function Qee(e){return Px({},e,...[...arguments].slice(1))}function Px(){let e=Fx(...arguments);return Lx(e),e}function Fx(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return Fx(Px(e[0],e[1]),...qh(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of lg(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===Nx?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!Sg(t[e])&&!Sg(n[e])?t[e]=Fx(t[e],n[e]):t[e]=Ix(n[e]));return t}function Ix(e){return Sg(e)?mh(e).call(e,e=>Ix(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):Fx({},e):e}function Lx(e){for(let t of Fg(e))e[t]===Nx?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&Lx(e[t])}function $ee(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var ete=typeof window<`u`?window.Hammer||Zee:function(){return $ee()};function Rx(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=ete(this._dom.overlay);n.on(`tap`,cm(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];e_(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{tte(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}by(Rx.prototype),Rx.current=null,Rx.prototype.destroy=function(){this.deactivate();for(let n of g_(e=R_(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},Rx.prototype.activate=function(){Rx.current&&Rx.current.deactivate(),Rx.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},Rx.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},Rx.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function tte(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var zx,Bx;function nte(){return Bx?zx:(Bx=1,iu(),zx=Ca().Object.getOwnPropertySymbols,zx)}var Vx,Hx;function rte(){return Hx?Vx:(Hx=1,Vx=nte(),Vx)}var Ux,Wx;function ite(){return Wx?Ux:(Wx=1,Ux=rte(),Ux)}var Gx=bi(ite()),Kx={exports:{}},qx={},Jx;function ate(){if(Jx)return qx;Jx=1;var e=cs(),t=Oi(),n=_a(),r=Vo().f,i=Xi();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),qx}var Yx;function ote(){if(Yx)return Kx.exports;Yx=1,ate();var e=Ca().Object,t=Kx.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Kx.exports}var Xx,Zx;function ste(){return Zx?Xx:(Zx=1,Xx=ote(),Xx)}var Qx,$x;function cte(){return $x?Qx:($x=1,Qx=ste(),Qx)}var eS=bi(cte()),tS={},nS;function lte(){if(nS)return tS;nS=1;var e=cs(),t=Xi(),n=Zh(),r=_a(),i=Vo(),a=Ks();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),tS}var rS,iS;function ute(){return iS?rS:(iS=1,lte(),rS=Ca().Object.getOwnPropertyDescriptors,rS)}var aS,oS;function dte(){return oS?aS:(oS=1,aS=ute(),aS)}var sS,cS;function fte(){return cS?sS:(cS=1,sS=dte(),sS)}var lS=bi(fte()),uS={exports:{}},dS={},fS;function pS(){if(fS)return dS;fS=1;var e=cs(),t=Xi(),n=Vc().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),dS}var mS;function hS(){if(mS)return uS.exports;mS=1,pS();var e=Ca().Object,t=uS.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),uS.exports}var gS,_S;function vS(){return _S?gS:(_S=1,gS=hS(),gS)}var yS,bS;function xS(){return bS?yS:(bS=1,yS=vS(),yS)}var SS=bi(xS()),CS,wS;function TS(){return wS?CS:(wS=1,CS=hs(),CS)}var ES=bi(TS()),DS={},OS={},kS={exports:{}},AS,jS;function MS(){return jS?AS:(jS=1,AS=Oi()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),AS)}var NS,PS;function FS(){if(PS)return NS;PS=1;var e=Oi(),t=ba(),n=Bi(),r=MS(),i=Object.isExtensible;return NS=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,NS}var IS,LS;function RS(){return LS?IS:(LS=1,IS=!Oi()(function(){return Object.isExtensible(Object.preventExtensions({}))}),IS)}var zS;function BS(){if(zS)return kS.exports;zS=1;var e=cs(),t=Li(),n=Ac(),r=ba(),i=xo(),a=ns().f,o=$c(),s=al(),c=FS(),l=wo(),u=RS(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=kS.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,kS.exports}var VS,HS;function US(){if(HS)return VS;HS=1;var e=Do(),t=cd(),n=e(`iterator`),r=Array.prototype;return VS=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},VS}var WS,GS;function KS(){if(GS)return WS;GS=1;var e=Qs(),t=$a(),n=da(),r=cd(),i=Do()(`iterator`);return WS=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},WS}var qS,JS;function YS(){if(JS)return qS;JS=1;var e=$i(),t=Xa(),n=es(),r=qa(),i=KS(),a=TypeError;return qS=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},qS}var XS,ZS;function QS(){if(ZS)return XS;ZS=1;var e=$i(),t=es(),n=$a();return XS=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},XS}var $S,eC;function tC(){if(eC)return $S;eC=1;var e=qo(),t=$i(),n=es(),r=qa(),i=US(),a=Bs(),o=ka(),s=YS(),c=KS(),l=QS(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return $S=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},$S}var nC,rC;function iC(){if(rC)return nC;rC=1;var e=ka(),t=TypeError;return nC=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},nC}var aC,oC;function sC(){if(oC)return aC;oC=1;var e=cs(),t=Ti(),n=BS(),r=Oi(),i=as(),a=tC(),o=iC(),s=Ki(),c=ba(),l=da(),u=Ol(),d=ns().f,f=Il().forEach,p=Xi(),m=Nl(),h=m.set,g=m.getterFor;return aC=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},aC}var cC,lC;function uC(){if(lC)return cC;lC=1;var e=dl();return cC=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},cC}var dC,fC;function pC(){if(fC)return dC;fC=1;var e=Ea(),t=ml(),n=Do(),r=Xi(),i=n(`species`);return dC=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},dC}var mC,hC;function gC(){if(hC)return mC;hC=1;var e=Xc(),t=ml(),n=uC(),r=qo(),i=iC(),a=da(),o=tC(),s=Pd(),c=Ld(),l=pC(),u=Xi(),d=BS().fastKey,f=Nl(),p=f.set,m=f.getterFor;return mC={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},mC}var _C;function vC(){return _C?OS:(_C=1,sC()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},gC()),OS)}var yC;function bC(){return yC?DS:(yC=1,vC(),DS)}var xC={},SC,CC;function wC(){return CC?SC:(CC=1,SC=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},SC)}var TC,EC;function DC(){if(EC)return TC;EC=1;var e=Ea(),t=wC(),n=e(`Map`);return TC={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},TC}var OC;function kC(){if(OC)return xC;OC=1;var e=cs(),t=Li(),n=Xa(),r=ma(),i=tC(),a=DC(),o=oo(),s=Oi(),c=a.Map,l=a.has,u=a.get,d=a.set,f=t([].push),p=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||p},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);l(a,n)?f(u(a,n),e):d(a,n,[e])}),a}}),xC}var AC,jC;function MC(){return jC?AC:(jC=1,Bd(),bC(),kC(),ip(),AC=Ca().Map,AC)}var NC,PC;function FC(){if(PC)return NC;PC=1;var e=MC();return Wd(),NC=e,NC}var IC,LC;function RC(){return LC?IC:(LC=1,IC=FC(),IC)}var zC=bi(RC()),BC={},VC;function HC(){if(VC)return BC;VC=1;var e=cs(),t=Il().some;return e({target:`Array`,proto:!0,forced:!hm()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),BC}var UC,WC;function GC(){return WC?UC:(WC=1,HC(),UC=Yp()(`Array`,`some`),UC)}var KC,qC;function JC(){if(qC)return KC;qC=1;var e=ka(),t=GC(),n=Array.prototype;return KC=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},KC}var YC,XC;function ZC(){return XC?YC:(XC=1,YC=JC(),YC)}var QC,$C;function ew(){return $C?QC:($C=1,QC=ZC(),QC)}var tw=bi(ew()),nw,rw;function iw(){return rw?nw:(rw=1,Bd(),nw=Yp()(`Array`,`keys`),nw)}var aw,ow;function pte(){return ow?aw:(ow=1,aw=iw(),aw)}var sw,cw;function lw(){if(cw)return sw;cw=1,Wd();var e=Qs(),t=xo(),n=ka(),r=pte(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return sw=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},sw}var uw,dw;function fw(){return dw?uw:(dw=1,uw=lw(),uw)}var pw=bi(fw()),mw={},hw,gw;function _w(){if(gw)return hw;gw=1;var e=rl(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return hw=n,hw}var vw,yw;function bw(){if(yw)return vw;yw=1;var e=Ma().match(/firefox\/(\d+)/i);return vw=!!e&&+e[1],vw}var xw,Sw;function Cw(){if(Sw)return xw;Sw=1;var e=Ma();return xw=/MSIE|Trident/.test(e),xw}var ww,Tw;function Ew(){if(Tw)return ww;Tw=1;var e=Ma().match(/AppleWebKit\/(\d+)\./);return ww=!!e&&+e[1],ww}var Dw;function Ow(){if(Dw)return mw;Dw=1;var e=cs(),t=Li(),n=Xa(),r=vo(),i=Bs(),a=C_(),o=bc(),s=Oi(),c=_w(),l=hm(),u=bw(),d=Cw(),f=Fa(),p=Ew(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),mw}var kw,Aw;function jw(){return Aw?kw:(Aw=1,Ow(),kw=Yp()(`Array`,`sort`),kw)}var Mw,Nw;function Pw(){if(Nw)return Mw;Nw=1;var e=ka(),t=jw(),n=Array.prototype;return Mw=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},Mw}var Fw,Iw;function Lw(){return Iw?Fw:(Iw=1,Fw=Pw(),Fw)}var Rw,zw;function Bw(){return zw?Rw:(zw=1,Rw=Lw(),Rw)}var Vw=bi(Bw()),Hw,Uw;function Ww(){return Uw?Hw:(Uw=1,Bd(),Hw=Yp()(`Array`,`values`),Hw)}var Gw,Kw;function qw(){return Kw?Gw:(Kw=1,Gw=Ww(),Gw)}var Jw,Yw;function Xw(){if(Yw)return Jw;Yw=1,Wd();var e=Qs(),t=xo(),n=ka(),r=qw(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Jw=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},Jw}var Zw,Qw;function $w(){return Qw?Zw:(Qw=1,Zw=Xw(),Zw)}var eT=bi($w()),tT,nT;function rT(){return nT?tT:(nT=1,tT=up(),tT)}var iT=bi(rT()),aT,oT;function sT(){return oT?aT:(oT=1,Bd(),aT=Yp()(`Array`,`entries`),aT)}var cT,lT;function uT(){return lT?cT:(lT=1,cT=sT(),cT)}var dT,fT;function pT(){if(fT)return dT;fT=1,Wd();var e=Qs(),t=xo(),n=ka(),r=uT(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return dT=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},dT}var mT,hT;function gT(){return hT?mT:(hT=1,mT=pT(),mT)}var mte=bi(gT()),_T=[];for(let e=0;e<256;++e)_T.push((e+256).toString(16).slice(1));function hte(e,t=0){return(_T[e[t+0]]+_T[e[t+1]]+_T[e[t+2]]+_T[e[t+3]]+`-`+_T[e[t+4]]+_T[e[t+5]]+`-`+_T[e[t+6]]+_T[e[t+7]]+`-`+_T[e[t+8]]+_T[e[t+9]]+`-`+_T[e[t+10]]+_T[e[t+11]]+_T[e[t+12]]+_T[e[t+13]]+_T[e[t+14]]+_T[e[t+15]]).toLowerCase()}var vT,gte=new Uint8Array(16);function _te(){if(!vT){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);vT=crypto.getRandomValues.bind(crypto)}return vT(gte)}var yT={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function vte(e,t,n){e||={};let r=e.random??e.rng?.()??_te();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,hte(r)}function yte(e,t,n){return yT.randomUUID&&!e?yT.randomUUID():vte(e)}function bT(e){return typeof e==`string`||typeof e==`number`}var bte=class e{constructor(e){Bp(this,`_queue`,[]),Bp(this,`_timeout`,null),Bp(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let a=n.replace[e];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay==`number`&&(this._timeout=gy(()=>{this.flush()},this.delay))}flush(){var e,t;e_(e=R_(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},xT=class e{constructor(){Bp(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),Bp(this,`subscribe`,e.prototype.on),Bp(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);e_(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=Qm(n=this._subscribers[e]).call(n,e=>e!==t)}},ST={},CT={},wT;function TT(){return wT?CT:(wT=1,sC()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},gC()),CT)}var ET;function DT(){return ET?ST:(ET=1,TT(),ST)}var OT={},kT,AT;function jT(){if(AT)return kT;AT=1;var e=qa(),t=TypeError;return kT=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},kT}var MT,NT;function PT(){if(NT)return MT;NT=1;var e=Ea(),t=wC(),n=e(`Set`),r=n.prototype;return MT={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},MT}var FT,IT;function LT(){if(IT)return FT;IT=1;var e=$i();return FT=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},FT}var RT,zT;function BT(){if(zT)return RT;zT=1;var e=LT();return RT=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},RT}var VT,HT;function UT(){if(HT)return VT;HT=1;var e=PT(),t=BT(),n=e.Set,r=e.add;return VT=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},VT}var WT,GT;function KT(){return GT?WT:(GT=1,WT=function(e){return e.size},WT)}var qT,JT;function YT(){return JT?qT:(JT=1,qT=function(e){return{iterator:e,next:e.next,done:!1}},qT)}var XT,ZT;function QT(){if(ZT)return XT;ZT=1;var e=Xa(),t=es(),n=$i(),r=Ps(),i=YT(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},XT=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},XT}var $T,eE;function tE(){if(eE)return $T;eE=1;var e=jT(),t=PT(),n=UT(),r=KT(),i=QT(),a=BT(),o=LT(),s=t.has,c=t.remove;return $T=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},$T}var nE,rE;function iE(){return rE?nE:(rE=1,nE=function(){return!1},nE)}var aE;function oE(){if(aE)return OT;aE=1;var e=cs(),t=tE(),n=Oi();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),OT}var sE={},cE,lE;function uE(){if(lE)return cE;lE=1;var e=jT(),t=PT(),n=KT(),r=QT(),i=BT(),a=LT(),o=t.Set,s=t.add,c=t.has;return cE=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},cE}var dE;function fE(){if(dE)return sE;dE=1;var e=cs(),t=Oi(),n=uE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),sE}var pE={},mE,hE;function gE(){if(hE)return mE;hE=1;var e=jT(),t=PT().has,n=KT(),r=QT(),i=BT(),a=LT(),o=QS();return mE=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},mE}var _E;function vE(){if(_E)return pE;_E=1;var e=cs(),t=gE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),pE}var yE={},bE,xE;function SE(){if(xE)return bE;xE=1;var e=jT(),t=KT(),n=BT(),r=QT();return bE=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},bE}var CE;function wE(){if(CE)return yE;CE=1;var e=cs(),t=SE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),yE}var TE={},EE,DE;function OE(){if(DE)return EE;DE=1;var e=jT(),t=PT().has,n=KT(),r=QT(),i=LT(),a=QS();return EE=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},EE}var kE;function AE(){if(kE)return TE;kE=1;var e=cs(),t=OE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),TE}var jE={},ME,NE;function PE(){if(NE)return ME;NE=1;var e=jT(),t=PT(),n=UT(),r=QT(),i=LT(),a=t.add,o=t.has,s=t.remove;return ME=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},ME}var FE,IE;function LE(){return IE?FE:(IE=1,FE=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},FE)}var RE;function zE(){if(RE)return jE;RE=1;var e=cs(),t=PE(),n=LE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),jE}var BE={},VE,HE;function UE(){if(HE)return VE;HE=1;var e=jT(),t=PT().add,n=UT(),r=QT(),i=LT();return VE=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},VE}var WE;function GE(){if(WE)return BE;WE=1;var e=cs(),t=UE(),n=LE();return e({target:`Set`,proto:!0,real:!0,forced:!iE()(`union`)||!n(`union`)},{union:t}),BE}var KE,qE;function JE(){return qE?KE:(qE=1,Bd(),DT(),oE(),fE(),vE(),wE(),AE(),zE(),GE(),ip(),KE=Ca().Set,KE)}var YE,XE;function ZE(){if(XE)return YE;XE=1;var e=JE();return Wd(),YE=e,YE}var QE,$E;function eD(){return $E?QE:($E=1,QE=ZE(),QE)}var tD=bi(eD()),nD,rD;function iD(){return rD?nD:(rD=1,Bd(),ip(),nD=YS(),nD)}var aD,oD;function sD(){if(oD)return aD;oD=1;var e=iD();return Wd(),aD=e,aD}var cD,lD;function uD(){return lD?cD:(lD=1,cD=sD(),cD)}var dD,fD;function pD(){return fD?dD:(fD=1,dD=uD(),dD)}var mD,hD;function gD(){return hD?mD:(hD=1,mD=pD(),mD)}var _D,vD;function yD(){return vD?_D:(vD=1,_D=gD(),_D)}var bD=bi(yD()),xD=class e{constructor(e){this._pairs=e}*[iT](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){var e;return mh(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return mh(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Ev(null);for(let[t,n]of this._pairs)e[t]=n;return e}toMap(){return new zC(this._pairs)}toIdSet(){return new tD(this.toIdArray())}toItemSet(){return new tD(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new tD;for(let[n,r]of this._pairs)t.add(e(r,n));return t}filter(t){let n=this._pairs;return new e({*[iT](){for(let[e,r]of n)t(r,e)&&(yield[e,r])}})}forEach(e){for(let[t,n]of this._pairs)e(n,t)}map(t){let n=this._pairs;return new e({*[iT](){for(let[e,r]of n)yield[e,t(r,e)]}})}max(e){let t=bD(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o>i&&(i=o,r=a)}return r}min(e){let t=bD(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o<i&&(i=o,r=a)}return r}reduce(e,t){for(let[n,r]of this._pairs)t=e(t,r,n);return t}sort(t){return new e({[iT]:()=>{var e;return bD(Vw(e=[...this._pairs]).call(e,(e,n)=>{let[r,i]=e,[a,o]=n;return t(i,o,r,a)}))}})}};function SD(e,t){var n=Fg(e);if(Gx){var r=Gx(e);t&&(r=Qm(r).call(r,function(t){return eS(e,t).enumerable})),n.push.apply(n,r)}return n}function CD(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?e_(n=SD(Object(i),!0)).call(n,function(t){Bp(e,t,i[t])}):lS?SS(e,lS(i)):e_(r=SD(Object(i))).call(r,function(t){ES(e,t,eS(i,t))})}return e}function xte(e,t){return e[t]??(e[t]=yte()),e}var wD=class extends xT{get idProp(){return this._idProp}constructor(e,t){super(),Bp(this,`_queue`,null),e&&!Sg(e)&&(t=e,e=[]),this._options=t||{},this._data=new zC,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=bte.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(Sg(e)){let t=mh(e).call(e,e=>e[this._idProp]);if(tw(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,i=e.length;t<i;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],i=[],a=[],o=this._idProp,s=e=>{let t=e[o];if(t!=null&&this._data.has(t)){let n=e,o=ev({},this._data.get(t)),s=this._updateItem(n);r.push(s),a.push(n),i.push(o)}else{let t=this._addItem(e);n.push(t)}};if(Sg(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?s(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)s(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:i,data:a};this._trigger(`update`,e,t)}return pv(n).call(n,r)}updateOnly(e,t){var n;Sg(e)||(e=[e]);let r=mh(n=mh(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let{oldData:t,update:n}=e,r=t[this._idProp],i=Qee(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:mh(r).call(r,e=>e.id),oldData:mh(r).call(r,e=>e.oldData),data:mh(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}else return[]}get(e,t){let n,r,i;bT(e)?(n=e,i=t):Sg(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&Qm(i),s=[],c,l,u;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)c=this._data.get(r[e]),c!=null&&(!o||o(c))&&s.push(c);else{var d;l=[...pw(d=this._data).call(d)];for(let e=0,t=l.length;e<t;e++)u=l[e],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){let e=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,e);else for(let t=0,n=s.length;t<n;t++)s[t]=this._filterFields(s[t],e)}if(a==`Object`){let e={};for(let t=0,n=s.length;t<n;t++){let n=s[t],r=n[this._idProp];e[r]=n}return e}else if(n!=null)return c??null;else return s}getIds(e){let t=this._data,n=e&&Qm(e),r=e&&e.order,i=[...pw(t).call(t)],a=[];if(n)if(r){let e=[];for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&n(a)&&e.push(a)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,t=i.length;e<t;e++){let t=i[e],r=this._data.get(t);r!=null&&n(r)&&a.push(r[this._idProp])}else if(r){let e=[];for(let n=0,r=i.length;n<r;n++){let r=i[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,n=i.length;e<n;e++){let n=i[e],r=t.get(n);r!=null&&a.push(r[this._idProp])}return a}getDataSet(){return this}forEach(e,t){let n=t&&Qm(t),r=this._data,i=[...pw(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],i=r[this._idProp];e(r,i)}}else for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&(!n||n(a))&&e(a,r)}}map(e,t){let n=t&&Qm(t),r=[],i=this._data,a=[...pw(i).call(i)];for(let t=0,i=a.length;t<i;t++){let i=a[t],o=this._data.get(i);o!=null&&(!n||n(o))&&r.push(e(o,i))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&Im(n=Sg(t)?t:Fg(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;Vw(e).call(e,(e,t)=>{let r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)Vw(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=Sg(e)?e:[e];for(let e=0,t=i.length;e<t;e++){let t=this._remove(i[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(bT(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...pw(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let i of eT(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a>n)&&(t=i,n=a)}return t||null}min(e){let t=null,n=null;for(let i of eT(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a<n)&&(t=i,n=a)}return t||null}distinct(e){let t=this._data,n=[...pw(t).call(t)],r=[],i=0;for(let a=0,o=n.length;a<o;a++){let o=n[a],s=t.get(o)[e],c=!1;for(let e=0;e<i;e++)if(r[e]==s){c=!0;break}!c&&s!==void 0&&(r[i]=s,i++)}return r}_addItem(e){let t=xte(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+Jv(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,CD(CD({},n),e)),t}stream(e){if(e){let t=this._data;return new xD({*[iT](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}else{var t;return new xD({[iT]:cm(t=mte(this._data)).call(t,this._data)})}}},Ste=class e extends xT{get idProp(){return this.getDataSet().idProp}constructor(e,t){var n;super(),Bp(this,`length`,0),Bp(this,`_ids`,new tD),this._options=t||{},this._listener=cm(n=this._onEvent).call(n,this),this.setData(e)}setData(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);let e=this._data.getIds({filter:Qm(this._options)}),t=this._data.get(e);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:e,oldData:t})}if(e!=null){this._data=e;let t=this._data.getIds({filter:Qm(this._options)});for(let e=0,n=t.length;e<n;e++){let n=t[e];this._ids.add(n)}this.length=t.length,this._trigger(`add`,{items:t})}else this._data=new wD;this._data.on&&this._data.on(`*`,this._listener)}refresh(){let e=this._data.getIds({filter:Qm(this._options)}),t=[...this._ids],n={},r=[],i=[],a=[];for(let t=0,i=e.length;t<i;t++){let i=e[t];n[i]=!0,this._ids.has(i)||(r.push(i),this._ids.add(i))}for(let e=0,r=t.length;e<r;e++){let r=t[e],o=this._data.get(r);o==null?console.error(`If you see this, report it please.`):n[r]||(i.push(r),a.push(o),this._ids.delete(r))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}get(e,t){if(this._data==null)return null;let n=null,r;bT(e)||Sg(e)?(n=e,r=t):r=e;let i=ev({},this._options,r),a=Qm(this._options),o=r&&Qm(r);return a&&o&&(i.filter=e=>a(e)&&o(e)),n==null?this._data.get(i):this._data.get(n,i)}getIds(e){if(this._data.length){let t=Qm(this._options),n=e==null?null:Qm(e),r;return r=n?t?e=>t(e)&&n(e):n:t,this._data.getIds({filter:r,order:e&&e.order})}else return[]}forEach(e,t){if(this._data){var n;let r=Qm(this._options),i=t&&Qm(t),a;a=i?r?function(e){return r(e)&&i(e)}:i:r,e_(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}map(e,t){if(this._data){var n;let r=Qm(this._options),i=t&&Qm(t),a;return a=i?r?e=>r(e)&&i(e):i:r,mh(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}getDataSet(){return this._data.getDataSet()}stream(e){var t;return this._data.stream(e||{[iT]:cm(t=pw(this._ids)).call(t,this._ids)})}dispose(){var t;(t=this._data)!=null&&t.off&&this._data.off(`*`,this._listener);let n=`This data view has already been disposed of.`,r={get:()=>{throw Error(n)},set:()=>{throw Error(n)},configurable:!1};for(let t of lg(e.prototype))ES(this,t,r)}_onEvent(e,t,n){if(!t||!t.items||!this._data)return;let r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(let e=0,t=r.length;e<t;e++){let t=r[e];this.get(t)&&(this._ids.add(t),i.push(t))}break;case`update`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this.get(n)?this._ids.has(n)?(a.push(n),c.push(t.data[e]),s.push(t.oldData[e])):(this._ids.add(n),i.push(n)):this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break;case`remove`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}};function Cte(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof e_(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof mh(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function wte(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof e_(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof mh(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&Cte(e,t.getDataSet())}var TD;function K(){return TD.apply(null,arguments)}function Tte(e){TD=e}function ED(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function DD(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function OD(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kD(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(OD(e,t))return!1;return!0}function AD(e){return e===void 0}function jD(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function MD(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function ND(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function PD(e,t){for(var n in t)OD(t,n)&&(e[n]=t[n]);return OD(t,`toString`)&&(e.toString=t.toString),OD(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function FD(e,t,n,r){return dj(e,t,n,r,!0).utc()}function Ete(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ID(e){return e._pf??=Ete(),e._pf}var Dte=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function LD(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=ID(e),n=Dte.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function RD(e){var t=FD(NaN);return e==null?ID(t).userInvalidated=!0:PD(ID(t),e),t}var zD=K.momentProperties=[],BD=!1;function VD(e,t){var n,r,i,a=zD.length;if(AD(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),AD(t._i)||(e._i=t._i),AD(t._f)||(e._f=t._f),AD(t._l)||(e._l=t._l),AD(t._strict)||(e._strict=t._strict),AD(t._tzm)||(e._tzm=t._tzm),AD(t._isUTC)||(e._isUTC=t._isUTC),AD(t._offset)||(e._offset=t._offset),AD(t._pf)||(e._pf=ID(t)),AD(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=zD[n],i=t[r],AD(i)||(e[r]=i);return e}function HD(e){VD(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),BD===!1&&(BD=!0,K.updateOffset(this),BD=!1)}function UD(e){return e instanceof HD||e!=null&&e._isAMomentObject!=null}function WD(e){K.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function GD(e,t){var n=!0;return PD(function(){if(K.deprecationHandler!=null&&K.deprecationHandler(null,e),n){var r=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i=``,typeof arguments[a]==`object`){for(o in i+=`-[`+a+`] `,arguments[0])OD(arguments[0],o)&&(i+=o+`: `+arguments[0][o]+`, `);i=i.slice(0,-2)}else i=arguments[a];r.push(i)}WD(e+`-Arguments: `+Array.prototype.slice.call(r).join(``)+`-`+Error().stack),n=!1}return t.apply(this,arguments)},t)}var KD={};function qD(e,t){K.deprecationHandler!=null&&K.deprecationHandler(e,t),KD[e]||(WD(t),KD[e]=!0)}K.suppressDeprecationWarnings=!1,K.deprecationHandler=null;function JD(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function YD(e){var t,n;for(n in e)OD(e,n)&&(t=e[n],JD(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function XD(e,t){var n=PD({},e),r;for(r in t)OD(t,r)&&(DD(e[r])&&DD(t[r])?(n[r]={},PD(n[r],e[r]),PD(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)OD(e,r)&&!OD(t,r)&&DD(e[r])&&(n[r]=PD({},n[r]));return n}function ZD(e){e!=null&&this.set(e)}var QD=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)OD(e,t)&&n.push(t);return n},$D={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function eO(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return JD(r)?r.call(t,n):r}function tO(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var nO=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rO=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,iO={},aO={};function q(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(aO[e]=i),t&&(aO[t[0]]=function(){return tO(i.apply(this,arguments),t[1],t[2])}),n&&(aO[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function oO(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function sO(e){var t=e.match(nO),n,r;for(n=0,r=t.length;n<r;n++)aO[t[n]]?t[n]=aO[t[n]]:t[n]=oO(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=JD(t[a])?t[a].call(n,e):t[a];return i}}function cO(e,t){return e.isValid()?(t=lO(t,e.localeData()),iO[t]=iO[t]||sO(t),iO[t](e)):e.localeData().invalidDate()}function lO(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(rO.lastIndex=0;n>=0&&rO.test(e);)e=e.replace(rO,r),rO.lastIndex=0,--n;return e}var uO={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function dO(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(nO).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var fO=`Invalid date`;function pO(){return this._invalidDate}var mO=`%d`,hO=/\d{1,2}/;function gO(e){return this._ordinal.replace(`%d`,e)}var _O={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function vO(e,t,n,r){var i=this._relativeTime[n];return JD(i)?i(e,t,n,r):i.replace(/%d/i,e)}function yO(e,t){var n=this._relativeTime[e>0?`future`:`past`];return JD(n)?n(t):n.replace(/%s/i,t)}var bO={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function xO(e){return typeof e==`string`?bO[e]||bO[e.toLowerCase()]:void 0}function SO(e){var t={},n,r;for(r in e)OD(e,r)&&(n=xO(r),n&&(t[n]=e[r]));return t}var CO={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function wO(e){var t=[],n;for(n in e)OD(e,n)&&t.push({unit:n,priority:CO[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var TO=/\d/,EO=/\d\d/,DO=/\d{3}/,OO=/\d{4}/,kO=/[+-]?\d{6}/,AO=/\d\d?/,jO=/\d\d\d\d?/,MO=/\d\d\d\d\d\d?/,NO=/\d{1,3}/,PO=/\d{1,4}/,FO=/[+-]?\d{1,6}/,IO=/\d+/,LO=/[+-]?\d+/,RO=/Z|[+-]\d\d:?\d\d/gi,zO=/Z|[+-]\d\d(?::?\d\d)?/gi,BO=/[+-]?\d+(\.\d{1,3})?/,VO=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,HO=/^[1-9]\d?/,UO=/^([1-9]\d|\d)/,WO={};function J(e,t,n){WO[e]=JD(t)?t:function(e,r){return e&&n?n:t}}function GO(e,t){return OD(WO,e)?WO[e](t._strict,t._locale):new RegExp(KO(e))}function KO(e){return qO(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function qO(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function JO(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function YO(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=JO(t)),n}var XO={};function ZO(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),jD(t)&&(r=function(e,n){n[t]=YO(e)}),i=e.length,n=0;n<i;n++)XO[e[n]]=r}function QO(e,t){ZO(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function $O(e,t,n){t!=null&&OD(XO,e)&&XO[e](t,n._a,n,e)}function ek(e){return e%4==0&&e%100!=0||e%400==0}var tk=0,nk=1,rk=2,ik=3,ak=4,ok=5,sk=6,ck=7,lk=8;q(`Y`,0,0,function(){var e=this.year();return e<=9999?tO(e,4):`+`+e}),q(0,[`YY`,2],0,function(){return this.year()%100}),q(0,[`YYYY`,4],0,`year`),q(0,[`YYYYY`,5],0,`year`),q(0,[`YYYYYY`,6,!0],0,`year`),J(`Y`,LO),J(`YY`,AO,EO),J(`YYYY`,PO,OO),J(`YYYYY`,FO,kO),J(`YYYYYY`,FO,kO),ZO([`YYYYY`,`YYYYYY`],tk),ZO(`YYYY`,function(e,t){t[tk]=e.length===2?K.parseTwoDigitYear(e):YO(e)}),ZO(`YY`,function(e,t){t[tk]=K.parseTwoDigitYear(e)}),ZO(`Y`,function(e,t){t[tk]=parseInt(e,10)});function uk(e){return ek(e)?366:365}K.parseTwoDigitYear=function(e){return YO(e)+(YO(e)>68?1900:2e3)};var dk=pk(`FullYear`,!0);function fk(){return ek(this.year())}function pk(e,t){return function(n){return n==null?mk(this,e):(hk(this,e,n),K.updateOffset(this,t),this)}}function mk(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function hk(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!ek(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function gk(e){return e=xO(e),JD(this[e])?this[e]():this}function _k(e,t){if(typeof e==`object`){e=SO(e);var n=wO(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=xO(e),JD(this[e]))return this[e](t);return this}function vk(e,t){return(e%t+t)%t}var yk=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function bk(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=vk(t,12);return e+=(t-n)/12,n===1?ek(e)?29:28:31-n%7%2}q(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),q(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),q(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),J(`M`,AO,HO),J(`MM`,AO,EO),J(`MMM`,function(e,t){return t.monthsShortRegex(e)}),J(`MMMM`,function(e,t){return t.monthsRegex(e)}),ZO([`M`,`MM`],function(e,t){t[nk]=YO(e)-1}),ZO([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?ID(n).invalidMonth=e:t[nk]=i});var xk=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),Sk=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),Ck=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,wk=VO,Tk=VO;function Ek(e,t){return e?ED(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ck).test(t)?`format`:`standalone`][e.month()]:ED(this._months)?this._months:this._months.standalone}function Dk(e,t){return e?ED(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ck.test(t)?`format`:`standalone`][e.month()]:ED(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Ok(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=FD([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=yk.call(this._shortMonthsParse,o),i===-1?null:i):(i=yk.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=yk.call(this._shortMonthsParse,o),i===-1?(i=yk.call(this._longMonthsParse,o),i===-1?null:i):i):(i=yk.call(this._longMonthsParse,o),i===-1?(i=yk.call(this._shortMonthsParse,o),i===-1?null:i):i)}function kk(e,t,n){var r,i,a;if(this._monthsParseExact)return Ok.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=FD([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function Ak(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=YO(t);else if(t=e.localeData().monthsParse(t),!jD(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,bk(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function jk(e){return e==null?mk(this,`Month`):(Ak(this,e),K.updateOffset(this,!0),this)}function Mk(){return bk(this.year(),this.month())}function Nk(e){return this._monthsParseExact?(OD(this,`_monthsRegex`)||Fk.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(OD(this,`_monthsShortRegex`)||(this._monthsShortRegex=wk),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Pk(e){return this._monthsParseExact?(OD(this,`_monthsRegex`)||Fk.call(this),e?this._monthsStrictRegex:this._monthsRegex):(OD(this,`_monthsRegex`)||(this._monthsRegex=Tk),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Fk(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=FD([2e3,i]),o=qO(this.monthsShort(a,``)),s=qO(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function Ik(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Lk(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Rk(e,t,n){var r=7+t-n;return-((7+Lk(e,0,r).getUTCDay()-t)%7)+r-1}function zk(e,t,n,r,i){var a=(7+n-r)%7,o=Rk(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=uk(c)+s):s>uk(e)?(c=e+1,l=s-uk(e)):(c=e,l=s),{year:c,dayOfYear:l}}function Bk(e,t,n){var r=Rk(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+Vk(o,t,n)):i>Vk(e.year(),t,n)?(a=i-Vk(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function Vk(e,t,n){var r=Rk(e,t,n),i=Rk(e+1,t,n);return(uk(e)-r+i)/7}q(`w`,[`ww`,2],`wo`,`week`),q(`W`,[`WW`,2],`Wo`,`isoWeek`),J(`w`,AO,HO),J(`ww`,AO,EO),J(`W`,AO,HO),J(`WW`,AO,EO),QO([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=YO(e)});function Hk(e){return Bk(e,this._week.dow,this._week.doy).week}var Uk={dow:0,doy:6};function Wk(){return this._week.dow}function Gk(){return this._week.doy}function Kk(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function qk(e){var t=Bk(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}q(`d`,0,`do`,`day`),q(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),q(`e`,0,0,`weekday`),q(`E`,0,0,`isoWeekday`),J(`d`,AO),J(`e`,AO),J(`E`,AO),J(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),J(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),J(`dddd`,function(e,t){return t.weekdaysRegex(e)}),QO([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?ID(n).invalidWeekday=e:t.d=i}),QO([`d`,`e`,`E`],function(e,t,n,r){t[r]=YO(e)});function Jk(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function Yk(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Xk(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Zk=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),Qk=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),$k=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),eA=VO,tA=VO,nA=VO;function rA(e,t){var n=ED(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?Xk(n,this._week.dow):e?n[e.day()]:n}function iA(e){return e===!0?Xk(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function aA(e){return e===!0?Xk(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function oA(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=FD([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=yk.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=yk.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=yk.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=yk.call(this._weekdaysParse,o),i!==-1||(i=yk.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=yk.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=yk.call(this._shortWeekdaysParse,o),i!==-1||(i=yk.call(this._weekdaysParse,o),i!==-1)?i:(i=yk.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=yk.call(this._minWeekdaysParse,o),i!==-1||(i=yk.call(this._weekdaysParse,o),i!==-1)?i:(i=yk.call(this._shortWeekdaysParse,o),i===-1?null:i))}function sA(e,t,n){var r,i,a;if(this._weekdaysParseExact)return oA.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=FD([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function cA(e){if(!this.isValid())return e==null?NaN:this;var t=mk(this,`Day`);return e==null?t:(e=Jk(e,this.localeData()),this.add(e-t,`d`))}function lA(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function uA(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=Yk(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function dA(e){return this._weekdaysParseExact?(OD(this,`_weekdaysRegex`)||mA.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(OD(this,`_weekdaysRegex`)||(this._weekdaysRegex=eA),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function fA(e){return this._weekdaysParseExact?(OD(this,`_weekdaysRegex`)||mA.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(OD(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=tA),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function pA(e){return this._weekdaysParseExact?(OD(this,`_weekdaysRegex`)||mA.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(OD(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=nA),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function mA(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=FD([2e3,1]).day(a),s=qO(this.weekdaysMin(o,``)),c=qO(this.weekdaysShort(o,``)),l=qO(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function hA(){return this.hours()%12||12}function gA(){return this.hours()||24}q(`H`,[`HH`,2],0,`hour`),q(`h`,[`hh`,2],0,hA),q(`k`,[`kk`,2],0,gA),q(`hmm`,0,0,function(){return``+hA.apply(this)+tO(this.minutes(),2)}),q(`hmmss`,0,0,function(){return``+hA.apply(this)+tO(this.minutes(),2)+tO(this.seconds(),2)}),q(`Hmm`,0,0,function(){return``+this.hours()+tO(this.minutes(),2)}),q(`Hmmss`,0,0,function(){return``+this.hours()+tO(this.minutes(),2)+tO(this.seconds(),2)});function _A(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}_A(`a`,!0),_A(`A`,!1);function vA(e,t){return t._meridiemParse}J(`a`,vA),J(`A`,vA),J(`H`,AO,UO),J(`h`,AO,HO),J(`k`,AO,HO),J(`HH`,AO,EO),J(`hh`,AO,EO),J(`kk`,AO,EO),J(`hmm`,jO),J(`hmmss`,MO),J(`Hmm`,jO),J(`Hmmss`,MO),ZO([`H`,`HH`],ik),ZO([`k`,`kk`],function(e,t,n){var r=YO(e);t[ik]=r===24?0:r}),ZO([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ZO([`h`,`hh`],function(e,t,n){t[ik]=YO(e),ID(n).bigHour=!0}),ZO(`hmm`,function(e,t,n){var r=e.length-2;t[ik]=YO(e.substr(0,r)),t[ak]=YO(e.substr(r)),ID(n).bigHour=!0}),ZO(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[ik]=YO(e.substr(0,r)),t[ak]=YO(e.substr(r,2)),t[ok]=YO(e.substr(i)),ID(n).bigHour=!0}),ZO(`Hmm`,function(e,t,n){var r=e.length-2;t[ik]=YO(e.substr(0,r)),t[ak]=YO(e.substr(r))}),ZO(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[ik]=YO(e.substr(0,r)),t[ak]=YO(e.substr(r,2)),t[ok]=YO(e.substr(i))});function yA(e){return(e+``).toLowerCase().charAt(0)===`p`}var bA=/[ap]\.?m?\.?/i,xA=pk(`Hours`,!0);function SA(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var CA={calendar:$D,longDateFormat:uO,invalidDate:fO,ordinal:mO,dayOfMonthOrdinalParse:hO,relativeTime:_O,months:xk,monthsShort:Sk,week:Uk,weekdays:Zk,weekdaysMin:$k,weekdaysShort:Qk,meridiemParse:bA},wA={},TA={},EA;function DA(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function OA(e){return e&&e.toLowerCase().replace(`_`,`-`)}function kA(e){for(var t=0,n,r,i,a;t<e.length;){for(a=OA(e[t]).split(`-`),n=a.length,r=OA(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=jA(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&DA(a,r)>=n-1)break;n--}t++}return EA}function AA(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function jA(t){var n=null,r;if(wA[t]===void 0&&typeof module<`u`&&module&&module.exports&&AA(t))try{n=EA._abbr,r=e,r(`./locale/`+t),MA(n)}catch{wA[t]=null}return wA[t]}function MA(e,t){var n;return e&&(n=AD(t)?FA(e):NA(e,t),n?EA=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),EA._abbr}function NA(e,t){if(t!==null){var n,r=CA;if(t.abbr=e,wA[e]!=null)qD(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=wA[e]._config;else if(t.parentLocale!=null)if(wA[t.parentLocale]!=null)r=wA[t.parentLocale]._config;else if(n=jA(t.parentLocale),n!=null)r=n._config;else return TA[t.parentLocale]||(TA[t.parentLocale]=[]),TA[t.parentLocale].push({name:e,config:t}),null;return wA[e]=new ZD(XD(r,t)),TA[e]&&TA[e].forEach(function(e){NA(e.name,e.config)}),MA(e),wA[e]}else return delete wA[e],null}function PA(e,t){if(t!=null){var n,r,i=CA;wA[e]!=null&&wA[e].parentLocale!=null?wA[e].set(XD(wA[e]._config,t)):(r=jA(e),r!=null&&(i=r._config),t=XD(i,t),r??(t.abbr=e),n=new ZD(t),n.parentLocale=wA[e],wA[e]=n),MA(e)}else wA[e]!=null&&(wA[e].parentLocale==null?wA[e]!=null&&delete wA[e]:(wA[e]=wA[e].parentLocale,e===MA()&&MA(e)));return wA[e]}function FA(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return EA;if(!ED(e)){if(t=jA(e),t)return t;e=[e]}return kA(e)}function IA(){return QD(wA)}function LA(e){var t,n=e._a;return n&&ID(e).overflow===-2&&(t=n[nk]<0||n[nk]>11?nk:n[rk]<1||n[rk]>bk(n[tk],n[nk])?rk:n[ik]<0||n[ik]>24||n[ik]===24&&(n[ak]!==0||n[ok]!==0||n[sk]!==0)?ik:n[ak]<0||n[ak]>59?ak:n[ok]<0||n[ok]>59?ok:n[sk]<0||n[sk]>999?sk:-1,ID(e)._overflowDayOfYear&&(t<tk||t>rk)&&(t=rk),ID(e)._overflowWeeks&&t===-1&&(t=ck),ID(e)._overflowWeekday&&t===-1&&(t=lk),ID(e).overflow=t),e}var RA=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zA=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,BA=/Z|[+-]\d\d(?::?\d\d)?/,VA=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],HA=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],UA=/^\/?Date\((-?\d+)/i,WA=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,GA={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function KA(e){var t,n,r=e._i,i=RA.exec(r)||zA.exec(r),a,o,s,c,l=VA.length,u=HA.length;if(i){for(ID(e).iso=!0,t=0,n=l;t<n;t++)if(VA[t][1].exec(i[1])){o=VA[t][0],a=VA[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(HA[t][1].exec(i[3])){s=(i[2]||` `)+HA[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(BA.exec(i[4]))c=`Z`;else{e._isValid=!1;return}e._f=o+(s||``)+(c||``),ij(e)}else e._isValid=!1}function qA(e,t,n,r,i,a){var o=[JA(e),Sk.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function JA(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function YA(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function XA(e,t,n){return e&&Qk.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(ID(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function ZA(e,t,n){if(e)return GA[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function QA(e){var t=WA.exec(YA(e._i)),n;if(t){if(n=qA(t[4],t[3],t[2],t[5],t[6],t[7]),!XA(t[1],n,e))return;e._a=n,e._tzm=ZA(t[8],t[9],t[10]),e._d=Lk.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ID(e).rfc2822=!0}else e._isValid=!1}function $A(e){var t=UA.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(KA(e),e._isValid===!1)delete e._isValid;else return;if(QA(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:K.createFromInputFallback(e)}K.createFromInputFallback=GD(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function ej(e,t,n){return e??t??n}function tj(e){var t=new Date(K.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function nj(e){var t,n,r=[],i,a,o;if(!e._d){for(i=tj(e),e._w&&e._a[rk]==null&&e._a[nk]==null&&rj(e),e._dayOfYear!=null&&(o=ej(e._a[tk],i[tk]),(e._dayOfYear>uk(o)||e._dayOfYear===0)&&(ID(e)._overflowDayOfYear=!0),n=Lk(o,0,e._dayOfYear),e._a[nk]=n.getUTCMonth(),e._a[rk]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ik]===24&&e._a[ak]===0&&e._a[ok]===0&&e._a[sk]===0&&(e._nextDay=!0,e._a[ik]=0),e._d=(e._useUTC?Lk:Ik).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ik]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(ID(e).weekdayMismatch=!0)}}function rj(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=ej(t.GG,e._a[tk],Bk(fj(),1,4).year),r=ej(t.W,1),i=ej(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Bk(fj(),a,o),n=ej(t.gg,e._a[tk],l.year),r=ej(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>Vk(n,a,o)?ID(e)._overflowWeeks=!0:c==null?(s=zk(n,r,i,a,o),e._a[tk]=s.year,e._dayOfYear=s.dayOfYear):ID(e)._overflowWeekday=!0}K.ISO_8601=function(){},K.RFC_2822=function(){};function ij(e){if(e._f===K.ISO_8601){KA(e);return}if(e._f===K.RFC_2822){QA(e);return}e._a=[],ID(e).empty=!0;var t=``+e._i,n,r,i,a,o,s=t.length,c=0,l,u;for(i=lO(e._f,e._locale).match(nO)||[],u=i.length,n=0;n<u;n++)a=i[n],r=(t.match(GO(a,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&ID(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),aO[a]?(r?ID(e).empty=!1:ID(e).unusedTokens.push(a),$O(a,r,e)):e._strict&&!r&&ID(e).unusedTokens.push(a);ID(e).charsLeftOver=s-c,t.length>0&&ID(e).unusedInput.push(t),e._a[ik]<=12&&ID(e).bigHour===!0&&e._a[ik]>0&&(ID(e).bigHour=void 0),ID(e).parsedDateParts=e._a.slice(0),ID(e).meridiem=e._meridiem,e._a[ik]=aj(e._locale,e._a[ik],e._meridiem),l=ID(e).era,l!==null&&(e._a[tk]=e._locale.erasConvertYear(l,e._a[tk])),nj(e),LA(e)}function aj(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function oj(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){ID(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=VD({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],ij(t),LD(t)&&(o=!0),a+=ID(t).charsLeftOver,a+=ID(t).unusedTokens.length*10,ID(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));PD(e,n||t)}function sj(e){if(!e._d){var t=SO(e._i),n=t.day===void 0?t.date:t.day;e._a=ND([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),nj(e)}}function cj(e){var t=new HD(LA(lj(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function lj(e){var t=e._i,n=e._f;return e._locale=e._locale||FA(e._l),t===null||n===void 0&&t===``?RD({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),UD(t)?new HD(LA(t)):(MD(t)?e._d=t:ED(n)?oj(e):n?ij(e):uj(e),LD(e)||(e._d=null),e))}function uj(e){var t=e._i;AD(t)?e._d=new Date(K.now()):MD(t)?e._d=new Date(t.valueOf()):typeof t==`string`?$A(e):ED(t)?(e._a=ND(t.slice(0),function(e){return parseInt(e,10)}),nj(e)):DD(t)?sj(e):jD(t)?e._d=new Date(t):K.createFromInputFallback(e)}function dj(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(DD(e)&&kD(e)||ED(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,cj(a)}function fj(e,t,n,r){return dj(e,t,n,r,!1)}var pj=GD(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=fj.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:RD()}),mj=GD(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=fj.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:RD()});function hj(e,t){var n,r;if(t.length===1&&ED(t[0])&&(t=t[0]),!t.length)return fj();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function gj(){return hj(`isBefore`,[].slice.call(arguments,0))}function _j(){return hj(`isAfter`,[].slice.call(arguments,0))}var vj=function(){return Date.now?Date.now():+new Date},yj=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function bj(e){var t,n=!1,r,i=yj.length;for(t in e)if(OD(e,t)&&!(yk.call(yj,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[yj[r]]){if(n)return!1;parseFloat(e[yj[r]])!==YO(e[yj[r]])&&(n=!0)}return!0}function xj(){return this._isValid}function Sj(){return Gj(NaN)}function Cj(e){var t=SO(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=bj(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=FA(),this._bubble()}function wj(e){return e instanceof Cj}function Tj(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ej(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&YO(e[o])!==YO(t[o]))&&a++;return a+i}function Dj(e,t){q(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+tO(~~(e/60),2)+t+tO(~~e%60,2)})}Dj(`Z`,`:`),Dj(`ZZ`,``),J(`Z`,zO),J(`ZZ`,zO),ZO([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=kj(zO,e)});var Oj=/([\+\-]|\d\d)/gi;function kj(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(Oj)||[`-`,0,0],a=+(i[1]*60)+YO(i[2]),a===0?0:i[0]===`+`?a:-a)}function Aj(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(UD(e)||MD(e)?e.valueOf():fj(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),K.updateOffset(n,!1),n):fj(e).local()}function jj(e){return-Math.round(e._d.getTimezoneOffset())}K.updateOffset=function(){};function Mj(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=kj(zO,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=jj(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,`m`),r!==e&&(!t||this._changeInProgress?Xj(this,Gj(e-r,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,K.updateOffset(this,!0),null)),this}else return this._isUTC?r:jj(this)}function Nj(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function Pj(e){return this.utcOffset(0,e)}function Fj(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jj(this),`m`)),this}function Ij(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=kj(RO,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function Lj(e){return this.isValid()?(e=e?fj(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Rj(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zj(){if(!AD(this._isDSTShifted))return this._isDSTShifted;var e={},t;return VD(e,this),e=lj(e),e._a?(t=e._isUTC?FD(e._a):fj(e._a),this._isDSTShifted=this.isValid()&&Ej(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Bj(){return this.isValid()?!this._isUTC:!1}function Vj(){return this.isValid()?this._isUTC:!1}function Hj(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Uj=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Wj=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gj(e,t){var n=e,r=null,i,a,o;return wj(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:jD(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=Uj.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:YO(r[rk])*i,h:YO(r[ik])*i,m:YO(r[ak])*i,s:YO(r[ok])*i,ms:YO(Tj(r[sk]*1e3))*i}):(r=Wj.exec(e))?(i=r[1]===`-`?-1:1,n={y:Kj(r[2],i),M:Kj(r[3],i),w:Kj(r[4],i),d:Kj(r[5],i),h:Kj(r[6],i),m:Kj(r[7],i),s:Kj(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=Jj(fj(n.from),fj(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new Cj(n),wj(e)&&OD(e,`_locale`)&&(a._locale=e._locale),wj(e)&&OD(e,`_isValid`)&&(a._isValid=e._isValid),a}Gj.fn=Cj.prototype,Gj.invalid=Sj;function Kj(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function qj(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function Jj(e,t){var n;return e.isValid()&&t.isValid()?(t=Aj(t,e),e.isBefore(t)?n=qj(e,t):(n=qj(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Yj(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(qD(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=Gj(n,r),Xj(this,i,e),this}}function Xj(e,t,n,r){var i=t._milliseconds,a=Tj(t._days),o=Tj(t._months);e.isValid()&&(r??=!0,o&&Ak(e,mk(e,`Month`)+o*n),a&&hk(e,`Date`,mk(e,`Date`)+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&K.updateOffset(e,a||o))}var Zj=Yj(1,`add`),Qj=Yj(-1,`subtract`);function $j(e){return typeof e==`string`||e instanceof String}function eM(e){return UD(e)||MD(e)||$j(e)||jD(e)||nM(e)||tM(e)||e==null}function tM(e){var t=DD(e)&&!kD(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n||=OD(e,a);return t&&n}function nM(e){var t=ED(e),n=!1;return t&&(n=e.filter(function(t){return!jD(t)&&$j(e)}).length===0),t&&n}function rM(e){var t=DD(e)&&!kD(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=OD(e,a);return t&&n}function iM(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function aM(e,t){arguments.length===1&&(arguments[0]?eM(arguments[0])?(e=arguments[0],t=void 0):rM(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||fj(),r=Aj(n,this).startOf(`day`),i=K.calendarFormat(this,r)||`sameElse`,a=t&&(JD(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,fj(n)))}function oM(){return new HD(this)}function sM(e,t){var n=UD(e)?e:fj(e);return this.isValid()&&n.isValid()?(t=xO(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function cM(e,t){var n=UD(e)?e:fj(e);return this.isValid()&&n.isValid()?(t=xO(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function lM(e,t,n,r){var i=UD(e)?e:fj(e),a=UD(t)?t:fj(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function uM(e,t){var n=UD(e)?e:fj(e),r;return this.isValid()&&n.isValid()?(t=xO(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function dM(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function fM(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function pM(e,t,n){var r,i,a;if(!this.isValid()||(r=Aj(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=xO(t),t){case`year`:a=mM(this,r)/12;break;case`month`:a=mM(this,r);break;case`quarter`:a=mM(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:JO(a)}function mM(e,t){if(e.date()<t.date())return-mM(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}K.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,K.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function hM(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function gM(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?cO(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):JD(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,cO(n,`Z`)):cO(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function _M(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function vM(e){e||=this.isUtc()?K.defaultFormatUtc:K.defaultFormat;var t=cO(this,e);return this.localeData().postformat(t)}function yM(e,t){return this.isValid()&&(UD(e)&&e.isValid()||fj(e).isValid())?Gj({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bM(e){return this.from(fj(),e)}function xM(e,t){return this.isValid()&&(UD(e)&&e.isValid()||fj(e).isValid())?Gj({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function SM(e){return this.to(fj(),e)}function CM(e){var t;return e===void 0?this._locale._abbr:(t=FA(e),t!=null&&(this._locale=t),this)}var wM=GD(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function TM(){return this._locale}var EM=1e3,DM=60*EM,OM=60*DM,kM=146097*24*OM;function AM(e,t){return(e%t+t)%t}function jM(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-kM:new Date(e,t,n).valueOf()}function MM(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-kM:Date.UTC(e,t,n)}function NM(e){var t,n;if(e=xO(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?MM:jM,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=AM(t+(this._isUTC?0:this.utcOffset()*DM),OM);break;case`minute`:t=this._d.valueOf(),t-=AM(t,DM);break;case`second`:t=this._d.valueOf(),t-=AM(t,EM);break}return this._d.setTime(t),K.updateOffset(this,!0),this}function PM(e){var t,n;if(e=xO(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?MM:jM,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=OM-AM(t+(this._isUTC?0:this.utcOffset()*DM),OM)-1;break;case`minute`:t=this._d.valueOf(),t+=DM-AM(t,DM)-1;break;case`second`:t=this._d.valueOf(),t+=EM-AM(t,EM)-1;break}return this._d.setTime(t),K.updateOffset(this,!0),this}function FM(){return this._d.valueOf()-(this._offset||0)*6e4}function IM(){return Math.floor(this.valueOf()/1e3)}function LM(){return new Date(this.valueOf())}function RM(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zM(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function BM(){return this.isValid()?this.toISOString():null}function VM(){return LD(this)}function HM(){return PD({},ID(this))}function UM(){return ID(this).overflow}function WM(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q(`N`,0,0,`eraAbbr`),q(`NN`,0,0,`eraAbbr`),q(`NNN`,0,0,`eraAbbr`),q(`NNNN`,0,0,`eraName`),q(`NNNNN`,0,0,`eraNarrow`),q(`y`,[`y`,1],`yo`,`eraYear`),q(`y`,[`yy`,2],0,`eraYear`),q(`y`,[`yyy`,3],0,`eraYear`),q(`y`,[`yyyy`,4],0,`eraYear`),J(`N`,tN),J(`NN`,tN),J(`NNN`,tN),J(`NNNN`,nN),J(`NNNNN`,rN),ZO([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ID(n).era=i:ID(n).invalidEra=e}),J(`y`,IO),J(`yy`,IO),J(`yyy`,IO),J(`yyyy`,IO),J(`yo`,iN),ZO([`y`,`yy`,`yyy`,`yyyy`],tk),ZO([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[tk]=n._locale.eraYearOrdinalParse(e,i):t[tk]=parseInt(e,10)});function GM(e,t){var n,r,i,a=this._eras||FA(`en`)._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case`string`:i=K(a[n].since).startOf(`day`),a[n].since=i.valueOf();break}switch(typeof a[n].until){case`undefined`:a[n].until=1/0;break;case`string`:i=K(a[n].until).startOf(`day`).valueOf(),a[n].until=i.valueOf();break}}return a}function KM(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r];break}else if([o,s,c].indexOf(e)>=0)return a[r]}function qM(e,t){var n=e.since<=e.until?1:-1;return t===void 0?K(e.since).year():K(e.since).year()+(t-e.offset)*n}function JM(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function YM(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function XM(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function ZM(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf(`day`).valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-K(i[e].since).year())*n+i[e].offset;return this.year()}function QM(e){return OD(this,`_erasNameRegex`)||aN.call(this),e?this._erasNameRegex:this._erasRegex}function $M(e){return OD(this,`_erasAbbrRegex`)||aN.call(this),e?this._erasAbbrRegex:this._erasRegex}function eN(e){return OD(this,`_erasNarrowRegex`)||aN.call(this),e?this._erasNarrowRegex:this._erasRegex}function tN(e,t){return t.erasAbbrRegex(e)}function nN(e,t){return t.erasNameRegex(e)}function rN(e,t){return t.erasNarrowRegex(e)}function iN(e,t){return t._eraYearOrdinalRegex||IO}function aN(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=qO(l[i].name),s=qO(l[i].abbr),c=qO(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}q(0,[`gg`,2],0,function(){return this.weekYear()%100}),q(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function oN(e,t){q(0,[e,e.length],0,t)}oN(`gggg`,`weekYear`),oN(`ggggg`,`weekYear`),oN(`GGGG`,`isoWeekYear`),oN(`GGGGG`,`isoWeekYear`),J(`G`,LO),J(`g`,LO),J(`GG`,AO,EO),J(`gg`,AO,EO),J(`GGGG`,PO,OO),J(`gggg`,PO,OO),J(`GGGGG`,FO,kO),J(`ggggg`,FO,kO),QO([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=YO(e)}),QO([`gg`,`GG`],function(e,t,n,r){t[r]=K.parseTwoDigitYear(e)});function sN(e){return pN.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function cN(e){return pN.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function lN(){return Vk(this.year(),1,4)}function uN(){return Vk(this.isoWeekYear(),1,4)}function dN(){var e=this.localeData()._week;return Vk(this.year(),e.dow,e.doy)}function fN(){var e=this.localeData()._week;return Vk(this.weekYear(),e.dow,e.doy)}function pN(e,t,n,r,i){var a;return e==null?Bk(this,r,i).year:(a=Vk(e,r,i),t>a&&(t=a),mN.call(this,e,t,n,r,i))}function mN(e,t,n,r,i){var a=zk(e,t,n,r,i),o=Lk(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}q(`Q`,0,`Qo`,`quarter`),J(`Q`,TO),ZO(`Q`,function(e,t){t[nk]=(YO(e)-1)*3});function hN(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}q(`D`,[`DD`,2],`Do`,`date`),J(`D`,AO,HO),J(`DD`,AO,EO),J(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ZO([`D`,`DD`],rk),ZO(`Do`,function(e,t){t[rk]=YO(e.match(AO)[0])});var gN=pk(`Date`,!0);q(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),J(`DDD`,NO),J(`DDDD`,DO),ZO([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=YO(e)});function _N(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}q(`m`,[`mm`,2],0,`minute`),J(`m`,AO,UO),J(`mm`,AO,EO),ZO([`m`,`mm`],ak);var vN=pk(`Minutes`,!1);q(`s`,[`ss`,2],0,`second`),J(`s`,AO,UO),J(`ss`,AO,EO),ZO([`s`,`ss`],ok);var yN=pk(`Seconds`,!1);q(`S`,0,0,function(){return~~(this.millisecond()/100)}),q(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),q(0,[`SSS`,3],0,`millisecond`),q(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),q(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),q(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),q(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),q(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),q(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),J(`S`,NO,TO),J(`SS`,NO,EO),J(`SSS`,NO,DO);var bN,xN;for(bN=`SSSS`;bN.length<=9;bN+=`S`)J(bN,IO);function SN(e,t){t[sk]=YO((`0.`+e)*1e3)}for(bN=`S`;bN.length<=9;bN+=`S`)ZO(bN,SN);xN=pk(`Milliseconds`,!1),q(`z`,0,0,`zoneAbbr`),q(`zz`,0,0,`zoneName`);function CN(){return this._isUTC?`UTC`:``}function wN(){return this._isUTC?`Coordinated Universal Time`:``}var Y=HD.prototype;Y.add=Zj,Y.calendar=aM,Y.clone=oM,Y.diff=pM,Y.endOf=PM,Y.format=vM,Y.from=yM,Y.fromNow=bM,Y.to=xM,Y.toNow=SM,Y.get=gk,Y.invalidAt=UM,Y.isAfter=sM,Y.isBefore=cM,Y.isBetween=lM,Y.isSame=uM,Y.isSameOrAfter=dM,Y.isSameOrBefore=fM,Y.isValid=VM,Y.lang=wM,Y.locale=CM,Y.localeData=TM,Y.max=mj,Y.min=pj,Y.parsingFlags=HM,Y.set=_k,Y.startOf=NM,Y.subtract=Qj,Y.toArray=RM,Y.toObject=zM,Y.toDate=LM,Y.toISOString=gM,Y.inspect=_M,typeof Symbol<`u`&&Symbol.for!=null&&(Y[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Y.toJSON=BM,Y.toString=hM,Y.unix=IM,Y.valueOf=FM,Y.creationData=WM,Y.eraName=JM,Y.eraNarrow=YM,Y.eraAbbr=XM,Y.eraYear=ZM,Y.year=dk,Y.isLeapYear=fk,Y.weekYear=sN,Y.isoWeekYear=cN,Y.quarter=Y.quarters=hN,Y.month=jk,Y.daysInMonth=Mk,Y.week=Y.weeks=Kk,Y.isoWeek=Y.isoWeeks=qk,Y.weeksInYear=dN,Y.weeksInWeekYear=fN,Y.isoWeeksInYear=lN,Y.isoWeeksInISOWeekYear=uN,Y.date=gN,Y.day=Y.days=cA,Y.weekday=lA,Y.isoWeekday=uA,Y.dayOfYear=_N,Y.hour=Y.hours=xA,Y.minute=Y.minutes=vN,Y.second=Y.seconds=yN,Y.millisecond=Y.milliseconds=xN,Y.utcOffset=Mj,Y.utc=Pj,Y.local=Fj,Y.parseZone=Ij,Y.hasAlignedHourOffset=Lj,Y.isDST=Rj,Y.isLocal=Bj,Y.isUtcOffset=Vj,Y.isUtc=Hj,Y.isUTC=Hj,Y.zoneAbbr=CN,Y.zoneName=wN,Y.dates=GD(`dates accessor is deprecated. Use date instead.`,gN),Y.months=GD(`months accessor is deprecated. Use month instead`,jk),Y.years=GD(`years accessor is deprecated. Use year instead`,dk),Y.zone=GD(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,Nj),Y.isDSTShifted=GD(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,zj);function TN(e){return fj(e*1e3)}function EN(){return fj.apply(null,arguments).parseZone()}function DN(e){return e}var ON=ZD.prototype;ON.calendar=eO,ON.longDateFormat=dO,ON.invalidDate=pO,ON.ordinal=gO,ON.preparse=DN,ON.postformat=DN,ON.relativeTime=vO,ON.pastFuture=yO,ON.set=YD,ON.eras=GM,ON.erasParse=KM,ON.erasConvertYear=qM,ON.erasAbbrRegex=$M,ON.erasNameRegex=QM,ON.erasNarrowRegex=eN,ON.months=Ek,ON.monthsShort=Dk,ON.monthsParse=kk,ON.monthsRegex=Pk,ON.monthsShortRegex=Nk,ON.week=Hk,ON.firstDayOfYear=Gk,ON.firstDayOfWeek=Wk,ON.weekdays=rA,ON.weekdaysMin=aA,ON.weekdaysShort=iA,ON.weekdaysParse=sA,ON.weekdaysRegex=dA,ON.weekdaysShortRegex=fA,ON.weekdaysMinRegex=pA,ON.isPM=yA,ON.meridiem=SA;function kN(e,t,n,r){var i=FA(),a=FD().set(r,t);return i[n](a,e)}function AN(e,t,n){if(jD(e)&&(t=e,e=void 0),e||=``,t!=null)return kN(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=kN(e,r,n,`month`);return i}function jN(e,t,n,r){typeof e==`boolean`?(jD(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,jD(t)&&(n=t,t=void 0),t||=``);var i=FA(),a=e?i._week.dow:0,o,s=[];if(n!=null)return kN(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=kN(t,(o+a)%7,r,`day`);return s}function MN(e,t){return AN(e,t,`months`)}function NN(e,t){return AN(e,t,`monthsShort`)}function PN(e,t,n){return jN(e,t,n,`weekdays`)}function FN(e,t,n){return jN(e,t,n,`weekdaysShort`)}function IN(e,t,n){return jN(e,t,n,`weekdaysMin`)}MA(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(YO(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),K.lang=GD(`moment.lang is deprecated. Use moment.locale instead.`,MA),K.langData=GD(`moment.langData is deprecated. Use moment.localeData instead.`,FA);var LN=Math.abs;function RN(){var e=this._data;return this._milliseconds=LN(this._milliseconds),this._days=LN(this._days),this._months=LN(this._months),e.milliseconds=LN(e.milliseconds),e.seconds=LN(e.seconds),e.minutes=LN(e.minutes),e.hours=LN(e.hours),e.months=LN(e.months),e.years=LN(e.years),this}function zN(e,t,n,r){var i=Gj(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function BN(e,t){return zN(this,e,t,1)}function Ote(e,t){return zN(this,e,t,-1)}function VN(e){return e<0?Math.floor(e):Math.ceil(e)}function kte(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=VN(UN(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=JO(e/1e3),r.seconds=i%60,a=JO(i/60),r.minutes=a%60,o=JO(a/60),r.hours=o%24,t+=JO(o/24),c=JO(HN(t)),n+=c,t-=VN(UN(c)),s=JO(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function HN(e){return e*4800/146097}function UN(e){return e*146097/4800}function Ate(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=xO(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+HN(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(UN(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function WN(e){return function(){return this.as(e)}}var GN=WN(`ms`),jte=WN(`s`),Mte=WN(`m`),Nte=WN(`h`),Pte=WN(`d`),Fte=WN(`w`),Ite=WN(`M`),Lte=WN(`Q`),Rte=WN(`y`),zte=GN;function Bte(){return Gj(this)}function Vte(e){return e=xO(e),this.isValid()?this[e+`s`]():NaN}function KN(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hte=KN(`milliseconds`),Ute=KN(`seconds`),Wte=KN(`minutes`),Gte=KN(`hours`),Kte=KN(`days`),qte=KN(`months`),Jte=KN(`years`);function Yte(){return JO(this.days()/7)}var qN=Math.round,JN={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xte(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Zte(e,t,n,r){var i=Gj(e).abs(),a=qN(i.as(`s`)),o=qN(i.as(`m`)),s=qN(i.as(`h`)),c=qN(i.as(`d`)),l=qN(i.as(`M`)),u=qN(i.as(`w`)),d=qN(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,Xte.apply(null,f)}function Qte(e){return e===void 0?qN:typeof e==`function`?(qN=e,!0):!1}function $te(e,t){return JN[e]===void 0?!1:t===void 0?JN[e]:(JN[e]=t,e===`s`&&(JN.ss=t-1),!0)}function ene(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=JN,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},JN,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=Zte(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var YN=Math.abs;function XN(e){return(e>0)-(e<0)||+e}function ZN(){if(!this.isValid())return this.localeData().invalidDate();var e=YN(this._milliseconds)/1e3,t=YN(this._days),n=YN(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=JO(e/60),i=JO(r/60),e%=60,r%=60,a=JO(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=XN(this._months)===XN(s)?``:`-`,u=XN(this._days)===XN(s)?``:`-`,d=XN(this._milliseconds)===XN(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var QN=Cj.prototype;QN.isValid=xj,QN.abs=RN,QN.add=BN,QN.subtract=Ote,QN.as=Ate,QN.asMilliseconds=GN,QN.asSeconds=jte,QN.asMinutes=Mte,QN.asHours=Nte,QN.asDays=Pte,QN.asWeeks=Fte,QN.asMonths=Ite,QN.asQuarters=Lte,QN.asYears=Rte,QN.valueOf=zte,QN._bubble=kte,QN.clone=Bte,QN.get=Vte,QN.milliseconds=Hte,QN.seconds=Ute,QN.minutes=Wte,QN.hours=Gte,QN.days=Kte,QN.weeks=Yte,QN.months=qte,QN.years=Jte,QN.humanize=ene,QN.toISOString=ZN,QN.toString=ZN,QN.toJSON=ZN,QN.locale=CM,QN.localeData=TM,QN.toIsoString=GD(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,ZN),QN.lang=wM,q(`X`,0,0,`unix`),q(`x`,0,0,`valueOf`),J(`x`,LO),J(`X`,BO),ZO(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),ZO(`x`,function(e,t,n){n._d=new Date(YO(e))}),K.version=`2.30.1`,Tte(fj),K.fn=Y,K.min=gj,K.max=_j,K.now=vj,K.utc=FD,K.unix=TN,K.months=MN,K.isDate=MD,K.locale=MA,K.invalid=RD,K.duration=Gj,K.isMoment=UD,K.weekdays=PN,K.parseZone=EN,K.localeData=FA,K.isDuration=wj,K.monthsShort=NN,K.weekdaysMin=IN,K.defineLocale=NA,K.updateLocale=PA,K.locales=IA,K.weekdaysShort=FN,K.normalizeUnits=xO,K.relativeTimeRounding=Qte,K.relativeTimeThreshold=$te,K.calendarFormat=iM,K.prototype=Y,K.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`};var $N=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function eP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var tP={},nP,rP;function iP(){if(rP)return nP;rP=1;var e=function(e){return e&&e.Math===Math&&e};return nP=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof $N==`object`&&$N)||e(typeof nP==`object`&&nP)||(function(){return this})()||Function(`return this`)(),nP}var aP,oP;function sP(){return oP?aP:(oP=1,aP=function(e){try{return!!e()}catch{return!0}},aP)}var cP,lP;function uP(){return lP?cP:(lP=1,cP=!sP()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),cP)}var dP,fP;function pP(){if(fP)return dP;fP=1;var e=uP(),t=Function.prototype,n=t.apply,r=t.call;return dP=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),dP}var mP,hP;function gP(){if(hP)return mP;hP=1;var e=uP(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return mP=e?r:function(e){return function(){return n.apply(e,arguments)}},mP}var _P,vP;function yP(){if(vP)return _P;vP=1;var e=gP(),t=e({}.toString),n=e(``.slice);return _P=function(e){return n(t(e),8,-1)},_P}var bP,xP;function SP(){if(xP)return bP;xP=1;var e=yP(),t=gP();return bP=function(n){if(e(n)===`Function`)return t(n)},bP}var CP,wP;function TP(){if(wP)return CP;wP=1;var e=typeof document==`object`&&document.all;return CP=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},CP}var EP={},DP,OP;function kP(){return OP?DP:(OP=1,DP=!sP()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),DP)}var AP,jP;function MP(){if(jP)return AP;jP=1;var e=uP(),t=Function.prototype.call;return AP=e?t.bind(t):function(){return t.apply(t,arguments)},AP}var NP={},PP;function FP(){if(PP)return NP;PP=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return NP.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,NP}var IP,LP;function RP(){return LP?IP:(LP=1,IP=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},IP)}var zP,BP;function VP(){if(BP)return zP;BP=1;var e=gP(),t=sP(),n=yP(),r=Object,i=e(``.split);return zP=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,zP}var HP,UP;function WP(){return UP?HP:(UP=1,HP=function(e){return e==null},HP)}var GP,KP;function qP(){if(KP)return GP;KP=1;var e=WP(),t=TypeError;return GP=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},GP}var JP,YP;function XP(){if(YP)return JP;YP=1;var e=VP(),t=qP();return JP=function(n){return e(t(n))},JP}var ZP,QP;function $P(){if(QP)return ZP;QP=1;var e=TP();return ZP=function(t){return typeof t==`object`?t!==null:e(t)},ZP}var eF,tF;function nF(){return tF?eF:(tF=1,eF={},eF)}var rF,iF;function aF(){if(iF)return rF;iF=1;var e=nF(),t=iP(),n=TP(),r=function(e){return n(e)?e:void 0};return rF=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},rF}var oF,sF;function cF(){return sF?oF:(sF=1,oF=gP()({}.isPrototypeOf),oF)}var lF,uF;function dF(){if(uF)return lF;uF=1;var e=iP().navigator,t=e&&e.userAgent;return lF=t?String(t):``,lF}var fF,pF;function mF(){if(pF)return fF;pF=1;var e=iP(),t=dF(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),fF=s,fF}var hF,gF;function _F(){if(gF)return hF;gF=1;var e=mF(),t=sP(),n=iP().String;return hF=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),hF}var vF,yF;function bF(){return yF?vF:(yF=1,vF=_F()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,vF)}var xF,SF;function CF(){if(SF)return xF;SF=1;var e=aF(),t=TP(),n=cF(),r=bF(),i=Object;return xF=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},xF}var wF,TF;function EF(){if(TF)return wF;TF=1;var e=String;return wF=function(t){try{return e(t)}catch{return`Object`}},wF}var DF,OF;function kF(){if(OF)return DF;OF=1;var e=TP(),t=EF(),n=TypeError;return DF=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},DF}var AF,jF;function MF(){if(jF)return AF;jF=1;var e=kF(),t=WP();return AF=function(n,r){var i=n[r];return t(i)?void 0:e(i)},AF}var NF,PF;function FF(){if(PF)return NF;PF=1;var e=MP(),t=TP(),n=$P(),r=TypeError;return NF=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},NF}var IF={exports:{}},LF,RF;function zF(){return RF?LF:(RF=1,LF=!0,LF)}var BF,VF;function HF(){if(VF)return BF;VF=1;var e=iP(),t=Object.defineProperty;return BF=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},BF}var UF;function WF(){if(UF)return IF.exports;UF=1;var e=zF(),t=iP(),n=HF(),r=`__core-js_shared__`,i=IF.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),IF.exports}var GF,KF;function qF(){if(KF)return GF;KF=1;var e=WF();return GF=function(t,n){return e[t]||(e[t]=n||{})},GF}var JF,YF;function XF(){if(YF)return JF;YF=1;var e=qP(),t=Object;return JF=function(n){return t(e(n))},JF}var ZF,QF;function $F(){if(QF)return ZF;QF=1;var e=gP(),t=XF(),n=e({}.hasOwnProperty);return ZF=Object.hasOwn||function(e,r){return n(t(e),r)},ZF}var eI,tI;function nI(){if(tI)return eI;tI=1;var e=gP(),t=0,n=Math.random(),r=e(1.1.toString);return eI=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},eI}var rI,iI;function aI(){if(iI)return rI;iI=1;var e=iP(),t=qF(),n=$F(),r=nI(),i=_F(),a=bF(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return rI=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},rI}var oI,sI;function cI(){if(sI)return oI;sI=1;var e=MP(),t=$P(),n=CF(),r=MF(),i=FF(),a=aI(),o=TypeError,s=a(`toPrimitive`);return oI=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},oI}var lI,uI;function dI(){if(uI)return lI;uI=1;var e=cI(),t=CF();return lI=function(n){var r=e(n,`string`);return t(r)?r:r+``},lI}var fI,pI;function mI(){if(pI)return fI;pI=1;var e=iP(),t=$P(),n=e.document,r=t(n)&&t(n.createElement);return fI=function(e){return r?n.createElement(e):{}},fI}var hI,gI;function _I(){if(gI)return hI;gI=1;var e=kP(),t=sP(),n=mI();return hI=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),hI}var vI;function yI(){if(vI)return EP;vI=1;var e=kP(),t=MP(),n=FP(),r=RP(),i=XP(),a=dI(),o=$F(),s=_I(),c=Object.getOwnPropertyDescriptor;return EP.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},EP}var bI,xI;function SI(){if(xI)return bI;xI=1;var e=sP(),t=TP(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return bI=r,bI}var CI,wI;function TI(){if(wI)return CI;wI=1;var e=SP(),t=kF(),n=uP(),r=e(e.bind);return CI=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},CI}var EI={},DI,OI;function kI(){return OI?DI:(OI=1,DI=kP()&&sP()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),DI)}var AI,jI;function MI(){if(jI)return AI;jI=1;var e=$P(),t=String,n=TypeError;return AI=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},AI}var NI;function PI(){if(NI)return EI;NI=1;var e=kP(),t=_I(),n=kI(),r=MI(),i=dI(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return EI.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},EI}var FI,II;function LI(){if(II)return FI;II=1;var e=kP(),t=PI(),n=RP();return FI=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},FI}var RI,zI;function X(){if(zI)return RI;zI=1;var e=iP(),t=pP(),n=SP(),r=TP(),i=yI().f,a=SI(),o=nF(),s=TI(),c=LI(),l=$F(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return RI=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},RI}var BI,VI;function HI(){if(VI)return BI;VI=1;var e=yP();return BI=Array.isArray||function(t){return e(t)===`Array`},BI}var UI;function WI(){return UI?tP:(UI=1,X()({target:`Array`,stat:!0},{isArray:HI()}),tP)}var GI,KI;function qI(){return KI?GI:(KI=1,WI(),GI=nF().Array.isArray,GI)}var JI,YI;function XI(){return YI?JI:(YI=1,JI=qI(),JI)}var ZI,QI;function $I(){return QI?ZI:(QI=1,ZI=XI(),ZI)}var eL=eP($I()),tL={},nL,rL;function iL(){return rL?nL:(rL=1,nL=gP()([].slice),nL)}var aL,oL;function sL(){if(oL)return aL;oL=1;var e=gP(),t=kF(),n=$P(),r=$F(),i=iL(),a=uP(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return aL=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},aL}var cL;function lL(){if(cL)return tL;cL=1;var e=X(),t=sL();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),tL}var uL,dL;function fL(){if(dL)return uL;dL=1;var e=iP(),t=nF();return uL=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},uL}var pL,mL;function hL(){return mL?pL:(mL=1,lL(),pL=fL()(`Function`,`bind`),pL)}var gL,_L;function vL(){if(_L)return gL;_L=1;var e=cF(),t=hL(),n=Function.prototype;return gL=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},gL}var yL,bL;function xL(){return bL?yL:(bL=1,yL=vL(),yL)}var SL,CL;function wL(){return CL?SL:(CL=1,SL=xL(),SL)}var Z=eP(wL()),TL={},EL={},DL,OL;function kL(){if(OL)return DL;OL=1;var e=iP(),t=dF(),n=yP(),r=function(e){return t.slice(0,e.length)===e};return DL=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),DL}var AL,jL;function ML(){if(jL)return AL;jL=1;var e=TypeError;return AL=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},AL}var NL,PL;function FL(){if(PL)return NL;PL=1;var e=iP(),t=pP(),n=TP(),r=kL(),i=dF(),a=iL(),o=ML(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return NL=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},NL}var IL;function LL(){if(IL)return EL;IL=1;var e=X(),t=iP(),n=FL()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),EL}var RL={},zL;function BL(){if(zL)return RL;zL=1;var e=X(),t=iP(),n=FL()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),RL}var VL;function HL(){return VL?TL:(VL=1,LL(),BL(),TL)}var UL,WL;function GL(){return WL?UL:(WL=1,HL(),UL=nF().setTimeout,UL)}var KL,qL;function JL(){return qL?KL:(qL=1,KL=GL(),KL)}var YL=eP(JL()),XL,ZL;function QL(){if(ZL)return XL;ZL=1;var e=aI()(`toStringTag`),t={};return t[e]=`z`,XL=String(t)===`[object z]`,XL}var $L,eR;function tR(){if(eR)return $L;eR=1;var e=QL(),t=TP(),n=yP(),r=aI()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return $L=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},$L}var nR={},rR,iR;function aR(){if(iR)return rR;iR=1;var e=Math.ceil,t=Math.floor;return rR=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},rR}var oR,sR;function cR(){if(sR)return oR;sR=1;var e=aR();return oR=function(t){var n=+t;return n!==n||n===0?0:e(n)},oR}var lR,uR;function dR(){if(uR)return lR;uR=1;var e=cR(),t=Math.min;return lR=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},lR}var fR,pR;function mR(){if(pR)return fR;pR=1;var e=dR();return fR=function(t){return e(t.length)},fR}var hR,gR;function _R(){if(gR)return hR;gR=1;var e=gP(),t=TP(),n=WF(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),hR=n.inspectSource,hR}var vR,yR;function bR(){if(yR)return vR;yR=1;var e=gP(),t=sP(),n=TP(),r=tR(),i=aF(),a=_R(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,vR=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,vR}var xR,SR;function CR(){if(SR)return xR;SR=1;var e=HI(),t=bR(),n=$P(),r=aI()(`species`),i=Array;return xR=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},xR}var wR,TR;function ER(){if(TR)return wR;TR=1;var e=CR();return wR=function(t,n){return new(e(t))(n===0?0:n)},wR}var DR,OR;function kR(){if(OR)return DR;OR=1;var e=TI(),t=gP(),n=VP(),r=XF(),i=mR(),a=ER(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return DR={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},DR}var AR,jR;function MR(){if(jR)return AR;jR=1;var e=sP();return AR=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},AR}var NR,PR;function FR(){if(PR)return NR;PR=1;var e=kR().forEach;return NR=MR()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},NR}var IR;function LR(){if(IR)return nR;IR=1;var e=X(),t=FR();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),nR}var RR,zR;function BR(){return zR?RR:(zR=1,LR(),RR=fL()(`Array`,`forEach`),RR)}var VR,HR;function UR(){return HR?VR:(HR=1,VR=BR(),VR)}var WR,GR;function KR(){if(GR)return WR;GR=1;var e=tR(),t=$F(),n=cF(),r=UR(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return WR=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},WR}var qR,JR;function YR(){return JR?qR:(JR=1,qR=KR(),qR)}var Q=eP(YR()),XR=typeof window<`u`&&window.moment||K,ZR={},QR={},$R,ez;function tz(){if(ez)return $R;ez=1;var e=tR(),t=String;return $R=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},$R}var nz={},rz,iz;function az(){if(iz)return rz;iz=1;var e=cR(),t=Math.max,n=Math.min;return rz=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},rz}var oz,sz;function cz(){if(sz)return oz;sz=1;var e=XP(),t=az(),n=mR(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return oz={includes:r(!0),indexOf:r(!1)},oz}var lz,uz;function dz(){return uz?lz:(uz=1,lz={},lz)}var fz,pz;function mz(){if(pz)return fz;pz=1;var e=gP(),t=$F(),n=XP(),r=cz().indexOf,i=dz(),a=e([].push);return fz=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},fz}var hz,gz;function _z(){return gz?hz:(gz=1,hz=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],hz)}var vz,yz;function bz(){if(yz)return vz;yz=1;var e=mz(),t=_z();return vz=Object.keys||function(n){return e(n,t)},vz}var xz;function Sz(){if(xz)return nz;xz=1;var e=kP(),t=kI(),n=PI(),r=MI(),i=XP(),a=bz();return nz.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},nz}var Cz,wz;function Tz(){return wz?Cz:(wz=1,Cz=aF()(`document`,`documentElement`),Cz)}var Ez,Dz;function Oz(){if(Dz)return Ez;Dz=1;var e=qF(),t=nI(),n=e(`keys`);return Ez=function(e){return n[e]||(n[e]=t(e))},Ez}var kz,Az;function jz(){if(Az)return kz;Az=1;var e=MI(),t=Sz(),n=_z(),r=dz(),i=Tz(),a=mI(),o=Oz(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,kz=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},kz}var Mz={},Nz;function Pz(){if(Nz)return Mz;Nz=1;var e=mz(),t=_z().concat(`length`,`prototype`);return Mz.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Mz}var Fz={},Iz;function Lz(){if(Iz)return Fz;Iz=1;var e=yP(),t=XP(),n=Pz().f,r=iL(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return Fz.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},Fz}var Rz={},zz;function Bz(){return zz?Rz:(zz=1,Rz.f=Object.getOwnPropertySymbols,Rz)}var Vz,Hz;function Uz(){if(Hz)return Vz;Hz=1;var e=LI();return Vz=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},Vz}var Wz,Gz;function Kz(){if(Gz)return Wz;Gz=1;var e=PI();return Wz=function(t,n,r){return e.f(t,n,r)},Wz}var qz={},Jz;function Yz(){return Jz?qz:(Jz=1,qz.f=aI(),qz)}var Xz,Zz;function Qz(){if(Zz)return Xz;Zz=1;var e=nF(),t=$F(),n=Yz(),r=PI().f;return Xz=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},Xz}var $z,eB;function tB(){if(eB)return $z;eB=1;var e=MP(),t=aF(),n=aI(),r=Uz();return $z=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},$z}var nB,rB;function iB(){if(rB)return nB;rB=1;var e=QL(),t=tR();return nB=e?{}.toString:function(){return`[object `+t(this)+`]`},nB}var aB,oB;function sB(){if(oB)return aB;oB=1;var e=QL(),t=PI().f,n=LI(),r=$F(),i=iB(),a=aI()(`toStringTag`);return aB=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},aB}var cB,lB;function uB(){if(lB)return cB;lB=1;var e=iP(),t=TP(),n=e.WeakMap;return cB=t(n)&&/native code/.test(String(n)),cB}var dB,fB;function pB(){if(fB)return dB;fB=1;var e=uB(),t=iP(),n=$P(),r=LI(),i=$F(),a=WF(),o=Oz(),s=dz(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return dB={set:d,get:f,has:p,enforce:m,getterFor:h},dB}var mB;function hB(){if(mB)return QR;mB=1;var e=X(),t=iP(),n=MP(),r=gP(),i=zF(),a=kP(),o=_F(),s=sP(),c=$F(),l=cF(),u=MI(),d=XP(),f=dI(),p=tz(),m=RP(),h=jz(),g=bz(),_=Pz(),v=Lz(),y=Bz(),b=yI(),x=PI(),S=Sz(),C=FP(),w=Uz(),T=Kz(),E=qF(),D=Oz(),O=dz(),ee=nI(),k=aI(),A=Yz(),j=Qz(),M=tB(),N=sB(),P=pB(),te=kR().forEach,F=D(`hidden`),I=`Symbol`,ne=`prototype`,re=P.set,ie=P.getterFor(I),ae=Object[ne],oe=t.Symbol,se=oe&&oe[ne],ce=t.RangeError,L=t.TypeError,R=t.QObject,le=b.f,z=x.f,B=v.f,V=C.f,ue=r([].push),de=E(`symbols`),fe=E(`op-symbols`),pe=E(`wks`),me=!R||!R[ne]||!R[ne].findChild,he=function(e,t,n){var r=le(ae,t);r&&delete ae[t],z(e,t,n),r&&e!==ae&&z(ae,t,r)},ge=a&&s(function(){return h(z({},`a`,{get:function(){return z(this,`a`,{value:7}).a}})).a!==7})?he:z,_e=function(e,t){var n=de[e]=h(se);return re(n,{type:I,tag:e,description:t}),a||(n.description=t),n},ve=function(e,t,n){e===ae&&ve(fe,t,n),u(e);var r=f(t);return u(n),c(de,r)?(n.enumerable?(c(e,F)&&e[F][r]&&(e[F][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,F)||z(e,F,m(1,h(null))),e[F][r]=!0),ge(e,r,n)):z(e,r,n)},ye=function(e,t){u(e);var r=d(t);return te(g(r).concat(we(r)),function(t){(!a||n(xe,r,t))&&ve(e,t,r[t])}),e},be=function(e,t){return t===void 0?h(e):ye(h(e),t)},xe=function(e){var t=f(e),r=n(V,this,t);return this===ae&&c(de,t)&&!c(fe,t)?!1:r||!c(this,t)||!c(de,t)||c(this,F)&&this[F][t]?r:!0},Se=function(e,t){var n=d(e),r=f(t);if(!(n===ae&&c(de,r)&&!c(fe,r))){var i=le(n,r);return i&&c(de,r)&&!(c(n,F)&&n[F][r])&&(i.enumerable=!0),i}},Ce=function(e){var t=B(d(e)),n=[];return te(t,function(e){!c(de,e)&&!c(O,e)&&ue(n,e)}),n},we=function(e){var t=e===ae,n=B(t?fe:d(e)),r=[];return te(n,function(e){c(de,e)&&(!t||c(ae,e))&&ue(r,de[e])}),r};return o||(oe=function(){if(l(se,this))throw new L(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=ee(e),i=function(e){var a=this===void 0?t:this;a===ae&&n(i,fe,e),c(a,F)&&c(a[F],r)&&(a[F][r]=!1);var o=m(1,e);try{ge(a,r,o)}catch(e){if(!(e instanceof ce))throw e;he(a,r,o)}};return a&&me&&ge(ae,r,{configurable:!0,set:i}),_e(r,e)},se=oe[ne],w(se,`toString`,function(){return ie(this).tag}),w(oe,`withoutSetter`,function(e){return _e(ee(e),e)}),C.f=xe,x.f=ve,S.f=ye,b.f=Se,_.f=v.f=Ce,y.f=we,A.f=function(e){return _e(k(e),e)},a&&(T(se,`description`,{configurable:!0,get:function(){return ie(this).description}}),i||w(ae,`propertyIsEnumerable`,xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:oe}),te(g(pe),function(e){j(e)}),e({target:I,stat:!0,forced:!o},{useSetter:function(){me=!0},useSimple:function(){me=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:be,defineProperty:ve,defineProperties:ye,getOwnPropertyDescriptor:Se}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:Ce}),M(),N(oe,I),O[F]=!0,QR}var gB={},_B,vB;function yB(){return vB?_B:(vB=1,_B=_F()&&!!Symbol.for&&!!Symbol.keyFor,_B)}var bB;function xB(){if(bB)return gB;bB=1;var e=X(),t=aF(),n=$F(),r=tz(),i=qF(),a=yB(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),gB}var SB={},CB;function wB(){if(CB)return SB;CB=1;var e=X(),t=$F(),n=CF(),r=EF(),i=qF(),a=yB(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),SB}var TB={},EB,DB;function OB(){if(DB)return EB;DB=1;var e=gP(),t=HI(),n=TP(),r=yP(),i=tz(),a=e([].push);return EB=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},EB}var kB;function AB(){if(kB)return TB;kB=1;var e=X(),t=aF(),n=pP(),r=MP(),i=gP(),a=sP(),o=TP(),s=CF(),c=iL(),l=OB(),u=_F(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),TB}var jB={},MB;function NB(){if(MB)return jB;MB=1;var e=X(),t=_F(),n=sP(),r=Bz(),i=XF();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),jB}var PB;function FB(){return PB?ZR:(PB=1,hB(),xB(),wB(),AB(),NB(),ZR)}var IB,LB;function RB(){return LB?IB:(LB=1,FB(),IB=nF().Object.getOwnPropertySymbols,IB)}var zB,BB;function VB(){return BB?zB:(BB=1,zB=RB(),zB)}var HB,UB;function WB(){return UB?HB:(UB=1,HB=VB(),HB)}var GB=eP(WB()),KB={},qB,JB;function YB(){if(JB)return qB;JB=1;var e=sP(),t=aI(),n=mF(),r=t(`species`);return qB=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},qB}var XB;function ZB(){if(XB)return KB;XB=1;var e=X(),t=kR().filter;return e({target:`Array`,proto:!0,forced:!YB()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),KB}var QB,$B;function eV(){return $B?QB:($B=1,ZB(),QB=fL()(`Array`,`filter`),QB)}var tV,nV;function rV(){if(nV)return tV;nV=1;var e=cF(),t=eV(),n=Array.prototype;return tV=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},tV}var iV,aV;function oV(){return aV?iV:(aV=1,iV=rV(),iV)}var sV,cV;function lV(){return cV?sV:(cV=1,sV=oV(),sV)}var uV=eP(lV()),dV={exports:{}},fV={},pV;function mV(){if(pV)return fV;pV=1;var e=X(),t=sP(),n=XP(),r=yI().f,i=kP();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),fV}var hV;function gV(){if(hV)return dV.exports;hV=1,mV();var e=nF().Object,t=dV.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),dV.exports}var _V,vV;function yV(){return vV?_V:(vV=1,_V=gV(),_V)}var bV,xV;function SV(){return xV?bV:(xV=1,bV=yV(),bV)}var CV=eP(SV()),wV={},TV,EV;function DV(){if(EV)return TV;EV=1;var e=aF(),t=gP(),n=Pz(),r=Bz(),i=MI(),a=t([].concat);return TV=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},TV}var OV,kV;function AV(){if(kV)return OV;kV=1;var e=kP(),t=PI(),n=RP();return OV=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},OV}var jV;function MV(){if(jV)return wV;jV=1;var e=X(),t=kP(),n=DV(),r=XP(),i=yI(),a=AV();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),wV}var NV,PV;function FV(){return PV?NV:(PV=1,MV(),NV=nF().Object.getOwnPropertyDescriptors,NV)}var IV,LV;function RV(){return LV?IV:(LV=1,IV=FV(),IV)}var zV,BV;function VV(){return BV?zV:(BV=1,zV=RV(),zV)}var HV=eP(VV()),UV={exports:{}},WV={},GV;function KV(){if(GV)return WV;GV=1;var e=X(),t=kP(),n=Sz().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),WV}var qV;function JV(){if(qV)return UV.exports;qV=1,KV();var e=nF().Object,t=UV.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),UV.exports}var YV,XV;function ZV(){return XV?YV:(XV=1,YV=JV(),YV)}var QV,$V;function eH(){return $V?QV:($V=1,QV=ZV(),QV)}var tH=eP(eH()),nH={exports:{}},rH={},iH;function aH(){if(iH)return rH;iH=1;var e=X(),t=kP(),n=PI().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),rH}var oH;function sH(){if(oH)return nH.exports;oH=1,aH();var e=nF().Object,t=nH.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),nH.exports}var cH,lH;function uH(){return lH?cH:(lH=1,cH=sH(),cH)}var dH,fH;function pH(){return fH?dH:(fH=1,dH=uH(),dH)}var mH,hH;function gH(){return hH?mH:(hH=1,mH=pH(),mH)}var _H,vH;function yH(){return vH?_H:(vH=1,_H=gH(),_H)}var bH=eP(yH()),xH={},SH,CH;function wH(){if(CH)return SH;CH=1;var e=TypeError,t=9007199254740991;return SH=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},SH}var TH;function EH(){if(TH)return xH;TH=1;var e=X(),t=sP(),n=HI(),r=$P(),i=XF(),a=mR(),o=wH(),s=AV(),c=ER(),l=YB(),u=aI(),d=mF(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),xH}var DH={},OH;function kH(){return OH?DH:(OH=1,Qz()(`asyncDispose`),DH)}var AH={},jH;function MH(){return jH?AH:(jH=1,Qz()(`asyncIterator`),AH)}var NH={},PH;function FH(){return PH?NH:(PH=1,Qz()(`dispose`),NH)}var IH={},LH;function RH(){return LH?IH:(LH=1,Qz()(`hasInstance`),IH)}var zH={},BH;function VH(){return BH?zH:(BH=1,Qz()(`isConcatSpreadable`),zH)}var HH={},UH;function WH(){return UH?HH:(UH=1,Qz()(`iterator`),HH)}var GH={},KH;function qH(){return KH?GH:(KH=1,Qz()(`match`),GH)}var JH={},YH;function XH(){return YH?JH:(YH=1,Qz()(`matchAll`),JH)}var ZH={},QH;function $H(){return QH?ZH:(QH=1,Qz()(`replace`),ZH)}var eU={},tU;function nU(){return tU?eU:(tU=1,Qz()(`search`),eU)}var rU={},iU;function aU(){return iU?rU:(iU=1,Qz()(`species`),rU)}var oU={},sU;function cU(){return sU?oU:(sU=1,Qz()(`split`),oU)}var lU={},uU;function dU(){if(uU)return lU;uU=1;var e=Qz(),t=tB();return e(`toPrimitive`),t(),lU}var fU={},pU;function tne(){if(pU)return fU;pU=1;var e=aF(),t=Qz(),n=sB();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),fU}var mU={},hU;function nne(){return hU?mU:(hU=1,Qz()(`unscopables`),mU)}var gU={},_U;function rne(){return _U?gU:(_U=1,sB()(iP().JSON,`JSON`,!0),gU)}var vU,yU;function ine(){return yU?vU:(yU=1,EH(),FB(),kH(),MH(),FH(),RH(),VH(),WH(),qH(),XH(),$H(),nU(),aU(),cU(),dU(),tne(),nne(),rne(),vU=nF().Symbol,vU)}var bU={},xU,SU;function CU(){return SU?xU:(SU=1,xU=function(){},xU)}var wU,TU;function EU(){return TU?wU:(TU=1,wU={},wU)}var DU,OU;function ane(){if(OU)return DU;OU=1;var e=kP(),t=$F(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return DU={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},DU}var kU,AU;function jU(){return AU?kU:(AU=1,kU=!sP()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),kU)}var MU,NU;function PU(){if(NU)return MU;NU=1;var e=$F(),t=TP(),n=XF(),r=Oz(),i=jU(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return MU=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},MU}var FU,IU;function LU(){if(IU)return FU;IU=1;var e=sP(),t=TP(),n=$P(),r=jz(),i=PU(),a=Uz(),o=aI(),s=zF(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),FU={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},FU}var RU,zU;function one(){if(zU)return RU;zU=1;var e=LU().IteratorPrototype,t=jz(),n=RP(),r=sB(),i=EU(),a=function(){return this};return RU=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},RU}var BU,VU;function sne(){if(VU)return BU;VU=1;var e=gP(),t=kF();return BU=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},BU}var HU,UU;function cne(){if(UU)return HU;UU=1;var e=$P();return HU=function(t){return e(t)||t===null},HU}var WU,GU;function lne(){if(GU)return WU;GU=1;var e=cne(),t=String,n=TypeError;return WU=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},WU}var KU,qU;function une(){if(qU)return KU;qU=1;var e=sne(),t=$P(),n=qP(),r=lne();return KU=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),KU}var JU,YU;function XU(){if(YU)return JU;YU=1;var e=X(),t=MP(),n=zF(),r=ane(),i=TP(),a=one(),o=PU(),s=une(),c=sB(),l=LI(),u=Uz(),d=aI(),f=EU(),p=LU(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return JU=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),M=d===`Array`&&k.entries||A,N,P,te;if(M&&(N=o(M.call(new r)),N!==Object.prototype&&N.next&&(!n&&o(N)!==g&&(s?s(N,g):i(N[v])||u(N,v,S)),c(N,O,!0,!0),n&&(f[O]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,j=function(){return t(A,this)})),w)if(P={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(te in P)(_||ee||!(te in k))&&u(k,te,P[te]);else e({target:d,proto:!0,forced:_||ee},P);return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,P},JU}var ZU,QU;function $U(){return QU?ZU:(QU=1,ZU=function(e,t){return{value:e,done:t}},ZU)}var eW,tW;function nW(){if(tW)return eW;tW=1;var e=XP(),t=CU(),n=EU(),r=pB(),i=PI().f,a=XU(),o=$U(),s=zF(),c=kP(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);eW=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return eW}var rW,iW;function dne(){return iW?rW:(iW=1,rW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rW)}var aW;function oW(){if(aW)return bU;aW=1,nW();var e=dne(),t=iP(),n=sB(),r=EU();for(var i in e)n(t[i],i),r[i]=r.Array;return bU}var sW,cW;function lW(){if(cW)return sW;cW=1;var e=ine();return oW(),sW=e,sW}var uW={},dW;function fne(){if(dW)return uW;dW=1;var e=aI(),t=PI().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),uW}var fW={},pW;function pne(){return pW?fW:(pW=1,kH(),fW)}var mW={},hW;function mne(){return hW?mW:(hW=1,FH(),mW)}var gW={},_W;function hne(){return _W?gW:(_W=1,Qz()(`metadata`),gW)}var vW,yW;function gne(){if(yW)return vW;yW=1;var e=lW();return fne(),pne(),mne(),hne(),vW=e,vW}var bW={},xW,SW;function CW(){if(SW)return xW;SW=1;var e=aF(),t=gP(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return xW=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},xW}var wW;function _ne(){return wW?bW:(wW=1,X()({target:`Symbol`,stat:!0},{isRegisteredSymbol:CW()}),bW)}var TW={},EW,DW;function OW(){if(DW)return EW;DW=1;for(var e=qF(),t=aF(),n=gP(),r=CF(),i=aI(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return EW=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},EW}var kW;function vne(){return kW?TW:(kW=1,X()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:OW()}),TW)}var AW={},jW;function yne(){return jW?AW:(jW=1,Qz()(`customMatcher`),AW)}var MW={},NW;function bne(){return NW?MW:(NW=1,Qz()(`observable`),MW)}var PW={},FW;function IW(){return FW?PW:(FW=1,X()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:CW()}),PW)}var LW={},RW;function zW(){return RW?LW:(RW=1,X()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:OW()}),LW)}var BW={},VW;function HW(){return VW?BW:(VW=1,Qz()(`matcher`),BW)}var UW={},WW;function GW(){return WW?UW:(WW=1,Qz()(`metadataKey`),UW)}var KW={},qW;function JW(){return qW?KW:(qW=1,Qz()(`patternMatch`),KW)}var YW={},XW;function ZW(){return XW?YW:(XW=1,Qz()(`replaceAll`),YW)}var QW,$W;function eG(){if($W)return QW;$W=1;var e=gne();return _ne(),vne(),yne(),bne(),IW(),zW(),HW(),GW(),JW(),ZW(),QW=e,QW}var tG,nG;function rG(){return nG?tG:(nG=1,tG=eG(),tG)}var iG=eP(rG()),aG={},oG,sG;function cG(){if(sG)return oG;sG=1;var e=gP(),t=cR(),n=tz(),r=qP(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return oG={codeAt:s(!1),charAt:s(!0)},oG}var lG;function uG(){if(lG)return aG;lG=1;var e=cG().charAt,t=tz(),n=pB(),r=XU(),i=$U(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),aG}var dG,fG;function pG(){return fG?dG:(fG=1,nW(),uG(),WH(),dG=Yz().f(`iterator`),dG)}var mG,hG;function gG(){if(hG)return mG;hG=1;var e=pG();return oW(),mG=e,mG}var _G,vG;function yG(){return vG?_G:(vG=1,_G=gG(),_G)}var bG,xG;function SG(){return xG?bG:(xG=1,bG=yG(),bG)}var CG,wG;function TG(){return wG?CG:(wG=1,CG=SG(),CG)}var EG=eP(TG());function DG(e){"@babel/helpers - typeof";return DG=typeof iG==`function`&&typeof EG==`symbol`?function(e){return typeof e}:function(e){return e&&typeof iG==`function`&&e.constructor===iG&&e!==iG.prototype?`symbol`:typeof e},DG(e)}var OG,kG;function AG(){return kG?OG:(kG=1,dU(),OG=Yz().f(`toPrimitive`),OG)}var jG,MG;function NG(){return MG?jG:(MG=1,jG=AG(),jG)}var PG,FG;function IG(){return FG?PG:(FG=1,PG=NG(),PG)}var LG,RG;function zG(){return RG?LG:(RG=1,LG=IG(),LG)}var BG,VG;function HG(){return VG?BG:(VG=1,BG=zG(),BG)}var UG=eP(HG());function WG(e,t){if(DG(e)!=`object`||!e)return e;var n=e[UG];if(n!==void 0){var r=n.call(e,t);if(DG(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function GG(e){var t=WG(e,`string`);return DG(t)==`symbol`?t:t+``}function KG(e,t,n){return(t=GG(t))in e?bH(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qG={},JG;function YG(){if(JG)return qG;JG=1;var e=X(),t=kR().map;return e({target:`Array`,proto:!0,forced:!YB()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),qG}var XG,ZG;function QG(){return ZG?XG:(ZG=1,YG(),XG=fL()(`Array`,`map`),XG)}var $G,eK;function tK(){if(eK)return $G;eK=1;var e=cF(),t=QG(),n=Array.prototype;return $G=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},$G}var nK,rK;function iK(){return rK?nK:(rK=1,nK=tK(),nK)}var aK,oK;function sK(){return oK?aK:(oK=1,aK=iK(),aK)}var cK=eP(sK()),lK={},uK,dK;function fK(){if(dK)return uK;dK=1;var e=kF(),t=XF(),n=VP(),r=mR(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return uK={left:o(!1),right:o(!0)},uK}var pK,mK;function hK(){return mK?pK:(mK=1,pK=kL()===`NODE`,pK)}var gK;function _K(){if(gK)return lK;gK=1;var e=X(),t=fK().left,n=MR(),r=mF();return e({target:`Array`,proto:!0,forced:!hK()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),lK}var vK,yK;function bK(){return yK?vK:(yK=1,_K(),vK=fL()(`Array`,`reduce`),vK)}var xK,SK;function CK(){if(SK)return xK;SK=1;var e=cF(),t=bK(),n=Array.prototype;return xK=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},xK}var wK,TK;function EK(){return TK?wK:(TK=1,wK=CK(),wK)}var DK,OK;function kK(){return OK?DK:(OK=1,DK=EK(),DK)}var AK=eP(kK()),jK={},MK;function NK(){if(MK)return jK;MK=1;var e=X(),t=XF(),n=bz();return e({target:`Object`,stat:!0,forced:sP()(function(){n(1)})},{keys:function(e){return n(t(e))}}),jK}var PK,FK;function IK(){return FK?PK:(FK=1,NK(),PK=nF().Object.keys,PK)}var LK,RK;function zK(){return RK?LK:(RK=1,LK=IK(),LK)}var BK,VK;function HK(){return VK?BK:(VK=1,BK=zK(),BK)}var UK=eP(HK()),WK,GK;function KK(){return GK?WK:(GK=1,WK=uH(),WK)}var qK=eP(KK()),JK,YK;function XK(){return YK?JK:(YK=1,JK=lW(),JK)}var ZK=eP(XK()),QK={},$K;function eq(){if($K)return QK;$K=1;var e=X(),t=HI(),n=bR(),r=$P(),i=az(),a=mR(),o=XP(),s=AV(),c=aI(),l=YB(),u=iL(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),QK}var tq,nq;function rq(){return nq?tq:(nq=1,eq(),tq=fL()(`Array`,`slice`),tq)}var iq,aq;function oq(){if(aq)return iq;aq=1;var e=cF(),t=rq(),n=Array.prototype;return iq=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},iq}var sq,cq;function lq(){return cq?sq:(cq=1,sq=oq(),sq)}var uq,dq;function fq(){return dq?uq:(dq=1,uq=lq(),uq)}var pq=eP(fq()),mq={},hq;function gq(){return hq?mq:(hq=1,X()({target:`Reflect`,stat:!0},{ownKeys:DV()}),mq)}var _q,vq;function yq(){return vq?_q:(vq=1,gq(),_q=nF().Reflect.ownKeys,_q)}var bq,xq;function Sq(){return xq?bq:(xq=1,bq=yq(),bq)}var Cq,wq;function Tq(){return wq?Cq:(wq=1,Cq=Sq(),Cq)}var Eq=eP(Tq()),Dq={},Oq;function kq(){if(Oq)return Dq;Oq=1;var e=X(),t=gP(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),Dq}var Aq,jq;function Mq(){return jq?Aq:(jq=1,kq(),Aq=nF().Date.now,Aq)}var Nq,Pq;function Fq(){return Pq?Nq:(Pq=1,Nq=Mq(),Nq)}var Iq,Lq;function Rq(){return Lq?Iq:(Lq=1,Iq=Fq(),Iq)}var zq=eP(Rq()),Bq={},Vq;function Hq(){if(Vq)return Bq;Vq=1;var e=X(),t=gP(),n=HI(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),Bq}var Uq,Wq;function Gq(){return Wq?Uq:(Wq=1,Hq(),Uq=fL()(`Array`,`reverse`),Uq)}var Kq,qq;function Jq(){if(qq)return Kq;qq=1;var e=cF(),t=Gq(),n=Array.prototype;return Kq=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},Kq}var Yq,Xq;function Zq(){return Xq?Yq:(Xq=1,Yq=Jq(),Yq)}var Qq,$q;function eJ(){return $q?Qq:($q=1,Qq=Zq(),Qq)}var tJ=eP(eJ()),nJ={},rJ,iJ;function aJ(){if(iJ)return rJ;iJ=1;var e=kP(),t=HI(),n=TypeError,r=Object.getOwnPropertyDescriptor;return rJ=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},rJ}var oJ,sJ;function cJ(){if(sJ)return oJ;sJ=1;var e=EF(),t=TypeError;return oJ=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},oJ}var lJ;function uJ(){if(lJ)return nJ;lJ=1;var e=X(),t=XF(),n=az(),r=cR(),i=mR(),a=aJ(),o=wH(),s=ER(),c=AV(),l=cJ(),u=YB()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),nJ}var dJ,fJ;function pJ(){return fJ?dJ:(fJ=1,uJ(),dJ=fL()(`Array`,`splice`),dJ)}var mJ,hJ;function gJ(){if(hJ)return mJ;hJ=1;var e=cF(),t=pJ(),n=Array.prototype;return mJ=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},mJ}var _J,vJ;function yJ(){return vJ?_J:(vJ=1,_J=gJ(),_J)}var bJ,xJ;function SJ(){return xJ?bJ:(xJ=1,bJ=yJ(),bJ)}var CJ=eP(SJ()),wJ={},TJ,EJ;function DJ(){if(EJ)return TJ;EJ=1;var e=kP(),t=gP(),n=MP(),r=sP(),i=bz(),a=Bz(),o=FP(),s=XF(),c=VP(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return TJ=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,TJ}var OJ;function kJ(){if(OJ)return wJ;OJ=1;var e=X(),t=DJ();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),wJ}var AJ,jJ;function MJ(){return jJ?AJ:(jJ=1,kJ(),AJ=nF().Object.assign,AJ)}var NJ,PJ;function FJ(){return PJ?NJ:(PJ=1,NJ=MJ(),NJ)}var IJ,LJ;function RJ(){return LJ?IJ:(LJ=1,IJ=FJ(),IJ)}var zJ=eP(RJ()),BJ={},VJ;function HJ(){if(VJ)return BJ;VJ=1;var e=X(),t=cz().includes,n=sP(),r=CU();return e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),BJ}var UJ,WJ;function GJ(){return WJ?UJ:(WJ=1,HJ(),UJ=fL()(`Array`,`includes`),UJ)}var KJ={},qJ,JJ;function YJ(){if(JJ)return qJ;JJ=1;var e=$P(),t=yP(),n=aI()(`match`);return qJ=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},qJ}var XJ,ZJ;function QJ(){if(ZJ)return XJ;ZJ=1;var e=YJ(),t=TypeError;return XJ=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},XJ}var $J,eY;function tY(){if(eY)return $J;eY=1;var e=aI()(`match`);return $J=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},$J}var nY;function rY(){if(nY)return KJ;nY=1;var e=X(),t=gP(),n=QJ(),r=qP(),i=tz(),a=tY(),o=t(``.indexOf);return e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}}),KJ}var iY,aY;function oY(){return aY?iY:(aY=1,rY(),iY=fL()(`String`,`includes`),iY)}var sY,cY;function lY(){if(cY)return sY;cY=1;var e=cF(),t=GJ(),n=oY(),r=Array.prototype,i=String.prototype;return sY=function(a){var o=a.includes;return a===r||e(r,a)&&o===r.includes?t:typeof a==`string`||a===i||e(i,a)&&o===i.includes?n:o},sY}var uY,dY;function fY(){return dY?uY:(dY=1,uY=lY(),uY)}var pY,mY;function hY(){return mY?pY:(mY=1,pY=fY(),pY)}var gY=eP(hY()),_Y={},vY;function yY(){if(vY)return _Y;vY=1;var e=X(),t=sP(),n=XF(),r=PU(),i=jU();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),_Y}var bY,xY;function SY(){return xY?bY:(xY=1,yY(),bY=nF().Object.getPrototypeOf,bY)}var CY,wY;function TY(){return wY?CY:(wY=1,CY=SY(),CY)}var EY,DY;function OY(){return DY?EY:(DY=1,EY=TY(),EY)}var kY=eP(OY()),AY,jY;function MY(){return jY?AY:(jY=1,EH(),AY=fL()(`Array`,`concat`),AY)}var NY,PY;function FY(){if(PY)return NY;PY=1;var e=cF(),t=MY(),n=Array.prototype;return NY=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},NY}var IY,LY;function RY(){return LY?IY:(LY=1,IY=FY(),IY)}var zY,BY;function VY(){return BY?zY:(BY=1,zY=RY(),zY)}var HY=eP(VY()),UY={},WY,GY;function KY(){if(GY)return WY;GY=1;var e=kP(),t=sP(),n=gP(),r=PU(),i=bz(),a=XP(),o=FP().f,s=n(o),c=n([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),u=function(t){return function(n){for(var o=a(n),u=i(o),d=l&&r(o)===null,f=u.length,p=0,m=[],h;f>p;)h=u[p++],(!e||(d?h in o:s(o,h)))&&c(m,t?[h,o[h]]:o[h]);return m}};return WY={entries:u(!0),values:u(!1)},WY}var qY;function JY(){if(qY)return UY;qY=1;var e=X(),t=KY().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),UY}var YY,XY;function ZY(){return XY?YY:(XY=1,JY(),YY=nF().Object.values,YY)}var QY,$Y;function eX(){return $Y?QY:($Y=1,QY=ZY(),QY)}var tX,nX;function rX(){return nX?tX:(nX=1,tX=eX(),tX)}var iX=eP(rX()),aX={},oX,sX;function cX(){return sX?oX:(sX=1,oX=`-\v\f\r \xA0 \u2028\u2029`,oX)}var lX,uX;function dX(){if(uX)return lX;uX=1;var e=gP(),t=qP(),n=tz(),r=cX(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return lX={start:s(1),end:s(2),trim:s(3)},lX}var fX,pX;function mX(){if(pX)return fX;pX=1;var e=iP(),t=sP(),n=gP(),r=tz(),i=dX().trim,a=cX(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return fX=o(a+`08`)!==8||o(a+`0x16`)!==22||c&&!t(function(){o(Object(c))})?function(e,t){var n=i(r(e));return o(n,t>>>0||(u(l,n)?16:10))}:o,fX}var hX;function gX(){if(hX)return aX;hX=1;var e=X(),t=mX();return e({global:!0,forced:parseInt!==t},{parseInt:t}),aX}var _X,vX;function yX(){return vX?_X:(vX=1,gX(),_X=nF().parseInt,_X)}var bX,xX;function SX(){return xX?bX:(xX=1,bX=yX(),bX)}var CX,wX;function TX(){return wX?CX:(wX=1,CX=SX(),CX)}var EX=eP(TX()),DX={},OX;function kX(){if(OX)return DX;OX=1;var e=X(),t=SP(),n=cz().indexOf,r=MR(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}}),DX}var AX,jX;function MX(){return jX?AX:(jX=1,kX(),AX=fL()(`Array`,`indexOf`),AX)}var NX,PX;function FX(){if(PX)return NX;PX=1;var e=cF(),t=MX(),n=Array.prototype;return NX=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},NX}var IX,LX;function RX(){return LX?IX:(LX=1,IX=FX(),IX)}var zX,BX;function VX(){return BX?zX:(BX=1,zX=RX(),zX)}var HX=eP(VX()),UX={},WX;function GX(){if(WX)return UX;WX=1;var e=X(),t=KY().entries;return e({target:`Object`,stat:!0},{entries:function(e){return t(e)}}),UX}var KX,qX;function JX(){return qX?KX:(qX=1,GX(),KX=nF().Object.entries,KX)}var YX,XX;function ZX(){return XX?YX:(XX=1,YX=JX(),YX)}var QX,$X;function eZ(){return $X?QX:($X=1,QX=ZX(),QX)}var tZ=eP(eZ()),nZ={},rZ;function iZ(){return rZ?nZ:(rZ=1,X()({target:`Object`,stat:!0,sham:!kP()},{create:jz()}),nZ)}var aZ,oZ;function sZ(){if(oZ)return aZ;oZ=1,iZ();var e=nF().Object;return aZ=function(t,n){return e.create(t,n)},aZ}var cZ,lZ;function uZ(){return lZ?cZ:(lZ=1,cZ=sZ(),cZ)}var dZ,fZ;function pZ(){return fZ?dZ:(fZ=1,dZ=uZ(),dZ)}var mZ=eP(pZ()),hZ={},gZ,_Z;function vZ(){if(_Z)return gZ;_Z=1;var e=cR(),t=tz(),n=qP(),r=RangeError;return gZ=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},gZ}var yZ,bZ;function xZ(){if(bZ)return yZ;bZ=1;var e=gP(),t=dR(),n=tz(),r=vZ(),i=qP(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return yZ={start:c(!1),end:c(!0)},yZ}var SZ,CZ;function wZ(){if(CZ)return SZ;CZ=1;var e=gP(),t=sP(),n=xZ().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return SZ=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,SZ}var TZ;function EZ(){if(TZ)return hZ;TZ=1;var e=X(),t=MP(),n=XF(),r=cI(),i=wZ(),a=yP();return e({target:`Date`,proto:!0,forced:sP()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),hZ}var DZ,OZ;function kZ(){if(OZ)return DZ;OZ=1,EZ(),AB();var e=nF(),t=pP();return e.JSON||={stringify:JSON.stringify},DZ=function(n,r,i){return t(e.JSON.stringify,null,arguments)},DZ}var AZ,jZ;function MZ(){return jZ?AZ:(jZ=1,AZ=kZ(),AZ)}var NZ,PZ;function FZ(){return PZ?NZ:(PZ=1,NZ=MZ(),NZ)}var IZ=eP(FZ()),LZ={},RZ,zZ;function BZ(){if(zZ)return RZ;zZ=1;var e=XF(),t=az(),n=mR();return RZ=function(r){for(var i=e(this),a=n(i),o=arguments.length,s=t(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:t(c,a);l>s;)i[s++]=r;return i},RZ}var VZ;function HZ(){if(VZ)return LZ;VZ=1;var e=X(),t=BZ(),n=CU();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),LZ}var UZ,WZ;function GZ(){return WZ?UZ:(WZ=1,HZ(),UZ=fL()(`Array`,`fill`),UZ)}var KZ,qZ;function JZ(){if(qZ)return KZ;qZ=1;var e=cF(),t=GZ(),n=Array.prototype;return KZ=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},KZ}var YZ,XZ;function ZZ(){return XZ?YZ:(XZ=1,YZ=JZ(),YZ)}var QZ,$Z;function eQ(){return $Z?QZ:($Z=1,QZ=ZZ(),QZ)}var tQ=eP(eQ()),nQ={exports:{}},rQ;function iQ(){return rQ?nQ.exports:(rQ=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(nQ),nQ.exports)}var aQ=eP(iQ());function oQ(){return oQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oQ.apply(this,arguments)}function sQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function cQ(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var lQ=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},uQ=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],dQ=typeof document>`u`?{style:{}}:document.createElement(`div`),fQ=`function`,pQ=Math.round,mQ=Math.abs,hQ=Date.now;function gQ(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<uQ.length;){if(n=uQ[a],r=n?n+i:t,r in e)return r;a++}}var _Q=typeof window>`u`?{}:window,vQ=gQ(dQ.style,`touchAction`),yQ=vQ!==void 0;function bQ(){if(!yQ)return!1;var e={},t=_Q.CSS&&_Q.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?_Q.CSS.supports(`touch-action`,n):!0}),e}var xQ=`compute`,SQ=`auto`,CQ=`manipulation`,wQ=`none`,TQ=`pan-x`,EQ=`pan-y`,DQ=bQ(),OQ=/mobile|tablet|ip(ad|hone|od)|android/i,kQ=`ontouchstart`in _Q,AQ=gQ(_Q,`PointerEvent`)!==void 0,jQ=kQ&&OQ.test(navigator.userAgent),MQ=`touch`,NQ=`pen`,PQ=`mouse`,FQ=`kinect`,IQ=25,LQ=1,RQ=2,zQ=4,BQ=8,VQ=1,HQ=2,UQ=4,WQ=8,GQ=16,KQ=HQ|UQ,qQ=WQ|GQ,JQ=KQ|qQ,YQ=[`x`,`y`],XQ=[`clientX`,`clientY`];function ZQ(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function QQ(e,t){return typeof e===fQ?e.apply(t&&t[0]||void 0,t):e}function $Q(e,t){return e.indexOf(t)>-1}function e$(e){if($Q(e,wQ))return wQ;var t=$Q(e,TQ),n=$Q(e,EQ);return t&&n?wQ:t||n?t?TQ:EQ:$Q(e,CQ)?CQ:SQ}var t$=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===xQ&&(e=this.compute()),yQ&&this.manager.element.style&&DQ[e]&&(this.manager.element.style[vQ]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return ZQ(this.manager.recognizers,function(t){QQ(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),e$(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=$Q(r,wQ)&&!DQ[wQ],a=$Q(r,EQ)&&!DQ[EQ],o=$Q(r,TQ)&&!DQ[TQ];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&KQ||o&&n&qQ))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function n$(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function r$(e){var t=e.length;if(t===1)return{x:pQ(e[0].clientX),y:pQ(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:pQ(n/t),y:pQ(r/t)}}function i$(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:pQ(e.pointers[n].clientX),clientY:pQ(e.pointers[n].clientY)},n++;return{timeStamp:hQ(),pointers:t,center:r$(t),deltaX:e.deltaX,deltaY:e.deltaY}}function a$(e,t,n){n||=YQ;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function o$(e,t,n){n||=YQ;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function s$(e,t){return e===t?VQ:mQ(e)>=mQ(t)?e<0?HQ:UQ:t<0?WQ:GQ}function c$(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===LQ||a.eventType===zQ)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function l$(e,t,n){return{x:t/e||0,y:n/e||0}}function u$(e,t){return a$(t[0],t[1],XQ)/a$(e[0],e[1],XQ)}function d$(e,t){return o$(t[1],t[0],XQ)+o$(e[1],e[0],XQ)}function f$(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==BQ&&(r>IQ||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=l$(r,c,l);a=u.x,o=u.y,i=mQ(u.x)>mQ(u.y)?u.x:u.y,s=s$(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function p$(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=i$(t),i>1&&!n.firstMultiple?n.firstMultiple=i$(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=r$(r);t.timeStamp=hQ(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=o$(s,c),t.distance=a$(s,c),c$(n,t),t.offsetDirection=s$(t.deltaX,t.deltaY);var l=l$(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=mQ(l.x)>mQ(l.y)?l.x:l.y,t.scale=o?u$(o.pointers,r):1,t.rotation=o?d$(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,f$(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;n$(f,u)&&(u=f),t.target=u}function m$(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&LQ&&r-i===0,o=t&(zQ|BQ)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,p$(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function h$(e){return e.trim().split(/\s+/g)}function g$(e,t,n){ZQ(h$(t),function(t){e.addEventListener(t,n,!1)})}function _$(e,t,n){ZQ(h$(t),function(t){e.removeEventListener(t,n,!1)})}function v$(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var y$=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){QQ(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&g$(this.element,this.evEl,this.domHandler),this.evTarget&&g$(this.target,this.evTarget,this.domHandler),this.evWin&&g$(v$(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&_$(this.element,this.evEl,this.domHandler),this.evTarget&&_$(this.target,this.evTarget,this.domHandler),this.evWin&&_$(v$(this.element),this.evWin,this.domHandler)},e}();function b$(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var x$={pointerdown:LQ,pointermove:RQ,pointerup:zQ,pointercancel:BQ,pointerout:BQ},S$={2:MQ,3:NQ,4:PQ,5:FQ},C$=`pointerdown`,w$=`pointermove pointerup pointercancel`;_Q.MSPointerEvent&&!_Q.PointerEvent&&(C$=`MSPointerDown`,w$=`MSPointerMove MSPointerUp MSPointerCancel`);var T$=function(e){sQ(t,e);function t(){var n,r=t.prototype;return r.evEl=C$,r.evWin=w$,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=x$[e.type.toLowerCase().replace(`ms`,``)],i=S$[e.pointerType]||e.pointerType,a=i===MQ,o=b$(t,e.pointerId,`pointerId`);r&LQ&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(zQ|BQ)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(y$);function E$(e){return Array.prototype.slice.call(e,0)}function D$(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];b$(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var O$={touchstart:LQ,touchmove:RQ,touchend:zQ,touchcancel:BQ},k$=`touchstart touchmove touchend touchcancel`,A$=function(e){sQ(t,e);function t(){var n;return t.prototype.evTarget=k$,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=O$[e.type],n=j$.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:MQ,srcEvent:e})},t}(y$);function j$(e,t){var n=E$(e.touches),r=this.targetIds;if(t&(LQ|RQ)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=E$(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return n$(e.target,c)}),t===LQ)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(zQ|BQ)&&delete r[o[i].identifier],i++;if(s.length)return[D$(a.concat(s),`identifier`,!0),s]}var M$={mousedown:LQ,mousemove:RQ,mouseup:zQ},N$=`mousedown`,P$=`mousemove mouseup`,F$=function(e){sQ(t,e);function t(){var n,r=t.prototype;return r.evEl=N$,r.evWin=P$,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=M$[e.type];t&LQ&&e.button===0&&(this.pressed=!0),t&RQ&&e.which!==1&&(t=zQ),this.pressed&&(t&zQ&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:PQ,srcEvent:e}))},t}(y$),I$=2500,L$=25;function R$(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},I$)}}function z$(e,t){e&LQ?(this.primaryTouch=t.changedPointers[0].identifier,R$.call(this,t)):e&(zQ|BQ)&&R$.call(this,t)}function B$(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=L$&&o<=L$)return!0}return!1}var V$=function(){return function(e){sQ(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===MQ,a=n.pointerType===PQ;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)z$.call(cQ(cQ(r)),t,n);else if(a&&B$.call(cQ(cQ(r)),n))return;r.callback(e,t,n)}},r.touch=new A$(r.manager,r.handler),r.mouse=new F$(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(y$)}();function H$(e){var t;return t=e.options.inputClass||(AQ?T$:jQ?A$:kQ?V$:F$),new t(e,m$)}function U$(e,t,n){return Array.isArray(e)?(ZQ(e,n[t],n),!0):!1}var W$=1,G$=2,K$=4,q$=8,J$=q$,Y$=16,X$=32,Z$=1;function Q$(){return Z$++}function $$(e,t){var n=t.manager;return n?n.get(e):e}function e1(e){return e&Y$?`cancel`:e&q$?`end`:e&K$?`move`:e&G$?`start`:``}var t1=function(){function e(e){e===void 0&&(e={}),this.options=oQ({enable:!0},e),this.id=Q$(),this.manager=null,this.state=W$,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return lQ(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(U$(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=$$(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return U$(e,`dropRecognizeWith`,this)?this:(e=$$(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(U$(e,`requireFailure`,this))return this;var t=this.requireFail;return e=$$(e,this),b$(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(U$(e,`dropRequireFailure`,this))return this;e=$$(e,this);var t=b$(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<q$&&r(t.options.event+e1(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=q$&&r(t.options.event+e1(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=X$},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(X$|W$)))return!1;e++}return!0},t.recognize=function(e){var t=lQ({},e);if(!QQ(this.options.enable,[this,t])){this.reset(),this.state=X$;return}this.state&(J$|Y$|X$)&&(this.state=W$),this.state=this.process(t),this.state&(G$|K$|q$|Y$)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),n1=function(e){sQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oQ({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[CQ]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&LQ&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==zQ)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||a$(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=J$,t.tryEmit()},n.interval),G$):J$}return X$},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=X$},this.options.interval),X$},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===J$&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(t1),r1=function(e){sQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oQ({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(G$|K$),i=this.attrTest(e);return r&&(n&BQ||!i)?t|Y$:r||i?n&zQ?t|q$:t&G$?t|K$:G$:X$},t}(t1);function i1(e){return e===GQ?`down`:e===WQ?`up`:e===HQ?`left`:e===UQ?`right`:``}var a1=function(e){sQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oQ({event:`pan`,threshold:10,pointers:1,direction:JQ},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&KQ&&t.push(EQ),e&qQ&&t.push(TQ),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&KQ?(i=a===0?VQ:a<0?HQ:UQ,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?VQ:o<0?WQ:GQ,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return r1.prototype.attrTest.call(this,e)&&(this.state&G$||!(this.state&G$)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=i1(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(r1),o1=function(e){sQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oQ({event:`swipe`,threshold:10,velocity:.3,direction:KQ|qQ,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return a1.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(KQ|qQ)?r=t.overallVelocity:n&KQ?r=t.overallVelocityX:n&qQ&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&mQ(r)>this.options.velocity&&t.eventType&zQ},n.emit=function(e){var t=i1(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(r1),s1=function(e){sQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oQ({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[wQ]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&G$)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(r1),c1=function(e){sQ(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oQ({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[wQ]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&G$)},t}(r1),l1=function(e){sQ(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oQ({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[SQ]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(zQ|BQ)&&!a)this.reset();else if(e.eventType&LQ)this.reset(),this._timer=setTimeout(function(){t.state=J$,t.tryEmit()},n.time);else if(e.eventType&zQ)return J$;return X$},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===J$&&(e&&e.eventType&zQ?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=hQ(),this.manager.emit(this.options.event,this._input)))},t}(t1),u1={domEvents:!1,touchAction:xQ,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},d1=[[c1,{enable:!1}],[s1,{enable:!1},[`rotate`]],[o1,{direction:KQ}],[a1,{direction:KQ},[`swipe`]],[n1],[n1,{event:`doubletap`,taps:2},[`tap`]],[l1]],f1=1,p1=2;function m1(e,t){var n=e.element;if(n.style){var r;ZQ(e.options.cssProps,function(i,a){r=gQ(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function h1(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var g1=function(){function e(e,t){var n=this;this.options=lQ({},u1,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=H$(this),this.touchAction=new t$(this,this.options.touchAction),m1(this,!0),ZQ(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return lQ(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?p1:f1},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&J$)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==p1&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(G$|K$|q$)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof t1)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(U$(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(U$(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=b$(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return ZQ(h$(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return ZQ(h$(e),function(e){t?n[e]&&n[e].splice(b$(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&h1(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&m1(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),_1={touchstart:LQ,touchmove:RQ,touchend:zQ,touchcancel:BQ},v1=`touchstart`,y1=`touchstart touchmove touchend touchcancel`,b1=function(e){sQ(t,e);function t(){var n,r=t.prototype;return r.evTarget=v1,r.evWin=y1,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=_1[e.type];if(t===LQ&&(this.started=!0),this.started){var n=x1.call(this,e,t);t&(zQ|BQ)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:MQ,srcEvent:e})}},t}(y$);function x1(e,t){var n=E$(e.touches),r=E$(e.changedTouches);return t&(zQ|BQ)&&(n=D$(n.concat(r),`identifier`,!0)),[n,r]}function S1(e,t,n){var r=`DEPRECATED METHOD: `+t+`-`+n+` AT-`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var C1=S1(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),w1=S1(function(e,t){return C1(e,t,!0)},`merge`,"Use `assign`.");function T1(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&lQ(i,n)}function E1(e,t){return function(){return e.apply(t,arguments)}}var D1=function(){var e=function(e,t){return t===void 0&&(t={}),new g1(e,oQ({recognizers:d1.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=JQ,e.DIRECTION_DOWN=GQ,e.DIRECTION_LEFT=HQ,e.DIRECTION_RIGHT=UQ,e.DIRECTION_UP=WQ,e.DIRECTION_HORIZONTAL=KQ,e.DIRECTION_VERTICAL=qQ,e.DIRECTION_NONE=VQ,e.DIRECTION_DOWN=GQ,e.INPUT_START=LQ,e.INPUT_MOVE=RQ,e.INPUT_END=zQ,e.INPUT_CANCEL=BQ,e.STATE_POSSIBLE=W$,e.STATE_BEGAN=G$,e.STATE_CHANGED=K$,e.STATE_ENDED=q$,e.STATE_RECOGNIZED=J$,e.STATE_CANCELLED=Y$,e.STATE_FAILED=X$,e.Manager=g1,e.Input=y$,e.TouchAction=t$,e.TouchInput=A$,e.MouseInput=F$,e.PointerEventInput=T$,e.TouchMouseInput=V$,e.SingleTouchInput=b1,e.Recognizer=t1,e.AttrRecognizer=r1,e.Tap=n1,e.Pan=a1,e.Swipe=o1,e.Pinch=s1,e.Rotate=c1,e.Press=l1,e.on=g$,e.off=_$,e.each=ZQ,e.merge=w1,e.extend=C1,e.bindFn=E1,e.assign=lQ,e.inherit=T1,e.bindFn=E1,e.prefixed=gQ,e.toArray=E$,e.inArray=b$,e.uniqueArray=D$,e.splitStr=h$,e.boolOrFn=QQ,e.hasParent=n$,e.addEventListeners=g$,e.removeEventListeners=_$,e.defaults=lQ({},u1,{preset:d1}),e}();D1.defaults;var O1=ZK(`DELETE`);function k1(e){return A1({},e,...[...arguments].slice(1))}function A1(){let e=j1(...arguments);return N1(e),e}function j1(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return j1(A1(e[0],e[1]),...pq(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of Eq(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===O1?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!eL(t[e])&&!eL(n[e])?t[e]=j1(t[e],n[e]):t[e]=M1(n[e]));return t}function M1(e){return eL(e)?cK(e).call(e,e=>M1(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):j1({},e):e}function N1(e){for(let t of UK(e))e[t]===O1?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&N1(e[t])}function P1(){var e=[...arguments];return F1(e.length?e:[zq()])}function F1(e){let[t,n,r]=I1(e),i=1,a=()=>{let e=2091639*t+i*23283064365386963e-26;return t=n,n=r,r=e-(i=e|0)};return a.uint32=()=>a()*4294967296,a.fract53=()=>a()+(a()*2097152|0)*11102230246251565e-32,a.algorithm=`Alea`,a.seed=e,a.version=`0.9`,a}function I1(){let e=L1(),t=e(` `),n=e(` `),r=e(` `);for(let i=0;i<arguments.length;i++)t-=e(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=e(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),r-=e(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[t,n,r]}function L1(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function R1(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var z1=typeof window<`u`?window.Hammer||D1:function(){return R1()};function B1(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=z1(this._dom.overlay);n.on(`tap`,Z(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{V1(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}aQ(B1.prototype),B1.current=null,B1.prototype.destroy=function(){this.deactivate();for(let n of tJ(e=CJ(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},B1.prototype.activate=function(){B1.current&&B1.current.deactivate(),B1.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},B1.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},B1.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function V1(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var H1=/^\/?Date\((-?\d+)/i,U1=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,W1=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,G1=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,K1=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function q1(e){return e instanceof Number||typeof e==`number`}function J1(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(J1(t),e.removeChild(t))}}function Y1(e){return e instanceof String||typeof e==`string`}function X1(e){return typeof e==`object`&&!!e}function Z1(e){return!!(e instanceof Date||Y1(e)&&(H1.exec(e)||!isNaN(Date.parse(e))))}function Q1(e,t,n,r){let i=!1;r===!0&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function $1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(let r in e)if(t[r]!==void 0)if(t[r]===null||typeof t[r]!=`object`)Q1(e,t,r,n);else{let i=e[r],a=t[r];X1(i)&&X1(a)&&$1(i,a,n)}}var e0=zJ;function t0(e,t){if(!eL(e))throw Error(`Array with property names expected as first argument`);var n=[...arguments].slice(2);for(let r of n)for(let n=0;n<e.length;n++){let i=e[n];r&&Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}function n0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(eL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i=0;i<e.length;i++){let a=e[i];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?i0(t[a],n[a],!1,r):Q1(t,n,a,r);else if(eL(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else Q1(t,n,a,r)}return t}function r0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(eL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!gY(e).call(e,i))if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?i0(t[i],n[i]):Q1(t,n,i,r);else if(eL(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else Q1(t,n,i,r);return t}function i0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)||n===!0)if(typeof t[a]==`object`&&t[a]!==null&&kY(t[a])===Object.prototype)e[a]===void 0?e[a]=i0({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&kY(e[a])===Object.prototype?i0(e[a],t[a],n):Q1(e,t,a,r);else if(eL(t[a])){var i;e[a]=pq(i=t[a]).call(i)}else Q1(e,t,a,r);return e}function a0(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!=t[n])return!1;return!0}function o0(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`Boolean`:e instanceof Number?`Number`:e instanceof String?`String`:eL(e)?`Array`:e instanceof Date?`Date`:`Object`:t===`number`?`Number`:t===`boolean`?`Boolean`:t===`string`?`String`:t===void 0?`undefined`:t}function s0(e,t){return[...e,t]}function c0(e){return pq(e).call(e)}function l0(e){return e.getBoundingClientRect().left}function u0(e){return e.getBoundingClientRect().right}function d0(e){return e.getBoundingClientRect().top}function f0(e,t){let n=e.className.split(` `),r=t.split(` `);n=HY(n).call(n,uV(r).call(r,function(e){return!gY(n).call(n,e)})),e.className=n.join(` `)}function p0(e,t){let n=e.className.split(` `),r=t.split(` `);n=uV(n).call(n,function(e){return!gY(r).call(r,e)}),e.className=n.join(` `)}function m0(e,t){if(eL(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}var h0=iX;function g0(e,t,n){return e[t]===n?!1:(e[t]=n,!0)}function _0(e){let t=!1;return()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}}function v0(e){e||=window.event,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function y0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event,t=null;return e&&(e.target?t=e.target:e.srcElement&&(t=e.srcElement)),!(t instanceof Element)||t.nodeType!=null&&t.nodeType==3&&(t=t.parentNode,!(t instanceof Element))?null:t}function b0(e,t){let n=e;for(;n;)if(n===t)return!0;else if(n.parentNode)n=n.parentNode;else return!1;return!1}var x0={asBoolean(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:e!=0},asNumber(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:Number(e)||t||null},asString(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:String(e)},asSize(e,t){return typeof e==`function`&&(e=e()),Y1(e)?e:q1(e)?e+`px`:t||null},asElement(e,t){return typeof e==`function`&&(e=e()),e||t||null}};function S0(e){let t;switch(e.length){case 3:case 4:return t=W1.exec(e),t?{r:EX(t[1]+t[1],16),g:EX(t[2]+t[2],16),b:EX(t[3]+t[3],16)}:null;case 6:case 7:return t=U1.exec(e),t?{r:EX(t[1],16),g:EX(t[2],16),b:EX(t[3],16)}:null;default:return null}}function C0(e,t){if(gY(e).call(e,`rgba`))return e;if(gY(e).call(e,`rgb`)){let n=e.substr(HX(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}else{let n=S0(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function w0(e,t,n){var r;return`#`+pq(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function T0(e,t){if(Y1(e)){let t=e;if(P0(t)){var n;let e=cK(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return EX(e)});t=w0(e[0],e[1],e[2])}if(N0(t)===!0){let e=M0(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},i=j0(r.h,r.s,r.v),a=j0(n.h,n.s,n.v);return{background:t,border:i,highlight:{background:a,border:i},hover:{background:a,border:i}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else if(t)return{background:e.background||t.background,border:e.border||t.border,highlight:Y1(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:Y1(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}};else return{background:e.background||void 0,border:e.border||void 0,highlight:Y1(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:Y1(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function E0(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));if(r===i)return{h:0,s:0,v:r};let a=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-a/(i-r))/360,s:(i-r)/i,v:i}}function D0(e){let t=document.createElement(`div`),n={};t.style.cssText=e;for(let e=0;e<t.style.length;++e)n[t.style[e]]=t.style.getPropertyValue(t.style[e]);return n}function O0(e,t){let n=D0(t);for(let[t,r]of tZ(n))e.style.setProperty(t,r)}function k0(e,t){let n=D0(t);for(let t of UK(n))e.style.removeProperty(t)}function A0(e,t,n){let r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function j0(e,t,n){let r=A0(e,t,n);return w0(r.r,r.g,r.b)}function M0(e){let t=S0(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return E0(t.r,t.g,t.b)}function N0(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function P0(e){return G1.test(e)}function F0(e){return K1.test(e)}function I0(e,t){if(typeof t==`object`&&t){let n=mZ(t);for(let r=0;r<e.length;r++)Object.prototype.hasOwnProperty.call(t,e[r])&&typeof t[e[r]]==`object`&&(n[e[r]]=L0(t[e[r]]));return n}else return null}function L0(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=mZ(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=L0(e[n]));return t}function R0(e,t){for(let n=0;n<e.length;n++){let r=e[n],i;for(i=n;i>0&&t(r,e[i-1])<0;i--)e[i]=e[i-1];e[i]=r}return e}function z0(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return typeof e==`object`&&!!e},o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);let s=function(e,t,n){a(e[n])||(e[n]={});let r=t[n],i=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])},c=t[n],l=a(r)&&!o(r)?r[n]:void 0,u=l?l.enabled:void 0;if(c===void 0)return;if(typeof c==`boolean`){a(e[n])||(e[n]={}),e[n].enabled=c;return}if(c===null&&!a(e[n]))if(i(l))e[n]=mZ(l);else return;if(!a(c))return;let d=!0;c.enabled===void 0?u!==void 0&&(d=l.enabled):d=c.enabled,s(e,t,n),e[n].enabled=d}function B0(e,t,n,r){let i=0,a=0,o=e.length-1;for(;a<=o&&i<1e4;){let s=Math.floor((a+o)/2),c=e[s],l=t(r===void 0?c[n]:c[n][r]);if(l==0)return s;l==-1?a=s+1:o=s-1,i++}return-1}function V0(e,t,n,r,i){let a=0,o=0,s=e.length-1,c,l,u,d;for(i??=function(e,t){return e==t?0:e<t?-1:1};o<=s&&a<1e4;){if(d=Math.floor(.5*(s+o)),c=e[Math.max(0,d-1)][n],l=e[d][n],u=e[Math.min(e.length-1,d+1)][n],i(l,t)==0)return d;if(i(c,t)<0&&i(l,t)>0)return r==`before`?Math.max(0,d-1):d;if(i(l,t)<0&&i(u,t)>0)return r==`before`?d:Math.min(e.length-1,d+1);i(l,t)<0?o=d+1:s=d-1,a++}return-1}var H0={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function U0(){let e=document.createElement(`p`);e.style.width=`100%`,e.style.height=`200px`;let t=document.createElement(`div`);t.style.position=`absolute`,t.style.top=`0px`,t.style.left=`0px`,t.style.visibility=`hidden`,t.style.width=`200px`,t.style.height=`150px`,t.style.overflow=`hidden`,t.appendChild(e),document.body.appendChild(t);let n=e.offsetWidth;t.style.overflow=`scroll`;let r=e.offsetWidth;return n==r&&(r=t.clientWidth),document.body.removeChild(t),n-r}function W0(e,t){let n;eL(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var G0={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},K0=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return G0[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),Y1(e)===!0){if(P0(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(F0(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(N0(e)===!0){let t=S0(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+IZ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=zJ({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,YL(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=zJ({},e)),this.color=e;let t=E0(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=E0(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=A0(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=E0(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),tQ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);let i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerText=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerText=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerText=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerText=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerText=`cancel`,this.cancelButton.onclick=Z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerText=`apply`,this.applyButton.onclick=Z(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=Z(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerText=`load last`,this.loadButton.onclick=Z(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new z1(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=A0(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=E0(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=A0(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}};function q0(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(q0(...pq(e).call(e,1))),t}}var J0=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=i,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},zJ(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new K0(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(eL(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),uV(e)!==void 0&&(this.options.filter=uV(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);uV(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=uV(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||HX(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return Q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(q0(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&HX(e).call(e,t)!==-1&&(i=HX(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=s.value;let d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=YL(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=YL(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=uV(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=s0(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!eL(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(eL(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions))if(s.enabled!==void 0){let e=s0(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(q0(`pre`,`const options = `+IZ(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},Y0=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=EX(e),this.y=EX(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,i=0,a=0;if(this.overflowMethod==`flip`){let n=!1,o=!0;this.y-e<this.padding&&(o=!1),this.x+t>r-this.padding&&(n=!0),i=n?this.x-t:this.x,a=o?this.y-e:this.y}else a=this.y-e,a+e+this.padding>n&&(a=n-e-this.padding),a<this.padding&&(a=this.padding),i=this.x,i+t+this.padding>r&&(i=r-t-this.padding),i<this.padding&&(i=this.padding);this.frame.style.left=i+`px`,this.frame.style.top=a+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},X0=!1,Z0,Q0=`background: #FFeeee; color: #dd0000`,$0=Object.freeze({__proto__:null,Activator:B1,Alea:P1,ColorPicker:K0,Configurator:J0,DELETE:O1,HSVToHex:j0,HSVToRGB:A0,Hammer:z1,Popup:Y0,RGBToHSV:E0,RGBToHex:w0,VALIDATOR_PRINT_STYLE:Q0,Validator:class e{static validate(t,n,r){X0=!1,Z0=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),X0}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.error(`%c`+n+e.printLocation(o,t),Q0)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(UK(a))+`. Received [`+c+`] "`+n[t]+`"`),X0=!0):e.getType(l)===`array`&&HX(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),X0=!0):c===`object`&&i!==`__any__`&&(o=s0(o,t),e.parse(n[t],r[i],o))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:eL(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,Z0,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(UK(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?--`,console.error(`%cUnknown option detected: "`+t+`"`+o,Q0),X0=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],s0(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;HX(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=c0(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`--`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:-`)+`options = {-`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {-`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`-`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}-`}return n+`--`}static print(e){return IZ(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},addClassName:f0,addCssText:O0,binarySearchCustom:B0,binarySearchValue:V0,bridgeObject:L0,copyAndExtendArray:s0,copyArray:c0,deepExtend:i0,deepObjectAssign:A1,easingFunctions:H0,equalArray:a0,extend:e0,fillIfDefined:$1,forEach:m0,getAbsoluteLeft:l0,getAbsoluteRight:u0,getAbsoluteTop:d0,getScrollBarWidth:U0,getTarget:y0,getType:o0,hasParent:b0,hexToHSV:M0,hexToRGB:S0,insertSort:R0,isDate:Z1,isNumber:q1,isObject:X1,isString:Y1,isValidHex:N0,isValidRGB:P0,isValidRGBA:F0,mergeOptions:z0,option:x0,overrideOpacity:C0,parseColor:T0,preventDefault:v0,pureDeepObjectAssign:k1,recursiveDOMDelete:J1,removeClassName:p0,removeCssText:k0,selectiveBridgeObject:I0,selectiveDeepExtend:n0,selectiveExtend:t0,selectiveNotDeepExtend:r0,throttle:_0,toArray:h0,topMost:W0,updateProperty:g0}),e2={exports:{}},t2={},n2={exports:{}},r2={},i2;function a2(){if(i2)return r2;i2=1;function e(){var e={};return e[`align-content`]=!1,e[`align-items`]=!1,e[`align-self`]=!1,e[`alignment-adjust`]=!1,e[`alignment-baseline`]=!1,e.all=!1,e[`anchor-point`]=!1,e.animation=!1,e[`animation-delay`]=!1,e[`animation-direction`]=!1,e[`animation-duration`]=!1,e[`animation-fill-mode`]=!1,e[`animation-iteration-count`]=!1,e[`animation-name`]=!1,e[`animation-play-state`]=!1,e[`animation-timing-function`]=!1,e.azimuth=!1,e[`backface-visibility`]=!1,e.background=!0,e[`background-attachment`]=!0,e[`background-clip`]=!0,e[`background-color`]=!0,e[`background-image`]=!0,e[`background-origin`]=!0,e[`background-position`]=!0,e[`background-repeat`]=!0,e[`background-size`]=!0,e[`baseline-shift`]=!1,e.binding=!1,e.bleed=!1,e[`bookmark-label`]=!1,e[`bookmark-level`]=!1,e[`bookmark-state`]=!1,e.border=!0,e[`border-bottom`]=!0,e[`border-bottom-color`]=!0,e[`border-bottom-left-radius`]=!0,e[`border-bottom-right-radius`]=!0,e[`border-bottom-style`]=!0,e[`border-bottom-width`]=!0,e[`border-collapse`]=!0,e[`border-color`]=!0,e[`border-image`]=!0,e[`border-image-outset`]=!0,e[`border-image-repeat`]=!0,e[`border-image-slice`]=!0,e[`border-image-source`]=!0,e[`border-image-width`]=!0,e[`border-left`]=!0,e[`border-left-color`]=!0,e[`border-left-style`]=!0,e[`border-left-width`]=!0,e[`border-radius`]=!0,e[`border-right`]=!0,e[`border-right-color`]=!0,e[`border-right-style`]=!0,e[`border-right-width`]=!0,e[`border-spacing`]=!0,e[`border-style`]=!0,e[`border-top`]=!0,e[`border-top-color`]=!0,e[`border-top-left-radius`]=!0,e[`border-top-right-radius`]=!0,e[`border-top-style`]=!0,e[`border-top-width`]=!0,e[`border-width`]=!0,e.bottom=!1,e[`box-decoration-break`]=!0,e[`box-shadow`]=!0,e[`box-sizing`]=!0,e[`box-snap`]=!0,e[`box-suppress`]=!0,e[`break-after`]=!0,e[`break-before`]=!0,e[`break-inside`]=!0,e[`caption-side`]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e[`clip-path`]=!1,e[`clip-rule`]=!1,e.color=!0,e[`color-interpolation-filters`]=!0,e[`column-count`]=!1,e[`column-fill`]=!1,e[`column-gap`]=!1,e[`column-rule`]=!1,e[`column-rule-color`]=!1,e[`column-rule-style`]=!1,e[`column-rule-width`]=!1,e[`column-span`]=!1,e[`column-width`]=!1,e.columns=!1,e.contain=!1,e.content=!1,e[`counter-increment`]=!1,e[`counter-reset`]=!1,e[`counter-set`]=!1,e.crop=!1,e.cue=!1,e[`cue-after`]=!1,e[`cue-before`]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e[`display-inside`]=!0,e[`display-list`]=!0,e[`display-outside`]=!0,e[`dominant-baseline`]=!1,e.elevation=!1,e[`empty-cells`]=!1,e.filter=!1,e.flex=!1,e[`flex-basis`]=!1,e[`flex-direction`]=!1,e[`flex-flow`]=!1,e[`flex-grow`]=!1,e[`flex-shrink`]=!1,e[`flex-wrap`]=!1,e.float=!1,e[`float-offset`]=!1,e[`flood-color`]=!1,e[`flood-opacity`]=!1,e[`flow-from`]=!1,e[`flow-into`]=!1,e.font=!0,e[`font-family`]=!0,e[`font-feature-settings`]=!0,e[`font-kerning`]=!0,e[`font-language-override`]=!0,e[`font-size`]=!0,e[`font-size-adjust`]=!0,e[`font-stretch`]=!0,e[`font-style`]=!0,e[`font-synthesis`]=!0,e[`font-variant`]=!0,e[`font-variant-alternates`]=!0,e[`font-variant-caps`]=!0,e[`font-variant-east-asian`]=!0,e[`font-variant-ligatures`]=!0,e[`font-variant-numeric`]=!0,e[`font-variant-position`]=!0,e[`font-weight`]=!0,e.grid=!1,e[`grid-area`]=!1,e[`grid-auto-columns`]=!1,e[`grid-auto-flow`]=!1,e[`grid-auto-rows`]=!1,e[`grid-column`]=!1,e[`grid-column-end`]=!1,e[`grid-column-start`]=!1,e[`grid-row`]=!1,e[`grid-row-end`]=!1,e[`grid-row-start`]=!1,e[`grid-template`]=!1,e[`grid-template-areas`]=!1,e[`grid-template-columns`]=!1,e[`grid-template-rows`]=!1,e[`hanging-punctuation`]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e[`image-orientation`]=!1,e[`image-resolution`]=!1,e[`ime-mode`]=!1,e[`initial-letters`]=!1,e[`inline-box-align`]=!1,e[`justify-content`]=!1,e[`justify-items`]=!1,e[`justify-self`]=!1,e.left=!1,e[`letter-spacing`]=!0,e[`lighting-color`]=!0,e[`line-box-contain`]=!1,e[`line-break`]=!1,e[`line-grid`]=!1,e[`line-height`]=!1,e[`line-snap`]=!1,e[`line-stacking`]=!1,e[`line-stacking-ruby`]=!1,e[`line-stacking-shift`]=!1,e[`line-stacking-strategy`]=!1,e[`list-style`]=!0,e[`list-style-image`]=!0,e[`list-style-position`]=!0,e[`list-style-type`]=!0,e.margin=!0,e[`margin-bottom`]=!0,e[`margin-left`]=!0,e[`margin-right`]=!0,e[`margin-top`]=!0,e[`marker-offset`]=!1,e[`marker-side`]=!1,e.marks=!1,e.mask=!1,e[`mask-box`]=!1,e[`mask-box-outset`]=!1,e[`mask-box-repeat`]=!1,e[`mask-box-slice`]=!1,e[`mask-box-source`]=!1,e[`mask-box-width`]=!1,e[`mask-clip`]=!1,e[`mask-image`]=!1,e[`mask-origin`]=!1,e[`mask-position`]=!1,e[`mask-repeat`]=!1,e[`mask-size`]=!1,e[`mask-source-type`]=!1,e[`mask-type`]=!1,e[`max-height`]=!0,e[`max-lines`]=!1,e[`max-width`]=!0,e[`min-height`]=!0,e[`min-width`]=!0,e[`move-to`]=!1,e[`nav-down`]=!1,e[`nav-index`]=!1,e[`nav-left`]=!1,e[`nav-right`]=!1,e[`nav-up`]=!1,e[`object-fit`]=!1,e[`object-position`]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e[`outline-color`]=!1,e[`outline-offset`]=!1,e[`outline-style`]=!1,e[`outline-width`]=!1,e.overflow=!1,e[`overflow-wrap`]=!1,e[`overflow-x`]=!1,e[`overflow-y`]=!1,e.padding=!0,e[`padding-bottom`]=!0,e[`padding-left`]=!0,e[`padding-right`]=!0,e[`padding-top`]=!0,e.page=!1,e[`page-break-after`]=!1,e[`page-break-before`]=!1,e[`page-break-inside`]=!1,e[`page-policy`]=!1,e.pause=!1,e[`pause-after`]=!1,e[`pause-before`]=!1,e.perspective=!1,e[`perspective-origin`]=!1,e.pitch=!1,e[`pitch-range`]=!1,e[`play-during`]=!1,e.position=!1,e[`presentation-level`]=!1,e.quotes=!1,e[`region-fragment`]=!1,e.resize=!1,e.rest=!1,e[`rest-after`]=!1,e[`rest-before`]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e[`rotation-point`]=!1,e[`ruby-align`]=!1,e[`ruby-merge`]=!1,e[`ruby-position`]=!1,e[`shape-image-threshold`]=!1,e[`shape-outside`]=!1,e[`shape-margin`]=!1,e.size=!1,e.speak=!1,e[`speak-as`]=!1,e[`speak-header`]=!1,e[`speak-numeral`]=!1,e[`speak-punctuation`]=!1,e[`speech-rate`]=!1,e.stress=!1,e[`string-set`]=!1,e[`tab-size`]=!1,e[`table-layout`]=!1,e[`text-align`]=!0,e[`text-align-last`]=!0,e[`text-combine-upright`]=!0,e[`text-decoration`]=!0,e[`text-decoration-color`]=!0,e[`text-decoration-line`]=!0,e[`text-decoration-skip`]=!0,e[`text-decoration-style`]=!0,e[`text-emphasis`]=!0,e[`text-emphasis-color`]=!0,e[`text-emphasis-position`]=!0,e[`text-emphasis-style`]=!0,e[`text-height`]=!0,e[`text-indent`]=!0,e[`text-justify`]=!0,e[`text-orientation`]=!0,e[`text-overflow`]=!0,e[`text-shadow`]=!0,e[`text-space-collapse`]=!0,e[`text-transform`]=!0,e[`text-underline-position`]=!0,e[`text-wrap`]=!0,e.top=!1,e.transform=!1,e[`transform-origin`]=!1,e[`transform-style`]=!1,e.transition=!1,e[`transition-delay`]=!1,e[`transition-duration`]=!1,e[`transition-property`]=!1,e[`transition-timing-function`]=!1,e[`unicode-bidi`]=!1,e[`vertical-align`]=!1,e.visibility=!1,e[`voice-balance`]=!1,e[`voice-duration`]=!1,e[`voice-family`]=!1,e[`voice-pitch`]=!1,e[`voice-range`]=!1,e[`voice-rate`]=!1,e[`voice-stress`]=!1,e[`voice-volume`]=!1,e.volume=!1,e[`white-space`]=!1,e.widows=!1,e.width=!0,e[`will-change`]=!1,e[`word-break`]=!0,e[`word-spacing`]=!0,e[`word-wrap`]=!0,e[`wrap-flow`]=!1,e[`wrap-through`]=!1,e[`writing-mode`]=!1,e[`z-index`]=!1,e}function t(e,t,n){}function n(e,t,n){}var r=/javascript\s*\:/gim;function i(e,t){return r.test(t)?``:t}return r2.whiteList=e(),r2.getDefaultWhiteList=e,r2.onAttr=t,r2.onIgnoreAttr=n,r2.safeAttrValue=i,r2}var o2,s2;function c2(){return s2?o2:(s2=1,o2={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,``)}},o2)}var l2,u2;function d2(){if(u2)return l2;u2=1;var e=c2();function t(t,n){t=e.trimRight(t),t[t.length-1]!==`;`&&(t+=`;`);var r=t.length,i=!1,a=0,o=0,s=``;function c(){if(!i){var r=e.trim(t.slice(a,o)),c=r.indexOf(`:`);if(c!==-1){var l=e.trim(r.slice(0,c)),u=e.trim(r.slice(c+1));if(l){var d=n(a,s.length,l,u,r);d&&(s+=d+`; `)}}}a=o+1}for(;o<r;o++){var l=t[o];if(l===`/`&&t[o+1]===`*`){var u=t.indexOf(`*/`,o+2);if(u===-1)break;o=u+1,a=o+1,i=!1}else l===`(`?i=!0:l===`)`?i=!1:l===`;`?i||c():l===`-`&&c()}return e.trim(s)}return l2=t,l2}var f2,p2;function m2(){if(p2)return f2;p2=1;var e=a2(),t=d2();c2();function n(e){return e==null}function r(e){var t={};for(var n in e)t[n]=e[n];return t}function i(t){t=r(t||{}),t.whiteList=t.whiteList||e.whiteList,t.onAttr=t.onAttr||e.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||e.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||e.safeAttrValue,this.options=t}return i.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var r=this.options,i=r.whiteList,a=r.onAttr,o=r.onIgnoreAttr,s=r.safeAttrValue;return t(e,function(e,t,r,c,l){var u=i[r],d=!1;if(u===!0?d=u:typeof u==`function`?d=u(c):u instanceof RegExp&&(d=u.test(c)),d!==!0&&(d=!1),c=s(r,c),c){var f={position:t,sourcePosition:e,source:l,isWhite:d};if(d){var p=a(r,c,f);return n(p)?r+`:`+c:p}else{var p=o(r,c,f);if(!n(p))return p}}})},f2=i,f2}var h2;function g2(){return h2?n2.exports:(h2=1,(function(e,t){var n=a2(),r=m2();function i(e,t){return new r(t).process(e)}for(var a in t=e.exports=i,t.FilterCSS=r,n)t[a]=n[a];typeof window<`u`&&(window.filterCSS=e.exports)})(n2,n2.exports),n2.exports)}var _2,v2;function y2(){return v2?_2:(v2=1,_2={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},_2)}var b2;function x2(){if(b2)return t2;b2=1;var e=g2().FilterCSS,t=g2().getDefaultWhiteList,n=y2();function r(){return{a:[`target`,`href`,`title`],abbr:[`title`],address:[],area:[`shape`,`coords`,`href`,`alt`],article:[],aside:[],audio:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`preload`,`src`],b:[],bdi:[`dir`],bdo:[`dir`],big:[],blockquote:[`cite`],br:[],caption:[],center:[],cite:[],code:[],col:[`align`,`valign`,`span`,`width`],colgroup:[`align`,`valign`,`span`,`width`],dd:[],del:[`datetime`],details:[`open`],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:[`color`,`size`,`face`],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:[`src`,`alt`,`title`,`width`,`height`,`loading`],ins:[`datetime`],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:[`width`,`border`,`align`,`valign`],tbody:[`align`,`valign`],td:[`width`,`rowspan`,`colspan`,`align`,`valign`],tfoot:[`align`,`valign`],th:[`width`,`rowspan`,`colspan`,`align`,`valign`],thead:[`align`,`valign`],tr:[`rowspan`,`align`,`valign`],tt:[],u:[],ul:[],video:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`playsinline`,`poster`,`preload`,`src`,`height`,`width`]}}var i=new e;function a(e,t,n){}function o(e,t,n){}function s(e,t,n){}function c(e,t,n){}function l(e){return e.replace(d,`<`).replace(f,`>`)}function u(e,t,r,a){if(r=E(r),t===`href`||t===`src`){if(r=n.trim(r),r===`#`)return`#`;if(!(r.substr(0,7)===`http://`||r.substr(0,8)===`https://`||r.substr(0,7)===`mailto:`||r.substr(0,4)===`tel:`||r.substr(0,11)===`data:image/`||r.substr(0,6)===`ftp://`||r.substr(0,2)===`./`||r.substr(0,3)===`../`||r[0]===`#`||r[0]===`/`))return``}else if(t===`background`){if(v.lastIndex=0,v.test(r))return``}else if(t===`style`){if(y.lastIndex=0,y.test(r)||(b.lastIndex=0,b.test(r)&&(v.lastIndex=0,v.test(r))))return``;a!==!1&&(a||=i,r=a.process(r))}return r=D(r),r}var d=/</g,f=/>/g,p=/"/g,m=/"/g,h=/&#([a-zA-Z0-9]*);?/gim,g=/:?/gim,_=/&newline;?/gim,v=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,y=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function x(e){return e.replace(p,`"`)}function S(e){return e.replace(m,`"`)}function C(e){return e.replace(h,function(e,t){return t[0]===`x`||t[0]===`X`?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function w(e){return e.replace(g,`:`).replace(_,` `)}function T(e){for(var t=``,r=0,i=e.length;r<i;r++)t+=e.charCodeAt(r)<32?` `:e.charAt(r);return n.trim(t)}function E(e){return e=S(e),e=C(e),e=w(e),e=T(e),e}function D(e){return e=x(e),e=l(e),e}function O(){return``}function ee(e,t){typeof t!=`function`&&(t=function(){});var r=!Array.isArray(e);function i(t){return r?!0:n.indexOf(e,t)!==-1}var a=[],o=!1;return{onIgnoreTag:function(e,n,r){if(i(e))if(r.isClosing){var s=`[/removed]`,c=r.position+s.length;return a.push([o===!1?r.position:o,c]),o=!1,s}else return o||=r.position,`[removed]`;else return t(e,n,r)},remove:function(e){var t=``,r=0;return n.forEach(a,function(n){t+=e.slice(r,n[0]),r=n[1]}),t+=e.slice(r),t}}}function k(e){for(var t=``,n=0;n<e.length;){var r=e.indexOf(`<!--`,n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var i=e.indexOf(`-->`,r);if(i===-1)break;n=i+3}return t}function A(e){var t=e.split(``);return t=t.filter(function(e){var t=e.charCodeAt(0);return t===127?!1:t<=31?t===10||t===13:!0}),t.join(``)}return t2.whiteList=r(),t2.getDefaultWhiteList=r,t2.onTag=a,t2.onIgnoreTag=o,t2.onTagAttr=s,t2.onIgnoreTagAttr=c,t2.safeAttrValue=u,t2.escapeHtml=l,t2.escapeQuote=x,t2.unescapeQuote=S,t2.escapeHtmlEntities=C,t2.escapeDangerHtml5Entities=w,t2.clearNonPrintableCharacter=T,t2.friendlyAttrValue=E,t2.escapeAttrValue=D,t2.onIgnoreTagStripAll=O,t2.StripTagBody=ee,t2.stripCommentTag=k,t2.stripBlankChar=A,t2.attributeWrapSign=`"`,t2.cssFilter=i,t2.getDefaultCSSWhiteList=t,t2}var S2={},C2;function w2(){if(C2)return S2;C2=1;var e=y2();function t(t){var n=e.spaceIndex(t),r=n===-1?t.slice(1,-1):t.slice(1,n+1);return r=e.trim(r).toLowerCase(),r.slice(0,1)===`/`&&(r=r.slice(1)),r.slice(-1)===`/`&&(r=r.slice(0,-1)),r}function n(e){return e.slice(0,2)===`</`}function r(e,r,i){var a=``,o=0,s=!1,c=!1,l=0,u=e.length,d=``,f=``;chariterator:for(l=0;l<u;l++){var p=e.charAt(l);if(s===!1){if(p===`<`){s=l;continue}}else if(c===!1){if(p===`<`){a+=i(e.slice(o,l)),s=l,o=l;continue}if(p===`>`||l===u-1){a+=i(e.slice(o,s)),f=e.slice(s,l+1),d=t(f),a+=r(s,a.length,d,f,n(f)),o=l+1,s=!1;continue}if(p===`"`||p===`'`)for(var m=1,h=e.charAt(l-m);h.trim()===``||h===`=`;){if(h===`=`){c=p;continue chariterator}h=e.charAt(l-++m)}}else if(p===c){c=!1;continue}}return o<u&&(a+=i(e.substr(o))),a}var i=/[^a-zA-Z0-9\\_:.-]/gim;function a(t,n){var r=0,a=0,l=[],d=!1,f=t.length;function p(t,r){if(t=e.trim(t),t=t.replace(i,``).toLowerCase(),!(t.length<1)){var a=n(t,r||``);a&&l.push(a)}}for(var m=0;m<f;m++){var h=t.charAt(m),g,_;if(d===!1&&h===`=`){d=t.slice(r,m),r=m+1,a=t.charAt(r)===`"`||t.charAt(r)===`'`?r:s(t,m+1);continue}if(d!==!1&&m===a){if(_=t.indexOf(h,m+1),_===-1)break;g=e.trim(t.slice(a+1,_)),p(d,g),d=!1,m=_,r=m+1;continue}if(/\s|\n|\t/.test(h))if(t=t.replace(/\s|\n|\t/g,` `),d===!1)if(_=o(t,m),_===-1){g=e.trim(t.slice(r,m)),p(g),d=!1,r=m+1;continue}else{m=_-1;continue}else if(_=c(t,m-1),_===-1){g=e.trim(t.slice(r,m)),g=u(g),p(d,g),d=!1,r=m+1;continue}else continue}return r<t.length&&(d===!1?p(t.slice(r)):p(d,u(e.trim(t.slice(r))))),e.trim(l.join(` `))}function o(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function s(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`'`||n===`"`?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function l(e){return e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`}function u(e){return l(e)?e.substr(1,e.length-2):e}return S2.parseTag=r,S2.parseAttr=a,S2}var T2,E2;function D2(){if(E2)return T2;E2=1;var e=g2().FilterCSS,t=x2(),n=w2(),r=n.parseTag,i=n.parseAttr,a=y2();function o(e){return e==null}function s(e){var t=a.spaceIndex(e);if(t===-1)return{html:``,closing:e[e.length-2]===`/`};e=a.trim(e.slice(t+1,-1));var n=e[e.length-1]===`/`;return n&&(e=a.trim(e.slice(0,-1))),{html:e,closing:n}}function c(e){var t={};for(var n in e)t[n]=e[n];return t}function l(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(e){return e.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function u(n){n=c(n||{}),n.stripIgnoreTag&&(n.onIgnoreTag&&console.error(`Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time`),n.onIgnoreTag=t.onIgnoreTagStripAll),n.whiteList||n.allowList?n.whiteList=l(n.whiteList||n.allowList):n.whiteList=t.whiteList,this.attributeWrapSign=n.singleQuotedAttributeValue===!0?`'`:t.attributeWrapSign,n.onTag=n.onTag||t.onTag,n.onTagAttr=n.onTagAttr||t.onTagAttr,n.onIgnoreTag=n.onIgnoreTag||t.onIgnoreTag,n.onIgnoreTagAttr=n.onIgnoreTagAttr||t.onIgnoreTagAttr,n.safeAttrValue=n.safeAttrValue||t.safeAttrValue,n.escapeHtml=n.escapeHtml||t.escapeHtml,this.options=n,n.css===!1?this.cssFilter=!1:(n.css=n.css||{},this.cssFilter=new e(n.css))}return u.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var n=this,c=n.options,l=c.whiteList,u=c.onTag,d=c.onIgnoreTag,f=c.onTagAttr,p=c.onIgnoreTagAttr,m=c.safeAttrValue,h=c.escapeHtml,g=n.attributeWrapSign,_=n.cssFilter;c.stripBlankChar&&(e=t.stripBlankChar(e)),c.allowCommentTag||(e=t.stripCommentTag(e));var v=!1;c.stripIgnoreTagBody&&(v=t.StripTagBody(c.stripIgnoreTagBody,d),d=v.onIgnoreTag);var y=r(e,function(e,t,n,r,c){var v={sourcePosition:e,position:t,isClosing:c,isWhite:Object.prototype.hasOwnProperty.call(l,n)},y=u(n,r,v);if(!o(y))return y;if(v.isWhite){if(v.isClosing)return`</`+n+`>`;var b=s(r),x=l[n],S=i(b.html,function(e,t){var r=a.indexOf(x,e)!==-1,i=f(n,e,t,r);return o(i)?r?(t=m(n,e,t,_),t?e+`=`+g+t+g:e):(i=p(n,e,t,r),o(i)?void 0:i):i});return r=`<`+n,S&&(r+=` `+S),b.closing&&(r+=` /`),r+=`>`,r}else return y=d(n,r,v),o(y)?h(r):y},h);return v&&(y=v.remove(y)),y},T2=u,T2}var O2;function k2(){return O2?e2.exports:(O2=1,(function(e,t){var n=x2(),r=w2(),i=D2();function a(e,t){return new i(t).process(e)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,(function(){for(var e in n)t[e]=n[e];for(var i in r)t[i]=r[i]})(),typeof window<`u`&&(window.filterXSS=e.exports);function o(){return typeof self<`u`&&typeof DedicatedWorkerGlobalScope<`u`&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=e.exports)})(e2,e2.exports),e2.exports)}var A2=eP(k2()),j2=[];for(let e=0;e<256;++e)j2.push((e+256).toString(16).slice(1));function M2(e,t=0){return(j2[e[t+0]]+j2[e[t+1]]+j2[e[t+2]]+j2[e[t+3]]+`-`+j2[e[t+4]]+j2[e[t+5]]+`-`+j2[e[t+6]]+j2[e[t+7]]+`-`+j2[e[t+8]]+j2[e[t+9]]+`-`+j2[e[t+10]]+j2[e[t+11]]+j2[e[t+12]]+j2[e[t+13]]+j2[e[t+14]]+j2[e[t+15]]).toLowerCase()}var N2,P2=new Uint8Array(16);function xne(){if(!N2){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);N2=crypto.getRandomValues.bind(crypto)}return N2(P2)}var F2={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function I2(e,t,n){e||={};let r=e.random??e.rng?.()??xne();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,M2(r)}function L2(e,t,n){return F2.randomUUID&&!e?F2.randomUUID():I2(e)}function R2(e,t){var n=UK(e);if(GB){var r=GB(e);t&&(r=uV(r).call(r,function(t){return CV(e,t).enumerable})),n.push.apply(n,r)}return n}function z2(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Q(n=R2(Object(i),!0)).call(n,function(t){KG(e,t,i[t])}):HV?tH(e,HV(i)):Q(r=R2(Object(i))).call(r,function(t){qK(e,t,CV(i,t))})}return e}function B2(e){if(!e)return!1;let t=e.idProp??e._idProp;return t?wte(t,e):!1}var V2=/^\/?Date\((-?\d+)/i,H2=/^\d+$/;function U2(e,t){let n;if(e!==void 0){if(e===null)return null;if(!t)return e;if(typeof t!=`string`&&!(t instanceof String))throw Error(`Type must be a string`);switch(t){case`boolean`:case`Boolean`:return!!e;case`number`:case`Number`:return Y1(e)&&!isNaN(Date.parse(e))?K(e).valueOf():Number(e.valueOf());case`string`:case`String`:return String(e);case`Date`:try{return U2(e,`Moment`).toDate()}catch(n){throw n instanceof TypeError?TypeError(`Cannot convert object of type `+o0(e)+` to type `+t):n}case`Moment`:if(q1(e))return K(e);if(e instanceof Date)return K(e.valueOf());if(K.isMoment(e))return K(e);if(Y1(e))return n=V2.exec(e),n?K(Number(n[1])):(n=H2.exec(e),K(n?Number(e):e));throw TypeError(`Cannot convert object of type `+o0(e)+` to type `+t);case`ISODate`:if(q1(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(K.isMoment(e))return e.toDate().toISOString();if(Y1(e))return n=V2.exec(e),n?new Date(Number(n[1])).toISOString():K(e).format();throw Error(`Cannot convert object of type `+o0(e)+` to type ISODate`);case`ASPDate`:if(q1(e))return`/Date(`+e+`)/`;if(e instanceof Date||K.isMoment(e))return`/Date(`+e.valueOf()+`)/`;if(Y1(e)){n=V2.exec(e);let t;return t=n?new Date(Number(n[1])).valueOf():new Date(e).valueOf(),`/Date(`+t+`)/`}else throw Error(`Cannot convert object of type `+o0(e)+` to type ASPDate`);default:throw Error(`Unknown type ${t}`)}}}function W2(e){var t,n,r,i,a,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{start:`Date`,end:`Date`},c=e._idProp,l=new wD({fieldId:c}),u=cK(t=Fee(e)).call(t,e=>{var t;return AK(t=UK(e)).call(t,(t,n)=>(t[n]=U2(e[n],s[n]),t),{})}).to(l);return u.all().start(),{add:function(){return e.getDataSet().add(...arguments)},remove:function(){return e.getDataSet().remove(...arguments)},update:function(){return e.getDataSet().update(...arguments)},updateOnly:function(){return e.getDataSet().updateOnly(...arguments)},clear:function(){return e.getDataSet().clear(...arguments)},forEach:Z(n=Q(l)).call(n,l),get:Z(r=l.get).call(r,l),getIds:Z(i=l.getIds).call(i,l),off:Z(a=l.off).call(a,l),on:Z(o=l.on).call(o,l),get length(){return l.length},idProp:c,type:s,rawDS:e,coercedDS:l,dispose:()=>u.stop()}}var G2=e=>{let t=new A2.FilterXSS(e);return e=>typeof e==`string`?t.process(e):e},K2=e=>e,q2=G2(),$=z2(z2({},$0),{},{convert:U2,setupXSSProtection:e=>{e&&(e.disabled===!0?(q2=K2,console.warn(`You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!`)):e.filterOptions&&(q2=G2(e.filterOptions)))}});qK($,`xss`,{get:function(){return q2}});var J2={},Y2,X2;function Z2(){if(X2)return Y2;X2=1;var e=iP(),t=sP(),n=gP(),r=tz(),i=dX().trim,a=cX(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return Y2=1/s(a+`-0`)!=-1/0||l&&!t(function(){s(Object(l))})?function(e){var t=i(r(e)),n=s(t);return n===0&&o(t,0)===`-`?-0:n}:s,Y2}var Q2;function $2(){if(Q2)return J2;Q2=1;var e=X(),t=Z2();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),J2}var e4,t4;function n4(){return t4?e4:(t4=1,$2(),e4=nF().parseFloat,e4)}var r4,i4;function a4(){return i4?r4:(i4=1,r4=n4(),r4)}var o4,s4;function c4(){return s4?o4:(s4=1,o4=a4(),o4)}var l4=eP(c4()),u4=class{constructor(){this.options=null,this.props=null}setOptions(e){e&&$.extend(this.options,e)}redraw(){return!1}destroy(){}_isResized(){let e=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,e}},d4={},f4;function p4(){return f4?d4:(f4=1,X()({target:`String`,proto:!0},{repeat:vZ()}),d4)}var m4,h4;function g4(){return h4?m4:(h4=1,p4(),m4=fL()(`String`,`repeat`),m4)}var _4,v4;function y4(){if(v4)return _4;v4=1;var e=cF(),t=g4(),n=String.prototype;return _4=function(r){var i=r.repeat;return typeof r==`string`||r===n||e(n,r)&&i===n.repeat?t:i},_4}var b4,x4;function S4(){return x4?b4:(x4=1,b4=y4(),b4)}var C4,w4;function T4(){return w4?C4:(w4=1,C4=S4(),C4)}var E4=eP(T4()),D4={},O4,k4;function A4(){if(k4)return O4;k4=1;var e=iL(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return O4=n,O4}var j4,M4;function N4(){if(M4)return j4;M4=1;var e=dF().match(/firefox\/(\d+)/i);return j4=!!e&&+e[1],j4}var P4,F4;function I4(){if(F4)return P4;F4=1;var e=dF();return P4=/MSIE|Trident/.test(e),P4}var L4,R4;function z4(){if(R4)return L4;R4=1;var e=dF().match(/AppleWebKit\/(\d+)\./);return L4=!!e&&+e[1],L4}var B4;function V4(){if(B4)return D4;B4=1;var e=X(),t=gP(),n=kF(),r=XF(),i=mR(),a=cJ(),o=tz(),s=sP(),c=A4(),l=MR(),u=N4(),d=I4(),f=mF(),p=z4(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),D4}var H4,U4;function W4(){return U4?H4:(U4=1,V4(),H4=fL()(`Array`,`sort`),H4)}var G4,K4;function q4(){if(K4)return G4;K4=1;var e=cF(),t=W4(),n=Array.prototype;return G4=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},G4}var J4,Y4;function X4(){return Y4?J4:(Y4=1,J4=q4(),J4)}var Z4,Q4;function $4(){return Q4?Z4:(Q4=1,Z4=X4(),Z4)}var e3=eP($4());function t3(e,t,n){if(n&&!eL(n))return t3(e,t,[n]);if(t.hiddenDates=[],n&&eL(n)==1){var r;for(let r=0;r<n.length;r++)if(E4(n[r])===void 0){let i={};i.start=e(n[r].start).toDate().valueOf(),i.end=e(n[r].end).toDate().valueOf(),t.hiddenDates.push(i)}e3(r=t.hiddenDates).call(r,(e,t)=>e.start-t.start)}}function n3(e,t,n){if(n&&!eL(n))return n3(e,t,[n]);if(n&&t.domProps.centerContainer.width!==void 0){t3(e,t,n);let r=e(t.range.start),i=e(t.range.end),a=(t.range.end-t.range.start)/t.domProps.centerContainer.width;for(let o=0;o<n.length;o++)if(E4(n[o])!==void 0){let s=e(n[o].start),c=e(n[o].end);if(s._d==`Invalid Date`)throw Error(`Supplied start date is not valid: ${n[o].start}`);if(c._d==`Invalid Date`)throw Error(`Supplied end date is not valid: ${n[o].end}`);if(c-s>=4*a){let e=0,a=i.clone();switch(E4(n[o])){case`daily`:s.day()!=c.day()&&(e=1),s=s.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7,`days`),c=c.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7-e,`days`),a.add(1,`weeks`);break;case`weekly`:{let e=c.diff(s,`days`),t=s.day();s=s.date(r.date()).month(r.month()).year(r.year()),c=s.clone(),s=s.day(t).subtract(1,`weeks`),c=c.day(t).add(e,`days`).subtract(1,`weeks`),a.add(1,`weeks`);break}case`monthly`:s.month()!=c.month()&&(e=1),s=s.month(r.month()).year(r.year()).subtract(1,`months`),c=c.month(r.month()).year(r.year()).subtract(1,`months`).add(e,`months`),a.add(1,`months`);break;case`yearly`:s.year()!=c.year()&&(e=1),s=s.year(r.year()).subtract(1,`years`),c=c.year(r.year()).subtract(1,`years`).add(e,`years`),a.add(1,`years`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,E4(n[o]));return}for(;s<a;)switch(t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()}),E4(n[o])){case`daily`:s=s.add(1,`days`),c=c.add(1,`days`);break;case`weekly`:s=s.add(1,`weeks`),c=c.add(1,`weeks`);break;case`monthly`:s=s.add(1,`months`),c=c.add(1,`months`);break;case`yearly`:s=s.add(1,`y`),c=c.add(1,`y`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,E4(n[o]));return}t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()})}}r3(t);let o=p3(t.range.start,t.hiddenDates),s=p3(t.range.end,t.hiddenDates),c=t.range.start,l=t.range.end;o.hidden==1&&(c=t.range.startToFront==1?o.startDate-1:o.endDate+1),s.hidden==1&&(l=t.range.endToFront==1?s.startDate-1:s.endDate+1),(o.hidden==1||s.hidden==1)&&t.range._applyRange(c,l)}}function r3(e){var t;let n=e.hiddenDates,r=[];for(var i=0;i<n.length;i++)for(let e=0;e<n.length;e++)i!=e&&n[e].remove!=1&&n[i].remove!=1&&(n[e].start>=n[i].start&&n[e].end<=n[i].end?n[e].remove=!0:n[e].start>=n[i].start&&n[e].start<=n[i].end?(n[i].end=n[e].end,n[e].remove=!0):n[e].end>=n[i].start&&n[e].end<=n[i].end&&(n[i].start=n[e].start,n[e].remove=!0));for(i=0;i<n.length;i++)n[i].remove!==!0&&r.push(n[i]);e.hiddenDates=r,e3(t=e.hiddenDates).call(t,(e,t)=>e.start-t.start)}function i3(e,t,n){let r=!1,i=t.current.valueOf();for(let e=0;e<t.hiddenDates.length;e++){let n=t.hiddenDates[e].start;var a=t.hiddenDates[e].end;if(i>=n&&i<a){r=!0;break}}if(r==1&&i<t._end.valueOf()&&i!=n){let r=e(n),i=e(a);r.year()==i.year()?r.month()==i.month()?r.dayOfYear()!=i.dayOfYear()&&(t.switchedDay=!0):t.switchedMonth=!0:t.switchedYear=!0,t.current=i}}function a3(e,t,n){let r;if(e.body.hiddenDates.length==0)return r=e.range.conversion(n),(t.valueOf()-r.offset)*r.scale;{let i=p3(t,e.body.hiddenDates);i.hidden==1&&(t=i.startDate);let a=s3(e.body.hiddenDates,e.range.start,e.range.end);if(t<e.range.start){r=e.range.conversion(n,a);let i=c3(e.body.hiddenDates,t,r.offset);return t=e.options.moment(t).toDate().valueOf(),t+=i,-(r.offset-t.valueOf())*r.scale}else if(t>e.range.end){let i={start:e.range.start,end:t};return t=l3(e.options.moment,e.body.hiddenDates,i,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}else return t=l3(e.options.moment,e.body.hiddenDates,e.range,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}}function o3(e,t,n){if(e.body.hiddenDates.length==0){let r=e.range.conversion(n);return new Date(t/r.scale+r.offset)}else{let r=s3(e.body.hiddenDates,e.range.start,e.range.end),i=(e.range.end-e.range.start-r)*t/n,a=d3(e.body.hiddenDates,e.range,i);return new Date(a+i+e.range.start)}}function s3(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<n&&(r+=o-a)}return r}function c3(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<=n&&(r+=o-a)}return r}function l3(e,t,n,r){return r=e(r).toDate().valueOf(),r-=u3(e,t,n,r),r}function u3(e,t,n,r){let i=0;r=e(r).toDate().valueOf();for(let e=0;e<t.length;e++){let a=t[e].start,o=t[e].end;a>=n.start&&o<n.end&&r>=o&&(i+=o-a)}return i}function d3(e,t,n){let r=0,i=0,a=t.start;for(let o=0;o<e.length;o++){let s=e[o].start,c=e[o].end;if(s>=t.start&&c<t.end){if(i+=s-a,a=c,i>=n)break;r+=c-s}}return r}function f3(e,t,n,r){let i=p3(t,e);return i.hidden==1?n<0?r==1?i.startDate-(i.endDate-t)-1:i.startDate-1:r==1?i.endDate+(t-i.startDate)+1:i.endDate+1:t}function p3(e,t){for(let i=0;i<t.length;i++){var n=t[i].start,r=t[i].end;if(e>=n&&e<r)return{hidden:!0,startDate:n,endDate:r}}return{hidden:!1,startDate:n,endDate:r}}var m3=class e extends u4{constructor(e,t){var n,r,i,a,o,s,c;super();let l=XR().hours(0).minutes(0).seconds(0).milliseconds(0),u=l.clone().add(-3,`days`).valueOf(),d=l.clone().add(3,`days`).valueOf();this.millisecondsPerPixelCache=void 0,t===void 0?(this.start=u,this.end=d):(this.start=t.start||u,this.end=t.end||d),this.rolling=!1,this.body=e,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:XR,direction:`horizontal`,moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:1e3*60*60*24*365*1e4,rollingMode:{follow:!1,offset:.5}},this.options=$.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on(`panstart`,Z(n=this._onDragStart).call(n,this)),this.body.emitter.on(`panmove`,Z(r=this._onDrag).call(r,this)),this.body.emitter.on(`panend`,Z(i=this._onDragEnd).call(i,this)),this.body.emitter.on(`mousewheel`,Z(a=this._onMouseWheel).call(a,this)),this.body.emitter.on(`touch`,Z(o=this._onTouch).call(o,this)),this.body.emitter.on(`pinch`,Z(s=this._onPinch).call(s,this)),this.body.dom.rollingModeBtn.addEventListener(`click`,Z(c=this.startRolling).call(c,this)),this.setOptions(t)}setOptions(e){e&&($.selectiveExtend([`animation`,`direction`,`min`,`max`,`zoomMin`,`zoomMax`,`moveable`,`zoomable`,`moment`,`activate`,`hiddenDates`,`zoomKey`,`zoomFriction`,`rtl`,`showCurrentTime`,`rollingMode`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`],this.options,e),e.rollingMode&&e.rollingMode.follow&&this.startRolling(),(`start`in e||`end`in e)&&this.setRange(e.start,e.end))}startRolling(){let e=this;function t(){e.stopRolling(),e.rolling=!0;let n=e.end-e.start,r=$.convert(new Date,`Date`).valueOf(),i=e.options.rollingMode&&e.options.rollingMode.offset||.5,a=r-n*i,o=r+n*(1-i);e.setRange(a,o,{animation:!1}),n=1/e.conversion(e.body.domProps.center.width).scale/10,n<30&&(n=30),n>1e3&&(n=1e3),e.body.dom.rollingModeBtn.style.visibility=`hidden`,e.currentTimeTimer=YL(t,n)}t()}stopRolling(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility=`visible`)}setRange(e,t,n,r,i){n||={},n.byUser!==!0&&(n.byUser=!1);let a=this,o=e==null?null:$.convert(e,`Date`).valueOf(),s=t==null?null:$.convert(t,`Date`).valueOf();if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,n.animation){let e=this.start,t=this.end,u=typeof n.animation==`object`&&`duration`in n.animation?n.animation.duration:500,d=typeof n.animation==`object`&&`easingFunction`in n.animation?n.animation.easingFunction:`easeInOutQuad`,f=$.easingFunctions[d];if(!f){var c;throw Error(HY(c=`Unknown easing function ${IZ(d)}. Choose from: `).call(c,UK($.easingFunctions).join(`, `)))}let p=zq(),m=!1,h=()=>{if(!a.props.touch.dragging){let c=zq()-p,d=f(c/u),g=c>u,_=g||o===null?o:e+(o-e)*d,v=g||s===null?s:t+(s-t)*d;l=a._applyRange(_,v),n3(a.options.moment,a.body,a.options.hiddenDates),m||=l;let y={start:new Date(a.start),end:new Date(a.end),byUser:n.byUser,event:n.event};if(i&&i(d,l,g),l&&a.body.emitter.emit(`rangechange`,y),g){if(m&&(a.body.emitter.emit(`rangechanged`,y),r))return r()}else a.animationTimer=YL(h,20)}};return h()}else{var l=this._applyRange(o,s);if(n3(this.options.moment,this.body,this.options.hiddenDates),l){let e={start:new Date(this.start),end:new Date(this.end),byUser:n.byUser,event:n.event};if(this.body.emitter.emit(`rangechange`,e),clearTimeout(a.timeoutID),a.timeoutID=YL(()=>{a.body.emitter.emit(`rangechanged`,e)},200),r)return r()}}}getMillisecondsPerPixel(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&=(clearTimeout(this.animationTimer),null)}_applyRange(e,t){let n=e==null?this.start:$.convert(e,`Date`).valueOf(),r=t==null?this.end:$.convert(t,`Date`).valueOf(),i=this.options.max==null?null:$.convert(this.options.max,`Date`).valueOf(),a=this.options.min==null?null:$.convert(this.options.min,`Date`).valueOf(),o;if(isNaN(n)||n===null)throw Error(`Invalid start "${e}"`);if(isNaN(r)||r===null)throw Error(`Invalid end "${t}"`);if(r<n&&(r=n),a!==null&&n<a&&(o=a-n,n+=o,r+=o,i!=null&&r>i&&(r=i)),i!==null&&r>i&&(o=r-i,n-=o,r-=o,a!=null&&n<a&&(n=a)),this.options.zoomMin!==null){let e=l4(this.options.zoomMin);e<0&&(e=0),r-n<e&&(this.end-this.start===e&&n>=this.start-.5&&r<=this.end?(n=this.start,r=this.end):(o=e-(r-n),n-=o/2,r+=o/2))}if(this.options.zoomMax!==null){let e=l4(this.options.zoomMax);e<0&&(e=0),r-n>e&&(this.end-this.start===e&&n<this.start&&r>this.end?(n=this.start,r=this.end):(o=r-n-e,n+=o/2,r-=o/2))}let s=this.start!=n||this.end!=r;return!(n>=this.start&&n<=this.end||r>=this.start&&r<=this.end)&&!(this.start>=n&&this.start<=r||this.end>=n&&this.end<=r)&&this.body.emitter.emit(`checkRangedItems`),this.start=n,this.end=r,s}getRange(){return{start:this.start,end:this.end}}conversion(t,n){return e.conversion(this.start,this.end,t,n)}static conversion(e,t,n,r){return r===void 0&&(r=0),n!=0&&t-e!=0?{offset:e,scale:n/(t-e-r)}:{offset:0,scale:1}}_onDragStart(e){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(e)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor=`move`))}_onDrag(e){if(!e||!this.props.touch.dragging||!this.options.moveable||!this.props.touch.allowDragging)return;let t=this.options.direction;h3(t);let n=t==`horizontal`?e.deltaX:e.deltaY;n-=this.deltaDifference;let r=this.props.touch.end-this.props.touch.start,i=s3(this.body.hiddenDates,this.start,this.end);r-=i;let a=t==`horizontal`?this.body.domProps.center.width:this.body.domProps.center.height,o;o=this.options.rtl?n/a*r:-n/a*r;let s=this.props.touch.start+o,c=this.props.touch.end+o,l=f3(this.body.hiddenDates,s,this.previousDelta-n,!0),u=f3(this.body.hiddenDates,c,this.previousDelta-n,!0);if(l!=s||u!=c){this.deltaDifference+=n,this.props.touch.start=l,this.props.touch.end=u,this._onDrag(e);return}this.previousDelta=n,this._applyRange(s,c);let d=new Date(this.start),f=new Date(this.end);this.body.emitter.emit(`rangechange`,{start:d,end:f,byUser:!0,event:e}),this.body.emitter.emit(`panmove`)}_onDragEnd(e){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor=`auto`),this.body.emitter.emit(`rangechanged`,{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:e}))}_onMouseWheel(e){let t=0;if(e.wheelDelta?t=e.wheelDelta/120:e.detail?t=-e.detail/3:e.deltaY&&(t=-e.deltaY/3),!(this.options.zoomKey&&!e[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(e)&&t){let n=this.options.zoomFriction||5,r;r=t<0?1-t/n:1/(1+t/n);let i;if(this.rolling){let e=this.options.rollingMode&&this.options.rollingMode.offset||.5;i=this.start+(this.end-this.start)*e}else{let t=this.getPointer({x:e.clientX,y:e.clientY},this.body.dom.center);i=this._pointerToDate(t)}this.zoom(r,i,t,e),e.preventDefault()}}_onTouch(e){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,$.preventDefault(e)}_onPinch(e){if(!(this.options.zoomable&&this.options.moveable))return;$.preventDefault(e),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(e.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();let t=1/(e.scale+this.scaleOffset),n=this.props.touch.centerDate,r=s3(this.body.hiddenDates,this.start,this.end),i=u3(this.options.moment,this.body.hiddenDates,this,n),a=r-i,o=n-i+(this.props.touch.start-(n-i))*t,s=n+a+(this.props.touch.end-(n+a))*t;this.startToFront=1-t<=0,this.endToFront=t-1<=0;let c=f3(this.body.hiddenDates,o,1-t,!0),l=f3(this.body.hiddenDates,s,t-1,!0);(c!=o||l!=s)&&(this.props.touch.start=c,this.props.touch.end=l,this.scaleOffset=1-e.scale,o=c,s=l);let u={animation:!1,byUser:!0,event:e};this.setRange(o,s,u),this.startToFront=!1,this.endToFront=!0}_isInsideRange(e){let t=e.center?e.center.x:e.clientX,n=this.body.dom.centerContainer.getBoundingClientRect(),r=this.options.rtl?t-n.left:n.right-t,i=this.body.util.toTime(r);return i>=this.start&&i<=this.end}_pointerToDate(e){let t,n=this.options.direction;if(h3(n),n==`horizontal`)return this.body.util.toTime(e.x).valueOf();{let n=this.body.domProps.center.height;return t=this.conversion(n),e.y/t.scale+t.offset}}getPointer(e,t){let n=t.getBoundingClientRect();return this.options.rtl?{x:n.right-e.x,y:e.y-n.top}:{x:e.x-n.left,y:e.y-n.top}}zoom(e,t,n,r){t??=(this.start+this.end)/2;let i=s3(this.body.hiddenDates,this.start,this.end),a=u3(this.options.moment,this.body.hiddenDates,this,t),o=i-a,s=t-a+(this.start-(t-a))*e,c=t+o+(this.end-(t+o))*e;this.startToFront=!(n>0),this.endToFront=!(-n>0);let l=f3(this.body.hiddenDates,s,n,!0),u=f3(this.body.hiddenDates,c,-n,!0);(l!=s||u!=c)&&(s=l,c=u);let d={animation:!1,byUser:!0,event:r};this.setRange(s,c,d),this.startToFront=!1,this.endToFront=!0}move(e){let t=this.end-this.start,n=this.start+t*e,r=this.end+t*e;this.start=n,this.end=r}moveTo(e){let t=(this.start+this.end)/2-e,n=this.start-t,r=this.end-t;this.setRange(n,r,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}};function h3(e){if(e!=`horizontal`&&e!=`vertical`)throw TypeError(`Unknown direction "${e}". Choose "horizontal" or "vertical".`)}var g3={},_3;function v3(){if(_3)return g3;_3=1;var e=X(),t=kR().some;return e({target:`Array`,proto:!0,forced:!MR()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),g3}var y3,b3;function x3(){return b3?y3:(b3=1,v3(),y3=fL()(`Array`,`some`),y3)}var S3,C3;function w3(){if(C3)return S3;C3=1;var e=cF(),t=x3(),n=Array.prototype;return S3=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},S3}var T3,E3;function D3(){return E3?T3:(E3=1,T3=w3(),T3)}var O3,k3;function A3(){return k3?O3:(k3=1,O3=D3(),O3)}var j3=eP(A3()),M3,N3;function P3(){return N3?M3:(N3=1,HL(),M3=nF().setInterval,M3)}var F3,I3;function L3(){return I3?F3:(I3=1,F3=P3(),F3)}var R3=eP(L3()),z3=null;function B3(e,t){var n=t||{preventDefault:!1};if(e.Manager){var r=e,i=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),B3(new r(e,i),i)};return r.assign(i,r),i.Manager=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),B3(new r.Manager(e,i),i)},i}var a=Object.create(e),o=e.element;o.hammer||=[],o.hammer.push(a),e.on(`hammer.input`,function(e){(n.preventDefault===!0||n.preventDefault===e.pointerType)&&e.preventDefault(),e.isFirst&&(z3=e.target)}),a._handlers={},a.on=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r||(a._handlers[t]=r=[],e.on(t,c)),r.push(n)}),a},a.off=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r&&(r=n?r.filter(function(e){return e!==n}):[],r.length>0?a._handlers[t]=r:(e.off(t,c),delete a._handlers[t]))}),a},a.emit=function(t,n){z3=n.target,e.emit(t,n)},a.destroy=function(){var t=e.element.hammer,n=t.indexOf(a);n!==-1&&t.splice(n,1),t.length||delete e.element.hammer,a._handlers={},e.destroy()};function s(e){return e.match(/[^ ]+/g)}function c(e){if(e.type!==`hammer.input`){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);typeof n==`function`&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=z3;for(var r=z3.isConnected?z3:e.target;r&&!t;){var i=r.hammer;if(i){for(var a,o=0;o<i.length;o++)if(a=i[o]._handlers[e.type],a)for(var s=0;s<a.length&&!t;s++)a[s](e)}r=r.parentNode}}return a}function V3(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var H3=typeof window<`u`?B3(window.Hammer||D1,{preventDefault:`mouse`}):function(){return V3()};function U3(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function W3(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}function G3(e){return e.getTouchAction=function(){return[`pan-y`]},e}var K3=class e{constructor(t,n,r,i,a){this.moment=a&&a.moment||XR,this.options=a||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale=`day`,this.step=1,this.setRange(t,n,r),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,eL(i)?this.hiddenDates=i:i==null?this.hiddenDates=[]:this.hiddenDates=[i],this.format=e.FORMAT}setMoment(e){this.moment=e,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){let n=$.deepExtend({},e.FORMAT);this.format=$.deepExtend(n,t)}setRange(e,t,n){if(!(e instanceof Date)||!(t instanceof Date))throw`No legal start or end date in method setRange`;this._start=e==null?zq():this.moment(e.valueOf()),this._end=t==null?zq():this.moment(t.valueOf()),this.autoScale&&this.setMinimumStep(n)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch(this.scale==`week`&&this.current.weekday(0),this.scale){case`year`:this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case`month`:this.current=this.current.date(1);case`week`:case`day`:case`weekday`:this.current=this.current.hours(0);case`hour`:this.current=this.current.minutes(0);case`minute`:this.current=this.current.seconds(0);case`second`:this.current=this.current.milliseconds(0)}if(this.step!=1){let e=this.current.clone();switch(this.scale){case`millisecond`:this.current=this.current.subtract(this.current.milliseconds()%this.step,`milliseconds`);break;case`second`:this.current=this.current.subtract(this.current.seconds()%this.step,`seconds`);break;case`minute`:this.current=this.current.subtract(this.current.minutes()%this.step,`minutes`);break;case`hour`:this.current=this.current.subtract(this.current.hours()%this.step,`hours`);break;case`weekday`:case`day`:this.current=this.current.subtract((this.current.date()-1)%this.step,`day`);break;case`week`:this.current=this.current.subtract(this.current.week()%this.step,`week`);break;case`month`:this.current=this.current.subtract(this.current.month()%this.step,`month`);break;case`year`:this.current=this.current.subtract(this.current.year()%this.step,`year`);break}e.isSame(this.current)||(this.current=this.moment(f3(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){let e=this.current.valueOf();switch(this.scale){case`millisecond`:this.current=this.current.add(this.step,`millisecond`);break;case`second`:this.current=this.current.add(this.step,`second`);break;case`minute`:this.current=this.current.add(this.step,`minute`);break;case`hour`:this.current=this.current.add(this.step,`hour`),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,`hour`):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,`hour`));break;case`weekday`:case`day`:this.current=this.current.add(this.step,`day`);break;case`week`:if(this.current.weekday()!==0)this.current=this.current.weekday(0).add(this.step,`week`);else if(this.options.showMajorLabels===!1)this.current=this.current.add(this.step,`week`);else{let e=this.current.clone();e.add(1,`week`),e.isSame(this.current,`month`)?this.current=this.current.add(this.step,`week`):this.current=this.current.add(this.step,`week`).date(1)}break;case`month`:this.current=this.current.add(this.step,`month`);break;case`year`:this.current=this.current.add(this.step,`year`);break}if(this.step!=1)switch(this.scale){case`millisecond`:this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case`second`:this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case`minute`:this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case`hour`:this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case`weekday`:case`day`:this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case`week`:this.current.week()<this.step&&(this.current=this.current.week(1));break;case`month`:this.current.month()<this.step&&(this.current=this.current.month(0));break}this.current.valueOf()==e&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,i3(this.moment,this,e)}getCurrent(){return this.current.clone()}setScale(e){e&&typeof e.scale==`string`&&(this.scale=e.scale,this.step=e.step>0?e.step:1,this.autoScale=!1)}setAutoScale(e){this.autoScale=e}setMinimumStep(e){if(e==null)return;let t=1e3*60*60*24*30*12,n=1e3*60*60*24*30,r=1e3*60*60*24,i=1e3*60*60,a=1e3*60,o=1e3;t*1e3>e&&(this.scale=`year`,this.step=1e3),t*500>e&&(this.scale=`year`,this.step=500),t*100>e&&(this.scale=`year`,this.step=100),t*50>e&&(this.scale=`year`,this.step=50),t*10>e&&(this.scale=`year`,this.step=10),t*5>e&&(this.scale=`year`,this.step=5),t>e&&(this.scale=`year`,this.step=1),n*3>e&&(this.scale=`month`,this.step=3),n>e&&(this.scale=`month`,this.step=1),r*7>e&&this.options.showWeekScale&&(this.scale=`week`,this.step=1),r*2>e&&(this.scale=`day`,this.step=2),r>e&&(this.scale=`day`,this.step=1),r/2>e&&(this.scale=`weekday`,this.step=1),i*4>e&&(this.scale=`hour`,this.step=4),i>e&&(this.scale=`hour`,this.step=1),a*15>e&&(this.scale=`minute`,this.step=15),a*10>e&&(this.scale=`minute`,this.step=10),a*5>e&&(this.scale=`minute`,this.step=5),a>e&&(this.scale=`minute`,this.step=1),o*15>e&&(this.scale=`second`,this.step=15),o*10>e&&(this.scale=`second`,this.step=10),o*5>e&&(this.scale=`second`,this.step=5),o>e&&(this.scale=`second`,this.step=1),200>e&&(this.scale=`millisecond`,this.step=200),100>e&&(this.scale=`millisecond`,this.step=100),50>e&&(this.scale=`millisecond`,this.step=50),10>e&&(this.scale=`millisecond`,this.step=10),5>e&&(this.scale=`millisecond`,this.step=5),1>e&&(this.scale=`millisecond`,this.step=1)}static snap(e,t,n){let r=XR(e);if(t==`year`){let e=r.year()+Math.round(r.month()/12);r=r.year(Math.round(e/n)*n).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if(t==`month`)r=r.date()>15?r.date(1).add(1,`month`):r.date(1),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`week`)r=r.weekday()>2?r.weekday(0).add(1,`week`):r.weekday(0),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`day`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/24)*24);break;default:r=r.hours(Math.round(r.hours()/12)*12);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`weekday`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/12)*12);break;default:r=r.hours(Math.round(r.hours()/6)*6);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`hour`){switch(n){case 4:r=r.minutes(Math.round(r.minutes()/60)*60);break;default:r=r.minutes(Math.round(r.minutes()/30)*30);break}r=r.seconds(0).milliseconds(0)}else if(t==`minute`){switch(n){case 15:case 10:r=r.minutes(Math.round(r.minutes()/5)*5).seconds(0);break;case 5:r=r.seconds(Math.round(r.seconds()/60)*60);break;default:r=r.seconds(Math.round(r.seconds()/30)*30);break}r=r.milliseconds(0)}else if(t==`second`)switch(n){case 15:case 10:r=r.seconds(Math.round(r.seconds()/5)*5).milliseconds(0);break;case 5:r=r.milliseconds(Math.round(r.milliseconds()/1e3)*1e3);break;default:r=r.milliseconds(Math.round(r.milliseconds()/500)*500);break}else if(t==`millisecond`){let e=n>5?n/2:1;r=r.milliseconds(Math.round(r.milliseconds()/e)*e)}return r}isMajor(){if(this.switchedYear==1)switch(this.scale){case`year`:case`month`:case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedMonth==1)switch(this.scale){case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedDay==1)switch(this.scale){case`millisecond`:case`second`:case`minute`:case`hour`:return!0;default:return!1}let e=this.moment(this.current);switch(this.scale){case`millisecond`:return e.milliseconds()==0;case`second`:return e.seconds()==0;case`minute`:return e.hours()==0&&e.minutes()==0;case`hour`:return e.hours()==0;case`weekday`:case`day`:return this.options.showWeekScale?e.isoWeekday()==1:e.date()==1;case`week`:return e.date()==1;case`month`:return e.month()==0;case`year`:return!1;default:return!1}}getLabelMinor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.minorLabels==`function`)return this.format.minorLabels(e,this.scale,this.step);let t=this.format.minorLabels[this.scale];switch(this.scale){case`week`:if(e.date()===1&&e.weekday()!==0)return``;default:return t&&t.length>0?this.moment(e).format(t):``}}getLabelMajor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.majorLabels==`function`)return this.format.majorLabels(e,this.scale,this.step);let t=this.format.majorLabels[this.scale];return t&&t.length>0?this.moment(e).format(t):``}getClassName(){var e;let t=this.moment,n=this.moment(this.current),r=n.locale?n.locale(`en`):n.lang(`en`),i=this.step,a=[];function o(e){return e/i%2==0?` vis-even`:` vis-odd`}function s(e){return e.isSame(zq(),`day`)?` vis-today`:e.isSame(t().add(1,`day`),`day`)?` vis-tomorrow`:e.isSame(t().add(-1,`day`),`day`)?` vis-yesterday`:``}function c(e){return e.isSame(zq(),`week`)?` vis-current-week`:``}function l(e){return e.isSame(zq(),`month`)?` vis-current-month`:``}function u(e){return e.isSame(zq(),`year`)?` vis-current-year`:``}switch(this.scale){case`millisecond`:a.push(s(r)),a.push(o(r.milliseconds()));break;case`second`:a.push(s(r)),a.push(o(r.seconds()));break;case`minute`:a.push(s(r)),a.push(o(r.minutes()));break;case`hour`:a.push(HY(e=`vis-h${r.hours()}`).call(e,this.step==4?`-h`+(r.hours()+4):``)),a.push(s(r)),a.push(o(r.hours()));break;case`weekday`:a.push(`vis-${r.format(`dddd`).toLowerCase()}`),a.push(s(r)),a.push(c(r)),a.push(o(r.date()));break;case`day`:a.push(`vis-day${r.date()}`),a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(s(r)),a.push(l(r)),a.push(this.step<=2?s(r):``),a.push(this.step<=2?`vis-${r.format(`dddd`).toLowerCase()}`:``),a.push(o(r.date()-1));break;case`week`:a.push(`vis-week${r.format(`w`)}`),a.push(c(r)),a.push(o(r.week()));break;case`month`:a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(l(r)),a.push(o(r.month()));break;case`year`:a.push(`vis-year${r.year()}`),a.push(u(r)),a.push(o(r.year()));break}return uV(a).call(a,String).join(` `)}};K3.FORMAT={minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}};var q3=class extends u4{constructor(e,t){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:`bottom`},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:$.extend({},K3.FORMAT),moment:XR,timeAxis:null},this.options=$.extend({},this.defaultOptions),this.body=e,this._create(),this.setOptions(t)}setOptions(e){e&&($.selectiveExtend([`showMinorLabels`,`showMajorLabels`,`showWeekScale`,`maxMinorChars`,`hiddenDates`,`timeAxis`,`moment`,`rtl`],this.options,e),$.selectiveDeepExtend([`format`],this.options,e),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.axis=e.orientation:typeof e.orientation==`object`&&`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis)),`locale`in e&&(typeof XR.locale==`function`?XR.locale(e.locale):XR.lang(e.locale)))}_create(){this.dom.foreground=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.foreground.className=`vis-time-axis vis-foreground`,this.dom.background.className=`vis-time-axis vis-background`}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){let e=this.props,t=this.dom.foreground,n=this.dom.background,r=this.options.orientation.axis==`top`?this.body.dom.top:this.body.dom.bottom,i=t.parentNode!==r;this._calculateCharSize();let a=this.options.showMinorLabels&&this.options.orientation.axis!==`none`,o=this.options.showMajorLabels&&this.options.orientation.axis!==`none`;e.minorLabelHeight=a?e.minorCharHeight:0,e.majorLabelHeight=o?e.majorCharHeight:0,e.height=e.minorLabelHeight+e.majorLabelHeight,e.width=t.offsetWidth,e.minorLineHeight=this.body.domProps.root.height-e.majorLabelHeight-(this.options.orientation.axis==`top`?this.body.domProps.bottom.height:this.body.domProps.top.height),e.minorLineWidth=1,e.majorLineHeight=e.minorLineHeight+e.majorLabelHeight,e.majorLineWidth=1;let s=t.nextSibling,c=n.nextSibling;return t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n),t.style.height=`${this.props.height}px`,this._repaintLabels(),s?r.insertBefore(t,s):r.appendChild(t),c?this.body.dom.backgroundVertical.insertBefore(n,c):this.body.dom.backgroundVertical.appendChild(n),this._isResized()||i}_repaintLabels(){let e=this.options.orientation.axis,t=$.convert(this.body.range.start,`Number`),n=$.convert(this.body.range.end,`Number`),r=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),i=r-u3(this.options.moment,this.body.hiddenDates,this.body.range,r);i-=this.body.util.toTime(0).valueOf();let a=new K3(new Date(t),new Date(n),i,this.body.hiddenDates,this.options);a.setMoment(this.options.moment),this.options.format&&a.setFormat(this.options.format),this.options.timeAxis&&a.setScale(this.options.timeAxis),this.step=a;let o=this.dom;o.redundant.lines=o.lines,o.redundant.majorTexts=o.majorTexts,o.redundant.minorTexts=o.minorTexts,o.lines=[],o.majorTexts=[],o.minorTexts=[];let s,c,l,u,d,f,p=0,m,h,g,_=0,v=1e3,y;for(a.start(),c=a.getCurrent(),u=this.body.util.toScreen(c);a.hasNext()&&_<v;){switch(_++,d=a.isMajor(),y=a.getClassName(),s=c,l=u,a.next(),c=a.getCurrent(),u=this.body.util.toScreen(c),m=p,p=u-l,a.scale){case`week`:f=!0;break;default:f=p>=m*.4;break}if(this.options.showMinorLabels&&f){var b=this._repaintMinorText(l,a.getLabelMinor(s),e,y);b.style.width=`${p}px`}d&&this.options.showMajorLabels?(l>0&&(g??=l,b=this._repaintMajorText(l,a.getLabelMajor(s),e,y)),h=this._repaintMajorLine(l,p,e,y)):f?h=this._repaintMinorLine(l,p,e,y):h&&(h.style.width=`${EX(h.style.width)+p}px`)}if(_===v&&!J3&&(console.warn(`Something is wrong with the Timeline scale. Limited drawing of grid lines to ${v} lines.`),J3=!0),this.options.showMajorLabels){let t=this.body.util.toTime(0),n=a.getLabelMajor(t),r=n.length*(this.props.majorCharWidth||10)+10;(g==null||r<g)&&this._repaintMajorText(0,n,e,y)}Q($).call($,this.dom.redundant,e=>{for(;e.length;){let t=e.pop();t&&t.parentNode&&t.parentNode.removeChild(t)}})}_repaintMinorText(e,t,n,r){let i=this.dom.redundant.minorTexts.shift();if(!i){let e=document.createTextNode(``);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}this.dom.minorTexts.push(i),i.innerHTML=$.xss(t);let a=n==`top`?this.props.majorLabelHeight:0;return this._setXY(i,e,a),i.className=`vis-text vis-minor ${r}`,i}_repaintMajorText(e,t,n,r){let i=this.dom.redundant.majorTexts.shift();if(!i){let e=document.createElement(`div`);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}i.childNodes[0].innerHTML=$.xss(t),i.className=`vis-text vis-major ${r}`;let a=n==`top`?0:this.props.minorLabelHeight;return this._setXY(i,e,a),this.dom.majorTexts.push(i),i}_setXY(e,t,n){var r;let i=this.options.rtl?t*-1:t;e.style.transform=HY(r=`translate(${i}px, `).call(r,n,`px)`)}_repaintMinorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.minorLineHeight}px`;let s=n==`top`?o.majorLabelHeight:this.body.domProps.top.height,c=e-o.minorLineWidth/2;return this._setXY(a,c,s),a.className=HY(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-minor `).call(i,r),a}_repaintMajorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.majorLineHeight}px`;let s=n==`top`?0:this.body.domProps.top.height,c=e-o.majorLineWidth/2;return this._setXY(a,c,s),a.className=HY(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-major `).call(i,r),a}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement(`DIV`),this.dom.measureCharMinor.className=`vis-text vis-minor vis-measure`,this.dom.measureCharMinor.style.position=`absolute`,this.dom.measureCharMinor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement(`DIV`),this.dom.measureCharMajor.className=`vis-text vis-major vis-measure`,this.dom.measureCharMajor.style.position=`absolute`,this.dom.measureCharMajor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}},J3=!1;function Y3(e){var t=window,n={},r={keydown:{},keyup:{}},i={},a;for(a=97;a<=122;a++)i[String.fromCharCode(a)]={code:65+(a-97),shift:!1};for(a=65;a<=90;a++)i[String.fromCharCode(a)]={code:a,shift:!0};for(a=0;a<=9;a++)i[``+a]={code:48+a,shift:!1};for(a=1;a<=12;a++)i[`F`+a]={code:111+a,shift:!1};for(a=0;a<=9;a++)i[`num`+a]={code:96+a,shift:!1};i[`num*`]={code:106,shift:!1},i[`num+`]={code:107,shift:!1},i[`num-`]={code:109,shift:!1},i[`num/`]={code:111,shift:!1},i[`num.`]={code:110,shift:!1},i.left={code:37,shift:!1},i.up={code:38,shift:!1},i.right={code:39,shift:!1},i.down={code:40,shift:!1},i.space={code:32,shift:!1},i.enter={code:13,shift:!1},i.shift={code:16,shift:void 0},i.esc={code:27,shift:!1},i.backspace={code:8,shift:!1},i.tab={code:9,shift:!1},i.ctrl={code:17,shift:!1},i.alt={code:18,shift:!1},i.delete={code:46,shift:!1},i.pageup={code:33,shift:!1},i.pagedown={code:34,shift:!1},i[`=`]={code:187,shift:!1},i[`-`]={code:189,shift:!1},i[`]`]={code:221,shift:!1},i[`[`]={code:219,shift:!1};var o=function(e){c(e,`keydown`)},s=function(e){c(e,`keyup`)},c=function(e,t){if(r[t][e.keyCode]!==void 0)for(var n=r[t][e.keyCode],i=0;i<n.length;i++)(n[i].shift===void 0||n[i].shift==1&&e.shiftKey==1||n[i].shift==0&&e.shiftKey==0)&&n[i].fn(e)};return n.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);r[n][i[e].code]===void 0&&(r[n][i[e].code]=[]),r[n][i[e].code].push({fn:t,shift:i[e].shift})},n.bindAll=function(e,t){for(var r in t===void 0&&(t=`keydown`),i)i.hasOwnProperty(r)&&n.bind(r,e,t)},n.getKey=function(e){for(var t in i)if(i.hasOwnProperty(t)&&(e.shiftKey==1&&i[t].shift==1&&e.keyCode==i[t].code||e.shiftKey==0&&i[t].shift==0&&e.keyCode==i[t].code||e.keyCode==i[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},n.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var a=[],o=r[n][i[e].code];if(o!==void 0)for(var s=0;s<o.length;s++)o[s].fn==t&&o[s].shift==i[e].shift||a.push(r[n][i[e].code][s]);r[n][i[e].code]=a}else r[n][i[e].code]=[]},n.reset=function(){r={keydown:{},keyup:{}}},n.destroy=function(){r={keydown:{},keyup:{}},t.removeEventListener(`keydown`,o,!0),t.removeEventListener(`keyup`,s,!0)},t.addEventListener(`keydown`,o,!0),t.addEventListener(`keyup`,s,!0),n}function X3(e){var t,n;this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement(`div`),this.dom.overlay.className=`vis-overlay`,this.dom.container.appendChild(this.dom.overlay),this.hammer=H3(this.dom.overlay),this.hammer.on(`tap`,Z(t=this._onTapOverlay).call(t,this));var r=this,i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(i).call(i,function(e){r.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(t){Z3(t.target,e)||r.deactivate()},document.body.addEventListener(`click`,this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=Y3(),this.escListener=Z(n=this.deactivate).call(n,this)}aQ(X3.prototype),X3.current=null,X3.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener(`click`,this.onClick),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},X3.prototype.activate=function(){var e;X3.current&&X3.current.deactivate(),X3.current=this,this.active=!0,this.dom.overlay.style.display=`none`,$.addClassName(this.dom.container,`vis-active`),this.emit(`change`),this.emit(`activate`),Z(e=this.keycharm).call(e,`esc`,this.escListener)},X3.prototype.deactivate=function(){X3.current===this&&(X3.current=null),this.active=!1,this.dom.overlay.style.display=``,$.removeClassName(this.dom.container,`vis-active`),this.keycharm.unbind(`esc`,this.escListener),this.emit(`change`),this.emit(`deactivate`)},X3.prototype._onTapOverlay=function(e){this.activate(),e.stopPropagation()};function Z3(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var Q3={current:`current`,time:`time`,deleteSelected:`Delete selected`},$3=Q3,e6=Q3,t6={current:`attuale`,time:`tempo`,deleteSelected:`Cancella la selezione`},n6=t6,r6=t6,i6={current:`huidige`,time:`tijd`,deleteSelected:`Selectie verwijderen`},a6=i6,o6=i6,s6={current:`Aktuelle`,time:`Zeit`,deleteSelected:`Lösche Auswahl`},c6=s6,l6=s6,u6={current:`actuel`,time:`heure`,deleteSelected:`Effacer la selection`},d6=u6,f6=u6,p6=u6,m6=u6,h6={current:`actual`,time:`hora`,deleteSelected:`Eliminar selección`},g6=h6,_6={current:`поточний`,time:`час`,deleteSelected:`Видалити обране`},v6=_6,y6={current:`текущее`,time:`время`,deleteSelected:`Удалить выбранное`},b6=y6,x6={current:`aktualny`,time:`czas`,deleteSelected:`Usuń wybrane`},S6=x6,C6={current:`atual`,time:`data`,deleteSelected:`Apagar selecionado`},w6=C6,T6=C6,E6={current:`güncel`,time:`zaman`,deleteSelected:`Seçileni sil`},D6=E6,O6={current:`現在`,time:`時刻`,deleteSelected:`選択されたものを削除`},k6=O6,A6={current:`nuvarande`,time:`tid`,deleteSelected:`Radera valda`},j6=A6,M6={current:`nåværende`,time:`tid`,deleteSelected:`Slett valgte`},N6=M6,P6=M6,F6=M6,I6={current:`einamas`,time:`laikas`,deleteSelected:`Pašalinti pasirinktą`},L6={en:Q3,en_EN:$3,en_US:e6,it:t6,it_IT:n6,it_CH:r6,nl:i6,nl_NL:a6,nl_BE:o6,de:s6,de_DE:c6,de_CH:l6,fr:u6,fr_FR:d6,fr_CA:f6,fr_BE:p6,fr_CH:m6,es:h6,es_ES:g6,uk:_6,uk_UA:v6,ru:y6,ru_RU:b6,pl:x6,pl_PL:S6,pt:C6,pt_BR:w6,pt_PT:T6,tr:E6,tr_TR:D6,ja:O6,ja_JP:k6,lt:I6,lt_LT:I6,sv:A6,sv_SE:j6,nb:M6,nn:P6,nb_NO:N6,nn_NO:F6},R6=class extends u4{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={moment:XR,locales:L6,locale:`en`,id:void 0,title:void 0},this.options=$.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=$.extend({},L6,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];Q(n=UK(this.options.locales)).call(n,e=>{this.options.locales[e]=$.extend({},r,this.options.locales[e])}),t&&t.time!=null?this.customTime=t.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(e){e&&$.selectiveExtend([`moment`,`locale`,`locales`,`id`,`title`,`rtl`,`snap`],this.options,e)}_create(){var e,t,n;let r=document.createElement(`div`);r[`custom-time`]=this,r.className=`vis-custom-time ${this.options.id||``}`,r.style.position=`absolute`,r.style.top=`0px`,r.style.height=`100%`,this.bar=r;let i=document.createElement(`div`);i.style.position=`relative`,i.style.top=`0px`,this.options.rtl?i.style.right=`-10px`:i.style.left=`-10px`,i.style.height=`100%`,i.style.width=`20px`;function a(e){this.body.range._onMouseWheel(e)}i.addEventListener?(i.addEventListener(`mousewheel`,Z(a).call(a,this),!1),i.addEventListener(`DOMMouseScroll`,Z(a).call(a,this),!1)):i.attachEvent(`onmousewheel`,Z(a).call(a,this)),r.appendChild(i),this.hammer=new H3(i),this.hammer.on(`panstart`,Z(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,Z(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,Z(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:H3.DIRECTION_ALL}),this.hammer.get(`press`).set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){let e=this.body.dom.backgroundVertical;this.bar.parentNode!=e&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),e.appendChild(this.bar));let t=this.body.util.toScreen(this.customTime),n=this.options.locales[this.options.locale];n||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let r=this.options.title;if(r===void 0){var i;r=HY(i=`${n.time}: `).call(i,this.options.moment(this.customTime).format(`dddd, MMMM Do YYYY, H:mm:ss`)),r=r.charAt(0).toUpperCase()+r.substring(1)}else typeof r==`function`&&(r=r.call(this,this.customTime));return this.options.rtl?this.bar.style.right=`${t}px`:this.bar.style.left=`${t}px`,this.bar.title=r,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(e){this.customTime=$.convert(e,`Date`),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(e,t){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement(`div`),this.marker.className=`vis-custom-time-marker`,this.marker.innerHTML=$.xss(e),this.marker.style.position=`absolute`,t){var n;this.marker.setAttribute(`contenteditable`,`true`),this.marker.addEventListener(`pointerdown`,()=>{this.marker.focus()}),this.marker.addEventListener(`input`,Z(n=this._onMarkerChange).call(n,this)),this.marker.title=e,this.marker.addEventListener(`blur`,e=>{this.title!=e.target.innerHTML&&(this._onMarkerChanged(e),this.title=e.target.innerHTML)})}this.bar.appendChild(this.marker)}setCustomTitle(e){this.options.title=e}_onDragStart(e){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,e.stopPropagation()}_onDrag(e){if(!this.eventParams.dragging)return;let t=this.options.rtl?-1*e.deltaX:e.deltaX,n=this.body.util.toScreen(this.eventParams.customTime)+t,r=this.body.util.toTime(n),i=this.body.util.getScale(),a=this.body.util.getStep(),o=this.options.snap,s=o?o(r,i,a):r;this.setCustomTime(s),this.body.emitter.emit(`timechange`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation()}_onDragEnd(e){this.eventParams.dragging&&(this.body.emitter.emit(`timechanged`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation())}_onMarkerChange(e){this.body.emitter.emit(`markerchange`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}_onMarkerChanged(e){this.body.emitter.emit(`markerchanged`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}static customTimeFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`custom-time`))return t[`custom-time`];t=t.parentNode}return null}},z6=class{_create(e){var t,n,r;this.dom={},this.dom.container=e,this.dom.container.style.position=`relative`,this.dom.root=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.backgroundVertical=document.createElement(`div`),this.dom.backgroundHorizontal=document.createElement(`div`),this.dom.centerContainer=document.createElement(`div`),this.dom.leftContainer=document.createElement(`div`),this.dom.rightContainer=document.createElement(`div`),this.dom.center=document.createElement(`div`),this.dom.left=document.createElement(`div`),this.dom.right=document.createElement(`div`),this.dom.top=document.createElement(`div`),this.dom.bottom=document.createElement(`div`),this.dom.shadowTop=document.createElement(`div`),this.dom.shadowBottom=document.createElement(`div`),this.dom.shadowTopLeft=document.createElement(`div`),this.dom.shadowBottomLeft=document.createElement(`div`),this.dom.shadowTopRight=document.createElement(`div`),this.dom.shadowBottomRight=document.createElement(`div`),this.dom.rollingModeBtn=document.createElement(`div`),this.dom.loadingScreen=document.createElement(`div`),this.dom.root.className=`vis-timeline`,this.dom.background.className=`vis-panel vis-background`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical`,this.dom.backgroundHorizontal.className=`vis-panel vis-background vis-horizontal`,this.dom.centerContainer.className=`vis-panel vis-center`,this.dom.leftContainer.className=`vis-panel vis-left`,this.dom.rightContainer.className=`vis-panel vis-right`,this.dom.top.className=`vis-panel vis-top`,this.dom.bottom.className=`vis-panel vis-bottom`,this.dom.left.className=`vis-content`,this.dom.center.className=`vis-content`,this.dom.right.className=`vis-content`,this.dom.shadowTop.className=`vis-shadow vis-top`,this.dom.shadowBottom.className=`vis-shadow vis-bottom`,this.dom.shadowTopLeft.className=`vis-shadow vis-top`,this.dom.shadowBottomLeft.className=`vis-shadow vis-bottom`,this.dom.shadowTopRight.className=`vis-shadow vis-top`,this.dom.shadowBottomRight.className=`vis-shadow vis-bottom`,this.dom.rollingModeBtn.className=`vis-rolling-mode-btn`,this.dom.loadingScreen.className=`vis-loading-screen`,this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on(`rangechange`,()=>{this.initialDrawDone===!0&&this._redraw()}),this.on(`rangechanged`,()=>{this.initialRangeChangeDone||=!0}),this.on(`touch`,Z(t=this._onTouch).call(t,this)),this.on(`panmove`,Z(n=this._onDrag).call(n,this));let i=this;this._origRedraw=Z(r=this._redraw).call(r,this),this._redraw=$.throttle(this._origRedraw),this.on(`_change`,e=>{i.itemSet&&i.itemSet.initialItemSetDrawn&&e&&e.queue==1?i._redraw():i._origRedraw()}),this.hammer=new H3(this.dom.root);let a=this.hammer.get(`pinch`).set({enable:!0});a&&G3(a),this.hammer.get(`pan`).set({threshold:5,direction:H3.DIRECTION_ALL}),this.timelineListeners={};let o=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Q(o).call(o,e=>{let t=t=>{i.isActive()&&i.emit(e,t)};i.hammer.on(e,t),i.timelineListeners[e]=t}),U3(this.hammer,e=>{i.emit(`touch`,e)}),W3(this.hammer,e=>{i.emit(`release`,e)});function s(e){if(!this.isActive())return;if(this.emit(`mousewheel`,e),this.options.preferZoom){if(!this.options.zoomKey||e[this.options.zoomKey])return}else if(this.options.zoomKey&&e[this.options.zoomKey])return;if(!this.options.verticalScroll&&!this.options.horizontalScroll)return;let t=0,n=0;`detail`in e&&(n=e.detail*-1),`wheelDelta`in e&&(n=e.wheelDelta),`wheelDeltaY`in e&&(n=e.wheelDeltaY),`wheelDeltaX`in e&&(t=e.wheelDeltaX*-1),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n*-1,n=0),`deltaY`in e&&(n=e.deltaY*-1),`deltaX`in e&&(t=e.deltaX);var r=40;e.deltaMode&&(e.deltaMode===1?(t*=r,n*=r):(t*=r,n*=800));let i=this.options.verticalScroll,a=Math.abs(n)>=Math.abs(t),o=this.options.horizontalScroll&&this.options.horizontalScrollKey&&e[this.options.horizontalScrollKey];if(i&&a&&!o){let t=this.props.scrollTop,r=t+n;this._setScrollTop(r)!==t&&(this._redraw(),this.emit(`scroll`,e),e.preventDefault());return}if(this.options.horizontalScroll){this.range.stopRolling();let r=(a?n:t)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&a&&(r=-r);let i=this.range.start+r,o=this.range.end+r,s={animation:!1,byUser:!0,event:e};this.range.setRange(i,o,s),e.preventDefault();return}}let c=`onwheel`in document.createElement(`div`)?`wheel`:document.onmousewheel===void 0?this.dom.centerContainer.addEventListener?`DOMMouseScroll`:`onmousewheel`:`mousewheel`;this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Z(s).call(s,this),!1),this.dom.top.addEventListener(c,Z(s).call(s,this),!1),this.dom.bottom.addEventListener(c,Z(s).call(s,this),!1);function l(e){if(i.options.verticalScroll&&(e.preventDefault(),i.isActive())){let t=-e.target.scrollTop;i._setScrollTop(t),i._redraw(),i.emit(`scrollSide`,e)}}this.dom.left.parentNode.addEventListener(`scroll`,Z(l).call(l,this)),this.dom.right.parentNode.addEventListener(`scroll`,Z(l).call(l,this));let u=!1;function d(e){var t;if(e.preventDefault&&(i.emit(`dragover`,i.getEventProperties(e)),e.preventDefault()),HX(t=e.target.className).call(t,`timeline`)>-1&&!u)return e.dataTransfer.dropEffect=`move`,u=!0,!1}function f(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();try{var t=JSON.parse(e.dataTransfer.getData(`text`));if(!t||!t.content)return}catch{return!1}return u=!1,e.center={x:e.clientX,y:e.clientY},t.target===`item`?i.itemSet._onDropObjectOnItem(e):i.itemSet._onAddItem(e),i.emit(`drop`,i.getEventProperties(e)),!1}if(this.dom.center.addEventListener(`dragover`,Z(d).call(d,this),!1),this.dom.center.addEventListener(`drop`,Z(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!e)throw Error(`No container provided`);e.appendChild(this.dom.root),e.appendChild(this.dom.loadingScreen)}setOptions(e){var t;if(e){if($.selectiveExtend([`width`,`height`,`minHeight`,`maxHeight`,`autoResize`,`start`,`end`,`clickToUse`,`dataAttributes`,`hiddenDates`,`locale`,`locales`,`moment`,`preferZoom`,`rtl`,`zoomKey`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`,`longSelectPressTime`,`snap`],this.options,e),this.dom.rollingModeBtn.style.visibility=`hidden`,this.options.rtl&&(this.dom.container.style.direction=`rtl`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical-rtl`),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`:this.dom.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`),typeof this.options.orientation!=`object`&&(this.options.orientation={item:void 0,axis:void 0}),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation={item:e.orientation,axis:e.orientation}:typeof e.orientation==`object`&&(`item`in e.orientation&&(this.options.orientation.item=e.orientation.item),`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis))),this.options.orientation.axis===`both`){if(!this.timeAxis2){let e=this.timeAxis2=new q3(this.body,this.options);e.setOptions=t=>{let n=t?$.extend({},t):{};n.orientation=`top`,q3.prototype.setOptions.call(e,n)},this.components.push(e)}}else if(this.timeAxis2){var n;let e=HX(n=this.components).call(n,this.timeAxis2);if(e!==-1){var r;CJ(r=this.components).call(r,e,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),`hiddenDates`in this.options&&t3(this.options.moment,this.body,this.options.hiddenDates),`clickToUse`in e&&(e.clickToUse?this.activator||=new X3(this.dom.root):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Q(t=this.components).call(t,t=>t.setOptions(e)),`configure`in e){var i;this.configurator||=this._createConfigurator(),this.configurator.setOptions(e.configure);let t=$.deepExtend({},this.options);Q(i=this.components).call(i,e=>{$.deepExtend(t,e.options)}),this.configurator.setModuleOptions({global:t})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var e;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(let e in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,Q(e=this.components).call(e,e=>e.destroy()),this.body=null}setCustomTime(e,t){var n;let r=uV(n=this.customTimes).call(n,e=>t===e.options.id);if(r.length===0)throw Error(`No custom time bar found with id ${IZ(t)}`);r.length>0&&r[0].setCustomTime(e)}getCustomTime(e){var t;let n=uV(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${IZ(e)}`);return n[0].getCustomTime()}setCustomTimeMarker(e,t,n){var r;let i=uV(r=this.customTimes).call(r,e=>e.options.id===t);if(i.length===0)throw Error(`No custom time bar found with id ${IZ(t)}`);i.length>0&&i[0].setCustomMarker(e,n)}setCustomTimeTitle(e,t){var n;let r=uV(n=this.customTimes).call(n,e=>e.options.id===t);if(r.length===0)throw Error(`No custom time bar found with id ${IZ(t)}`);if(r.length>0)return r[0].setCustomTitle(e)}getEventProperties(e){return{event:e}}addCustomTime(e,t){var n;let r=e===void 0?new Date:$.convert(e,`Date`);if(j3(n=this.customTimes).call(n,e=>e.options.id===t))throw Error(`A custom time with id ${IZ(t)} already exists`);let i=new R6(this.body,$.extend({},this.options,{time:r,id:t,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(i),this.components.push(i),this._redraw(),t}removeCustomTime(e){var t;let n=uV(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${IZ(e)}`);Q(n).call(n,e=>{var t,n,r,i;CJ(t=this.customTimes).call(t,HX(n=this.customTimes).call(n,e),1),CJ(r=this.components).call(r,HX(i=this.components).call(i,e),1),e.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(e){return this.time=e,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(e,t){let n=this.getDataRange();if(n.min===null&&n.max===null)return;let r=n.max-n.min,i=new Date(n.min.valueOf()-r*.01),a=new Date(n.max.valueOf()+r*.01),o=e&&e.animation!==void 0?e.animation:!0;this.range.setRange(i,a,{animation:o},t)}getDataRange(){throw Error(`Cannot invoke abstract method getDataRange`)}setWindow(e,t,n,r){typeof arguments[2]==`function`&&(r=arguments[2],n={});let i,a;arguments.length==1?(a=arguments[0],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i})):arguments.length==2&&typeof arguments[1]==`function`?(a=arguments[0],r=arguments[1],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i},r)):(i=n&&n.animation!==void 0?n.animation:!0,this.range.setRange(e,t,{animation:i},r))}moveTo(e,t,n){typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.range.end-this.range.start,i=$.convert(e,`Date`).valueOf(),a=i-r/2,o=i+r/2,s=t&&t.animation!==void 0?t.animation:!0;this.range.setRange(a,o,{animation:s},n)}getWindow(){let e=this.range.getRange();return{start:new Date(e.start),end:new Date(e.end)}}zoomIn(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=(o-o/(1+e))/2,c=i+s,l=a-s;this.setWindow(c,l,t,n)}zoomOut(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=i-o*e/2,c=a+o*e/2;this.setWindow(s,c,t,n)}redraw(){this._redraw()}_redraw(){var e;this.redrawCount++;let t=this.dom;if(!t||!t.container||t.root.offsetWidth==0)return;let n=!1,r=this.options,i=this.props;n3(this.options.moment,this.body,this.options.hiddenDates),r.orientation==`top`?($.addClassName(t.root,`vis-top`),$.removeClassName(t.root,`vis-bottom`)):($.removeClassName(t.root,`vis-top`),$.addClassName(t.root,`vis-bottom`)),r.rtl?($.addClassName(t.root,`vis-rtl`),$.removeClassName(t.root,`vis-ltr`)):($.addClassName(t.root,`vis-ltr`),$.removeClassName(t.root,`vis-rtl`)),t.root.style.maxHeight=$.option.asSize(r.maxHeight,``),t.root.style.minHeight=$.option.asSize(r.minHeight,``),t.root.style.width=$.option.asSize(r.width,``);let a=t.root.offsetWidth;i.border.left=1,i.border.right=1,i.border.top=1,i.border.bottom=1,i.center.height=t.center.offsetHeight,i.left.height=t.left.offsetHeight,i.right.height=t.right.offsetHeight,i.top.height=t.top.clientHeight||-i.border.top,i.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-i.border.bottom;let o=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+o+i.bottom.height+i.border.top+i.border.bottom;t.root.style.height=$.option.asSize(r.height,`${s}px`),i.root.height=t.root.offsetHeight,i.background.height=i.root.height;let c=i.root.height-i.top.height-i.bottom.height;i.centerContainer.height=c,i.leftContainer.height=c,i.rightContainer.height=i.leftContainer.height,i.root.width=a,i.background.width=i.root.width,this.initialDrawDone||(i.scrollbarWidth=$.getScrollBarWidth());let l=t.leftContainer.clientWidth,u=t.rightContainer.clientWidth;r.verticalScroll?r.rtl?(i.left.width=l||-i.border.left,i.right.width=u+i.scrollbarWidth||-i.border.right):(i.left.width=l+i.scrollbarWidth||-i.border.left,i.right.width=u||-i.border.right):(i.left.width=l||-i.border.left,i.right.width=u||-i.border.right),this._setDOM();let d=this._updateScrollTop();r.orientation.item!=`top`&&(d+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),t.center.style.transform=`translateY(${d}px)`;let f=i.scrollTop==0?`hidden`:``,p=i.scrollTop==i.scrollTopMin?`hidden`:``;t.shadowTop.style.visibility=f,t.shadowBottom.style.visibility=p,t.shadowTopLeft.style.visibility=f,t.shadowBottomLeft.style.visibility=p,t.shadowTopRight.style.visibility=f,t.shadowBottomRight.style.visibility=p,r.verticalScroll&&(t.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`,t.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`,t.shadowTopRight.style.visibility=`hidden`,t.shadowBottomRight.style.visibility=`hidden`,t.shadowTopLeft.style.visibility=`hidden`,t.shadowBottomLeft.style.visibility=`hidden`,t.left.style.top=`0px`,t.right.style.top=`0px`),(!r.verticalScroll||i.center.height<i.centerContainer.height)&&(t.left.style.top=`${d}px`,t.right.style.top=`${d}px`,t.rightContainer.className=t.rightContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),t.leftContainer.className=t.leftContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),i.left.width=l||-i.border.left,i.right.width=u||-i.border.right,this._setDOM());let m=i.center.height>i.centerContainer.height;if(this.hammer.get(`pan`).set({direction:m?H3.DIRECTION_ALL:H3.DIRECTION_HORIZONTAL}),this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),Q(e=this.components).call(e,e=>{n=e.redraw()||n}),n)if(this.redrawCount<5){this.body.emitter.emit(`_change`);return}else console.log(`WARNING: infinite loop in redraw?`);else this.redrawCount=0;this.body.emitter.emit(`changed`)}_setDOM(){let e=this.props,t=this.dom;e.leftContainer.width=e.left.width,e.rightContainer.width=e.right.width;let n=e.root.width-e.left.width-e.right.width;e.center.width=n,e.centerContainer.width=n,e.top.width=n,e.bottom.width=n,t.background.style.height=`${e.background.height}px`,t.backgroundVertical.style.height=`${e.background.height}px`,t.backgroundHorizontal.style.height=`${e.centerContainer.height}px`,t.centerContainer.style.height=`${e.centerContainer.height}px`,t.leftContainer.style.height=`${e.leftContainer.height}px`,t.rightContainer.style.height=`${e.rightContainer.height}px`,t.background.style.width=`${e.background.width}px`,t.backgroundVertical.style.width=`${e.centerContainer.width}px`,t.backgroundHorizontal.style.width=`${e.background.width}px`,t.centerContainer.style.width=`${e.center.width}px`,t.top.style.width=`${e.top.width}px`,t.bottom.style.width=`${e.bottom.width}px`,t.background.style.left=`0`,t.background.style.top=`0`,t.backgroundVertical.style.left=`${e.left.width+e.border.left}px`,t.backgroundVertical.style.top=`0`,t.backgroundHorizontal.style.left=`0`,t.backgroundHorizontal.style.top=`${e.top.height}px`,t.centerContainer.style.left=`${e.left.width}px`,t.centerContainer.style.top=`${e.top.height}px`,t.leftContainer.style.left=`0`,t.leftContainer.style.top=`${e.top.height}px`,t.rightContainer.style.left=`${e.left.width+e.center.width}px`,t.rightContainer.style.top=`${e.top.height}px`,t.top.style.left=`${e.left.width}px`,t.top.style.top=`0`,t.bottom.style.left=`${e.left.width}px`,t.bottom.style.top=`${e.top.height+e.centerContainer.height}px`,t.center.style.left=`0`,t.left.style.left=`0`,t.right.style.left=`0`}setCurrentTime(e){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);this.currentTime.setCurrentTime(e)}getCurrentTime(){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);return this.currentTime.getCurrentTime()}_toTime(e){return o3(this,e,this.props.center.width)}_toGlobalTime(e){return o3(this,e,this.props.root.width)}_toScreen(e){return a3(this,e,this.props.center.width)}_toGlobalScreen(e){return a3(this,e,this.props.root.width)}_initAutoResize(){this.options.autoResize==1?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){let e=this;this._stopAutoResize(),this._onResize=()=>{if(e.options.autoResize!=1){e._stopAutoResize();return}if(e.dom.root){let t=e.dom.root.offsetHeight,n=e.dom.root.offsetWidth;(n!=e.props.lastWidth||t!=e.props.lastHeight)&&(e.props.lastWidth=n,e.props.lastHeight=t,e.props.scrollbarWidth=$.getScrollBarWidth(),e.body.emitter.emit(`_change`))}},window.addEventListener(`resize`,this._onResize),e.dom.root&&(e.props.lastWidth=e.dom.root.offsetWidth,e.props.lastHeight=e.dom.root.offsetHeight),this.watchTimer=R3(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&=(clearInterval(this.watchTimer),void 0),this._onResize&&=(window.removeEventListener(`resize`,this._onResize),null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){this.touch.allowDragging=!1}_onDrag(e){if(!e||!this.touch.allowDragging)return;let t=e.deltaY,n=this._getScrollTop(),r=this._setScrollTop(this.touch.initialScrollTop+t);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),r!=n&&this.emit(`verticalDrag`)}_setScrollTop(e){return this.props.scrollTop=e,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){let e=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return e!=this.props.scrollTopMin&&(this.options.orientation.item!=`top`&&(this.props.scrollTop+=e-this.props.scrollTopMin),this.props.scrollTopMin=e),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<e&&(this.props.scrollTop=e),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw Error(`Cannot invoke abstract method _createConfigurator`)}};aQ(z6.prototype);var B6=class extends u4{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:XR,locales:L6,locale:`en`},this.options=$.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=$.extend({},L6,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];Q(n=UK(this.options.locales)).call(n,e=>{this.options.locales[e]=$.extend({},r,this.options.locales[e])}),this.offset=0,this._create()}_create(){let e=document.createElement(`div`);e.className=`vis-current-time`,e.style.position=`absolute`,e.style.top=`0px`,e.style.height=`100%`,this.bar=e}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(e){e&&$.selectiveExtend([`rtl`,`showCurrentTime`,`alignCurrentTime`,`moment`,`locale`,`locales`],this.options,e)}redraw(){if(this.options.showCurrentTime){var e,t;let n=this.body.dom.backgroundVertical;this.bar.parentNode!=n&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),n.appendChild(this.bar),this.start());let r=this.options.moment(zq()+this.offset);this.options.alignCurrentTime&&(r=r.startOf(this.options.alignCurrentTime));let i=this.body.util.toScreen(r),a=this.options.locales[this.options.locale];a||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let o=HY(e=HY(t=`${a.current} `).call(t,a.time,`: `)).call(e,r.format(`dddd, MMMM Do YYYY, H:mm:ss`));o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${i*-1}px)`:this.bar.style.transform=`translateX(${i}px)`,this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){let e=this;function t(){e.stop();let n=1/e.body.range.conversion(e.body.domProps.center.width).scale/10;n<30&&(n=30),n>1e3&&(n=1e3),e.redraw(),e.body.emitter.emit(`currentTimeTick`),e.currentTimeTimer=YL(t,n)}t()}stop(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(e){this.offset=$.convert(e,`Date`).valueOf()-zq(),this.redraw()}getCurrentTime(){return new Date(zq()+this.offset)}},V6={},H6;function U6(){if(H6)return V6;H6=1;var e=X(),t=kR().find,n=CU(),r=`find`,i=!0;return r in[]&&[,][r](function(){i=!1}),e({target:`Array`,proto:!0,forced:i},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r),V6}var W6,G6;function K6(){return G6?W6:(G6=1,U6(),W6=fL()(`Array`,`find`),W6)}var q6,J6;function Y6(){if(J6)return q6;J6=1;var e=cF(),t=K6(),n=Array.prototype;return q6=function(r){var i=r.find;return r===n||e(n,r)&&i===n.find?t:i},q6}var X6,Z6;function Q6(){return Z6?X6:(Z6=1,X6=Y6(),X6)}var $6,e8;function t8(){return e8?$6:(e8=1,$6=Q6(),$6)}var n8=eP(t8()),r8={},i8={},a8={exports:{}},o8,s8;function c8(){return s8?o8:(s8=1,o8=sP()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),o8)}var l8,u8;function d8(){if(u8)return l8;u8=1;var e=sP(),t=$P(),n=yP(),r=c8(),i=Object.isExtensible;return l8=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,l8}var f8,p8;function m8(){return p8?f8:(p8=1,f8=!sP()(function(){return Object.isExtensible(Object.preventExtensions({}))}),f8)}var h8;function g8(){if(h8)return a8.exports;h8=1;var e=X(),t=gP(),n=dz(),r=$P(),i=$F(),a=PI().f,o=Pz(),s=Lz(),c=d8(),l=nI(),u=m8(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=a8.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,a8.exports}var _8,v8;function y8(){if(v8)return _8;v8=1;var e=aI(),t=EU(),n=e(`iterator`),r=Array.prototype;return _8=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},_8}var b8,x8;function S8(){if(x8)return b8;x8=1;var e=tR(),t=MF(),n=WP(),r=EU(),i=aI()(`iterator`);return b8=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},b8}var C8,w8;function T8(){if(w8)return C8;w8=1;var e=MP(),t=kF(),n=MI(),r=EF(),i=S8(),a=TypeError;return C8=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},C8}var E8,D8;function O8(){if(D8)return E8;D8=1;var e=MP(),t=MI(),n=MF();return E8=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},E8}var k8,A8;function j8(){if(A8)return k8;A8=1;var e=TI(),t=MP(),n=MI(),r=EF(),i=y8(),a=mR(),o=cF(),s=T8(),c=S8(),l=O8(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return k8=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},k8}var M8,N8;function P8(){if(N8)return M8;N8=1;var e=cF(),t=TypeError;return M8=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},M8}var F8,I8;function L8(){if(I8)return F8;I8=1;var e=X(),t=iP(),n=g8(),r=sP(),i=LI(),a=j8(),o=P8(),s=TP(),c=$P(),l=WP(),u=sB(),d=PI().f,f=kR().forEach,p=kP(),m=pB(),h=m.set,g=m.getterFor;return F8=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},F8}var R8,z8;function B8(){if(z8)return R8;z8=1;var e=Uz();return R8=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},R8}var V8,H8;function U8(){if(H8)return V8;H8=1;var e=aF(),t=Kz(),n=aI(),r=kP(),i=n(`species`);return V8=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},V8}var W8,G8;function K8(){if(G8)return W8;G8=1;var e=jz(),t=Kz(),n=B8(),r=TI(),i=P8(),a=WP(),o=j8(),s=XU(),c=$U(),l=U8(),u=kP(),d=g8().fastKey,f=pB(),p=f.set,m=f.getterFor;return W8={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},W8}var q8;function J8(){return q8?i8:(q8=1,L8()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},K8()),i8)}var Y8;function X8(){return Y8?r8:(Y8=1,J8(),r8)}var Z8={},Q8,$8;function e5(){if($8)return Q8;$8=1;var e=EF(),t=TypeError;return Q8=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},Q8}var t5,n5;function r5(){return n5?t5:(n5=1,t5=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},t5)}var i5,a5;function o5(){if(a5)return i5;a5=1;var e=aF(),t=r5(),n=e(`Set`),r=n.prototype;return i5={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},i5}var s5,c5;function l5(){if(c5)return s5;c5=1;var e=MP();return s5=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},s5}var u5,d5;function f5(){if(d5)return u5;d5=1;var e=l5();return u5=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},u5}var p5,m5;function h5(){if(m5)return p5;m5=1;var e=o5(),t=f5(),n=e.Set,r=e.add;return p5=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},p5}var g5,_5;function v5(){return _5?g5:(_5=1,g5=function(e){return e.size},g5)}var y5,b5;function x5(){return b5?y5:(b5=1,y5=function(e){return{iterator:e,next:e.next,done:!1}},y5)}var S5,C5;function w5(){if(C5)return S5;C5=1;var e=kF(),t=MI(),n=MP(),r=cR(),i=x5(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},S5=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},S5}var T5,E5;function D5(){if(E5)return T5;E5=1;var e=e5(),t=o5(),n=h5(),r=v5(),i=w5(),a=f5(),o=l5(),s=t.has,c=t.remove;return T5=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},T5}var O5,k5;function A5(){return k5?O5:(k5=1,O5=function(){return!1},O5)}var j5;function M5(){if(j5)return Z8;j5=1;var e=X(),t=D5(),n=sP();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),Z8}var N5={},P5,F5;function Sne(){if(F5)return P5;F5=1;var e=e5(),t=o5(),n=v5(),r=w5(),i=f5(),a=l5(),o=t.Set,s=t.add,c=t.has;return P5=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},P5}var I5;function Cne(){if(I5)return N5;I5=1;var e=X(),t=sP(),n=Sne();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),N5}var L5={},R5,z5;function wne(){if(z5)return R5;z5=1;var e=e5(),t=o5().has,n=v5(),r=w5(),i=f5(),a=l5(),o=O8();return R5=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},R5}var B5;function Tne(){if(B5)return L5;B5=1;var e=X(),t=wne();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),L5}var V5={},H5,U5;function Ene(){if(U5)return H5;U5=1;var e=e5(),t=v5(),n=f5(),r=w5();return H5=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},H5}var W5;function Dne(){if(W5)return V5;W5=1;var e=X(),t=Ene();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),V5}var G5={},K5,q5;function One(){if(q5)return K5;q5=1;var e=e5(),t=o5().has,n=v5(),r=w5(),i=l5(),a=O8();return K5=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},K5}var J5;function kne(){if(J5)return G5;J5=1;var e=X(),t=One();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),G5}var Y5={},X5,Z5;function Ane(){if(Z5)return X5;Z5=1;var e=e5(),t=o5(),n=h5(),r=w5(),i=l5(),a=t.add,o=t.has,s=t.remove;return X5=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},X5}var Q5,$5;function e7(){return $5?Q5:($5=1,Q5=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},Q5)}var t7;function jne(){if(t7)return Y5;t7=1;var e=X(),t=Ane(),n=e7();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),Y5}var n7={},r7,i7;function Mne(){if(i7)return r7;i7=1;var e=e5(),t=o5().add,n=h5(),r=w5(),i=l5();return r7=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},r7}var a7;function Nne(){if(a7)return n7;a7=1;var e=X(),t=Mne(),n=e7();return e({target:`Set`,proto:!0,real:!0,forced:!A5()(`union`)||!n(`union`)},{union:t}),n7}var o7,s7;function Pne(){return s7?o7:(s7=1,nW(),X8(),M5(),Cne(),Tne(),Dne(),kne(),jne(),Nne(),uG(),o7=nF().Set,o7)}var c7,l7;function Fne(){if(l7)return c7;l7=1;var e=Pne();return oW(),c7=e,c7}var u7,d7;function Ine(){return d7?u7:(d7=1,u7=Fne(),u7)}var f7=eP(Ine()),p7=.001;function Lne(e){e3(e).call(e,(e,t)=>e.data.start-t.data.start)}function Rne(e){e3(e).call(e,(e,t)=>(`end`in e.data?e.data.end:e.data.start)-(`end`in t.data?t.data.end:t.data.start))}function m7(e,t,n,r){return g7(e,t.item,!1,e=>e.stack&&(n||e.top===null),e=>e.stack,()=>t.axis,r)===null}function zne(e,t,n){n.height=g7(e,t.item,!1,e=>e.stack,()=>!0,e=>e.baseTop)-n.top+.5*t.item.vertical}function Bne(e,t,n,r){for(let i=0;i<e.length;i++){if(e[i].data.subgroup==null){e[i].top=t.item.vertical;continue}if(e[i].data.subgroup===void 0||!r)continue;let a=0;for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||n[t].visible!==!0||n[t].index>=n[e[i].data.subgroup].index||(a+=n[t].height,n[e[i].data.subgroup].top=a);e[i].top=a+.5*t.item.vertical}r||Vne(e,t,n)}function Vne(e,t,n){var r;g7(e3(r=iX(n)).call(r,(e,t)=>e.index>t.index?1:e.index<t.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let r=0;r<e.length;r++)e[r].data.subgroup!==void 0&&(e[r].top=n[e[r].data.subgroup].top+.5*t.item.vertical)}function h7(e,t,n){let r=!1,i=[];for(let e in n)Object.prototype.hasOwnProperty.call(n[e],`index`)?i[n[e].index]=e:i.push(e);for(let a=0;a<i.length;a++){let o=i[a];if(!Object.prototype.hasOwnProperty.call(n,o))continue;r||=n[o].stack,n[o].top=0;for(let e in n)n[e].visible&&n[o].index>n[e].index&&(n[o].top+=n[e].height);let s=e[o];for(let e=0;e<s.length;e++)s[e].data.subgroup!==void 0&&(s[e].top=n[s[e].data.subgroup].top+.5*t.item.vertical,n[o].stack&&(s[e].baseTop=s[e].top));r&&n[o].stack&&zne(e[o],t,n[o])}}function g7(e,t,n,r,i,a,o){let s=e=>e.start,c=e=>e.end;n||(s=e[0]&&e[0].options.rtl?e=>e.right:e=>e.left,c=e=>s(e)+e.width+t.horizontal);let l=[],u=[],d=null,f=0;for(let t of e)if(r(t))l.push(t);else if(i(t)){let e=s(t);d!==null&&e<d-p7&&(f=0),d=e,f=_7(u,t=>s(t)-p7>e,f),CJ(u).call(u,f,0,t),f++}d=null;let p=null;f=0;let m=0,h=0,g=0;for(;l.length>0;){var _;let e=l.shift();e.top=a(e);let n=s(e),r=c(e);d!==null&&n<d-p7&&(m=0,h=0,f=0,p=null),(d===null||n>d+p7)&&(m=_7(u,e=>n<c(e)-p7,m)),d=n,(p===null||p<r-p7)&&(h=_7(u,e=>r<s(e)-p7,Math.max(m,h))),p!==null&&p-p7>r&&(h=Une(u,e=>r+p7>=s(e),m,h)+1),p=r;let v=e3(_=Wne(u,e=>n<c(e)-p7,m,h)).call(_,(e,t)=>e.top-t.top);for(let n=0;n<v.length;n++){let r=v[n];Hne(e,r,t)&&(e.top=r.top+r.height+t.vertical)}i(e)&&(f=_7(u,e=>s(e)-p7>n,f),CJ(u).call(u,f,0,e),f<m&&m++,f<=h&&h++,f++);let y=e.top+e.height;if(y>g&&(g=y),o&&o())return null}return g}function Hne(e,t,n){return e.top-n.vertical+p7<t.top+t.height&&e.top+e.height+n.vertical-p7>t.top}function _7(e,t,n){n||=0;for(let r=n;r<e.length;r++)if(t(e[r]))return r;return e.length}function Une(e,t,n,r){n||=0,r||=e.length;for(let i=r-1;i>=n;i--)if(t(e[i]))return i;return n-1}function Wne(e,t,n,r){n||=0,r=r?Math.min(r,e.length):e.length;let i=[];for(let a=n;a<r;a++)t(e[a])&&i.push(e[a]);return i}var v7={BACKGROUND:`__background__`},y7=class{constructor(e,t,n){if(this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=t&&t.subgroupOrder,this.itemSet=n,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],t&&t.nestedGroups&&(this.nestedGroups=t.nestedGroups,t.showNested==0?this.showNested=!1:this.showNested=!0),t&&t.subgroupStack)if(typeof t.subgroupStack==`boolean`)this.doInnerStack=t.subgroupStack,this.subgroupStackAll=t.subgroupStack;else for(let e in t.subgroupStack)Object.prototype.hasOwnProperty.call(t.subgroupStack,e)&&(this.subgroupStack[e]=t.subgroupStack[e],this.doInnerStack=this.doInnerStack||t.subgroupStack[e]);t&&t.heightMode?this.heightMode=t.heightMode:this.heightMode=n.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;let r=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on(`checkRangedItems`,r),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off(`checkRangedItems`,r)}),this._create(),this.setData(t)}_create(){let e=document.createElement(`div`);this.itemSet.options.groupEditable.order?e.className=`vis-label draggable`:e.className=`vis-label`,this.dom.label=e;let t=document.createElement(`div`);t.className=`vis-inner`,e.appendChild(t),this.dom.inner=t;let n=document.createElement(`div`);n.className=`vis-group`,n[`vis-group`]=this,this.dom.foreground=n,this.dom.background=document.createElement(`div`),this.dom.background.className=`vis-group`,this.dom.axis=document.createElement(`div`),this.dom.axis.className=`vis-group`,this.dom.marker=document.createElement(`div`),this.dom.marker.style.visibility=`hidden`,this.dom.marker.style.position=`absolute`,this.dom.marker.innerHTML=``,this.dom.background.appendChild(this.dom.marker)}setData(e){if(this.itemSet.groupTouchParams.isDragging)return;let t,n;if(e&&e.subgroupVisibility)for(let t in e.subgroupVisibility)Object.prototype.hasOwnProperty.call(e.subgroupVisibility,t)&&(this.subgroupVisibility[t]=e.subgroupVisibility[t]);if(this.itemSet.options&&this.itemSet.options.groupTemplate){var r;n=Z(r=this.itemSet.options.groupTemplate).call(r,this),t=n(e,this.dom.inner)}else t=e&&e.content;if(t instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(t)}else t instanceof Object&&t.isReactComponent||(t instanceof Object?n(e,this.dom.inner):t==null?this.dom.inner.innerHTML=$.xss(this.groupId||``):this.dom.inner.innerHTML=$.xss(t));this.dom.label.title=e&&e.title||``,this.dom.inner.firstChild?$.removeClassName(this.dom.inner,`vis-hidden`):$.addClassName(this.dom.inner,`vis-hidden`),e&&e.nestedGroups?((!this.nestedGroups||this.nestedGroups!=e.nestedGroups)&&(this.nestedGroups=e.nestedGroups),(e.showNested!==void 0||this.showNested===void 0)&&(e.showNested==0?this.showNested=!1:this.showNested=!0),$.addClassName(this.dom.label,`vis-nesting-group`),this.showNested?($.removeClassName(this.dom.label,`collapsed`),$.addClassName(this.dom.label,`expanded`)):($.removeClassName(this.dom.label,`expanded`),$.addClassName(this.dom.label,`collapsed`))):this.nestedGroups&&(this.nestedGroups=null,$.removeClassName(this.dom.label,`collapsed`),$.removeClassName(this.dom.label,`expanded`),$.removeClassName(this.dom.label,`vis-nesting-group`)),e&&(e.treeLevel||e.nestedInGroup)?($.addClassName(this.dom.label,`vis-nested-group`),e.treeLevel?$.addClassName(this.dom.label,`vis-group-level-`+e.treeLevel):$.addClassName(this.dom.label,`vis-group-level-unknown-but-gte1`)):$.addClassName(this.dom.label,`vis-group-level-0`);let i=e&&e.className||null;i!=this.className&&(this.className&&($.removeClassName(this.dom.label,this.className),$.removeClassName(this.dom.foreground,this.className),$.removeClassName(this.dom.background,this.className),$.removeClassName(this.dom.axis,this.className)),$.addClassName(this.dom.label,i),$.addClassName(this.dom.foreground,i),$.addClassName(this.dom.background,i),$.addClassName(this.dom.axis,i),this.className=i),this.style&&=($.removeCssText(this.dom.label,this.style),null),e&&e.style&&($.addCssText(this.dom.label,e.style),this.style=e.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){let e=this.dom.marker.clientHeight;if(e!=this.lastMarkerHeight){this.lastMarkerHeight=e;let t={},n=0;if(Q($).call($,this.items,(e,r)=>{e.dirty=!0,e.displayed&&(t[r]=e.redraw(!0),n=t[r].length)}),n>0)for(let e=0;e<n;e++)Q($).call($,t,t=>{t[e]()});return!0}else return!1}_calculateGroupSizeAndPosition(){let{offsetTop:e,offsetLeft:t,offsetWidth:n}=this.dom.foreground;this.top=e,this.right=t,this.width=n}_shouldBailItemsRedraw(){let e=this,t=this.itemSet.options.onTimeout,n={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:t&&t.timeoutMs,userBailFunction:t&&t.callback,shouldBailStackItems:this.shouldBailStackItems},r=null;if(!this.itemSet.initialDrawDone){if(n.shouldBailStackItems)return!0;Math.abs(zq()-new Date(n.relativeBailingTime))>n.bailTimeMs&&(n.userBailFunction&&this.itemSet.userContinueNotBail==null?n.userBailFunction(t=>{e.itemSet.userContinueNotBail=t,r=!t}):r=e.itemSet.userContinueNotBail==0)}return r}_redrawItems(e,t,n,r){if(e||this.stackDirty||this.isVisible&&!t){var i,a,o,s,c,l;let e={byEnd:uV(i=this.orderedItems.byEnd).call(i,e=>!e.isCluster),byStart:uV(a=this.orderedItems.byStart).call(a,e=>!e.isCluster)},t={byEnd:[...new f7(uV(o=cK(s=this.orderedItems.byEnd).call(s,e=>e.cluster)).call(o,e=>!!e))],byStart:[...new f7(uV(c=cK(l=this.orderedItems.byStart).call(l,e=>e.cluster)).call(c,e=>!!e))]},h=()=>{var n,i;let a=this._updateItemsInRange(e,uV(n=this.visibleItems).call(n,e=>!e.isCluster),r),o=this._updateClustersInRange(t,uV(i=this.visibleItems).call(i,e=>e.isCluster),r);return[...a,...o]},g=e=>{let t={};for(let r in this.subgroups){var n;if(!Object.prototype.hasOwnProperty.call(this.subgroups,r))continue;let i=uV(n=this.visibleItems).call(n,e=>e.data.subgroup===r);t[r]=e?e3(i).call(i,(t,n)=>e(t.data,n.data)):i}return t};if(typeof this.itemSet.options.order==`function`){let e=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups)h7(g(this.itemSet.options.order),n,this.subgroups),this.visibleItems=h(),this._updateSubGroupHeights(n);else{var u,d,f,p;this.visibleItems=h(),this._updateSubGroupHeights(n),this.shouldBailStackItems=m7(e3(u=uV(d=pq(f=this.visibleItems).call(f)).call(d,e=>e.isCluster||!e.isCluster&&!e.cluster)).call(u,(t,n)=>e.itemSet.options.order(t.data,n.data)),n,!0,Z(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=h(),this._updateSubGroupHeights(n),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups)h7(g(),n,this.subgroups);else{var m;this.shouldBailStackItems=m7(this.visibleItems,n,!0,Z(m=this._shouldBailItemsRedraw).call(m,this))}else Bne(this.visibleItems,n,this.subgroups,this.itemSet.options.stackSubgroups);for(let e=0;e<this.visibleItems.length;e++)this.visibleItems[e].repositionX(),this.subgroupVisibility[this.visibleItems[e].data.subgroup]!==void 0&&(this.subgroupVisibility[this.visibleItems[e].data.subgroup]||this.visibleItems[e].hide());this.itemSet.options.cluster&&Q($).call($,this.items,e=>{e.cluster&&e.displayed&&e.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit(`destroyTimeline`),this.stackDirty=!1}}_didResize(e,t){e=$.updateProperty(this,`height`,t)||e;let n=this.dom.inner.clientWidth,r=this.dom.inner.clientHeight;return e=$.updateProperty(this.props.label,`width`,n)||e,e=$.updateProperty(this.props.label,`height`,r)||e,e}_applyGroupHeight(e){this.dom.background.style.height=`${e}px`,this.dom.foreground.style.height=`${e}px`,this.dom.label.style.height=`${e}px`}_updateItemsVerticalPosition(e){for(let t=0,n=this.visibleItems.length;t<n;t++){let n=this.visibleItems[t];n.repositionY(e),!this.isVisible&&this.groupId!=v7.BACKGROUND&&n.displayed&&n.hide()}}redraw(e,t,n,r){var i,a,o,s,c;let l=!1,u=this.isVisible,d,f=[()=>{n=this._didMarkerHeightChange.call(this)||n},Z(i=this._updateSubGroupHeights).call(i,this,t),Z(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var n;this.isVisible=Z(n=this._isGroupVisible).call(n,this)(e,t)},()=>{var r;Z(r=this._redrawItems).call(r,this)(n,u,t,e)},Z(o=this._updateSubgroupsSizes).call(o,this),()=>{var e;d=this.height=Z(e=this._calculateHeight).call(e,this)(t)},Z(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var e;l=Z(e=this._didResize).call(e,this)(l,d)},()=>{var e;Z(e=this._applyGroupHeight).call(e,this)(d)},()=>{var e;Z(e=this._updateItemsVerticalPosition).call(e,this)(t)},Z(c=()=>(!this.isVisible&&this.height&&(l=!1),l)).call(c,this)];if(r)return f;{let e;return Q(f).call(f,t=>{e=t()}),e}}_updateSubGroupHeights(e){if(UK(this.subgroups).length>0){let t=this;this._resetSubgroups(),Q($).call($,this.visibleItems,n=>{n.data.subgroup!==void 0&&(t.subgroups[n.data.subgroup].height=Math.max(t.subgroups[n.data.subgroup].height,n.height+e.item.vertical),t.subgroups[n.data.subgroup].visible=this.subgroupVisibility[n.data.subgroup]===void 0?!0:!!this.subgroupVisibility[n.data.subgroup])})}}_isGroupVisible(e,t){return this.top<=e.body.domProps.centerContainer.height-e.body.domProps.scrollTop+t.axis&&this.top+this.height+t.axis>=-e.body.domProps.scrollTop}_calculateHeight(e){let t,n;if(n=this.heightMode===`fixed`?$.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)t=Math.max(this.height,this.props.label.height);else if(n.length>0){let r=n[0].top,i=n[0].top+n[0].height;if(Q($).call($,n,e=>{r=Math.min(r,e.top),i=Math.max(i,e.top+e.height)}),r>e.axis){let t=r-e.axis;i-=t,Q($).call($,n,e=>{e.top-=t})}t=Math.ceil(i+e.item.vertical/2),this.heightMode!==`fitItems`&&(t=Math.max(t,this.props.label.height))}else t=this.props.label.height;return t}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){let e=this.dom.label;e.parentNode&&e.parentNode.removeChild(e);let t=this.dom.foreground;t.parentNode&&t.parentNode.removeChild(t);let n=this.dom.background;n.parentNode&&n.parentNode.removeChild(n);let r=this.dom.axis;r.parentNode&&r.parentNode.removeChild(r)}add(e){var t;if(this.items[e.id]=e,e.setParent(this),this.stackDirty=!0,e.data.subgroup!==void 0&&(this._addToSubgroup(e),this.orderSubgroups()),!gY(t=this.visibleItems).call(t,e)){let t=this.itemSet.body.range;this._checkIfVisible(e,this.visibleItems,t)}}_addToSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;t!=null&&this.subgroups[t]===void 0&&(this.subgroups[t]={height:0,top:0,start:e.data.start,end:e.data.end||e.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[t]||!1},this.subgroupIndex++),new Date(e.data.start)<new Date(this.subgroups[t].start)&&(this.subgroups[t].start=e.data.start);let n=e.data.end||e.data.start;new Date(n)>new Date(this.subgroups[t].end)&&(this.subgroups[t].end=n),this.subgroups[t].items.push(e)}_updateSubgroupsSizes(){let e=this;if(e.subgroups)for(let n in e.subgroups){var t;if(!Object.prototype.hasOwnProperty.call(e.subgroups,n))continue;let r=e.subgroups[n].items[0].data.end||e.subgroups[n].items[0].data.start,i=e.subgroups[n].items[0].data.start,a=r-1;Q(t=e.subgroups[n].items).call(t,e=>{new Date(e.data.start)<new Date(i)&&(i=e.data.start);let t=e.data.end||e.data.start;new Date(t)>new Date(a)&&(a=t)}),e.subgroups[n].start=i,e.subgroups[n].end=new Date(a-1)}}orderSubgroups(){if(this.subgroupOrderer!==void 0){let e=[];if(typeof this.subgroupOrderer==`string`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});e3(e).call(e,(e,t)=>e.sortField-t.sortField)}else if(typeof this.subgroupOrderer==`function`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push(this.subgroups[t].items[0].data);e3(e).call(e,this.subgroupOrderer)}if(e.length>0)for(let t=0;t<e.length;t++)this.subgroups[e[t].subgroup].index=t}}_resetSubgroups(){for(let e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&(this.subgroups[e].visible=!1,this.subgroups[e].height=0)}remove(e){var t,n;delete this.items[e.id],e.setParent(null),this.stackDirty=!0;let r=HX(t=this.visibleItems).call(t,e);r!=-1&&CJ(n=this.visibleItems).call(n,r,1),e.data.subgroup!==void 0&&(this._removeFromSubgroup(e),this.orderSubgroups())}_removeFromSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;if(t!=null){let i=this.subgroups[t];if(i){var n;let a=HX(n=i.items).call(n,e);if(a>=0){var r;CJ(r=i.items).call(r,a,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[t]}}}}removeFromDataSet(e){this.itemSet.removeItem(e.id)}order(){let e=$.toArray(this.items),t=[],n=[];for(let r=0;r<e.length;r++)e[r].data.end!==void 0&&n.push(e[r]),t.push(e[r]);this.orderedItems={byStart:t,byEnd:n},Lne(this.orderedItems.byStart),Rne(this.orderedItems.byEnd)}_updateItemsInRange(e,t,n){let r=[],i={};if(!this.isVisible&&this.height!==void 0&&this.groupId!=v7.BACKGROUND){for(let e=0;e<t.length;e++){var a=t[e];a.displayed&&a.hide()}return r}let o=(n.end-n.start)/4,s=n.start-o,c=n.end+o,l=e=>e<s?-1:e<=c?0:1,u=e=>{let{start:t,end:n}=e;return n<s?-1:t<=c?0:1};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);let d=$.binarySearchCustom(e.byStart,l,`data`,`start`);if(this._traceVisible(d,e.byStart,r,i,e=>e.data.start<s||e.data.start>c),this.checkRangedItems==1){this.checkRangedItems=!1;for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n)}else{let t=$.binarySearchCustom(e.byEnd,u,`data`);this._traceVisible(t,e.byEnd,r,i,e=>e.data.end<s||e.data.start>c)}this._sortVisibleItems(e.byStart,r,i);let f={},p=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(f[e]=t.redraw(!0),p=f[e].length)}if(p>0)for(let e=0;e<p;e++)Q($).call($,f,t=>{t[e]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}_traceVisible(e,t,n,r,i){if(e!=-1){for(let a=e;a>=0;a--){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.unshift(e))}for(let a=e+1;a<t.length;a++){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.push(e))}}}_sortVisibleItems(e,t,n){t.length=0;for(let r=0;r<e.length;r++){let i=e[r];n[i.id]&&t.push(i)}}_checkIfVisible(e,t,n){e.isVisible(n)?(e.displayed||e.show(),e.repositionX(),t.push(e)):e.displayed&&e.hide()}_checkIfVisibleWithReference(e,t,n,r){e.isVisible(r)?n[e.id]===void 0&&(n[e.id]=!0,t.push(e)):e.displayed&&e.hide()}_updateClustersInRange(e,t,n){let r=[],i={};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);for(let t=0;t<e.byStart.length;t++)this._checkIfVisibleWithReference(e.byStart[t],r,i,n);for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n);let a={},o=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(a[e]=t.redraw(!0),o=a[e].length)}if(o>0)for(var s=0;s<o;s++)Q($).call($,a,function(e){e[s]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}changeSubgroup(e,t,n){this._removeFromSubgroup(e,t),this._addToSubgroup(e,n),this.orderSubgroups()}dispose(){this.hide();let e;for(;e=this._disposeCallbacks.pop();)e()}},b7=class extends y7{constructor(e,t,n){super(e,t,n),this.width=0,this.height=0,this.top=0,this.left=0}redraw(e,t){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,e),this.width=this.dom.background.offsetWidth,this.dom.background.style.height=`0`;for(let e=0,n=this.visibleItems.length;e<n;e++)this.visibleItems[e].repositionY(t);return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}},x7=class{constructor(e,t,n){var r;this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=t||{},this.defaultOptions={locales:L6,locale:`en`},this.options=$.extend({},this.defaultOptions,n),this.options.locales=$.extend({},L6,this.options.locales);let i=this.defaultOptions.locales[this.defaultOptions.locale];Q(r=UK(this.options.locales)).call(r,e=>{this.options.locales[e]=$.extend({},i,this.options.locales[e])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(e){e.group!=null&&this.data.group!=e.group&&this.parent!=null&&this.parent.itemSet._moveToGroup(this,e.group),this.setSelectability(e),this.parent&&(this.parent.stackDirty=!0),e.subgroup!=null&&this.data.subgroup!=e.subgroup&&this.parent!=null&&this.parent.changeSubgroup(this,this.data.subgroup,e.subgroup),this.data=e,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(e){e&&(this.selectable=e.selectable===void 0?!0:!!e.selectable)}setParent(e){this.displayed?(this.hide(),this.parent=e,this.parent&&this.show()):this.parent=e}isVisible(){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var e,t;let n=this,r=document.createElement(`div`);r.className=`vis-drag-center`,r.dragCenterItem=this,this.hammerDragCenter=new H3(r),this.hammerDragCenter.on(`tap`,e=>{n.parent.itemSet.body.emitter.emit(`click`,{event:e,item:n.id})}),this.hammerDragCenter.on(`doubletap`,e=>{e.stopPropagation(),n.parent.itemSet._onUpdateItem(n),n.parent.itemSet.body.emitter.emit(`doubleClick`,{event:e,item:n.id})}),this.hammerDragCenter.on(`panstart`,e=>{e.stopPropagation(),n.parent.itemSet._onDragStart(e)}),this.hammerDragCenter.on(`panmove`,Z(e=n.parent.itemSet._onDrag).call(e,n.parent.itemSet)),this.hammerDragCenter.on(`panend`,Z(t=n.parent.itemSet._onDragEnd).call(t,n.parent.itemSet)),this.hammerDragCenter.get(`press`).set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(r,this.dom.dragLeft):this.dom.box.appendChild(r):this.dom.point&&this.dom.point.appendChild(r),this.dom.dragCenter=r}else !this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&=(this.hammerDragCenter.destroy(),null))}_repaintDeleteButton(e){let t=(this.options.editable.overrideItems||this.editable==null)&&this.options.editable.remove||!this.options.editable.overrideItems&&this.editable!=null&&this.editable.remove;if(this.selected&&t&&!this.dom.deleteButton){let t=this,n=document.createElement(`div`);this.options.rtl?n.className=`vis-delete-rtl`:n.className=`vis-delete`;let r=this.options.locales[this.options.locale];r||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en),n.title=r.deleteSelected,this.hammerDeleteButton=new H3(n).on(`tap`,e=>{e.stopPropagation(),t.parent.removeFromDataSet(t)}),e.appendChild(n),this.dom.deleteButton=n}else (!this.selected||!t)&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&=(this.hammerDeleteButton.destroy(),null))}_repaintOnItemUpdateTimeTooltip(e){if(!this.options.tooltipOnItemUpdateTime)return;let t=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&t&&!this.dom.onItemUpdateTimeTooltip){let t=document.createElement(`div`);t.className=`vis-onUpdateTime-tooltip`,e.appendChild(t),this.dom.onItemUpdateTimeTooltip=t}else !this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?`visible`:`hidden`,this.dom.onItemUpdateTimeTooltip.style.transform=`translateX(-50%)`,this.dom.onItemUpdateTimeTooltip.style.left=`50%`;let e=this.parent.itemSet.body.domProps.scrollTop,t;t=this.options.orientation.item==`top`?this.top:this.parent.height-this.top-this.height,t+this.parent.top-50<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom=``,this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top=``,this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`);let r,i;if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template){var n;i=Z(n=this.options.tooltipOnItemUpdateTime.template).call(n,this),r=i(this.data)}else r=`start: ${XR(this.data.start).format(`MM/DD/YYYY hh:mm`)}`,this.data.end&&(r+=`<br> end: ${XR(this.data.end).format(`MM/DD/YYYY hh:mm`)}`);this.dom.onItemUpdateTimeTooltip.innerHTML=$.xss(r)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(e){let t,n,r,i,a,o=this._getItemData(),s=(this.dom.box||this.dom.point).getElementsByClassName(`vis-item-visible-frame`)[0];if(this.options.visibleFrameTemplate){var c;a=Z(c=this.options.visibleFrameTemplate).call(c,this),i=$.xss(a(o,s))}else i=``;if(s){if(i instanceof Object&&!(i instanceof Element))a(o,s);else if(n=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(i),n){if(i instanceof Element)s.innerHTML=``,s.appendChild(i);else if(i!=null)s.innerHTML=$.xss(i);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=i}}if(this.options.template){var l;r=Z(l=this.options.template).call(l,this),t=r(o,e,this.data)}else t=this.data.content;if(t instanceof Object&&!(t instanceof Element))r(o,e);else if(n=this._contentToString(this.content)!==this._contentToString(t),n){if(t instanceof Element)e.innerHTML=``,e.appendChild(t);else if(t!=null)e.innerHTML=$.xss(t);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.content=t}}_updateDataAttributes(e){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let t=[];if(eL(this.options.dataAttributes))t=this.options.dataAttributes;else if(this.options.dataAttributes==`all`)t=UK(this.data);else return;for(let n of t){let t=this.data[n];t==null?e.removeAttribute(`data-${n}`):e.setAttribute(`data-${n}`,t)}}}_updateStyle(e){this.style&&=($.removeCssText(e,this.style),null),this.data.style&&($.addCssText(e,this.data.style),this.style=this.data.style)}_contentToString(e){return typeof e==`string`?e:e&&`outerHTML`in e?e.outerHTML:e}_updateEditStatus(){this.options&&(typeof this.options.editable==`boolean`?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:typeof this.options.editable==`object`&&(this.editable={},$.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.options.editable))),(!this.options||!this.options.editable||this.options.editable.overrideItems!==!0)&&this.data&&(typeof this.data.editable==`boolean`?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:typeof this.data.editable==`object`&&(this.editable={},$.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var e;return Z(e=this.options.tooltip.template).call(e,this)(this._getItemData(),this.data)}return this.data.title}};x7.prototype.stack=!0;var Gne=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={dot:{width:0,height:0},line:{width:0,height:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t,n=this.data.align||this.options.align,r=this.width*e.getMillisecondsPerPixel();return t=n==`right`?this.data.start.getTime()>e.start&&this.data.start.getTime()-r<e.end:n==`left`?this.data.start.getTime()+r>e.start&&this.data.start.getTime()<e.end:this.data.start.getTime()+r/2>e.start&&this.data.start.getTime()-r/2<e.end,t}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-line`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-dot`,this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){let t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=`vis-item vis-box${t}`,this.dom.line.className=`vis-item vis-line${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.props.dot.height=e.dot.height,this.props.dot.width=e.dot.width,this.props.line.width=e.line.width,this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom;e.box.remove?e.box.remove():e.box.parentNode&&e.box.parentNode.removeChild(e.box),e.line.remove?e.line.remove():e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.remove?e.dot.remove():e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot),this.displayed=!1}}repositionXY(){let e=this.options.rtl,t=function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=HY(r=`translate(${a}px, `).call(r,n,`px)`)};t(this.dom.box,this.boxX,this.boxY,e),t(this.dom.dot,this.dotX,this.dotY,e),t(this.dom.line,this.lineX,this.lineY,e)}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.align===void 0?this.options.align:this.data.align,n=this.props.line.width,r=this.props.dot.width;t==`right`?(this.boxX=e-this.width,this.lineX=e-n,this.dotX=e-n/2-r/2):t==`left`?(this.boxX=e,this.lineX=e,this.dotX=e+n/2-r/2):(this.boxX=e-this.width/2,this.lineX=this.options.rtl?e-n:e-n/2,this.dotX=e-r/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){let e=this.options.orientation.item,t=this.dom.line.style;if(e==`top`){let e=this.parent.top+this.top+1;this.boxY=this.top||0,t.height=`${e}px`,t.bottom=``,t.top=`0`}else{let e=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),t.height=`${e}px`,t.top=``,t.bottom=`0`}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},Kne=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t=this.width*e.getMillisecondsPerPixel();return this.data.start.getTime()+t>e.start&&this.data.start<e.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement(`div`),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement(`div`),this.dom.point.appendChild(this.dom.dot),this.dom.point[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.point.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.point.className=`vis-item vis-point${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(e){this.props.dot.width=e.dot.width,this.props.dot.height=e.dot.height,this.props.content.height=e.content.height,this.options.rtl?this.dom.content.style.marginRight=`${this.props.dot.width/2}px`:this.dom.content.style.marginLeft=`${this.props.dot.width/2}px`,this.width=e.point.width,this.height=e.point.height,this.dom.dot.style.top=`${(this.height-this.props.dot.height)/2}px`;let t=this.props.dot.width,n=this.options.rtl?t/2:t/2*-1;this.dom.dot.style.transform=`translateX(${n}px`,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}repositionXY(){let e=this.options.rtl;(function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=HY(r=`translate(${a}px, `).call(r,n,`px)`)})(this.dom.point,this.pointX,this.pointY,e)}show(e){if(!this.displayed)return this.redraw(e)}hide(){this.displayed&&=(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),!1)}repositionX(){let e=this.conversion.toScreen(this.data.start);this.pointX=e,this.options.rtl?this.right=e-this.props.dot.width:this.left=e-this.props.dot.width,this.repositionXY()}repositionY(){this.options.orientation.item==`top`?this.pointY=this.top:this.pointY=this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}},S7=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.cluster?!1:this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement(`div`),this.dom.visibleFrame.className=`vis-item-visible-frame`,this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=this.baseClassName+t,this.dom.content.style.maxWidth=`none`}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.frame).overflow!==`hidden`,this.whiteSpace=window.getComputedStyle(this.dom.content).whiteSpace!==`nowrap`,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=e.box.height,this.dom.content.style.maxWidth=``,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=Z(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom.box;e.parentNode&&e.parentNode.removeChild(e),this.displayed=!1}}repositionX(e){let t=this.parent.width,n=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),i=this.data.align===void 0?this.options.align:this.data.align,a,o;this.data.limitSize!==!1&&(e===void 0||e===!0)&&(n<-t&&(n=-t),r>2*t&&(r=2*t));let s=Math.max(Math.round((r-n)*1e3)/1e3,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=s+this.props.content.width,o=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=s,o=Math.min(r-n,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${this.right*-1}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${s}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),i){case`left`:this.dom.content.style.transform=`translateX(0)`;break;case`right`:if(this.options.rtl){let e=Math.max(s-o,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max(s-o,0)}px)`;break;case`center`:if(this.options.rtl){let e=Math.max((s-o)/2,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max((s-o)/2,0)}px)`;break;default:if(a=this.overflow?r>0?Math.max(-n,0):-o:n<0?-n:0,this.options.rtl){let e=a*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${a}px)`}}repositionY(){let e=this.options.orientation.item,t=this.dom.box;e==`top`?t.style.top=`${this.top}px`:t.style.top=`${this.parent.height-this.top-this.height}px`}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){let e=document.createElement(`div`);e.className=`vis-drag-left`,e.dragLeftItem=this,this.dom.box.appendChild(e),this.dom.dragLeft=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){let e=document.createElement(`div`);e.className=`vis-drag-right`,e.dragRightItem=this,this.dom.box.appendChild(e),this.dom.dragRight=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}};S7.prototype.baseClassName=`vis-item vis-range`;var C7=class extends x7{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);let e=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``);this.dom.box.className=this.baseClassName+e}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.content).overflow!==`hidden`,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(e){var t,n,r,i;let a,o=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=Z(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(a)}},Z(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return Q(o).call(o,t=>{e=t()}),e}}repositionY(){let e,t=this.options.orientation.item;if(this.data.subgroup!==void 0){let e=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[e].height}px`,t==`top`?this.dom.box.style.top=`${this.parent.top+this.parent.subgroups[e].top}px`:this.dom.box.style.top=`${this.parent.top+this.parent.height-this.parent.subgroups[e].top-this.parent.subgroups[e].height}px`,this.dom.box.style.bottom=``}else this.parent instanceof b7?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom=t==`bottom`?`0`:``,this.dom.box.style.top=t==`top`?`0`:``):(e=this.parent.height,this.dom.box.style.top=`${this.parent.top}px`,this.dom.box.style.bottom=``);this.dom.box.style.height=`${e}px`}};C7.prototype.baseClassName=`vis-item vis-background`,C7.prototype.stack=!1,C7.prototype.show=S7.prototype.show,C7.prototype.hide=S7.prototype.hide,C7.prototype.repositionX=S7.prototype.repositionX;var qne=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=EX(e),this.y=EX(t)}setText(e){e instanceof Element?(this.frame.innerHTML=``,this.frame.appendChild(e)):this.frame.innerHTML=$.xss(e)}show(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,n=this.frame.clientWidth,r=this.frame.parentNode.clientHeight,i=this.frame.parentNode.clientWidth,a=0,o=0;if(this.overflowMethod==`flip`||this.overflowMethod==`none`){let e=!1,r=!0;this.overflowMethod==`flip`&&(this.y-t<this.padding&&(r=!1),this.x+n>i-this.padding&&(e=!0)),a=e?this.x-n:this.x,o=r?this.y-t:this.y}else o=this.y-t,o+t+this.padding>r&&(o=r-t-this.padding),o<this.padding&&(o=this.padding),a=this.x,a+n+this.padding>i&&(a=i-n-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+`px`,this.frame.style.top=o+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},w7={},T7;function Jne(){if(T7)return w7;T7=1;var e=X(),t=kR().every;return e({target:`Array`,proto:!0,forced:!MR()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),w7}var E7,D7;function Yne(){return D7?E7:(D7=1,Jne(),E7=fL()(`Array`,`every`),E7)}var O7,k7;function Xne(){if(k7)return O7;k7=1;var e=cF(),t=Yne(),n=Array.prototype;return O7=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},O7}var A7,j7;function Zne(){return j7?A7:(j7=1,A7=Xne(),A7)}var M7,N7;function Qne(){return N7?M7:(N7=1,M7=Zne(),M7)}var $ne=eP(Qne()),P7=class e extends x7{constructor(e,t,n){let r=zJ({},{fitOnDoubleClick:!0},n,{editable:!1});if(super(e,t,r),this.props={content:{width:0,height:0}},!e||e.uiItems==null)throw Error(`Property "uiItems" missing in item `+e.id);this.id=L2(),this.group=e.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(e){this.detach(),this.data.uiItems=e,this._setupRange(),this.attach()}isVisible(e){let t=this.data.end?this.data.end-this.data.start:0,n=this.width*e.getMillisecondsPerPixel(),r=Math.max(this.data.start.getTime()+t,this.data.start.getTime()+n);return this.data.start<e.end&&r>e.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(e){var t,n,r,i,a,o,s,c=[Z(t=this._createDomElement).call(t,this),Z(n=this._appendDomElement).call(n,this),Z(r=this._updateDirtyDomComponents).call(r,this),Z(i=function(){this.dirty&&(s=this._getDomComponentsSizes())}).call(i,this),Z(a=function(){if(this.dirty){var e;Z(e=this._updateDomComponentsSizes).call(e,this)(s)}}).call(a,this),Z(o=this._repaintDomAdditionals).call(o,this)];if(e)return c;var l;return Q(c).call(c,function(e){l=e()}),l}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var e=this.dom;e.box.parentNode&&e.box.parentNode.removeChild(e.box),this.options.showStipes&&(e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot)),this.displayed=!1}}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.end?this.conversion.toScreen(this.data.end):0;if(t)this.repositionXWithRanges(e,t);else{let t=this.data.align===void 0?this.options.align:this.data.align;this.repositionXWithoutRanges(e,t)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?`block`:`none`,this.dom.dot.style.display=this._isStipeVisible()?`block`:`none`,this._isStipeVisible()&&this.repositionStype(e,t))}repositionStype(e,t){this.dom.line.style.display=`block`,this.dom.dot.style.display=`block`;let n=this.dom.line.offsetWidth,r=this.dom.dot.offsetWidth;if(t){let i=n+e+(t-e)/2,a=i-r/2,o=this.options.rtl?i*-1:i,s=this.options.rtl?a*-1:a;this.dom.line.style.transform=`translateX(${o}px)`,this.dom.dot.style.transform=`translateX(${s}px)`}else{let t=this.options.rtl?e*-1:e,n=this.options.rtl?(e-r/2)*-1:e-r/2;this.dom.line.style.transform=`translateX(${t}px)`,this.dom.dot.style.transform=`translateX(${n}px)`}}repositionXWithoutRanges(e,t){t==`right`?this.options.rtl?(this.right=e-this.width,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width,this.dom.box.style.left=this.left+`px`):t==`left`?this.options.rtl?(this.right=e,this.dom.box.style.right=this.right+`px`):(this.left=e,this.dom.box.style.left=this.left+`px`):this.options.rtl?(this.right=e-this.width/2,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width/2,this.dom.box.style.left=this.left+`px`)}repositionXWithRanges(e,t){let n=Math.round(Math.max(t-e+.5,1));this.options.rtl?this.right=e:this.left=e,this.width=Math.max(n,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+`px`:this.dom.box.style.left=this.left+`px`,this.dom.box.style.width=n+`px`}repositionY(){var e=this.options.orientation.item,t=this.dom.box;if(e==`top`?t.style.top=(this.top||0)+`px`:t.style.top=(this.parent.height-this.top-this.height||0)+`px`,this.options.showStipes){if(e==`top`)this.dom.line.style.top=`0`,this.dom.line.style.height=this.parent.top+this.top+1+`px`,this.dom.line.style.bottom=``;else{var n=this.parent.itemSet.props.height,r=n-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=n-r+`px`,this.dom.line.style.bottom=`0`}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+`px`}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var e;for(let e of this.data.uiItems)e.cluster=this;this.data.items=cK(e=this.data.uiItems).call(e,e=>e.data),this.attached=!0,this.dirty=!0}detach(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.hasItems()){for(let e of this.data.uiItems)delete e.cluster;this.attached=!1,e&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var e,t,n;let r=cK(e=this.data.uiItems).call(e,e=>({start:e.data.start.valueOf(),end:e.data.end?e.data.end.valueOf():e.data.start.valueOf()}));this.data.min=Math.min(...cK(r).call(r,e=>Math.min(e.start,e.end||e.start))),this.data.max=Math.max(...cK(r).call(r,e=>Math.max(e.start,e.end||e.start)));let i=cK(t=this.data.uiItems).call(t,e=>e.center),a=AK(i).call(i,(e,t)=>e+t,0)/this.data.uiItems.length;j3(n=this.data.uiItems).call(n,e=>e.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(a),this.data.end=null)}_getUiItems(){if(this.data.uiItems&&this.data.uiItems.length){var e;return uV(e=this.data.uiItems).call(e,e=>e.cluster===this)}return[]}_createDomElement(){if(!this.dom){if(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-cluster-line`,this.dom.line.style.display=`none`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-cluster-dot`,this.dom.dot.style.display=`none`),this.options.fitOnDoubleClick){var t;this.dom.box.ondblclick=Z(t=e.prototype._onDoubleClick).call(t,this)}this.dom.box[`vis-item`]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}let e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.baseClassName+` `+(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+` vis-readonly`;this.dom.box.className=`vis-item `+e,this.options.showStipes&&(this.dom.line.className=`vis-item vis-cluster-line `+(this.selected?` vis-selected`:``),this.dom.dot.className=`vis-item vis-cluster-dot `+(this.selected?` vis-selected`:``)),this.data.end&&(this.dom.content.style.maxWidth=`none`)}}_getDomComponentsSizes(){let e={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(e.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},e.line={width:this.dom.line.offsetWidth}),e}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.data.end?this.minWidth=e.box.width:this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){let e=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-e,fitEnd:this.data.max+e}}_fit(){if(this.emitter){let{fitStart:e,fitEnd:t}=this._getFitRange(),n={start:new Date(e),end:new Date(t),animation:!0};this.emitter.emit(`fit`,n)}}_getItemData(){return this.data}};P7.prototype.baseClassName=`vis-item vis-range vis-cluster`;var ere={UNGROUPED:`__ungrouped__`},tre=class{constructor(e){this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(e,t,n){return new P7(e,t,n)}setItems(e,t){this.items=e||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,t&&t.applyOnChangedLevel&&(this.applyOnChangedLevel=t.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(e,t,n){let{maxItems:r,clusterCriteria:i}=typeof n==`boolean`?{}:n;i||=()=>!0,r||=1;let a=-1,o=0;if(t>0){if(t>=1)return[];a=Math.abs(Math.round(Math.log(100/t)/Math.log(2))),o=Math.abs(2**a)}if(this.dataChanged){let e=a!=this.cacheLevel;(!this.applyOnChangedLevel||e)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=a;let s=this.cache[a];if(!s){s=[];for(let t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;let a=this.groups[t],c=a.length,l=0;for(;l<c;){let t=a[l],c=1,u=l-1;for(;u>=0&&t.center-a[u].center<o/2;)!a[u].cluster&&i(t.data,a[u].data)&&c++,u--;let d=l+1;for(;d<a.length&&a[d].center-t.center<o/2;)i(t.data,a[d].data)&&c++,d++;let f=s.length-1;for(;f>=0&&t.center-s[f].center<o;)t.group==s[f].group&&i(t.data,s[f].data)&&c++,f--;if(c>r){let o=c-r+1,u=[],d=l;for(;u.length<o&&d<a.length;)i(a[l].data,a[d].data)&&u.push(a[d]),d++;let f=this.itemSet.getGroupId(t.data),p=this.itemSet.groups[f]||this.itemSet.groups[ere.UNGROUPED],m=this._getClusterForItems(u,p,e,n);s.push(m),l+=o}else delete t.cluster,l+=1}}this.cache[a]=s}return s}_filterData(){let e={};this.groups=e;for(let t of iX(this.items)){let n=t.parent?t.parent.groupId:``,r=e[n];r||(r=[],e[n]=r),r.push(t),t.data.start&&(t.data.end?t.center=(t.data.start.valueOf()+t.data.end.valueOf())/2:t.center=t.data.start.valueOf())}for(let n in e){var t;Object.prototype.hasOwnProperty.call(e,n)&&e3(t=e[n]).call(t,(e,t)=>e.center-t.center)}this.dataChanged=!1}_getClusterForItems(e,t,n,r){var i;let a=cK(i=n||[]).call(i,e=>{var t;return{cluster:e,itemsIds:new f7(cK(t=e.data.uiItems).call(t,e=>e.id))}}),o;if(a.length){for(let t of a)if(t.itemsIds.size===e.length&&$ne(e).call(e,e=>t.itemsIds.has(e.id))){o=t.cluster;break}}if(o)return o.setUiItems(e),o.group!==t&&(o.group&&o.group.remove(o),t&&(t.add(o),o.group=t)),o;let s=r.titleTemplate||``,c={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=s.replace(/{count}/,e.length),u=`<div title="`+l+`">`+e.length+`</div>`,d=zJ({},r,this.itemSet.options),f={content:u,title:l,group:t,uiItems:e,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return o=this.createClusterItem(f,c,d),t&&(t.add(o),o.group=t),o.attach(),o}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}},F7=`__ungrouped__`,I7=`__background__`,L7=class e extends u4{constructor(e,t){super(),this.body=e,this.defaultOptions={type:null,orientation:{item:`bottom`},align:`auto`,stack:!0,stackSubgroups:!0,groupOrderSwap(e,t){let n=t.order;t.order=e.order,e.order=n},groupOrder:`order`,selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:K3.snap,onDropObjectOnItem(e,t,n){n(t)},onAdd(e,t){t(e)},onUpdate(e,t){t(e)},onMove(e,t){t(e)},onRemove(e,t){t(e)},onMoving(e,t){t(e)},onAddGroup(e,t){t(e)},onMoveGroup(e,t){t(e)},onRemoveGroup(e,t){t(e)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:500},tooltipOnItemUpdateTime:!1},this.options=$.extend({},this.defaultOptions),this.options.rtl=t.rtl,this.options.onTimeout=t.onTimeout,this.conversion={toScreen:e.util.toScreen,toTime:e.util.toTime},this.dom={},this.props={},this.hammer=null;let n=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(e,t){n._onAdd(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},update(e,t){n._onUpdate(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},remove(e,t){n._onRemove(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()}},this.groupListeners={add(e,t,r){if(n._onAddGroups(t.items),n.groupsData&&n.groupsData.length>0){var i;let e=n.groupsData.getDataSet();Q(i=e.get()).call(i,t=>{if(t.nestedGroups){var n;t.showNested!=0&&(t.showNested=!0);let i=[];Q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r&&(r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),i=HY(i).call(i,r))}),e.update(i,r)}})}},update(e,t){n._onUpdateGroups(t.items)},remove(e,t){n._onRemoveGroups(t.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(t),this.clusters=[]}_create(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m;let h=document.createElement(`div`);h.className=`vis-itemset`,h[`vis-itemset`]=this,this.dom.frame=h;let g=document.createElement(`div`);g.className=`vis-background`,h.appendChild(g),this.dom.background=g;let _=document.createElement(`div`);_.className=`vis-foreground`,h.appendChild(_),this.dom.foreground=_;let v=document.createElement(`div`);v.className=`vis-axis`,this.dom.axis=v;let y=document.createElement(`div`);y.className=`vis-labelset`,this.dom.labelSet=y,this._updateUngrouped();let b=new b7(I7,null,this);b.show(),this.groups[I7]=b,this.hammer=new H3(this.body.dom.centerContainer),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._onTouch(e)}),this.hammer.on(`panstart`,Z(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,Z(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,Z(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:H3.ALL}),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`tap`,Z(r=this._onSelectItem).call(r,this)),this.hammer.on(`press`,Z(i=this._onMultiSelectItem).call(i,this)),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`doubletap`,Z(a=this._onAddItem).call(a,this)),this.options.rtl?this.groupHammer=new H3(this.body.dom.rightContainer):this.groupHammer=new H3(this.body.dom.leftContainer),this.groupHammer.on(`tap`,Z(o=this._onGroupClick).call(o,this)),this.groupHammer.on(`panstart`,Z(s=this._onGroupDragStart).call(s,this)),this.groupHammer.on(`panmove`,Z(c=this._onGroupDrag).call(c,this)),this.groupHammer.on(`panend`,Z(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get(`pan`).set({threshold:5,direction:H3.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener(`mouseover`,Z(u=this._onMouseOver).call(u,this)),this.body.dom.centerContainer.addEventListener(`mouseout`,Z(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener(`mousemove`,Z(f=this._onMouseMove).call(f,this)),this.body.dom.centerContainer.addEventListener(`contextmenu`,Z(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener(`mousewheel`,Z(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(e){if(e){var t,n;$.selectiveExtend([`type`,`rtl`,`align`,`order`,`stack`,`stackSubgroups`,`selectable`,`multiselect`,`sequentialSelection`,`multiselectPerGroup`,`longSelectPressTime`,`groupOrder`,`dataAttributes`,`template`,`groupTemplate`,`visibleFrameTemplate`,`hide`,`snap`,`groupOrderSwap`,`showTooltips`,`tooltip`,`tooltipOnItemUpdateTime`,`groupHeightMode`,`onTimeout`],this.options,e),`itemsAlwaysDraggable`in e&&(typeof e.itemsAlwaysDraggable==`boolean`?(this.options.itemsAlwaysDraggable.item=e.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):typeof e.itemsAlwaysDraggable==`object`&&($.selectiveExtend([`item`,`range`],this.options.itemsAlwaysDraggable,e.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),`sequentialSelection`in e&&typeof e.sequentialSelection==`boolean`&&(this.options.sequentialSelection=e.sequentialSelection),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.item=e.orientation===`top`?`top`:`bottom`:typeof e.orientation==`object`&&`item`in e.orientation&&(this.options.orientation.item=e.orientation.item)),`margin`in e&&(typeof e.margin==`number`?(this.options.margin.axis=e.margin,this.options.margin.item.horizontal=e.margin,this.options.margin.item.vertical=e.margin):typeof e.margin==`object`&&($.selectiveExtend([`axis`],this.options.margin,e.margin),`item`in e.margin&&(typeof e.margin.item==`number`?(this.options.margin.item.horizontal=e.margin.item,this.options.margin.item.vertical=e.margin.item):typeof e.margin.item==`object`&&$.selectiveExtend([`horizontal`,`vertical`],this.options.margin.item,e.margin.item)))),Q(t=[`locale`,`locales`]).call(t,t=>{t in e&&(this.options[t]=e[t])}),`editable`in e&&(typeof e.editable==`boolean`?(this.options.editable.updateTime=e.editable,this.options.editable.updateGroup=e.editable,this.options.editable.add=e.editable,this.options.editable.remove=e.editable,this.options.editable.overrideItems=!1):typeof e.editable==`object`&&$.selectiveExtend([`updateTime`,`updateGroup`,`add`,`remove`,`overrideItems`],this.options.editable,e.editable)),`groupEditable`in e&&(typeof e.groupEditable==`boolean`?(this.options.groupEditable.order=e.groupEditable,this.options.groupEditable.add=e.groupEditable,this.options.groupEditable.remove=e.groupEditable):typeof e.groupEditable==`object`&&$.selectiveExtend([`order`,`add`,`remove`],this.options.groupEditable,e.groupEditable)),Q(n=[`onDropObjectOnItem`,`onAdd`,`onUpdate`,`onRemove`,`onMove`,`onMoving`,`onAddGroup`,`onMoveGroup`,`onRemoveGroup`]).call(n,t=>{let n=e[t];if(n){if(typeof n!=`function`){var r;throw Error(HY(r=`option ${t} must be a function `).call(r,t,`(item, callback)`))}this.options[t]=n}}),e.cluster?(zJ(this.options,{cluster:e.cluster}),this.clusterGenerator||=new tre(this),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(e){this.groupIds=[],e&&(e.refreshItems&&Q($).call($,this.items,e=>{e.dirty=!0,e.displayed&&e.redraw()}),e.restackGroups&&Q($).call($,this.groups,(e,t)=>{t!==I7&&(e.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(e){this.clearPopupTimer(),e&&(this.popupTimer=YL(function(){e.show()},this.options.tooltip.delay||typeof this.options.tooltip.delay==`number`?this.options.tooltip.delay:500))}clearPopupTimer(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(e){var t;e??=[],eL(e)||(e=[e]);let n=uV(t=this.selection).call(t,t=>HX(e).call(e,t)===-1);for(let e of n){let t=this.getItemById(e);t&&t.unselect()}this.selection=[...e];for(let t of e){let e=this.getItemById(t);e&&e.select()}}getSelection(){var e;return HY(e=this.selection).call(e,[])}getVisibleItems(){let e=this.body.range.getRange(),t,n;this.options.rtl?(t=this.body.util.toScreen(e.start),n=this.body.util.toScreen(e.end)):(n=this.body.util.toScreen(e.start),t=this.body.util.toScreen(e.end));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getItemsAtCurrentTime(e){let t,n;this.options.rtl?(t=this.body.util.toScreen(e),n=this.body.util.toScreen(e)):(n=this.body.util.toScreen(e),t=this.body.util.toScreen(e));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getVisibleGroups(){let e=[];for(let t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&this.groups[t].isVisible&&e.push(t);return e}getItemById(e){var t;return this.items[e]||n8(t=this.clusters).call(t,t=>t.id===e)}_deselect(e){let t=this.selection;for(let n=0,r=t.length;n<r;n++)if(t[n]==e){CJ(t).call(t,n,1);break}}redraw(){let e=this.options.margin,t=this.body.range,n=$.option.asSize,r=this.options,i=r.orientation.item,a=!1,o=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,o.className=`vis-itemset`,this.options.cluster&&this._clusterItems(),a=this._orderGroups()||a;let s=t.end-t.start,c=s!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=t.start!=this.lastRangeStart,u=r.stack!=this.lastStack,d=r.stackSubgroups!=this.lastStackSubgroups,f=c||l||u||d;this.lastVisibleInterval=s,this.lastRangeStart=t.start,this.lastStack=r.stack,this.lastStackSubgroups=r.stackSubgroups,this.props.lastWidth=this.props.width;let p=this._firstGroup(),m={item:e.item,axis:e.axis},h={item:e.item,axis:e.item.vertical/2},g=0,_=e.axis+e.item.vertical;this.groups[I7].redraw(t,h,f);let v={},y=0;if(Q($).call($,this.groups,(e,n)=>{if(n===I7)return;let r=e==p?m:h;v[n]=e.redraw(t,r,f,!0),y=v[n].length}),y>0){let e={};for(let t=0;t<y;t++)Q($).call($,v,(n,r)=>{e[r]=n[t]()});Q($).call($,this.groups,(t,n)=>{n!==I7&&(a=e[n]||a,g+=t.height)}),g=Math.max(g,_)}return g=Math.max(g,_),o.style.height=n(g),this.props.width=o.offsetWidth,this.props.height=g,this.dom.axis.style.top=n(i==`top`?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right=`0`:this.dom.axis.style.left=`0`,this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,a=this._isResized()||a,a}_firstGroup(){let e=this.options.orientation.item==`top`?0:this.groupIds.length-1,t=this.groupIds[e];return this.groups[t]||this.groups[F7]||null}_updateUngrouped(){let e=this.groups[F7],t,n;if(this.groupsData){if(e)for(n in e.dispose(),delete this.groups[F7],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,n))continue;t=this.items[n],t.parent&&t.parent.remove(t);let e=this.getGroupId(t.data),r=this.groups[e];r&&r.add(t)||t.hide()}}else if(!e){for(n in e=new y7(null,null,this),this.groups[F7]=e,this.items)Object.prototype.hasOwnProperty.call(this.items,n)&&(t=this.items[n],e.add(t));e.show()}}getLabelSet(){return this.dom.labelSet}setItems(e){this.itemsSettingTime=new Date;let t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(B2(e))this.itemsData=W2(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(Q($).call($,this.itemListeners,(e,t)=>{r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){let e=this.id;Q($).call($,this.itemListeners,(n,r)=>{t.itemsData.on(r,n,e)}),n=this.itemsData.getIds(),this._onAdd(n),this._updateUngrouped()}this.body.emitter.emit(`_change`,{queue:!0})}getItems(){return this.itemsData==null?null:this.itemsData.rawDS}setGroups(e){let t=this,n;if(this.groupsData&&(Q($).call($,this.groupListeners,(e,n)=>{t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(n)),!e)this.groupsData=null;else if(B2(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var r;let e=this.groupsData.getDataSet();Q(r=e.get()).call(r,t=>{if(t.nestedGroups){var n;Q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),e.update(r)})}});let i=this.id;Q($).call($,this.groupListeners,(e,n)=>{t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit(`_change`,{queue:!0})}getGroups(){return this.groupsData}removeItem(e){let t=this.itemsData.get(e);t&&this.options.onRemove(t,t=>{t&&this.itemsData.remove(e)})}_getType(e){return e.type||this.options.type||(e.end?`range`:`box`)}getGroupId(e){return this._getType(e)==`background`&&e.group==null?I7:this.groupsData?e.group:F7}_onUpdate(t){let n=this;Q(t).call(t,t=>{let r=n.itemsData.get(t),i=n.items[t],a=r?n._getType(r):null,o=e.types[a],s;if(i&&(!o||!(i instanceof o)?(s=i.selected,n._removeItem(i),i=null):n._updateItem(i,r)),!i&&r)if(o)i=new o(r,n.conversion,n.options),i.id=t,n._addItem(i),s&&(this.selection.push(t),i.select());else throw TypeError(`Unknown item type "${a}"`)}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit(`_change`,{queue:!0})}_onRemove(e){let t=0,n=this;Q(e).call(e,e=>{let r=n.items[e];r&&(t++,n._removeItem(r))}),t&&(this._order(),this.body.emitter.emit(`_change`,{queue:!0}))}_order(){Q($).call($,this.groups,e=>{e.order()})}_onUpdateGroups(e){this._onAddGroups(e)}_onAddGroups(e){let t=this;Q(e).call(e,e=>{let n=t.groupsData.get(e),r=t.groups[e];if(r)r.setData(n);else{if(e==F7||e==I7)throw Error(`Illegal group id. ${e} is a reserved id.`);let i=mZ(t.options);$.extend(i,{height:null}),r=new y7(e,n,t),t.groups[e]=r;for(let n in t.items){if(!Object.prototype.hasOwnProperty.call(t.items,n))continue;let i=t.items[n];i.data.group==e&&r.add(i)}r.order(),r.show()}}),this.body.emitter.emit(`_change`,{queue:!0})}_onRemoveGroups(e){Q(e).call(e,e=>{let t=this.groups[e];t&&(t.dispose(),delete this.groups[e])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit(`_change`,{queue:!0})}_orderGroups(){if(this.groupsData){let e=this.groupsData.getIds({order:this.options.groupOrder});e=this._orderNestedGroups(e);let t=!$.equalArray(e,this.groupIds);if(t){let t=this.groups;Q(e).call(e,e=>{t[e].hide()}),Q(e).call(e,e=>{t[e].show()}),this.groupIds=e}return t}else return!1}_orderNestedGroups(e){function t(e,n){let r=[];return Q(n).call(n,n=>{if(r.push(n),e.groupsData.get(n).nestedGroups){var i;let a=cK(i=e.groupsData.get({filter(e){return e.nestedInGroup==n},order:e.options.groupOrder})).call(i,e=>e.id);r=HY(r).call(r,t(e,a))}}),r}let n=uV(e).call(e,e=>!this.groupsData.get(e).nestedInGroup);return t(this,n)}_addItem(e){this.items[e.id]=e;let t=this.getGroupId(e.data),n=this.groups[t];n?n&&n.data&&n.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1,n&&n.add(e)}_updateItem(e,t){e.setData(t);let n=this.getGroupId(e.data),r=this.groups[n];r?r&&r.data&&r.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1}_removeItem(e){var t,n;e.hide(),delete this.items[e.id];let r=HX(t=this.selection).call(t,e.id);r!=-1&&CJ(n=this.selection).call(n,r,1),e.parent&&e.parent.remove(e),this.popup!=null&&this.popup.hide()}_constructByEndArray(e){let t=[];for(let n=0;n<e.length;n++)e[n]instanceof S7&&t.push(e[n]);return t}_onTouch(e){this.touchParams.item=this.itemFromTarget(e),this.touchParams.dragLeftItem=e.target.dragLeftItem||!1,this.touchParams.dragRightItem=e.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(e){for(let t=0;t<this.groupIds.length;t++)if(e==this.groupIds[t])return t}_onDragStart(e){if(this.touchParams.itemIsDragging)return;let t=this.touchParams.item||null,n=this,r;if(t&&(t.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup||t.editable!=null&&!t.editable.updateTime&&!t.editable.updateGroup&&!this.options.editable.overrideItems)return;let i=this.touchParams.dragLeftItem,a=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=t,i)r={item:i,initialX:e.center.x,dragLeft:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(a)r={item:a,initialX:e.center.x,dragRight:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey))this._onDragStartAddItem(e);else{this.groupIds.length<1&&this.redraw();let r=this._getGroupIndex(t.data.group),i=this.options.itemsAlwaysDraggable.item&&!t.selected?[t.id]:this.getSelection();this.touchParams.itemProps=cK(i).call(i,t=>{let i=n.items[t],a=n._getGroupIndex(i.data.group);return{item:i,initialX:e.center.x,groupOffset:r-a,data:this._cloneItemData(i.data)}})}e.stopPropagation()}else this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey)&&this._onDragStartAddItem(e)}_onDragStartAddItem(e){let t=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),r=this.options.rtl?n.right-e.center.x+10:e.center.x-n.left-10,i=this.body.util.toTime(r),a=this.body.util.getScale(),o=this.body.util.getStep(),s=t?t(i,a,o):i,c={type:`range`,start:s,end:s,content:`new item`},l=L2();c[this.itemsData.idProp]=l;let u=this.groupFromTarget(e);u&&(c.group=u.groupId);let d=new S7(c,this.conversion,this.options);d.id=l,d.data=this._cloneItemData(c),this._addItem(d),this.touchParams.selectedItem=d;let f={item:d,initialX:e.center.x,data:d.data};this.options.rtl?f.dragLeft=!0:f.dragRight=!0,this.touchParams.itemProps=[f],e.stopPropagation()}_onDrag(e){if(this.popup!=null&&this.options.showTooltips&&!this.popup.hidden){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.center.x-n.left+t.offsetLeft,e.center.y-n.top+t.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var t;e.stopPropagation();let n=this,r=this.options.snap||null,i=this.body.dom.root.offsetLeft,a=this.options.rtl?i+this.body.domProps.right.width:i+this.body.domProps.left.width,o=this.body.util.getScale(),s=this.body.util.getStep(),c=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateGroup,u=null;if(l&&c&&c.data.group!=null){let t=n.groupFromTarget(e);t&&(u=this._getGroupIndex(t.groupId))}Q(t=this.touchParams.itemProps).call(t,t=>{let i=n.body.util.toTime(e.center.x-a),d=n.body.util.toTime(t.initialX-a),f,p,m,h,g;f=this.options.rtl?-(i-d):i-d;let _=this._cloneItemData(t.item.data);if(!(t.item.editable!=null&&!t.item.editable.updateTime&&!t.item.editable.updateGroup&&!n.options.editable.overrideItems)){if((this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateTime){if(t.dragLeft)this.options.rtl?_.end!=null&&(m=$.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g):_.start!=null&&(p=$.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h);else if(t.dragRight)this.options.rtl?_.start!=null&&(p=$.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h):_.end!=null&&(m=$.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g);else if(_.start!=null)if(p=$.convert(t.data.start,`Date`).valueOf(),h=new Date(p+f),_.end!=null){m=$.convert(t.data.end,`Date`);let e=m.valueOf()-p.valueOf();_.start=r?r(h,o,s):h,_.end=new Date(_.start.valueOf()+e)}else _.start=r?r(h,o,s):h}if(l&&!t.dragLeft&&!t.dragRight&&u!=null&&_.group!=null){let e=u-t.groupOffset;e=Math.max(0,e),e=Math.min(n.groupIds.length-1,e),_.group=n.groupIds[e]}_=this._cloneItemData(_),n.options.onMoving(_,e=>{e&&t.item.setData(this._cloneItemData(e,`Date`))})}}),this.body.emitter.emit(`_change`)}}_moveToGroup(e,t){let n=this.groups[t];if(n&&n.groupId!=e.data.group){let t=e.parent;t.remove(e),t.order(),e.data.group=n.groupId,n.add(e),n.order()}}_onDragEnd(e){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){e.stopPropagation();let t=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,Q(n).call(n,e=>{let n=e.item.id;if(t.itemsData.get(n)==null)t.options.onAdd(e.item.data,n=>{t._removeItem(e.item),n&&t.itemsData.add(n),t.body.emitter.emit(`_change`)});else{let r=this._cloneItemData(e.item.data);t.options.onMove(r,r=>{r?(r[this.itemsData.idProp]=n,this.itemsData.update(r)):(e.item.setData(e.data),t.body.emitter.emit(`_change`))})}})}}_onGroupClick(e){let t=this.groupFromTarget(e);YL(()=>{this.toggleGroupShowNested(t)},1)}toggleGroupShowNested(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(!e||!e.nestedGroups)return;let n=this.groupsData.getDataSet();t==null?e.showNested=!e.showNested:e.showNested=!!t;let r=n.get(e.groupId);r.showNested=e.showNested;let i=e.nestedGroups,a=i;for(;a.length>0;){let e=a;a=[];for(let t=0;t<e.length;t++){let r=n.get(e[t]);r.nestedGroups&&(a=HY(a).call(a,r.nestedGroups))}a.length>0&&(i=HY(i).call(i,a))}var o;if(r.showNested){var s=n.get(r.nestedGroups);for(let e=0;e<s.length;e++){let t=s[e];t.nestedGroups&&t.nestedGroups.length>0&&(t.showNested==null||t.showNested==1)&&s.push(...n.get(t.nestedGroups))}o=cK(s).call(s,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}else{var c;o=cK(c=n.get(i)).call(c,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}n.update(HY(o).call(o,r)),r.showNested?($.removeClassName(e.dom.label,`collapsed`),$.addClassName(e.dom.label,`expanded`)):($.removeClassName(e.dom.label,`expanded`),$.addClassName(e.dom.label,`collapsed`))}toggleGroupDragClassName(e){e.dom.label.classList.toggle(`vis-group-is-dragging`),e.dom.foreground.classList.toggle(`vis-group-is-dragging`)}_onGroupDragStart(e){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(e),this.groupTouchParams.group&&(e.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(e){if(this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this.groupsData.getDataSet(),n=this.groupFromTarget(e);if(n&&n.height!=this.groupTouchParams.group.height){let t=n.top<this.groupTouchParams.group.top,r=e.center?e.center.y:e.clientY,i=n.dom.foreground.getBoundingClientRect(),a=this.groupTouchParams.group.height;if(t){if(i.top+a<r)return}else{let e=n.height;if(i.top+e-a>r)return}}if(n&&n!=this.groupTouchParams.group){let e=t.get(n.groupId),r=t.get(this.groupTouchParams.group.groupId);r&&e&&(this.options.groupOrderSwap(r,e,t),t.update(r),t.update(e));let i=t.getIds({order:this.options.groupOrder});if(!$.equalArray(i,this.groupTouchParams.originalOrder)){let e=this.groupTouchParams.originalOrder,n=this.groupTouchParams.group.groupId,r=Math.min(e.length,i.length),a=0,o=0,s=0;for(;a<r;){for(;a+o<r&&a+s<r&&i[a+o]==e[a+s];)a++;if(a+o>=r)break;if(i[a+o]==n)o=1;else if(e[a+s]==n)s=1;else{let n=HX(i).call(i,e[a+s]),r=t.get(i[a+o]),c=t.get(e[a+s]);this.options.groupOrderSwap(r,c,t),t.update(r),t.update(c);let l=i[a+o];i[a+o]=e[a+s],i[n]=l,a++}}}}}}_onGroupDragEnd(e){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this,n=t.groupTouchParams.group.groupId,r=t.groupsData.getDataSet(),i=$.extend({},r.get(n));t.options.onMoveGroup(i,e=>{if(e)e[r._idProp]=n,r.update(e);else{let e=r.getIds({order:t.options.groupOrder});if(!$.equalArray(e,t.groupTouchParams.originalOrder)){let n=t.groupTouchParams.originalOrder,i=Math.min(n.length,e.length),a=0;for(;a<i;){for(;a<i&&e[a]==n[a];)a++;if(a>=i)break;let o=HX(e).call(e,n[a]),s=r.get(e[a]),c=r.get(n[a]);t.options.groupOrderSwap(s,c,r),r.update(s),r.update(c);let l=e[a];e[a]=n[a],e[o]=l,a++}}}}),t.body.emitter.emit(`groupDragged`,{groupId:n}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(e){if(!this.options.selectable)return;let t=e.srcEvent&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey),n=e.srcEvent&&e.srcEvent.shiftKey;if(t||n){this._onMultiSelectItem(e);return}let r=this.getSelection(),i=this.itemFromTarget(e),a=i&&i.selectable?[i.id]:[];this.setSelection(a);let o=this.getSelection();(o.length>0||r.length>0)&&this.body.emitter.emit(`select`,{items:o,event:e})}_onMouseOver(e){let t=this.itemFromTarget(e);if(!t||t===this.itemFromRelatedTarget(e))return;let n=t.getTitle();if(this.options.showTooltips&&n){this.popup??=new qne(this.body.dom.root,this.options.tooltip.overflowMethod||`flip`),this.popup.setText(n);let t=this.body.dom.centerContainer,r=t.getBoundingClientRect();this.popup.setPosition(e.clientX-r.left+t.offsetLeft,e.clientY-r.top+t.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit(`itemover`,{item:t.id,event:e})}_onMouseOut(e){let t=this.itemFromTarget(e);t&&t!==this.itemFromRelatedTarget(e)&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit(`itemout`,{item:t.id,event:e}))}_onMouseMove(e){if(this.itemFromTarget(e)&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.clientX-n.left+t.offsetLeft,e.clientY-n.top+t.offsetTop),this.popup.show()}}_onMouseWheel(e){this.touchParams.itemIsDragging&&this._onDragEnd(e)}_onUpdateItem(e){if(!this.options.selectable||!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;let t=this;if(e){let n=t.itemsData.get(e.id);this.options.onUpdate(n,e=>{e&&t.itemsData.update(e)})}}_onDropObjectOnItem(e){let t=this.itemFromTarget(e),n=JSON.parse(e.dataTransfer.getData(`text`));this.options.onDropObjectOnItem(n,t)}_onAddItem(e){if(!this.options.selectable||!this.options.editable.add)return;let t=this,n=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),i=this.options.rtl?r.right-e.center.x:e.center.x-r.left,a=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),c,l;e.type==`drop`?(l=JSON.parse(e.dataTransfer.getData(`text`)),l.content=l.content?l.content:`new item`,l.start=l.start?l.start:n?n(a,o,s):a,l.type=l.type||`box`,l[this.itemsData.idProp]=l.id||L2(),l.type==`range`&&!l.end&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c)):(l={start:n?n(a,o,s):a,content:`new item`},l[this.itemsData.idProp]=L2(),this.options.type===`range`&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c));let u=this.groupFromTarget(e);u&&(l.group=u.groupId),l=this._cloneItemData(l),this.options.onAdd(l,n=>{n&&(t.itemsData.add(n),e.type==`drop`&&t.setSelection([n.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;let n=this.itemFromTarget(t);if(n){let r=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||this.options.sequentialSelection)&&this.options.multiselect){let t=this.itemsData.get(n.id).group,i;this.options.multiselectPerGroup&&r.length>0&&(i=this.itemsData.get(r[0]).group),(!this.options.multiselectPerGroup||i==null||i==t)&&r.push(n.id);let a=e._getItemRange(this.itemsData.get(r));if(!this.options.multiselectPerGroup||i==t){r=[];for(let e in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;let t=this.items[e],n=t.data.start,o=t.data.end===void 0?n:t.data.end;n>=a.min&&o<=a.max&&(!this.options.multiselectPerGroup||i==this.itemsData.get(t.id).group)&&!(t instanceof C7)&&r.push(t.id)}}}else{let e=HX(r).call(r,n.id);e==-1?r.push(n.id):CJ(r).call(r,e,1)}let i=uV(r).call(r,e=>this.getItemById(e).selectable);this.setSelection(i),this.body.emitter.emit(`select`,{items:this.getSelection(),event:t})}}static _getItemRange(e){let t=null,n=null;return Q(e).call(e,e=>{(n==null||e.start<n)&&(n=e.start),e.end==null?(t==null||e.start>t)&&(t=e.start):(t==null||e.end>t)&&(t=e.end)}),{min:n,max:t}}itemFromElement(e){let t=e;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-item`))return t[`vis-item`];t=t.parentNode}return null}itemFromTarget(e){return this.itemFromElement(e.target)}itemFromRelatedTarget(e){return this.itemFromElement(e.relatedTarget)}groupFromTarget(e){let t=e.center?e.center.y:e.clientY,n=this.groupIds;n.length<=0&&this.groupsData&&(n=this.groupsData.getIds({order:this.options.groupOrder}));for(let e=0;e<n.length;e++){let r=n[e],i=this.groups[r],a=i.dom.foreground,o=a.getBoundingClientRect();if(t>=o.top&&t<o.top+a.offsetHeight)return i;if(this.options.orientation.item===`top`){if(e===this.groupIds.length-1&&t>o.top)return i}else if(e===0&&t<o.top+a.offset)return i}return null}static itemSetFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-itemset`))return t[`vis-itemset`];t=t.parentNode}return null}_cloneItemData(e,t){let n=$.extend({},e);return t||=this.itemsData.type,n.start!=null&&(n.start=$.convert(n.start,t&&t.start||`Date`)),n.end!=null&&(n.end=$.convert(n.end,t&&t.end||`Date`)),n}_clusterItems(){if(!this.options.cluster)return;let{scale:e}=this.body.range.conversion(this.body.domProps.center.width),t=this.clusterGenerator.getClusters(this.clusters,e,this.options.cluster);if(this.clusters!=t){if(this._detachAllClusters(),t){for(let e of t)e.attach();this.clusters=t}this._updateClusters(t)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let e of this.clusters)e.detach()}_updateClusters(e){if(this.clusters&&this.clusters.length){var t;let i=new f7(cK(e).call(e,e=>e.id)),a=uV(t=this.clusters).call(t,e=>!i.has(e.id)),o=!1;for(let e of a){var n;let t=HX(n=this.selection).call(n,e.id);if(t!==-1){var r;e.unselect(),CJ(r=this.selection).call(r,t,1),o=!0}}if(o){let e=this.getSelection();this.body.emitter.emit(`select`,{items:e,event})}}this.clusters=e||[]}};L7.types={background:C7,box:Gne,range:S7,point:Kne},L7.prototype._onAdd=L7.prototype._onUpdate;var R7=!1,z7,B7=`background: #FFeeee; color: #dd0000`,V7=class e{constructor(){}static validate(t,n,r){R7=!1,z7=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),R7}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.log(`%c`+n+e.printLocation(o,t),B7)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(UK(a))+`. Received [`+c+`] "`+n[t]+`"`),R7=!0):e.getType(l)===`array`&&HX(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),R7=!0):c===`object`&&i!==`__any__`&&(o=$.copyAndExtendArray(o,t),e.parse(n[t],r[i],o))}static getType(e){var t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:eL(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,z7,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(UK(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?--`,console.log(`%cUnknown option detected: "`+t+`"`+o,B7),R7=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){if(!Object.prototype.hasOwnProperty.call(n,d))continue;let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],$.copyAndExtendArray(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;HX(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=$.copyArray(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`--`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:-`)+`options = {-`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {-`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`-`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}-`}return n+`--`}static print(e){return IZ(e).replace(/(\")|(\[)|(\])|(,"__type__")/g,``).replace(/(\,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];var i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},H7=`string`,U7=`boolean`,W7=`number`,G7=`array`,K7=`date`,q7=`object`,nre=`dom`,J7=`moment`,Y7=`any`,rre={configure:{enabled:{boolean:U7},filter:{boolean:U7,function:`function`},container:{dom:nre},__type__:{object:q7,boolean:U7,function:`function`}},align:{string:H7},alignCurrentTime:{string:H7,undefined:`undefined`},rtl:{boolean:U7,undefined:`undefined`},rollingMode:{follow:{boolean:U7},offset:{number:W7,undefined:`undefined`},__type__:{object:q7}},onTimeout:{timeoutMs:{number:W7},callback:{function:`function`},__type__:{object:q7}},verticalScroll:{boolean:U7,undefined:`undefined`},horizontalScroll:{boolean:U7,undefined:`undefined`},horizontalScrollKey:{string:H7,undefined:`undefined`},horizontalScrollInvert:{boolean:U7,undefined:`undefined`},autoResize:{boolean:U7},throttleRedraw:{number:W7},clickToUse:{boolean:U7},dataAttributes:{string:H7,array:G7},editable:{add:{boolean:U7,undefined:`undefined`},remove:{boolean:U7,undefined:`undefined`},updateGroup:{boolean:U7,undefined:`undefined`},updateTime:{boolean:U7,undefined:`undefined`},overrideItems:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},end:{number:W7,date:K7,string:H7,moment:J7},format:{minorLabels:{millisecond:{string:H7,undefined:`undefined`},second:{string:H7,undefined:`undefined`},minute:{string:H7,undefined:`undefined`},hour:{string:H7,undefined:`undefined`},weekday:{string:H7,undefined:`undefined`},day:{string:H7,undefined:`undefined`},week:{string:H7,undefined:`undefined`},month:{string:H7,undefined:`undefined`},year:{string:H7,undefined:`undefined`},__type__:{object:q7,function:`function`}},majorLabels:{millisecond:{string:H7,undefined:`undefined`},second:{string:H7,undefined:`undefined`},minute:{string:H7,undefined:`undefined`},hour:{string:H7,undefined:`undefined`},weekday:{string:H7,undefined:`undefined`},day:{string:H7,undefined:`undefined`},week:{string:H7,undefined:`undefined`},month:{string:H7,undefined:`undefined`},year:{string:H7,undefined:`undefined`},__type__:{object:q7,function:`function`}},__type__:{object:q7}},moment:{function:`function`},groupHeightMode:{string:H7},groupOrder:{string:H7,function:`function`},groupEditable:{add:{boolean:U7,undefined:`undefined`},remove:{boolean:U7,undefined:`undefined`},order:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},groupOrderSwap:{function:`function`},height:{string:H7,number:W7},hiddenDates:{start:{date:K7,number:W7,string:H7,moment:J7},end:{date:K7,number:W7,string:H7,moment:J7},repeat:{string:H7},__type__:{object:q7,array:G7}},itemsAlwaysDraggable:{item:{boolean:U7,undefined:`undefined`},range:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},limitSize:{boolean:U7},locale:{string:H7},locales:{__any__:{any:Y7},__type__:{object:q7}},longSelectPressTime:{number:W7},margin:{axis:{number:W7},item:{horizontal:{number:W7,undefined:`undefined`},vertical:{number:W7,undefined:`undefined`},__type__:{object:q7,number:W7}},__type__:{object:q7,number:W7}},max:{date:K7,number:W7,string:H7,moment:J7},maxHeight:{number:W7,string:H7},maxMinorChars:{number:W7},min:{date:K7,number:W7,string:H7,moment:J7},minHeight:{number:W7,string:H7},moveable:{boolean:U7},multiselect:{boolean:U7},multiselectPerGroup:{boolean:U7},onAdd:{function:`function`},onDropObjectOnItem:{function:`function`},onUpdate:{function:`function`},onMove:{function:`function`},onMoving:{function:`function`},onRemove:{function:`function`},onAddGroup:{function:`function`},onMoveGroup:{function:`function`},onRemoveGroup:{function:`function`},onInitialDrawComplete:{function:`function`},order:{function:`function`},orientation:{axis:{string:H7,undefined:`undefined`},item:{string:H7,undefined:`undefined`},__type__:{string:H7,object:q7}},selectable:{boolean:U7},sequentialSelection:{boolean:U7},showCurrentTime:{boolean:U7},showMajorLabels:{boolean:U7},showMinorLabels:{boolean:U7},showWeekScale:{boolean:U7},stack:{boolean:U7},stackSubgroups:{boolean:U7},cluster:{maxItems:{number:W7,undefined:`undefined`},titleTemplate:{string:H7,undefined:`undefined`},clusterCriteria:{function:`function`,undefined:`undefined`},showStipes:{boolean:U7,undefined:`undefined`},fitOnDoubleClick:{boolean:U7,undefined:`undefined`},__type__:{boolean:U7,object:q7}},snap:{function:`function`,null:`null`},start:{date:K7,number:W7,string:H7,moment:J7},template:{function:`function`},loadingScreenTemplate:{function:`function`},groupTemplate:{function:`function`},visibleFrameTemplate:{string:H7,function:`function`},showTooltips:{boolean:U7},tooltip:{followMouse:{boolean:U7},overflowMethod:{string:[`cap`,`flip`,`none`]},delay:{number:W7},template:{function:`function`},__type__:{object:q7}},tooltipOnItemUpdateTime:{template:{function:`function`},__type__:{boolean:U7,object:q7}},timeAxis:{scale:{string:H7,undefined:`undefined`},step:{number:W7,undefined:`undefined`},__type__:{object:q7}},type:{string:H7},width:{string:H7,number:W7},preferZoom:{boolean:U7},zoomable:{boolean:U7},zoomKey:{string:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``]},zoomFriction:{number:W7},zoomMax:{number:W7},zoomMin:{number:W7},xss:{disabled:{boolean:U7},filterOptions:{__any__:{any:Y7},__type__:{object:q7}},__type__:{object:q7}},__type__:{object:q7}},ire={global:{align:[`center`,`left`,`right`],alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}},groupHeightMode:[`auto`,`fixed`,`fitItems`],groupsDraggable:!1,height:``,locale:``,longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:[`both`,`bottom`,`top`],item:[`bottom`,`top`]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:``,showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:[`box`,`point`,`range`,`background`],width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},are={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},ore=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return are[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n;var r=this._isColorString(e);if(r!==void 0&&(e=r),$.isString(e)===!0){if($.isValidRGB(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if($.isValidRGBA(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if($.isValidHex(e)===!0){let t=$.hexToRGB(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+IZ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=$.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,YL(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=$.extend({},e)),this.color=e;let t=$.RGBToHSV(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=$.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=$.HSVToRGB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=$.RGBToHSV(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),tQ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerHTML=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerHTML=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerHTML=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerHTML=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerHTML=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerHTML=`cancel`,this.cancelButton.onclick=Z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerHTML=`apply`,this.applyButton.onclick=Z(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerHTML=`save`,this.saveButton.onclick=Z(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerHTML=`load last`,this.loadButton.onclick=Z(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new H3(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),U3(this.hammer,e=>{this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=$.HSVToRGB(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=$.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=$.HSVToRGB(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}},X7=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},$.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ore(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(eL(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),uV(e)!==void 0&&(this.options.filter=uV(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);uV(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=uV(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||HX(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return Q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerHTML=$.xss(e),this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);return r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0?r.innerHTML=$.xss(`<i><b>`+e+`:</b></i>`):r.innerHTML=$.xss(e+`:`),r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&HX(e).call(e,t)!==-1&&(i=HX(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerHTML=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=Number(s.value);var d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerHTML=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerHTML=$.xss(e),n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=YL(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=YL(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){var r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){var r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=uV(this.options),a=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r=!0;let s=e[o],c=$.copyAndExtendArray(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!eL(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(eL(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){let e=!0;if(HX(t).call(t,`physics`)!==-1&&this.moduleOptions.physics.solver!==o&&(e=!1),e===!0)if(s.enabled!==void 0){let e=$.copyAndExtendArray(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();this.optionsContainer.innerHTML=`<pre>var options = `+IZ(e,null,2)+`</pre>`}getOptions(){let e={};for(var t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},sre=class e extends z6{constructor(t,n,r,i){var a,o,s,c,l,u,d;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);if(!(eL(r)||B2(r))&&r instanceof Object){let e=i;i=r,r=e}i&&i.throttleRedraw&&console.warn(`Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);let f=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:`bottom`,item:`bottom`},moment:XR},this.options=$.deepExtend({},this.defaultOptions),i&&$.setupXSSProtection(i.xss),this._create(t),!i||i&&i.rtl===void 0){this.dom.root.style.visibility=`hidden`;let e,t=this.dom.root;for(;!e&&t;)e=window.getComputedStyle(t,null).direction,t=t.parentElement;this.options.rtl=e&&e.toLowerCase()==`rtl`}else this.options.rtl=i.rtl;i&&(i.rollingMode&&(this.options.rollingMode=i.rollingMode),i.onInitialDrawComplete&&(this.options.onInitialDrawComplete=i.onInitialDrawComplete),i.onTimeout&&(this.options.onTimeout=i.onTimeout),i.loadingScreenTemplate&&(this.options.loadingScreenTemplate=i.loadingScreenTemplate));let p=document.createElement(`div`);if(this.options.loadingScreenTemplate){var m;let e=Z(m=this.options.loadingScreenTemplate).call(m,this),t=e(this.dom.loadingScreen);t instanceof Object&&!(t instanceof Element)?e(p):t instanceof Element?(p.innerHTML=``,p.appendChild(t)):t!=null&&(p.innerHTML=$.xss(t))}this.dom.loadingScreen.appendChild(p),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Z(a=this.on).call(a,this),off:Z(o=this.off).call(o,this),emit:Z(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:Z(c=f._toScreen).call(c,f),toGlobalScreen:Z(l=f._toGlobalScreen).call(l,f),toTime:Z(u=f._toTime).call(u,f),toGlobalTime:Z(d=f._toGlobalTime).call(d,f)}},this.range=new m3(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new q3(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new B6(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new L7(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null;function h(e,t){f.hasListeners(e)&&f.emit(e,f.getEventProperties(t))}this.dom.root.onclick=e=>h(`click`,e),this.dom.root.ondblclick=e=>h(`doubleClick`,e),this.dom.root.oncontextmenu=e=>h(`contextmenu`,e),this.dom.root.onmouseover=e=>h(`mouseOver`,e),window.PointerEvent?(this.dom.root.onpointerdown=e=>h(`mouseDown`,e),this.dom.root.onpointermove=e=>h(`mouseMove`,e),this.dom.root.onpointerup=e=>h(`mouseUp`,e)):(this.dom.root.onmousemove=e=>h(`mouseMove`,e),this.dom.root.onmousedown=e=>h(`mouseDown`,e),this.dom.root.onmouseup=e=>h(`mouseUp`,e)),this.initialFitDone=!1,this.on(`changed`,()=>{if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();let t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.itemSet.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&YL(()=>f.options.onInitialDrawComplete(),0))}}),this.on(`destroyTimeline`,()=>{f.destroy()}),i&&this.setOptions(i),this.body.emitter.on(`fit`,e=>{this._onFit(e),this.redraw()}),r&&this.setGroups(r),n&&this.setItems(n),this._redraw()}_createConfigurator(){return new X7(this,this.dom.container,ire)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(e){if(V7.validate(e,rre)===!0&&console.log(`%cErrors have been found in the supplied options object.`,B7),z6.prototype.setOptions.call(this,e),`type`in e&&e.type!==this.options.type){this.options.type=e.type;let t=this.itemsData;if(t){let e=this.getSelection();this.setItems(null),this.setItems(t.rawDS),this.setSelection(e)}}}setItems(e){this.itemsDone=!1;let t;t=e?B2(e)?W2(e):W2(new wD(e)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=t,this.itemSet&&this.itemSet.setItems(t==null?null:t.rawDS)}setGroups(e){let t;e?(eL(e)&&(e=new wD(e)),t=new Ste(e,{filter:e=>e.visible!==!1})):t=null,this.groupsData!=null&&typeof this.groupsData.setData==`function`&&this.groupsData.setData(null),this.groupsData=t,this.itemSet.setGroups(t)}setData(e){e&&e.groups&&this.setGroups(e.groups),e&&e.items&&this.setItems(e.items)}setSelection(e,t){this.itemSet&&this.itemSet.setSelection(e),t&&t.focus&&this.focus(e,t)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(e,t){if(!this.itemsData||e==null)return;let n=eL(e)?e:[e],r=this.itemsData.get(n),i=null,a=null;if(Q(r).call(r,e=>{let t=e.start.valueOf(),n=`end`in e?e.end.valueOf():e.start.valueOf();(i===null||t<i)&&(i=t),(a===null||n>a)&&(a=n)}),i!==null&&a!==null){let e=this,r=this.itemSet.items[n[0]],o=this._getScrollTop()*-1,s=null,c=(t,n,i)=>{let a=$7(e,r);if(a===!1||(s||=a,s.itemTop==a.itemTop&&!s.shouldScroll))return;s.itemTop!=a.itemTop&&a.shouldScroll&&(s=a,o=e._getScrollTop()*-1);let c=o,l=s.scrollOffset,u=i?l:c+(l-c)*t;e._setScrollTop(-u),n||e._redraw()},l=()=>{let t=$7(e,r);t.shouldScroll&&t.itemTop!=s.itemTop&&(e._setScrollTop(-t.scrollOffset),e._redraw())},u=()=>{l(),YL(l,100)},d=t&&t.zoom!==void 0?t.zoom:!0,f=(i+a)/2,p=d?(a-i)*1.1:Math.max(this.range.end-this.range.start,(a-i)*1.1),m=t&&t.animation!==void 0?t.animation:!0;m||(s={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(f-p/2,f+p/2,{animation:m},u,c)}}fit(e,t){let n=e&&e.animation!==void 0?e.animation:!0,r;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(r=this.getDataRange(),this.moveTo(r.min.valueOf(),{animation:n},t)):(r=this.getItemRange(),this.range.setRange(r.min,r.max,{animation:n},t))}getItemRange(){let e=this.getDataRange(),t=e.min===null?null:e.min.valueOf(),n=e.max===null?null:e.max.valueOf(),r=null,i=null;if(t!=null&&n!=null){let e=n-t;e<=0&&(e=10);let a=e/this.props.center.width,o={},s=0;if(Q($).call($,this.itemSet.items,(e,t)=>{e.groupShowing&&(o[t]=e.redraw(!0),s=o[t].length)}),s>0)for(let e=0;e<s;e++)Q($).call($,o,t=>{t[e]()});if(Q($).call($,this.itemSet.items,e=>{let o=Z7(e),s=Q7(e),c,l;this.options.rtl?(c=o-(e.getWidthRight()+10)*a,l=s+(e.getWidthLeft()+10)*a):(c=o-(e.getWidthLeft()+10)*a,l=s+(e.getWidthRight()+10)*a),c<t&&(t=c,r=e),l>n&&(n=l,i=e)}),r&&i){let a=r.getWidthLeft()+10,o=i.getWidthRight()+10,s=this.props.center.width-a-o;s>0&&(this.options.rtl?(t=Z7(r)-o*e/s,n=Q7(i)+a*e/s):(t=Z7(r)-a*e/s,n=Q7(i)+o*e/s))}}return{min:t==null?null:new Date(t),max:n==null?null:new Date(n)}}getDataRange(){let e=null,t=null;if(this.itemsData){var n;Q(n=this.itemsData).call(n,n=>{let r=$.convert(n.start,`Date`).valueOf(),i=$.convert(n.end==null?n.start:n.end,`Date`).valueOf();(e===null||r<e)&&(e=r),(t===null||i>t)&&(t=i)})}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}}getEventProperties(e){let t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=this.dom.centerContainer.getBoundingClientRect(),i=this.options.rtl?r.right-t:t-r.left,a=n-r.top,o=this.itemSet.itemFromTarget(e),s=this.itemSet.groupFromTarget(e),c=R6.customTimeFromTarget(e),l=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),f=this._toTime(i),p=l?l(f,u,d):f,m=$.getTarget(e),h=null;return o==null?c==null?$.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&$.hasParent(m,this.timeAxis2.dom.foreground)?h=`axis`:$.hasParent(m,this.itemSet.dom.labelSet)?h=`group-label`:$.hasParent(m,this.currentTime.bar)?h=`current-time`:$.hasParent(m,this.dom.center)&&(h=`background`):h=`custom-time`:h=`item`,{event:e,item:o?o.id:null,isCluster:o?!!o.isCluster:!1,items:o?o.items||[]:null,group:s?s.groupId:null,customTime:c?c.options.id:null,what:h,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:i,y:a,time:f,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode??this.setOptions(this.options),this.range.startRolling())}_redraw(){z6.prototype._redraw.call(this)}_onFit(e){let{start:t,end:n,animation:r}=e;n?this.range.setRange(t,n,{animation:r}):this.moveTo(t.valueOf(),{animation:r})}};function Z7(e){return $.convert(e.data.start,`Date`).valueOf()}function Q7(e){let t=e.data.end==null?e.data.start:e.data.end;return $.convert(t,`Date`).valueOf()}function $7(e,t){if(!t.parent)return!1;let n=e.options.rtl?e.props.rightContainer.height:e.props.leftContainer.height,r=e.props.center.height,i=t.parent,a=i.top,o=!0,s=e.timeAxis.options.orientation.axis,c=()=>s==`bottom`?i.height-t.top-t.height:t.top,l=e._getScrollTop()*-1,u=a+c(),d=t.height;return u<l?a+n<=a+c()+d&&(a+=c()-e.itemSet.options.margin.item.vertical):u+d>l+n?a+=c()+d-n+e.itemSet.options.margin.item.vertical:o=!1,a=Math.min(a,r-n),{shouldScroll:o,scrollOffset:a,itemTop:u}}function e9(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].redundant=e[t].used,e[t].used=[])}function t9(e){for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;let r=e[t];for(var n=0;n<r.redundant.length;n++)r.redundant[n].parentNode.removeChild(r.redundant[n]);r.redundant=[]}}function cre(e){e9(e),t9(e),e9(e)}function n9(e,t,n){var r;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(r=t[e].redundant[0],t[e].redundant.shift()):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),n.appendChild(r)):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),t[e]={used:[],redundant:[]},n.appendChild(r)),t[e].used.push(r),r}function r9(e,t,n,r){var i;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(i=t[e].redundant[0],t[e].redundant.shift()):(i=document.createElement(e),n.appendChild(i)):(i=document.createElement(e),t[e]={used:[],redundant:[]},n.appendChild(i)),t[e].used.push(i),i}function i9(e,t,n,r,i,a){var o;if(n.style==`circle`?(o=n9(`circle`,r,i),o.setAttributeNS(null,`cx`,e),o.setAttributeNS(null,`cy`,t),o.setAttributeNS(null,`r`,.5*n.size)):(o=n9(`rect`,r,i),o.setAttributeNS(null,`x`,e-.5*n.size),o.setAttributeNS(null,`y`,t-.5*n.size),o.setAttributeNS(null,`width`,n.size),o.setAttributeNS(null,`height`,n.size)),n.styles!==void 0&&o.setAttributeNS(null,`style`,n.styles),o.setAttributeNS(null,`class`,n.className+` vis-point`),a){var s=n9(`text`,r,i);a.xOffset&&(e+=a.xOffset),a.yOffset&&(t+=a.yOffset),a.content&&(s.textContent=a.content),a.className&&s.setAttributeNS(null,`class`,a.className+` vis-label`),s.setAttributeNS(null,`x`,e),s.setAttributeNS(null,`y`,t)}return o}function a9(e,t,n,r,i,a,o,s){if(r!=0){r<0&&(r*=-1,t-=r);var c=n9(`rect`,a,o);c.setAttributeNS(null,`x`,e-.5*n),c.setAttributeNS(null,`y`,t),c.setAttributeNS(null,`width`,n),c.setAttributeNS(null,`height`,r),c.setAttributeNS(null,`class`,i),s&&c.setAttributeNS(null,`style`,s)}}function lre(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||`en`:`en`}catch{return`en`}}var ure=class{constructor(e,t,n,r,i,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=i,this.majorCharHeight=a,this._start=e,this._end=t,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=o,this.autoScaleStart=n,this.autoScaleEnd=r,this.formattingFunction=s,n||r){let e=this,t=t=>{let n=t-t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx]);return t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx])>.5*(e.magnitudefactor*e.minorSteps[e.minorStepIdx])?n+e.magnitudefactor*e.minorSteps[e.minorStepIdx]:n};n&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=t(this._start)),r&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=t(this._end)),this.determineScale()}}setCharHeight(e){this.majorCharHeight=e}setHeight(e){this.containerHeight=e}determineScale(){let e=this._end-this._start;this.scale=this.containerHeight/e;let t=this.majorCharHeight/this.scale,n=e>0?Math.round(Math.log(e)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=10**n;let r=0;n<0&&(r=n);let i=!1;for(let e=r;Math.abs(e)<=Math.abs(n);e++){this.magnitudefactor=10**e;for(let e=0;e<this.minorSteps.length;e++)if(this.magnitudefactor*this.minorSteps[e]>=t){i=!0,this.minorStepIdx=e;break}if(i===!0)break}}is_major(e){return e%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){let e=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(e-this._start%e)%e)}formatValue(e){let t=e.toPrecision(5);return typeof this.formattingFunction==`function`&&(t=this.formattingFunction(e)),typeof t==`number`?`${t}`:typeof t==`string`?t:e.toPrecision(5)}getLines(){let e=[],t=this.getStep(),n=(t-this._start%t)%t;for(let r=this._start+n;this._end-r>1e-5;r+=t)r!=this._start&&e.push({major:this.is_major(r),y:this.convertValue(r),val:this.formatValue(r)});return e}followScale(e){let t=this.minorStepIdx,n=this._start,r=this._end,i=this,a=()=>{i.magnitudefactor*=2},o=()=>{i.magnitudefactor/=2};e.minorStepIdx<=1&&this.minorStepIdx<=1||e.minorStepIdx>1&&this.minorStepIdx>1||(e.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,t==2||a(),a()):(this.minorStepIdx=2,t==1||o(),o()));let s=e.convertValue(0),c=e.getStep()*e.scale,l=!1,u=0;for(;!l&&u++<5;){this.scale=c/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);let t=this.containerHeight/this.scale;this._start=n,this._end=this._start+t;let i=this._end*this.scale,u=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=this.getFirstMajor()-e.getFirstMajor();if(this.zeroAlign){let e=s-i;this._end+=e/this.scale,this._start=this._end-t}else this.autoScaleStart?(this._start-=d/this.scale,this._end=this._start+t):(this._start+=u-d/this.scale,this._end=this._start+t);if(!this.autoScaleEnd&&this._end>r+1e-5){o(),l=!1;continue}if(!this.autoScaleStart&&this._start<n-1e-5)if(this.zeroAlign&&n>=0)console.warn(`Can't adhere to given 'min' range, due to zeroalign`);else{o(),l=!1;continue}if(this.autoScaleStart&&this.autoScaleEnd&&t<r-n){a(),l=!1;continue}l=!0}}convertValue(e){return this.containerHeight-(e-this._start)*this.scale}screenToValue(e){return(this.containerHeight-e)/this.scale+this._start}},o9=class extends u4{constructor(e,t,n,r){super(),this.id=L2(),this.body=e,this.defaultOptions={orientation:`left`,showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:`40px`,visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format(e){return`${l4(e.toPrecision(3))}`},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format(e){return`${l4(e.toPrecision(3))}`},title:{text:void 0,style:void 0}}},this.linegraphOptions=r,this.linegraphSVG=n,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=$.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(t),this.width=Number(`${this.options.width}`.replace(`px`,``)),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),this.scale??this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};let i=this;this.body.emitter.on(`verticalDrag`,()=>{i.dom.lineContainer.style.top=`${i.body.domProps.scrollTop}px`})}addGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1}updateGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.amountOfGroups+=1),this.groups[e]=t}removeGroup(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)}setOptions(e){if(e){let t=!1;this.options.orientation!=e.orientation&&e.orientation!==void 0&&(t=!0),$.selectiveDeepExtend([`orientation`,`showMinorLabels`,`showMajorLabels`,`icons`,`majorLinesOffset`,`minorLinesOffset`,`labelOffsetX`,`labelOffsetY`,`iconWidth`,`width`,`visible`,`left`,`right`,`alignZeros`],this.options,e),this.minWidth=Number(`${this.options.width}`.replace(`px`,``)),t===!0&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement(`div`),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement(`div`),this.dom.lineContainer.style.width=`100%`,this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position=`relative`,this.dom.lineContainer.style.visibility=`visible`,this.dom.lineContainer.style.display=`block`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.height=`100%`,this.svg.style.width=`100%`,this.svg.style.display=`block`,this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){e9(this.svgElements);let e,t=this.options.iconWidth,n=11.5;e=this.options.orientation===`left`?4:this.width-t-4;let r=UK(this.groups);e3(r).call(r,(e,t)=>e<t?-1:1);for(let i of r)this.groups[i].visible===!0&&(this.linegraphOptions.visibility[i]===void 0||this.linegraphOptions.visibility[i]===!0)&&(this.groups[i].getLegend(t,15,this.framework,e,n),n+=19);t9(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){this.iconsRemoved===!1&&(e9(this.svgElements),t9(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||(this.options.orientation===`left`?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display=`block`}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display=`none`}setRange(e,t){this.range.start=e,this.range.end=t}redraw(){let e=!1,t=0;this.dom.lineContainer.style.top=`${this.body.domProps.scrollTop}px`;for(let e in this.groups)Object.prototype.hasOwnProperty.call(this.groups,e)&&this.groups[e].visible===!0&&(this.linegraphOptions.visibility[e]===void 0||this.linegraphOptions.visibility[e]===!0)&&t++;if(this.amountOfGroups===0||t===0)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace(`px`,``)),this.dom.lineContainer.style.height=`${this.height}px`,this.width=this.options.visible===!0?Number(`${this.options.width}`.replace(`px`,``)):0;let t=this.props,n=this.dom.frame;n.className=`vis-data-axis`,this._calculateCharSize();let r=this.options.orientation,i=this.options.showMinorLabels,a=this.options.showMajorLabels,o=this.body.dom.backgroundHorizontal.offsetWidth;t.minorLabelHeight=i?t.minorCharHeight:0,t.majorLabelHeight=a?t.majorCharHeight:0,t.minorLineWidth=o-this.lineOffset-this.width+2*this.options.minorLinesOffset,t.minorLineHeight=1,t.majorLineWidth=o-this.lineOffset-this.width+2*this.options.majorLinesOffset,t.majorLineHeight=1,r===`left`?(n.style.top=`0`,n.style.left=`0`,n.style.bottom=``,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top=``,n.style.bottom=`0`,n.style.left=`0`,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),e=this._redrawLabels(),e=this._isResized()||e,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return e}_redrawLabels(){let e=!1;e9(this.DOMelements.lines),e9(this.DOMelements.labels);let t=this.options.orientation,n=this.options[t].range==null?{}:this.options[t].range,r=!0;n.max!=null&&(this.range.end=n.max,r=!1);let i=!0;n.min!=null&&(this.range.start=n.min,i=!1),this.scale=new ure(this.range.start,this.range.end,i,r,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[t].format),this.master===!1&&this.masterAxis!=null?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display=`none`):this.dom.lineContainer.style.display=`block`,this.maxLabelSize=0;let a=this.scale.getLines();Q(a).call(a,e=>{let n=e.y,r=e.major;this.options.showMinorLabels&&r===!1&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-minor`,this.props.minorCharHeight),r&&n>=0&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-major`,this.props.majorCharHeight),this.master===!0&&(r?this._redrawLine(n,t,`vis-grid vis-horizontal vis-major`,this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(n,t,`vis-grid vis-horizontal vis-minor`,this.options.minorLinesOffset,this.props.minorLineWidth))});let o=0;this.options[t].title!==void 0&&this.options[t].title.text!==void 0&&(o=this.props.titleCharHeight);let s=this.options.icons===!0?Math.max(this.options.iconWidth,o)+this.options.labelOffsetX+15:o+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-s&&this.options.visible===!0?(this.width=this.maxLabelSize+s,this.options.width=`${this.width}px`,t9(this.DOMelements.lines),t9(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-s&&this.options.visible===!0&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+s),this.options.width=`${this.width}px`,t9(this.DOMelements.lines),t9(this.DOMelements.labels),this.redraw(),e=!0):(t9(this.DOMelements.lines),t9(this.DOMelements.labels),e=!1),e}convertValue(e){return this.scale.convertValue(e)}screenToValue(e){return this.scale.screenToValue(e)}_redrawLabel(e,t,n,r,i){let a=r9(`div`,this.DOMelements.labels,this.dom.frame);a.className=r,a.innerHTML=$.xss(t),n===`left`?(a.style.left=`-${this.options.labelOffsetX}px`,a.style.textAlign=`right`):(a.style.right=`-${this.options.labelOffsetX}px`,a.style.textAlign=`left`),a.style.top=`${e-.5*i+this.options.labelOffsetY}px`,t+=``;let o=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<t.length*o&&(this.maxLabelSize=t.length*o)}_redrawLine(e,t,n,r,i){if(this.master===!0){let a=r9(`div`,this.DOMelements.lines,this.dom.lineContainer);a.className=n,a.innerHTML=``,t===`left`?a.style.left=`${this.width-r}px`:a.style.right=`${this.width-r}px`,a.style.width=`${i}px`,a.style.top=`${e}px`}}_redrawTitle(e){if(e9(this.DOMelements.title),this.options[e].title!==void 0&&this.options[e].title.text!==void 0){let t=r9(`div`,this.DOMelements.title,this.dom.frame);t.className=`vis-y-axis vis-title vis-${e}`,t.innerHTML=$.xss(this.options[e].title.text),this.options[e].title.style!==void 0&&$.addCssText(t,this.options[e].title.style),e===`left`?t.style.left=`${this.props.titleCharHeight}px`:t.style.right=`${this.props.titleCharHeight}px`,t.style.width=`${this.height}px`}t9(this.DOMelements.title)}_calculateCharSize(){if(!(`minorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-minor vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.minorCharHeight=t.clientHeight,this.props.minorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`majorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-major vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.majorCharHeight=t.clientHeight,this.props.majorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`titleCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-title vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.titleCharHeight=t.clientHeight,this.props.titleCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}}};function s9(){}s9.draw=function(e,t,n,r){r||=0;for(var i=dre(n,t),a=0;a<e.length;a++)if(!i)i9(e[a].screen_x+r,e[a].screen_y,c9(t),n.svgElements,n.svg,e[a].label);else{var o=i(e[a],t);(o===!0||typeof o==`object`)&&i9(e[a].screen_x+r,e[a].screen_y,c9(t,o),n.svgElements,n.svg,e[a].label)}},s9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=n9(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`),i9(t+.5*r,n,c9(e),a.svgElements,a.svg)};function c9(e,t){return t=t===void 0?{}:t,{style:t.style||e.options.drawPoints.style,styles:t.styles||e.options.drawPoints.styles,size:t.size||e.options.drawPoints.size,className:t.className||e.className}}function dre(e,t){var n=void 0;return e.options&&e.options.drawPoints&&e.options.drawPoints.onRender&&typeof e.options.drawPoints.onRender==`function`&&(n=e.options.drawPoints.onRender),t.group.options&&t.group.options.drawPoints&&t.group.options.drawPoints.onRender&&typeof t.group.options.drawPoints.onRender==`function`&&(n=t.group.options.drawPoints.onRender),n}function l9(){}l9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=n9(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`);var c=Math.round(.3*r),l=e.options.barChart.width/c,u=Math.round(.4*i),d=Math.round(.75*i),f=Math.round((r-2*c)/3);if(a9(t+.5*c+f,n+o-u-1,c,u,e.className+` vis-bar`,a.svgElements,a.svg,e.style),a9(t+1.5*c+f+2,n+o-d-1,c,d,e.className+` vis-bar`,a.svgElements,a.svg,e.style),e.options.drawPoints.enabled==1){var p={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size/l,className:e.className};i9(t+.5*c+f,n+o-u-1,p,a.svgElements,a.svg),i9(t+1.5*c+f+2,n+o-d-1,p,a.svgElements,a.svg)}},l9.draw=function(e,t,n){var r=[],i={},a,o,s,c,l,u,d=0;for(l=0;l<e.length;l++)if(c=n.groups[e[l]],c.options.style===`bar`&&c.visible===!0&&(n.options.groups.visibility[e[l]]===void 0||n.options.groups.visibility[e[l]]===!0))for(u=0;u<t[e[l]].length;u++)r.push({screen_x:t[e[l]][u].screen_x,screen_end:t[e[l]][u].screen_end,screen_y:t[e[l]][u].screen_y,x:t[e[l]][u].x,end:t[e[l]][u].end,y:t[e[l]][u].y,groupId:e[l],label:t[e[l]][u].label}),d+=1;if(d!==0)for(e3(r).call(r,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x}),l9._getDataIntersections(i,r),l=0;l<r.length;l++){c=n.groups[r[l].groupId];var f=c.options.barChart.minWidth==null?.1*c.options.barChart.width:c.options.barChart.minWidth;o=r[l].screen_x;var p=0;if(i[o]===void 0)l+1<r.length&&(a=Math.abs(r[l+1].screen_x-o)),s=l9._getSafeDrawData(a,c,f);else{var m=l+(i[o].amount-i[o].resolved);m<r.length&&(a=Math.abs(r[m].screen_x-o)),s=l9._getSafeDrawData(a,c,f),i[o].resolved+=1,c.options.stack===!0&&c.options.excludeFromStacking!==!0?r[l].screen_y<c.zeroPosition?(p=i[o].accumulatedNegative,i[o].accumulatedNegative+=c.zeroPosition-r[l].screen_y):(p=i[o].accumulatedPositive,i[o].accumulatedPositive+=c.zeroPosition-r[l].screen_y):c.options.barChart.sideBySide===!0&&(s.width/=i[o].amount,s.offset+=i[o].resolved*s.width-.5*s.width*(i[o].amount+1))}let e=s.width,t=r[l].screen_x;if(r[l].screen_end==null?t+=s.offset:(e=r[l].screen_end-r[l].screen_x,t+=e*.5),a9(t,r[l].screen_y-p,e,c.zeroPosition-r[l].screen_y,c.className+` vis-bar`,n.svgElements,n.svg,c.style),c.options.drawPoints.enabled===!0){let e={screen_x:r[l].screen_x,screen_y:r[l].screen_y-p,x:r[l].x,y:r[l].y,groupId:r[l].groupId,label:r[l].label};s9.draw([e],c,n,s.offset)}}},l9._getDataIntersections=function(e,t){for(var n,r=0;r<t.length;r++)r+1<t.length&&(n=Math.abs(t[r+1].screen_x-t[r].screen_x)),r>0&&(n=Math.min(n,Math.abs(t[r-1].screen_x-t[r].screen_x))),n===0&&(e[t[r].screen_x]===void 0&&(e[t[r].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),e[t[r].screen_x].amount+=1)},l9._getSafeDrawData=function(e,t,n){var r,i;return e<t.options.barChart.width&&e>0?(r=e<n?n:e,i=0,t.options.barChart.align===`left`?i-=.5*e:t.options.barChart.align===`right`&&(i+=.5*e)):(r=t.options.barChart.width,i=0,t.options.barChart.align===`left`?i-=.5*t.options.barChart.width:t.options.barChart.align===`right`&&(i+=.5*t.options.barChart.width)),{width:r,offset:i}},l9.getStackedYRange=function(e,t,n,r,i){if(e.length>0){e3(e).call(e,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x});var a={};l9._getDataIntersections(a,e),t[r]=l9._getStackedYRange(a,e),t[r].yAxisOrientation=i,n.push(r)}},l9._getStackedYRange=function(e,t){for(var n,r=t[0].screen_y,i=t[0].screen_y,a=0;a<t.length;a++)n=t[a].screen_x,e[n]===void 0?(r=r>t[a].screen_y?t[a].screen_y:r,i=i<t[a].screen_y?t[a].screen_y:i):t[a].screen_y<0?e[n].accumulatedNegative+=t[a].screen_y:e[n].accumulatedPositive+=t[a].screen_y;for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r=r>e[o].accumulatedNegative?e[o].accumulatedNegative:r,r=r>e[o].accumulatedPositive?e[o].accumulatedPositive:r,i=i<e[o].accumulatedNegative?e[o].accumulatedNegative:i,i=i<e[o].accumulatedPositive?e[o].accumulatedPositive:i);return{min:r,max:i}};function u9(){}u9.calcPath=function(e,t){if(e!=null&&e.length>0){var n=[];return n=t.options.interpolation.enabled==1?u9._catmullRom(e,t):u9._linear(e),n}},u9.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s,c,l=n9(`rect`,a.svgElements,a.svg);if(l.setAttributeNS(null,`x`,t),l.setAttributeNS(null,`y`,n-o),l.setAttributeNS(null,`width`,r),l.setAttributeNS(null,`height`,2*o),l.setAttributeNS(null,`class`,`vis-outline`),s=n9(`path`,a.svgElements,a.svg),s.setAttributeNS(null,`class`,e.className),e.style!==void 0&&s.setAttributeNS(null,`style`,e.style),s.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+(t+r)+`,`+n),e.options.shaded.enabled==1&&(c=n9(`path`,a.svgElements,a.svg),e.options.shaded.orientation==`top`?c.setAttributeNS(null,`d`,`M`+t+`, `+(n-o)+`L`+t+`,`+n+` L`+(t+r)+`,`+n+` L`+(t+r)+`,`+(n-o)):c.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+t+`,`+(n+o)+` L`+(t+r)+`,`+(n+o)+`L`+(t+r)+`,`+n),c.setAttributeNS(null,`class`,e.className+` vis-icon-fill`),e.options.shaded.style!==void 0&&e.options.shaded.style!==``&&c.setAttributeNS(null,`style`,e.options.shaded.style)),e.options.drawPoints.enabled==1){var u={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size,className:e.className};i9(t+.5*r,n,u,a.svgElements,a.svg)}},u9.drawShading=function(e,t,n,r){if(t.options.shaded.enabled==1){var i=Number(r.svg.style.height.replace(`px`,``)),a=n9(`path`,r.svgElements,r.svg),o=`L`;t.options.interpolation.enabled==1&&(o=`C`);var s,c=0;c=t.options.shaded.orientation==`top`?0:t.options.shaded.orientation==`bottom`?i:Math.min(Math.max(0,t.zeroPosition),i),s=t.options.shaded.orientation==`group`&&n!=null&&n!=null?`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` L`+n[n.length-1][0]+`,`+n[n.length-1][1]+` `+this.serializePath(n,o,!0)+n[0][0]+`,`+n[0][1]+` Z`:`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` V`+c+` H`+e[0][0]+` Z`,a.setAttributeNS(null,`class`,t.className+` vis-fill`),t.options.shaded.style!==void 0&&a.setAttributeNS(null,`style`,t.options.shaded.style),a.setAttributeNS(null,`d`,s)}},u9.draw=function(e,t,n){if(e!=null&&e!=null){var r=n9(`path`,n.svgElements,n.svg);r.setAttributeNS(null,`class`,t.className),t.style!==void 0&&r.setAttributeNS(null,`style`,t.style);var i=`L`;t.options.interpolation.enabled==1&&(i=`C`),r.setAttributeNS(null,`d`,`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,i,!1))}},u9.serializePath=function(e,t,n){if(e.length<2)return``;var r=t,i;if(n)for(i=e.length-2;i>0;i--)r+=e[i][0]+`,`+e[i][1]+` `;else for(i=1;i<e.length;i++)r+=e[i][0]+`,`+e[i][1]+` `;return r},u9._catmullRomUniform=function(e){var t,n,r,i,a,o,s=[];s.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var c=1/6,l=e.length,u=0;u<l-1;u++)t=u==0?e[0]:e[u-1],n=e[u],r=e[u+1],i=u+2<l?e[u+2]:r,a={screen_x:(-t.screen_x+6*n.screen_x+r.screen_x)*c,screen_y:(-t.screen_y+6*n.screen_y+r.screen_y)*c},o={screen_x:(n.screen_x+6*r.screen_x-i.screen_x)*c,screen_y:(n.screen_y+6*r.screen_y-i.screen_y)*c},s.push([a.screen_x,a.screen_y]),s.push([o.screen_x,o.screen_y]),s.push([r.screen_x,r.screen_y]);return s},u9._catmullRom=function(e,t){var n=t.options.interpolation.alpha;if(n==0||n===void 0)return this._catmullRomUniform(e);var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[];S.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var C=e.length,w=0;w<C-1;w++)r=w==0?e[0]:e[w-1],i=e[w],a=e[w+1],o=w+2<C?e[w+2]:a,l=Math.sqrt((r.screen_x-i.screen_x)**2+(r.screen_y-i.screen_y)**2),u=Math.sqrt((i.screen_x-a.screen_x)**2+(i.screen_y-a.screen_y)**2),d=Math.sqrt((a.screen_x-o.screen_x)**2+(a.screen_y-o.screen_y)**2),g=d**+n,v=d**(2*n),_=u**+n,y=u**(2*n),x=l**+n,b=l**(2*n),f=2*b+3*x*_+y,p=2*v+3*g*_+y,m=3*x*(x+_),m>0&&(m=1/m),h=3*g*(g+_),h>0&&(h=1/h),s={screen_x:(-y*r.screen_x+f*i.screen_x+b*a.screen_x)*m,screen_y:(-y*r.screen_y+f*i.screen_y+b*a.screen_y)*m},c={screen_x:(v*i.screen_x+p*a.screen_x-y*o.screen_x)*h,screen_y:(v*i.screen_y+p*a.screen_y-y*o.screen_y)*h},s.screen_x==0&&s.screen_y==0&&(s=i),c.screen_x==0&&c.screen_y==0&&(c=a),S.push([s.screen_x,s.screen_y]),S.push([c.screen_x,c.screen_y]),S.push([a.screen_x,a.screen_y]);return S},u9._linear=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n].screen_x,e[n].screen_y]);return t};function d9(e,t,n,r){this.id=t,this.options=$.selectiveBridgeObject([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`drawPoints`,`shaded`,`interpolation`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],n),this.usingDefaultStyle=e.className===void 0,this.groupsUsingDefaultStyles=r,this.zeroPosition=0,this.update(e),this.usingDefaultStyle==1&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=e.visible===void 0?!0:e.visible}d9.prototype.setItems=function(e){e==null?this.itemsData=[]:(this.itemsData=e,e3(this.options)==1&&$.insertSort(this.itemsData,function(e,t){return e.x>t.x?1:-1}))},d9.prototype.getItems=function(){return this.itemsData},d9.prototype.setZeroPosition=function(e){this.zeroPosition=e},d9.prototype.setOptions=function(e){e!==void 0&&($.selectiveDeepExtend([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],this.options,e),typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),$.mergeOptions(this.options,e,`interpolation`),$.mergeOptions(this.options,e,`drawPoints`),$.mergeOptions(this.options,e,`shaded`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)))},d9.prototype.update=function(e){this.group=e,this.content=e.content||`graph`,this.className=e.className||this.className||`vis-graph-group`+this.groupsUsingDefaultStyles[0]%10,this.visible=e.visible===void 0?!0:e.visible,this.style=e.style,this.setOptions(e.options)},d9.prototype.getLegend=function(e,t,n,r,i){switch((n==null||n==null)&&(n={svg:document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),svgElements:{},options:this.options,groups:[this]}),(r==null||r==null)&&(r=0),(i==null||i==null)&&(i=.5*t),this.options.style){case`line`:u9.drawIcon(this,r,i,e,t,n);break;case`points`:case`point`:s9.drawIcon(this,r,i,e,t,n);break;case`bar`:l9.drawIcon(this,r,i,e,t,n);break}return{icon:n.svg,label:this.content,orientation:this.options.yAxisOrientation}},d9.prototype.getYRange=function(e){for(var t=e[0].y,n=e[0].y,r=0;r<e.length;r++)t=t>e[r].y?e[r].y:t,n=n<e[r].y?e[r].y:n;return{min:t,max:n,yAxisOrientation:this.options.yAxisOrientation}};function f9(e,t,n,r){this.body=e,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:`top-left`},right:{visible:!0,position:`top-right`}},this.side=n,this.options=$.extend({},this.defaultOptions),this.linegraphOptions=r,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(t)}f9.prototype=new u4,f9.prototype.clear=function(){this.groups={},this.amountOfGroups=0},f9.prototype.addGroup=function(e,t){t.options.excludeFromLegend!=1&&(Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1)},f9.prototype.updateGroup=function(e,t){this.groups[e]=t},f9.prototype.removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)},f9.prototype._create=function(){this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-legend`,this.dom.frame.style.position=`absolute`,this.dom.frame.style.top=`10px`,this.dom.frame.style.display=`block`,this.dom.textArea=document.createElement(`div`),this.dom.textArea.className=`vis-legend-text`,this.dom.textArea.style.position=`relative`,this.dom.textArea.style.top=`0px`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.width=this.options.iconSize+5+`px`,this.svg.style.height=`100%`,this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},f9.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},f9.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},f9.prototype.setOptions=function(e){$.selectiveDeepExtend([`enabled`,`orientation`,`icons`,`left`,`right`],this.options,e)},f9.prototype.redraw=function(){var e=0,t=UK(this.groups);e3(t).call(t,function(e,t){return e<t?-1:1});for(var n=0;n<t.length;n++){var r=t[n];this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&e++}if(this.options[this.side].visible==0||this.amountOfGroups==0||this.options.enabled==0||e==0)this.hide();else{if(this.show(),this.options[this.side].position==`top-left`||this.options[this.side].position==`bottom-left`?(this.dom.frame.style.left=`4px`,this.dom.frame.style.textAlign=`left`,this.dom.textArea.style.textAlign=`left`,this.dom.textArea.style.left=this.options.iconSize+15+`px`,this.dom.textArea.style.right=``,this.svg.style.left=`0px`,this.svg.style.right=``):(this.dom.frame.style.right=`4px`,this.dom.frame.style.textAlign=`right`,this.dom.textArea.style.textAlign=`right`,this.dom.textArea.style.right=this.options.iconSize+15+`px`,this.dom.textArea.style.left=``,this.svg.style.right=`0px`,this.svg.style.left=``),this.options[this.side].position==`top-left`||this.options[this.side].position==`top-right`)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.bottom=``;else{var i=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+i+Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.top=``}this.options.icons==0?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+`px`,this.dom.textArea.style.right=``,this.dom.textArea.style.left=``,this.svg.style.width=`0px`):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+`px`,this.drawLegendIcons());var a=``;for(n=0;n<t.length;n++)r=t[n],this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&(a+=this.groups[r].content+`<br />`);this.dom.textArea.innerHTML=$.xss(a),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+`px`}},f9.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var e=UK(this.groups);e3(e).call(e,function(e,t){return e<t?-1:1}),cre(this.svgElements);var t=window.getComputedStyle(this.dom.frame).paddingTop,n=Number(t.replace(`px`,``)),r=n,i=this.options.iconSize,a=.75*this.options.iconSize,o=n+.5*a+3;this.svg.style.width=i+5+n+`px`;for(var s=0;s<e.length;s++){var c=e[s];this.groups[c].visible==1&&(this.linegraphOptions.visibility[c]===void 0||this.linegraphOptions.visibility[c]==1)&&(this.groups[c].getLegend(i,a,this.framework,r,o),o+=a+this.options.iconSpacing)}}};var p9=`__ungrouped__`;function m9(e,t){this.id=L2(),this.body=e,this.defaultOptions={yAxisOrientation:`left`,defaultGroup:`default`,sort:!0,sampling:!0,stack:!1,graphHeight:`400px`,shaded:{enabled:!1,orientation:`bottom`},style:`line`,barChart:{width:50,sideBySide:!1,align:`center`},interpolation:{enabled:!0,parametrization:`centripetal`,alpha:.5},drawPoints:{enabled:!0,size:6,style:`square`},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=$.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(e,t){n._onAdd(t.items)},update:function(e,t){n._onUpdate(t.items)},remove:function(e,t){n._onRemove(t.items)}},this.groupListeners={add:function(e,t){n._onAddGroups(t.items)},update:function(e,t){n._onUpdateGroups(t.items)},remove:function(e,t){n._onRemoveGroups(t.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(t),this.groupsUsingDefaultStyles=[0],this.body.emitter.on(`rangechanged`,function(){n.svg.style.left=$.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}m9.prototype=new u4,m9.prototype._create=function(){var e=document.createElement(`div`);e.className=`vis-line-graph`,this.dom.frame=e,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`relative`,this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,this.svg.style.display=`block`,e.appendChild(this.svg),this.options.dataAxis.orientation=`left`,this.yAxisLeft=new o9(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation=`right`,this.yAxisRight=new o9(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new f9(this.body,this.options.legend,`left`,this.options.groups),this.legendRight=new f9(this.body,this.options.legend,`right`,this.options.groups),this.show()},m9.prototype.setOptions=function(e){e&&(e.graphHeight===void 0&&e.height!==void 0?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):this.body.domProps.centerContainer.height!==void 0&&e.graphHeight!==void 0&&EX((e.graphHeight+``).replace(`px`,``))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),$.selectiveDeepExtend([`sampling`,`defaultGroup`,`stack`,`height`,`graphHeight`,`yAxisOrientation`,`style`,`barChart`,`dataAxis`,`sort`,`groups`],this.options,e),$.mergeOptions(this.options,e,`interpolation`),$.mergeOptions(this.options,e,`drawPoints`),$.mergeOptions(this.options,e,`shaded`),$.mergeOptions(this.options,e,`legend`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)),this.yAxisLeft&&e.dataAxis!==void 0&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&e.legend!==void 0&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,p9)&&this.groups[p9].setOptions(e)),this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0}))},m9.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},m9.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},m9.prototype.setItems=function(e){var t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(B2(e))this.itemsData=W2(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(Q($).call($,this.itemListeners,function(e,t){r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){var i=this.id;Q($).call($,this.itemListeners,function(e,n){t.itemsData.on(n,e,i)}),n=this.itemsData.getIds(),this._onAdd(n)}},m9.prototype.setGroups=function(e){var t=this,n;if(this.groupsData){Q($).call($,this.groupListeners,function(e,n){t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null;for(var r=0;r<n.length;r++)this._removeGroup(n[r])}if(!e)this.groupsData=null;else if(B2(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var i=this.id;Q($).call($,this.groupListeners,function(e,n){t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}},m9.prototype._onUpdate=function(e){this._updateAllGroupData(e)},m9.prototype._onAdd=function(e){this._onUpdate(e)},m9.prototype._onRemove=function(e){this._onUpdate(e)},m9.prototype._onUpdateGroups=function(e){this._updateAllGroupData(null,e)},m9.prototype._onAddGroups=function(e){this._onUpdateGroups(e)},m9.prototype._onRemoveGroups=function(e){for(var t=0;t<e.length;t++)this._removeGroup(e[t]);this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})},m9.prototype._removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(this.groups[e].options.yAxisOrientation==`right`?(this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e),this.legendLeft.redraw()),delete this.groups[e])},m9.prototype._updateGroup=function(e,t){Object.prototype.hasOwnProperty.call(this.groups,t)?(this.groups[t].update(e),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.updateGroup(t,this.groups[t]),this.legendRight.updateGroup(t,this.groups[t]),this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t)):(this.yAxisLeft.updateGroup(t,this.groups[t]),this.legendLeft.updateGroup(t,this.groups[t]),this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t))):(this.groups[t]=new d9(e,t,this.options,this.groupsUsingDefaultStyles),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.addGroup(t,this.groups[t]),this.legendRight.addGroup(t,this.groups[t])):(this.yAxisLeft.addGroup(t,this.groups[t]),this.legendLeft.addGroup(t,this.groups[t]))),this.legendLeft.redraw(),this.legendRight.redraw()},m9.prototype._updateAllGroupData=function(e,t){if(this.itemsData!=null){var n={},r=this.itemsData.get(),i=this.itemsData.idProp,a={};e&&cK(e).call(e,function(e){a[e]=e});for(var o={},s=0;s<r.length;s++){var c=r[s],l=c.group;l??=p9,Object.prototype.hasOwnProperty.call(o,l)?o[l]++:o[l]=1}var u={};if(!t&&e){for(l in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,l)){h=this.groups[l];var d=h.getItems();n[l]=uV(d).call(d,function(e){return u[e[i]]=e[i],e[i]!==a[e[i]]});var f=o[l];o[l]-=n[l].length,n[l].length<f&&(n[l][f-1]={})}}for(s=0;s<r.length;s++)if(c=r[s],l=c.group,l??=p9,!(!t&&e&&c[i]!==a[c[i]]&&Object.prototype.hasOwnProperty.call(u,c[i]))){Object.prototype.hasOwnProperty.call(n,l)||(n[l]=Array(o[l]));var p=$.bridgeObject(c);p.x=$.convert(c.x,`Date`),p.end=$.convert(c.end,`Date`),p.orginalY=c.y,p.y=Number(c.y),p[i]=c[i];var m=n[l].length- o[l]--;n[l][m]=p}for(l in this.groups)!Object.prototype.hasOwnProperty.call(this.groups,l)||Object.prototype.hasOwnProperty.call(n,l)||(n[l]=[]);for(l in n)if(Object.prototype.hasOwnProperty.call(n,l))if(n[l].length==0)Object.prototype.hasOwnProperty.call(this.groups,l)&&this._removeGroup(l);else{var h=void 0;this.groupsData!=null&&(h=this.groupsData.get(l)),h??={id:l,content:this.options.defaultGroup+l},this._updateGroup(h,l),this.groups[l].setItems(n[l])}this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})}},m9.prototype.redraw=function(){var e=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,e=this._isResized()||e;var t=this.body.range.end-this.body.range.start,n=t!=this.lastVisibleInterval;if(this.lastVisibleInterval=t,e==1){var r;this.svg.style.width=$.option.asSize(3*this.props.width),this.svg.style.left=$.option.asSize(-this.props.width),(HX(r=this.options.height+``).call(r,`%`)!=-1||this.updateSVGheightOnResize==1)&&(this.updateSVGheight=!0)}if(this.updateSVGheight==1?(this.options.graphHeight!=this.props.height+`px`&&(this.options.graphHeight=this.props.height+`px`,this.svg.style.height=this.props.height+`px`),this.updateSVGheight=!1):this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,e==1||n==1||this.abortedGraphUpdate==1||this.forceGraphUpdate==1)e=this._updateGraph()||e,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+`px`;else if(this.lastStart!=0){var i=this.body.range.start-this.lastStart,a=this.body.range.end-this.body.range.start;if(this.props.width!=0){var o=i*(this.props.width/a);this.svg.style.left=-this.props.width-o+`px`}}return this.legendLeft.redraw(),this.legendRight.redraw(),e},m9.prototype._getSortedGroupIds=function(){var e=[];for(var t in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,t)){var n=this.groups[t];n.visible==1&&(this.options.groups.visibility[t]===void 0||this.options.groups.visibility[t]==1)&&e.push({id:t,zIndex:n.options.zIndex})}$.insertSort(e,function(e,t){var n=e.zIndex,r=t.zIndex;return n===void 0&&(n=0),r===void 0&&(r=0),n==r?0:n<r?-1:1});for(var r=Array(e.length),i=0;i<e.length;i++)r[i]=e[i].id;return r},m9.prototype._updateGraph=function(){if(e9(this.svgElements),this.props.width!=0&&this.itemsData!=null){var e,t,n={},r=!1,i=this.body.util.toGlobalTime(-this.body.domProps.root.width),a=this.body.util.toGlobalTime(2*this.body.domProps.root.width),o=this._getSortedGroupIds();if(o.length>0){var s={};for(this._getRelevantData(o,s,i,a),this._applySampling(o,s),t=0;t<o.length;t++)this._convertXcoordinates(s[o[t]]);if(this._getYRanges(o,s,n),r=this._updateYAxis(o,n),r==1)return t9(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var c=void 0;for(t=0;t<o.length;t++)e=this.groups[o[t]],this.options.stack===!0&&this.options.style===`line`&&(e.options.excludeFromStacking==null||!e.options.excludeFromStacking)&&(c!=null&&(this._stack(s[e.id],s[c.id]),e.options.shaded.enabled==1&&e.options.shaded.orientation!==`group`&&(e.options.shaded.orientation==`top`&&c.options.shaded.orientation!==`group`?(c.options.shaded.orientation=`group`,c.options.shaded.groupId=e.id):(e.options.shaded.orientation=`group`,e.options.shaded.groupId=c.id))),c=e),this._convertYcoordinates(s[o[t]],e);var l={};for(t=0;t<o.length;t++)if(e=this.groups[o[t]],e.options.style===`line`&&e.options.shaded.enabled==1){var u=s[o[t]];if(u==null||u.length==0)continue;if(Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=u9.calcPath(u,e)),e.options.shaded.orientation===`group`){var d=e.options.shaded.groupId;if(HX(o).call(o,d)===-1){console.log(e.id+`: Unknown shading group target given:`+d);continue}Object.prototype.hasOwnProperty.call(l,d)||(l[d]=u9.calcPath(s[d],this.groups[d])),u9.drawShading(l[o[t]],e,l[d],this.framework)}else u9.drawShading(l[o[t]],e,void 0,this.framework)}for(l9.draw(o,s,this.framework),t=0;t<o.length;t++)if(e=this.groups[o[t]],s[o[t]].length>0)switch(e.options.style){case`line`:Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=u9.calcPath(s[o[t]],e)),u9.draw(l[o[t]],e,this.framework);case`point`:case`points`:(e.options.style==`point`||e.options.style==`points`||e.options.drawPoints.enabled==1)&&s9.draw(s[o[t]],e,this.framework);break}}}return t9(this.svgElements),!1},m9.prototype._stack=function(e,t){for(var n=0,r,i,a,o,s=0;s<e.length;s++){a=void 0,o=void 0;for(var c=n;c<t.length;c++)if(t[c].x===e[s].x){a=t[c],o=t[c],n=c;break}else if(t[c].x>e[s].x){o=t[c],a=c==0?o:t[c-1],n=c;break}o===void 0&&(a=t[t.length-1],o=t[t.length-1]),r=o.x-a.x,i=o.y-a.y,r==0?e[s].y=e[s].orginalY+o.y:e[s].y=e[s].orginalY+i/r*(e[s].x-a.x)+a.y}},m9.prototype._getRelevantData=function(e,t,n,r){var i,a,o,s;if(e.length>0)for(a=0;a<e.length;a++){i=this.groups[e[a]];var c=i.getItems();if(e3(i.options)==1){var l=function(e,t){return e.getTime()==t.getTime()?0:e<t?-1:1},u=Math.max(0,$.binarySearchValue(c,n,`x`,`before`,l)),d=Math.min(c.length,$.binarySearchValue(c,r,`x`,`after`,l)+1);d<=0&&(d=c.length);var f=Array(d-u);for(o=u;o<d;o++)s=i.itemsData[o],f[o-u]=s;t[e[a]]=f}else t[e[a]]=i.itemsData}},m9.prototype._applySampling=function(e,t){var n;if(e.length>0){for(var r=0;r<e.length;r++)if(n=this.groups[e[r]],n.options.sampling==1){var i=t[e[r]];if(i.length>0){var a=1,o=i.length,s=o/(this.body.util.toGlobalScreen(i[i.length-1].x)-this.body.util.toGlobalScreen(i[0].x));a=Math.min(Math.ceil(.2*o),Math.max(1,Math.round(s)));for(var c=Array(o),l=0;l<o;l+=a){var u=Math.round(l/a);c[u]=i[l]}t[e[r]]=CJ(c).call(c,0,Math.round(o/a))}}}},m9.prototype._getYRanges=function(e,t,n){var r,i,a,o=[],s=[],c;if(e.length>0){for(a=0;a<e.length;a++)r=t[e[a]],c=this.groups[e[a]].options,r.length>0&&(i=this.groups[e[a]],c.stack===!0&&c.style===`bar`?c.yAxisOrientation===`left`?o=HY(o).call(o,r):s=HY(s).call(s,r):n[e[a]]=i.getYRange(r,e[a]));l9.getStackedYRange(o,n,e,`__barStackLeft`,`left`),l9.getStackedYRange(s,n,e,`__barStackRight`,`right`)}},m9.prototype._updateYAxis=function(e,t){var n=!1,r=!1,i=!1,a=1e9,o=1e9,s=-1e9,c=-1e9,l,u;if(e.length>0){for(var d=0;d<e.length;d++){var f=this.groups[e[d]];f&&f.options.yAxisOrientation!=`right`?(r=!0,a=1e9,s=-1e9):f&&f.options.yAxisOrientation&&(i=!0,o=1e9,c=-1e9)}for(d=0;d<e.length;d++)!Object.prototype.hasOwnProperty.call(t,e[d])||t[e[d]].ignore===!0||(l=t[e[d]].min,u=t[e[d]].max,t[e[d]].yAxisOrientation==`right`?(i=!0,o=o>l?l:o,c=c<u?u:c):(r=!0,a=a>l?l:a,s=s<u?u:s));r==1&&this.yAxisLeft.setRange(a,s),i==1&&this.yAxisRight.setRange(o,c)}n=this._toggleAxisVisiblity(r,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(i,this.yAxisRight)||n,i==1&&r==1?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,this.yAxisRight.master==0?(i==1?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;var p=[`__barStackLeft`,`__barStackRight`,`__lineStackLeft`,`__lineStackRight`];for(d=0;d<p.length;d++)HX(e).call(e,p[d])!=-1&&CJ(e).call(e,HX(e).call(e,p[d]),1);return n},m9.prototype._toggleAxisVisiblity=function(e,t){var n=!1;return e==0?t.dom.frame.parentNode&&t.hidden==0&&(t.hide(),n=!0):!t.dom.frame.parentNode&&t.hidden==1&&(t.show(),n=!0),n},m9.prototype._convertXcoordinates=function(e){for(var t=this.body.util.toScreen,n=0;n<e.length;n++)e[n].screen_x=t(e[n].x)+this.props.width,e[n].screen_y=e[n].y,e[n].end==null?e[n].screen_end=void 0:e[n].screen_end=t(e[n].end)+this.props.width},m9.prototype._convertYcoordinates=function(e,t){var n=this.yAxisLeft,r=Number(this.svg.style.height.replace(`px`,``));t.options.yAxisOrientation==`right`&&(n=this.yAxisRight);for(var i=0;i<e.length;i++)e[i].screen_y=Math.round(n.convertValue(e[i].y));t.setZeroPosition(Math.min(r,n.convertValue(0)))};var h9=`string`,g9=`boolean`,_9=`number`,fre=`array`,v9=`date`,y9=`object`,pre=`dom`,b9=`moment`,x9=`any`,mre={configure:{enabled:{boolean:g9},filter:{boolean:g9,function:`function`},container:{dom:pre},__type__:{object:y9,boolean:g9,function:`function`}},alignCurrentTime:{string:h9,undefined:`undefined`},yAxisOrientation:{string:[`left`,`right`]},defaultGroup:{string:h9},sort:{boolean:g9},sampling:{boolean:g9},stack:{boolean:g9},graphHeight:{string:h9,number:_9},shaded:{enabled:{boolean:g9},orientation:{string:[`bottom`,`top`,`zero`,`group`]},groupId:{object:y9},__type__:{boolean:g9,object:y9}},style:{string:[`line`,`bar`,`points`]},barChart:{width:{number:_9},minWidth:{number:_9},sideBySide:{boolean:g9},align:{string:[`left`,`center`,`right`]},__type__:{object:y9}},interpolation:{enabled:{boolean:g9},parametrization:{string:[`centripetal`,`chordal`,`uniform`]},alpha:{number:_9},__type__:{object:y9,boolean:g9}},drawPoints:{enabled:{boolean:g9},onRender:{function:`function`},size:{number:_9},style:{string:[`square`,`circle`]},__type__:{object:y9,boolean:g9,function:`function`}},dataAxis:{showMinorLabels:{boolean:g9},showMajorLabels:{boolean:g9},showWeekScale:{boolean:g9},icons:{boolean:g9},width:{string:h9,number:_9},visible:{boolean:g9},alignZeros:{boolean:g9},left:{range:{min:{number:_9,undefined:`undefined`},max:{number:_9,undefined:`undefined`},__type__:{object:y9}},format:{function:`function`},title:{text:{string:h9,number:_9,undefined:`undefined`},style:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},right:{range:{min:{number:_9,undefined:`undefined`},max:{number:_9,undefined:`undefined`},__type__:{object:y9}},format:{function:`function`},title:{text:{string:h9,number:_9,undefined:`undefined`},style:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},__type__:{object:y9}},legend:{enabled:{boolean:g9},icons:{boolean:g9},left:{visible:{boolean:g9},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:y9}},right:{visible:{boolean:g9},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:y9}},__type__:{object:y9,boolean:g9}},groups:{visibility:{any:x9},__type__:{object:y9}},autoResize:{boolean:g9},throttleRedraw:{number:_9},clickToUse:{boolean:g9},end:{number:_9,date:v9,string:h9,moment:b9},format:{minorLabels:{millisecond:{string:h9,undefined:`undefined`},second:{string:h9,undefined:`undefined`},minute:{string:h9,undefined:`undefined`},hour:{string:h9,undefined:`undefined`},weekday:{string:h9,undefined:`undefined`},day:{string:h9,undefined:`undefined`},week:{string:h9,undefined:`undefined`},month:{string:h9,undefined:`undefined`},quarter:{string:h9,undefined:`undefined`},year:{string:h9,undefined:`undefined`},__type__:{object:y9}},majorLabels:{millisecond:{string:h9,undefined:`undefined`},second:{string:h9,undefined:`undefined`},minute:{string:h9,undefined:`undefined`},hour:{string:h9,undefined:`undefined`},weekday:{string:h9,undefined:`undefined`},day:{string:h9,undefined:`undefined`},week:{string:h9,undefined:`undefined`},month:{string:h9,undefined:`undefined`},quarter:{string:h9,undefined:`undefined`},year:{string:h9,undefined:`undefined`},__type__:{object:y9}},__type__:{object:y9}},moment:{function:`function`},height:{string:h9,number:_9},hiddenDates:{start:{date:v9,number:_9,string:h9,moment:b9},end:{date:v9,number:_9,string:h9,moment:b9},repeat:{string:h9},__type__:{object:y9,array:fre}},locale:{string:h9},locales:{__any__:{any:x9},__type__:{object:y9}},max:{date:v9,number:_9,string:h9,moment:b9},maxHeight:{number:_9,string:h9},maxMinorChars:{number:_9},min:{date:v9,number:_9,string:h9,moment:b9},minHeight:{number:_9,string:h9},moveable:{boolean:g9},multiselect:{boolean:g9},orientation:{string:h9},showCurrentTime:{boolean:g9},showMajorLabels:{boolean:g9},showMinorLabels:{boolean:g9},showWeekScale:{boolean:g9},snap:{function:`function`,null:`null`},start:{date:v9,number:_9,string:h9,moment:b9},timeAxis:{scale:{string:h9,undefined:`undefined`},step:{number:_9,undefined:`undefined`},__type__:{object:y9}},width:{string:h9,number:_9},zoomable:{boolean:g9},zoomKey:{string:[`ctrlKey`,`altKey`,`metaKey`,``]},zoomMax:{number:_9},zoomMin:{number:_9},zIndex:{number:_9},__type__:{object:y9}},hre={global:{alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:[`zero`,`top`,`bottom`,`group`]},style:[`line`,`bar`,`points`],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:[`left`,`center`,`right`]},interpolation:{enabled:!0,parametrization:[`centripetal`,`chordal`,`uniform`]},drawPoints:{enabled:!0,size:[6,2,30,1],style:[`square`,`circle`]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:``,style:``}},right:{title:{text:``,style:``}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},right:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]}},autoResize:!0,clickToUse:!1,end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,quarter:`[Q]Q`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,quarter:`YYYY`,year:``}},height:``,locale:``,max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!0,orientation:[`both`,`bottom`,`top`],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:``,width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function S9(e,t,n,r){var i,a,o,s,c,l,u;if(!(eL(n)||B2(n))&&n instanceof Object){var d=r;r=n,n=d}r&&r.throttleRedraw&&console.warn(`Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:`bottom`,item:`bottom`},moment:XR,width:null,height:null,maxHeight:null,minHeight:null},this.options=$.deepExtend({},this.defaultOptions),this._create(e),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Z(i=this.on).call(i,this),off:Z(a=this.off).call(a,this),emit:Z(o=this.emit).call(o,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:Z(s=f._toScreen).call(s,f),toGlobalScreen:Z(c=f._toGlobalScreen).call(c,f),toTime:Z(l=f._toTime).call(l,f),toGlobalTime:Z(u=f._toGlobalTime).call(u,f)}},this.range=new m3(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new q3(this.body),this.components.push(this.timeAxis),this.currentTime=new B6(this.body),this.components.push(this.currentTime),this.linegraph=new m9(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on(`tap`,function(e){f.emit(`click`,f.getEventProperties(e))}),this.on(`doubletap`,function(e){f.emit(`doubleClick`,f.getEventProperties(e))}),this.dom.root.oncontextmenu=function(e){f.emit(`contextmenu`,f.getEventProperties(e))},this.initialFitDone=!1,this.on(`changed`,function(){if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();var t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&YL(()=>f.options.onInitialDrawComplete(),0))}}),r&&this.setOptions(r),n&&this.setGroups(n),t&&this.setItems(t),this._redraw()}S9.prototype=new z6,S9.prototype.setOptions=function(e){V7.validate(e,mre)===!0&&console.log(`%cErrors have been found in the supplied options object.`,B7),z6.prototype.setOptions.call(this,e)},S9.prototype.setItems=function(e){var t=this.itemsData==null,n=e?B2(e)?W2(e):W2(new wD(e)):null;if(this.itemsData&&this.itemsData.dispose(),this.itemsData=n,this.linegraph&&this.linegraph.setItems(n==null?null:n.rawDS),t)if(this.options.start!=null||this.options.end!=null){var r=this.options.start==null?null:this.options.start,i=this.options.end==null?null:this.options.end;this.setWindow(r,i,{animation:!1})}else this.fit({animation:!1})},S9.prototype.setGroups=function(e){var t=e?B2(e)?e:new wD(e):null;this.groupsData=t,this.linegraph.setGroups(t)},S9.prototype.getLegend=function(e,t,n){return t===void 0&&(t=15),n===void 0&&(n=15),this.linegraph.groups[e]===void 0?`cannot find group:'`+e+`'`:this.linegraph.groups[e].getLegend(t,n)},S9.prototype.isGroupVisible=function(e){return this.linegraph.groups[e]===void 0?!1:this.linegraph.groups[e].visible&&(this.linegraph.options.groups.visibility[e]===void 0||this.linegraph.options.groups.visibility[e]==1)},S9.prototype.getDataRange=function(){var e=null,t=null;for(var n in this.linegraph.groups)if(!(!Object.prototype.hasOwnProperty.call(this.linegraph.groups,n)||this.linegraph.groups[n].visible!==!0))for(var r=0;r<this.linegraph.groups[n].itemsData.length;r++){var i=this.linegraph.groups[n].itemsData[r],a=$.convert(i.x,`Date`).valueOf();e=e==null||e>a?a:e,t=t==null||t<a?a:t}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}},S9.prototype.getEventProperties=function(e){var t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=t-$.getAbsoluteLeft(this.dom.centerContainer),i=n-$.getAbsoluteTop(this.dom.centerContainer),a=this._toTime(r),o=R6.customTimeFromTarget(e),s=$.getTarget(e),c=null;$.hasParent(s,this.timeAxis.dom.foreground)||this.timeAxis2&&$.hasParent(s,this.timeAxis2.dom.foreground)?c=`axis`:$.hasParent(s,this.linegraph.yAxisLeft.dom.frame)||$.hasParent(s,this.linegraph.yAxisRight.dom.frame)?c=`data-axis`:$.hasParent(s,this.linegraph.legendLeft.dom.frame)||$.hasParent(s,this.linegraph.legendRight.dom.frame)?c=`legend`:o==null?$.hasParent(s,this.currentTime.bar)?c=`current-time`:$.hasParent(s,this.dom.center)&&(c=`background`):c=`custom-time`;var l=[],u=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!u.hidden&&this.itemsData.length>0&&l.push(u.screenToValue(i)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(i)),{event:e,customTime:o?o.options.id:null,what:c,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:r,y:i,time:a,value:l}},S9.prototype._createConfigurator=function(){return new X7(this,this.dom.container,hre)};var gre=lre();K.locale(gre);var C9=new Date(`1970-01-01T00:00:00Z`),_re=new Date(`2030-01-01T00:00:00Z`),w9=`playhead`,vre=500,yre=6,bre=`- .sem-timeline-wrap .vis-timeline { border: none !important; background: transparent !important; overflow: visible !important; }- .sem-timeline-wrap .vis-panel.vis-background, .sem-timeline-wrap .vis-panel.vis-center { background: transparent !important; }- .sem-timeline-wrap .vis-panel { border-color: rgba(88, 166, 255, 0.15) !important; }- .sem-timeline-wrap .vis-time-axis .vis-text {- color: #8b949e !important;- font-size: 11px !important;- font-family: 'JetBrains Mono', 'Fira Code', monospace !important;- padding-top: 3px !important;- }- .sem-timeline-wrap .vis-time-axis .vis-text.vis-major {- color: #c9d1d9 !important;- font-weight: 700 !important;- font-size: 12px !important;- }- .sem-timeline-wrap .vis-time-axis .vis-grid.vis-minor { border-color: rgba(88, 166, 255, 0.07) !important; }- .sem-timeline-wrap .vis-time-axis .vis-grid.vis-major { border-color: rgba(88, 166, 255, 0.18) !important; }- .sem-timeline-wrap .vis-custom-time.${w9} {- background: rgba(88, 166, 255, 0.15) !important;- width: 2px !important;- cursor: ew-resize !important;- z-index: 5 !important;- }- .sem-timeline-wrap .vis-custom-time.${w9} > .vis-custom-time-marker {- background: #58a6ff !important;- color: #0d1117 !important;- font-size: 10px !important;- font-weight: 700 !important;- border-radius: 3px !important;- padding: 1px 5px !important;- white-space: nowrap !important;- box-shadow: 0 0 8px rgba(88, 166, 255, 0.7) !important;- }- .sem-timeline-wrap .vis-current-time { display: none !important; }- .sem-timeline-wrap .vis-panel.vis-left { display: none !important; }-`;function T9(e,t){if(!e)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:n}function E9(e){return`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`}function xre(e){let t=(0,u.c)(56),{onTimeChange:n,minDate:r,maxDate:i}=e,a=(0,l.useRef)(null),o=(0,l.useRef)(null),s=(0,l.useRef)(C9),c=(0,l.useRef)(null),[d,f]=(0,l.useState)(!1),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=E9(C9),t[0]=p):p=t[0];let[m,h]=(0,l.useState)(p),g;t[1]===r?g=t[2]:(g=T9(r,C9),t[1]=r,t[2]=g);let _=g,v=T9(i,_re),y;t[3]!==v||t[4]!==_?(y=new Date(Math.round((_.getTime()+v.getTime())/2)),t[3]=v,t[4]=_,t[5]=y):y=t[5];let b=y,x,S;t[6]!==b||t[7]!==v||t[8]!==_||t[9]!==n?(x=()=>{if(!a.current)return;let e=o.current;if(!e){let e=new wD([]),t={height:`100%`,min:_,max:v,start:_,end:v,showCurrentTime:!1,zoomable:!0,moveable:!0,zoomMin:31536e6,zoomMax:252288e7,showMajorLabels:!0,showMinorLabels:!0,timeAxis:{scale:`year`,step:5},format:{minorLabels:{year:`YYYY`},majorLabels:{year:`YYYY`}},orientation:{axis:`bottom`},margin:{item:0,axis:0},selectable:!1,stack:!1},r=new sre(a.current,e,t);return o.current=r,s.current=b,r.addCustomTime(b,w9),r.on(`timechange`,e=>{e.id===w9&&(s.current=e.time,r.setCustomTime(e.time,w9),n(e.time),h(E9(e.time)))}),n(b),h(E9(b)),()=>{r.destroy(),o.current=null}}e.setOptions({min:_,max:v,start:_,end:v}),s.current=b,e.setCustomTime(b,w9),n(b),h(E9(b))},S=[b,v,_,n],t[6]=b,t[7]=v,t[8]=_,t[9]=n,t[10]=x,t[11]=S):(x=t[10],S=t[11]),(0,l.useEffect)(x,S);let C;t[12]!==v||t[13]!==_||t[14]!==n?(C=()=>{c.current||=setInterval(()=>{let e=o.current;if(!e)return;let t=new Date(s.current);t.setMonth(t.getMonth()+yre),t>=v&&t.setTime(_.getTime()),s.current=t,e.setCustomTime(t,w9),n(t),h(E9(t))},vre)},t[12]=v,t[13]=_,t[14]=n,t[15]=C):C=t[15];let w=C,T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{c.current&&=(clearInterval(c.current),null)},t[16]=T):T=t[16];let E=T,D;t[17]===w?D=t[18]:(D=()=>{f(e=>e?(E(),!1):(w(),!0))},t[17]=w,t[18]=D);let O=D,ee,k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>()=>E(),ee=[E],t[19]=ee,t[20]=k):(ee=t[19],k=t[20]),(0,l.useEffect)(k,ee);let A,j,M;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(A={position:`relative`,width:`100%`,height:`90px`,borderTop:`1px solid rgba(88, 166, 255, 0.2)`,background:`rgba(1, 4, 9, 0.88)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,display:`flex`,alignItems:`stretch`,flexShrink:0},j=(0,G.jsx)(`style`,{children:bre}),M={display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`0 16px`,borderRight:`1px solid rgba(88, 166, 255, 0.15)`,minWidth:80,flexShrink:0},t[21]=A,t[22]=j,t[23]=M):(A=t[21],j=t[22],M=t[23]);let N=d?`Pause Evolution`:`Play Evolution`,P=`1.5px solid ${d?`#58a6ff`:`rgba(88, 166, 255, 0.35)`}`,te=d?`rgba(88, 166, 255, 0.2)`:`rgba(88, 166, 255, 0.06)`,F=d?`0 0 10px rgba(88, 166, 255, 0.4)`:`none`,I;t[24]!==P||t[25]!==te||t[26]!==F?(I={width:34,height:34,borderRadius:`50%`,border:P,background:te,color:`#58a6ff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`,boxShadow:F},t[24]=P,t[25]=te,t[26]=F,t[27]=I):I=t[27];let ne;t[28]===d?ne=t[29]:(ne=d?(0,G.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,G.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,G.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}):(0,G.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,G.jsx)(`polygon`,{points:`5,3 19,12 5,21`})}),t[28]=d,t[29]=ne);let re;t[30]!==N||t[31]!==I||t[32]!==ne||t[33]!==O?(re=(0,G.jsx)(`button`,{id:`temporal-play-btn`,onClick:O,title:N,style:I,children:ne}),t[30]=N,t[31]=I,t[32]=ne,t[33]=O,t[34]=re):re=t[34];let ie=d?`#58a6ff`:`#8b949e`,ae;t[35]===ie?ae=t[36]:(ae={fontSize:10,color:ie,fontFamily:`monospace`,letterSpacing:`0.04em`,transition:`color 0.2s`},t[35]=ie,t[36]=ae);let oe;t[37]!==m||t[38]!==ae?(oe=(0,G.jsx)(`span`,{style:ae,children:m}),t[37]=m,t[38]=ae,t[39]=oe):oe=t[39];let se;t[40]!==re||t[41]!==oe?(se=(0,G.jsxs)(`div`,{style:M,children:[re,oe]}),t[40]=re,t[41]=oe,t[42]=se):se=t[42];let ce;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(ce={position:`absolute`,top:5,left:100,fontSize:10,fontWeight:600,letterSpacing:`0.1em`,color:`rgba(88, 166, 255, 0.55)`,textTransform:`uppercase`,pointerEvents:`none`,zIndex:2},t[43]=ce):ce=t[43];let L;t[44]===_?L=t[45]:(L=_.getFullYear(),t[44]=_,t[45]=L);let R;t[46]===v?R=t[47]:(R=v.getFullYear(),t[46]=v,t[47]=R);let le;t[48]!==L||t[49]!==R?(le=(0,G.jsxs)(`div`,{style:ce,children:[`Temporal Scrubber · `,L,`-`,R]}),t[48]=L,t[49]=R,t[50]=le):le=t[50];let z;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(z={flex:1,overflow:`hidden`,position:`relative`},t[51]=z):z=t[51];let B;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,G.jsx)(`div`,{className:`sem-timeline-wrap`,style:z,children:(0,G.jsx)(`div`,{ref:a,style:{width:`100%`,height:`100%`,position:`relative`}})}),t[52]=B):B=t[52];let V;return t[53]!==se||t[54]!==le?(V=(0,G.jsxs)(`div`,{style:A,children:[j,se,le,B]}),t[53]=se,t[54]=le,t[55]=V):V=t[55],V}var Sre=[`community`,`cluster`,`module`,`group`,`category`,`domain`,`layer`,`source`,`nodeType`];function D9(e,t){if(t===`nodeType`){let t=e.nodeType;return typeof t==`string`&&t.trim()?t:null}let n=e.properties?.[t];return typeof n==`string`&&n.trim()?n:null}function Cre(e,t){if(e.length<=1||t<=0)return 0;let n=0;for(let r of e){let e=r/t;n-=e*Math.log(e)}return n/Math.log(e.length)}function wre(e){let t=null,n=0;for(let r of Sre){let i=new Map,a=0;for(let t of e){let e=D9(t.attributes,r);e&&(a+=1,i.set(e,(i.get(e)??0)+1))}let o=i.size;if(a===0||o<=1)continue;let s=[...i.values()],c=a/e.length,l=Math.max(...s)/a,u=Cre(s,a),d=Math.min(o,W.palette.semantic.length)/W.palette.semantic.length,f=u*.65+d*.2+c*.15;c>=.45&&u>=.45&&l<=.88&&f>n&&(t=r,n=f)}return t?(e,n)=>D9(n,t)??O9(e,n):(e,t)=>O9(e,t)}function O9(e,t){let n=Xr(e)%W.palette.semantic.length;return`${t.nodeType||`entity`}:${n}`}var k9=1e3;async function Tre(e,t){let n=null,r=[],i=null;for(;;){let a=new URL(`/api/graph/nodes`,window.location.origin);a.searchParams.set(`limit`,String(k9)),n&&a.searchParams.set(`cursor`,n);let o=await fetch(a.toString(),{signal:e});if(!o.ok)throw Error(`Fetch failed: ${o.status}`);let s=await o.json();if(!s.nodes?.length||(i=s.total??i,r.push(...s.nodes),t?.({phase:`nodes`,nodesLoaded:r.length,nodesTotal:i,edgesLoaded:0,edgesTotal:null,message:i?`Loading nodes ${r.length.toLocaleString()} of ${i.toLocaleString()}`:`Loading nodes ${r.length.toLocaleString()}`,progress:i?Math.min(r.length/Math.max(i,1),.45):.18}),!s.next_cursor))break;n=s.next_cursor,await A9()}return r}async function Ere(e,t,n,r){let i=null,a=[],o=null;for(;;){let s=new URL(`/api/graph/edges`,window.location.origin);s.searchParams.set(`limit`,String(k9)),i&&s.searchParams.set(`cursor`,i);let c=await fetch(s.toString(),{signal:e});if(!c.ok)throw Error(`Fetch failed: ${c.status}`);let l=await c.json();if(!l.edges?.length)break;o=l.total??o;let u=l.edges.filter(e=>t.has(e.source)&&t.has(e.target));if(a.push(...u),r?.({phase:`edges`,nodesLoaded:n.loaded,nodesTotal:n.total,edgesLoaded:a.length,edgesTotal:o,message:o?`Loading edges ${a.length.toLocaleString()} of ${o.toLocaleString()}`:`Loading edges ${a.length.toLocaleString()}`,progress:o?.45+Math.min(a.length/Math.max(o,1),1)*.35:.62}),!l.next_cursor)break;i=l.next_cursor,await A9()}return a}function A9(){return`scheduler`in window&&typeof window.scheduler?.yield==`function`?window.scheduler.yield():new Promise(e=>setTimeout(e,0))}function Dre(e){let t=(0,u.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{enabled:r,onGraphReady:i,onProgress:o}=n,s=r===void 0?!0:r,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=[`graph`,`full-load`],t[2]=c):c=t[2];let l;t[3]!==i||t[4]!==o?(l=async e=>{let{signal:t}=e,n=performance.now();o?.({phase:`nodes`,nodesLoaded:0,nodesTotal:null,edgesLoaded:0,edgesTotal:null,message:`Preparing graph load`,progress:.06});let r=await Tre(t,o),a=new Set(r.map(Are)),s=await Ere(t,a,{loaded:r.length,total:r.length},o),c=new Map;for(let e of a)c.set(e,0);for(let e of s)c.set(e.source,(c.get(e.source)??0)+1),c.set(e.target,(c.get(e.target)??0)+1);let l=Math.max(...c.values(),1),u=r.map(kre);o?.({phase:`styling`,nodesLoaded:r.length,nodesTotal:r.length,edgesLoaded:s.length,edgesTotal:s.length,message:`Computing graph styling`,progress:.86});let d=wre(u),f=new Map;for(let e of a){let t=c.get(e)??0,n=Math.log(t+1)/Math.log(l+1);f.set(e,n)}let p=u.map(e=>{let{id:t,attributes:n}=e,r=d(t,n),i=Xr(r)%W.palette.semantic.length,a=W.palette.semantic[i],o=f.get(t)??0,s=Zr(2.6,2.6+12.4*o,15.8);return{id:t,attributes:{...n,semanticGroup:r,color:a,baseColor:a,mutedColor:Qr(a,W.nodes.mutedAlpha),glowColor:Qr(a,.34),size:s,baseSize:s,visualPriority:o,labelPriority:o,strokeColor:$r(a,112),borderColor:$r(a,112),borderSize:.85}}}),m=new Set(s.map(Ore)),h=s.map(e=>({source:e.source,target:e.target,attributes:{weight:e.weight,edgeType:e.type,properties:e.properties,size:Zr(.45,.5+Math.sqrt(Math.max(Number(e.weight)||1,1))*.38,1.8),baseSize:Zr(.45,.5+Math.sqrt(Math.max(Number(e.weight)||1,1))*.38,1.8),color:W.palette.muted.edgeStructure,baseColor:W.palette.muted.edgeStructure,mutedColor:W.palette.muted.edgeOverview,visualPriority:Math.max(f.get(e.source)??0,f.get(e.target)??0),isBidirectional:m.has(`${e.target}::${e.source}`),edgeFamily:m.has(`${e.target}::${e.source}`)?`bidirectional`:`line`,curveGroup:m.has(`${e.target}::${e.source}`)?[e.source,e.target].sort().join(`::`):null,type:`line`}}));o?.({phase:`rendering`,nodesLoaded:p.length,nodesTotal:p.length,edgesLoaded:h.length,edgesTotal:h.length,message:`Rendering graph`,progress:.96}),mt(),ft(p),pt(h);let g={nodeCount:p.length,edgeCount:h.length,loadTimeMs:Math.round(performance.now()-n)};return o?.({phase:`rendering`,nodesLoaded:g.nodeCount,nodesTotal:g.nodeCount,edgesLoaded:g.edgeCount,edgesTotal:g.edgeCount,message:`Graph ready`,progress:1}),i?.(g),g},t[3]=i,t[4]=o,t[5]=l):l=t[5];let d;return t[6]!==s||t[7]!==l?(d={queryKey:c,enabled:s,staleTime:1/0,queryFn:l},t[6]=s,t[7]=l,t[8]=d):d=t[8],a(d)}function Ore(e){return`${e.source}::${e.target}`}function kre(e){let t=Number(e.properties?.x??Math.random()*1e3-500),n=Number(e.properties?.y??Math.random()*1e3-500);return{id:e.id,attributes:{label:e.content||e.id,x:t,y:n,nodeType:e.type,content:e.content,valid_from:e.valid_from,valid_until:e.valid_until,properties:e.properties}}}function Are(e){return e.id}function jre(){let e=(0,u.c)(2),t=s(),n;return e[0]===t?n=e[1]:(n=()=>t.invalidateQueries({queryKey:[`graph`,`full-load`]}),e[0]=t,e[1]=n),n}var j9=`legend-panel`,Mre=8,Nre={id:`legend`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`legend-toggle`,label:`Legend`,title:`Toggle semantic legend`,active:e.isPanelOpen(j9),order:20,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:j9})}],renderPanel:e=>{if(!e.isPanelOpen(j9))return null;let t=new Map;e.graph.forEachNode((n,r)=>{let i=String(r.semanticGroup||r.nodeType||`entity`),a=String(r.baseColor||e.theme.palette.semantic[0]),o=t.get(i);t.set(i,{count:(o?.count??0)+1,color:a})});let n=[...t.entries()].map(([e,t])=>({group:e,...t})).sort((e,t)=>t.count-e.count).slice(0,Mre);return{id:j9,title:`Legend`,placement:`bottom`,order:10,content:(0,G.jsxs)(`div`,{style:Pre,children:[(0,G.jsx)(`div`,{style:Fre,children:`Semantic groups`}),n.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:n.map(e=>(0,G.jsxs)(`div`,{style:Ire,children:[(0,G.jsx)(`span`,{style:{...Lre,background:e.color,boxShadow:`0 0 0 1px rgba(255,255,255,0.06), 0 0 18px ${e.color}44`}}),(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,G.jsx)(`div`,{style:Rre,children:e.group}),(0,G.jsxs)(`div`,{style:zre,children:[e.count.toLocaleString(),` nodes`]})]})]},e.group))}):(0,G.jsx)(`div`,{style:Bre,children:`Legend will populate when the graph metadata is available.`})]})}}},Pre={display:`flex`,flexDirection:`column`,gap:12},Fre={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},Ire={display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},Lre={width:10,height:10,borderRadius:999,flexShrink:0},Rre={color:`#f3f7fd`,fontSize:13,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},zre={color:`#8ea4be`,fontSize:12},Bre={color:`#8ea4be`,fontSize:12,lineHeight:1.5},M9=`neighborhood-panel`,Vre=10,Hre={id:`neighborhood-panel`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`neighborhood-toggle`,label:`Neighbors`,title:`Toggle neighborhood panel`,active:e.isPanelOpen(M9),order:30,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:M9})}],renderPanel:e=>{if(!e.isPanelOpen(M9))return null;let t=e.getSelectedNodeState();if(!t)return{id:M9,title:`Neighborhood`,placement:`bottom`,order:20,content:(0,G.jsx)(`div`,{style:N9,children:`Select a node to inspect its local neighborhood.`})};let n=e.graph.neighbors(t.id).map(n=>{let r=e.graph.getNodeAttributes(n),i=0;if(e.graph.hasDirectedEdge(t.id,n)){let r=e.graph.getDirectedEdgeAttributes(t.id,n);i=Math.max(i,Number(r.weight??0))}if(e.graph.hasDirectedEdge(n,t.id)){let r=e.graph.getDirectedEdgeAttributes(n,t.id);i=Math.max(i,Number(r.weight??0))}return{id:n,label:String(r.label||n),nodeType:String(r.nodeType||`Entity`),color:String(r.baseColor||r.color||e.theme.palette.semantic[0]),weight:i,degree:e.graph.degree(n)}}).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.label.localeCompare(t.label):t.degree-e.degree:t.weight-e.weight).slice(0,Vre);return{id:M9,title:`Neighborhood`,placement:`bottom`,order:20,content:(0,G.jsxs)(`div`,{style:Ure,children:[(0,G.jsx)(`div`,{style:Wre,children:t.label}),(0,G.jsxs)(`div`,{style:Gre,children:[t.neighborCount.toLocaleString(),` direct neighbors in the full graph`]}),n.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:n.map(t=>(0,G.jsxs)(`button`,{type:`button`,onClick:()=>e.dispatchAction({type:`selectNode`,nodeId:t.id}),style:Kre,children:[(0,G.jsx)(`span`,{style:{...qre,background:t.color,boxShadow:`0 0 16px ${t.color}40`}}),(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1,textAlign:`left`},children:[(0,G.jsx)(`div`,{style:Jre,children:t.label}),(0,G.jsxs)(`div`,{style:Yre,children:[t.nodeType,` · degree `,t.degree,t.weight>0?` · weight ${t.weight.toFixed(2)}`:``]})]})]},t.id))}):(0,G.jsx)(`div`,{style:N9,children:`No direct neighbors are available for this node.`})]})}}},Ure={display:`flex`,flexDirection:`column`,gap:12},Wre={color:`#f3f7fd`,fontSize:14,fontWeight:700},Gre={color:`#8ea4be`,fontSize:12,lineHeight:1.5},Kre={display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`8px 10px`,background:`rgba(255,255,255,0.025)`,border:`1px solid rgba(255,255,255,0.06)`,borderRadius:12,cursor:`pointer`},qre={width:10,height:10,borderRadius:999,flexShrink:0},Jre={color:`#f3f7fd`,fontSize:13,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},Yre={color:`#8ea4be`,fontSize:12},N9={color:`#8ea4be`,fontSize:12,lineHeight:1.5},P9=`temporal-panel`;function F9(e){return e?`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`:`No time selected`}var Xre={id:`temporal-overlay`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`temporal-toggle`,label:`Temporal`,title:`Toggle temporal context panel`,active:e.isPanelOpen(P9),order:40,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:P9})}],renderOverlay:e=>{let t=e.getTemporalState();if(!t?.currentTime)return null;let n=F9(t.currentTime);return{id:`temporal-overlay-chip`,layer:1,order:10,element:(0,G.jsxs)(`div`,{style:{position:`absolute`,left:140,bottom:26,display:`inline-flex`,alignItems:`center`,gap:10,padding:`8px 12px`,borderRadius:999,border:`1px solid rgba(127, 208, 255, 0.18)`,background:`linear-gradient(135deg, rgba(6, 15, 27, 0.88), rgba(11, 22, 39, 0.76))`,boxShadow:`0 12px 30px rgba(0, 0, 0, 0.28)`,color:`#dce9f8`,fontSize:11,letterSpacing:`0.05em`,textTransform:`uppercase`,pointerEvents:`none`},children:[(0,G.jsx)(`span`,{style:{color:`#7fc6ff`,fontWeight:700},children:`Temporal`}),(0,G.jsx)(`span`,{children:n}),typeof t.activeNodeCount==`number`?(0,G.jsxs)(`span`,{style:{color:`#8ea4be`},children:[t.activeNodeCount.toLocaleString(),` active`]}):null]})}},renderPanel:e=>{if(!e.isPanelOpen(P9))return null;let t=e.getTemporalState();return{id:P9,title:`Temporal Context`,placement:`bottom`,order:30,content:(0,G.jsxs)(`div`,{style:Zre,children:[(0,G.jsx)(`div`,{style:Qre,children:`Current scrubber state`}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Current`}),(0,G.jsx)(`span`,{style:R9,children:F9(t?.currentTime??null)})]}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Bounds`}),(0,G.jsxs)(`span`,{style:R9,children:[t?.minDate??`1970`,` → `,t?.maxDate??`2030`]})]}),(0,G.jsxs)(`div`,{style:I9,children:[(0,G.jsx)(`span`,{style:L9,children:`Active nodes`}),(0,G.jsx)(`span`,{style:R9,children:typeof t?.activeNodeCount==`number`?t.activeNodeCount.toLocaleString():`All`})]})]})}}},Zre={display:`flex`,flexDirection:`column`,gap:10},Qre={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},I9={display:`flex`,justifyContent:`space-between`,gap:16,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},L9={color:`#8ea4be`,fontSize:12},R9={color:`#f3f7fd`,fontSize:12,fontWeight:600};function $re(e,t){let n=(0,u.c)(4),[r,i]=(0,l.useState)(e),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=setTimeout(()=>i(e),t);return()=>clearTimeout(n)},o=[t,e],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,l.useEffect)(a,o),r}var eie=`- .palantir-bg {- background:- radial-gradient(circle at top, rgba(77, 157, 255, 0.08), transparent 22%),- linear-gradient(180deg, #060b17 0%, #02060d 100%);- }- .palantir-grid {- position: absolute;- inset: 0;- background-image:- linear-gradient(rgba(88, 166, 255, 0.038) 1px, transparent 1px),- linear-gradient(90deg, rgba(88, 166, 255, 0.038) 1px, transparent 1px);- background-size: 42px 42px;- pointer-events: none;- z-index: 1;- }- .palantir-vignette {- position: absolute;- inset: 0;- background: radial-gradient(ellipse at center, transparent 34%, rgba(1, 4, 10, 0.78) 100%);- pointer-events: none;- z-index: 2;- }- .glass-header {- background: linear-gradient(180deg, rgba(7, 14, 25, 0.88) 0%, rgba(10, 18, 31, 0.62) 100%);- border-bottom: 1px solid rgba(112, 196, 255, 0.1);- backdrop-filter: blur(12px);- -webkit-backdrop-filter: blur(12px);- }- .glass-hud {- background: linear-gradient(135deg, rgba(8, 15, 27, 0.76), rgba(10, 19, 32, 0.58));- backdrop-filter: blur(14px) saturate(1.08);- -webkit-backdrop-filter: blur(14px) saturate(1.08);- border-left: 1px solid rgba(112, 196, 255, 0.14);- box-shadow: -10px 0 28px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(255, 255, 255, 0.04);- }- .hud-scrollbar::-webkit-scrollbar { width: 6px; }- .hud-scrollbar::-webkit-scrollbar-track { background: transparent; }- .hud-scrollbar::-webkit-scrollbar-thumb { background: rgba(88, 166, 255, 0.25); border-radius: 6px; }- .node-panel-collapse {- border: 1px solid rgba(255, 255, 255, 0.05);- border-radius: 12px;- background: rgba(0, 0, 0, 0.14);- overflow: hidden;- }- .node-panel-collapse + .node-panel-collapse {- margin-top: 12px;- }- .node-panel-summary {- list-style: none;- cursor: pointer;- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- padding: 12px 14px;- color: #c6d4e3;- font-size: 12px;- font-weight: 700;- letter-spacing: 0.04em;- text-transform: uppercase;- }- .node-panel-summary::-webkit-details-marker {- display: none;- }- .node-panel-summary::after {- content: "+";- color: rgba(127, 208, 255, 0.8);- font-size: 16px;- line-height: 1;- }- .node-panel-collapse[open] .node-panel-summary::after {- content: "−";- }- .node-panel-body {- padding: 0 14px 14px;- }- .graph-loading-overlay {- position: absolute;- inset: 0;- z-index: 9;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;- }- .graph-loading-card {- width: min(460px, calc(100% - 48px));- border-radius: 20px;- padding: 22px 22px 18px;- background: linear-gradient(135deg, rgba(7, 17, 31, 0.9), rgba(14, 28, 48, 0.78));- border: 1px solid rgba(127, 208, 255, 0.16);- box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.04);- backdrop-filter: blur(18px);- -webkit-backdrop-filter: blur(18px);- }- .graph-loading-dots {- display: inline-flex;- gap: 8px;- align-items: center;- }- .graph-loading-dot {- width: 10px;- height: 10px;- border-radius: 999px;- background: linear-gradient(135deg, rgba(127, 208, 255, 0.96), rgba(242, 182, 109, 0.96));- box-shadow: 0 0 18px rgba(127, 208, 255, 0.35);- animation: sem-loader-pulse 1.2s ease-in-out infinite;- }- .graph-loading-dot:nth-child(2) {- animation-delay: 0.14s;- }- .graph-loading-dot:nth-child(3) {- animation-delay: 0.28s;- }- @keyframes sem-loader-pulse {- 0%, 100% {- transform: translateY(0) scale(0.92);- opacity: 0.55;- }- 50% {- transform: translateY(-4px) scale(1.08);- opacity: 1;- }- }- .graph-loading-bar {- width: 100%;- height: 10px;- border-radius: 999px;- overflow: hidden;- background: rgba(255, 255, 255, 0.06);- border: 1px solid rgba(127, 208, 255, 0.1);- }- .graph-loading-bar > span {- display: block;- height: 100%;- border-radius: 999px;- background: linear-gradient(90deg, rgba(74, 163, 255, 0.9), rgba(127, 208, 255, 0.95), rgba(242, 182, 109, 0.92));- box-shadow: 0 0 28px rgba(74, 163, 255, 0.3);- transition: width 180ms ease;- }-`;function z9(e){switch(e){case`nodes`:return`Loading nodes`;case`edges`:return`Loading edges`;case`styling`:return`Computing layout and styling`;case`rendering`:return`Rendering graph`;default:return`Loading graph`}}function tie(e){let t=(0,u.c)(48),{progress:n,showGraphBehind:r}=e,i;t[0]===n?i=t[1]:(i=n??{phase:`nodes`,nodesLoaded:0,nodesTotal:null,edgesLoaded:0,edgesTotal:null,message:`Preparing graph load`,progress:.06},t[0]=n,t[1]=i);let a=i,o=r?`linear-gradient(180deg, rgba(1,4,9,0.08), rgba(1,4,9,0.28))`:`linear-gradient(180deg, rgba(1,4,9,0.32), rgba(1,4,9,0.58))`,s;t[2]===o?s=t[3]:(s={background:o},t[2]=o,t[3]=s);let c,l,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c={display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:14,marginBottom:14},l=(0,G.jsx)(`div`,{style:{color:`#ffffff`,fontSize:18,fontWeight:700,marginBottom:4},children:`Loading Graph`}),d={color:`#8fa8c6`,fontSize:13},t[4]=c,t[5]=l,t[6]=d):(c=t[4],l=t[5],d=t[6]);let f;t[7]===a.phase?f=t[8]:(f=z9(a.phase),t[7]=a.phase,t[8]=f);let p;t[9]===f?p=t[10]:(p=(0,G.jsxs)(`div`,{children:[l,(0,G.jsx)(`div`,{style:d,children:f})]}),t[9]=f,t[10]=p);let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsxs)(`div`,{className:`graph-loading-dots`,"aria-hidden":`true`,children:[(0,G.jsx)(`span`,{className:`graph-loading-dot`}),(0,G.jsx)(`span`,{className:`graph-loading-dot`}),(0,G.jsx)(`span`,{className:`graph-loading-dot`})]}),t[11]=m):m=t[11];let h;t[12]===p?h=t[13]:(h=(0,G.jsxs)(`div`,{style:c,children:[p,m]}),t[12]=p,t[13]=h);let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g={color:`#c6d4e3`,fontSize:13,marginBottom:12},t[14]=g):g=t[14];let _;t[15]===a.message?_=t[16]:(_=(0,G.jsx)(`div`,{style:g,children:a.message}),t[15]=a.message,t[16]=_);let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v={marginBottom:14},t[17]=v):v=t[17];let y;t[18]===a.progress?y=t[19]:(y=Math.round(Math.max(6,a.progress*100)),t[18]=a.progress,t[19]=y);let b=`${y}%`,x;t[20]===b?x=t[21]:(x=(0,G.jsx)(`div`,{className:`graph-loading-bar`,style:v,children:(0,G.jsx)(`span`,{style:{width:b}})}),t[20]=b,t[21]=x);let S;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(S={display:`flex`,gap:10,flexWrap:`wrap`},t[22]=S):S=t[22];let C;t[23]===a.nodesLoaded?C=t[24]:(C=a.nodesLoaded.toLocaleString(),t[23]=a.nodesLoaded,t[24]=C);let w;t[25]===a.nodesTotal?w=t[26]:(w=a.nodesTotal?` / ${a.nodesTotal.toLocaleString()}`:``,t[25]=a.nodesTotal,t[26]=w);let T;t[27]!==C||t[28]!==w?(T=(0,G.jsxs)(`span`,{style:$9,children:[C,w,` nodes`]}),t[27]=C,t[28]=w,t[29]=T):T=t[29];let E;t[30]===a.edgesLoaded?E=t[31]:(E=a.edgesLoaded.toLocaleString(),t[30]=a.edgesLoaded,t[31]=E);let D;t[32]===a.edgesTotal?D=t[33]:(D=a.edgesTotal?` / ${a.edgesTotal.toLocaleString()}`:``,t[32]=a.edgesTotal,t[33]=D);let O;t[34]!==E||t[35]!==D?(O=(0,G.jsxs)(`span`,{style:$9,children:[E,D,` edges`]}),t[34]=E,t[35]=D,t[36]=O):O=t[36];let ee;t[37]!==T||t[38]!==O?(ee=(0,G.jsxs)(`div`,{style:S,children:[T,O]}),t[37]=T,t[38]=O,t[39]=ee):ee=t[39];let k;t[40]!==h||t[41]!==_||t[42]!==x||t[43]!==ee?(k=(0,G.jsxs)(`div`,{className:`graph-loading-card`,children:[h,_,x,ee]}),t[40]=h,t[41]=_,t[42]=x,t[43]=ee,t[44]=k):k=t[44];let A;return t[45]!==k||t[46]!==s?(A=(0,G.jsx)(`div`,{className:`graph-loading-overlay`,style:s,children:k}),t[45]=k,t[46]=s,t[47]=A):A=t[47],A}function nie(e){return[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`].filter(t=>t in e).map(t=>({key:t,value:e[t]}))}function rie(e){if(!e||!dt.hasNode(e))return null;let t=dt.getNodeAttributes(e);return{id:e,label:String(t.label??e),content:String(t.content??t.label??e),nodeType:String(t.nodeType??`Entity`),color:typeof t.color==`string`?t.color:void 0,valid_from:t.valid_from??null,valid_until:t.valid_until??null,properties:t.properties??{},neighborCount:dt.neighbors(e).length}}function iie(e,t){let n=[];for(let r of e)try{let e=r.toolbarItems?.(t)??[];n.push(...e)}catch(e){console.error(`[GraphPlugin:${r.id}] toolbar collection failed`,e)}return n.sort((e,t)=>(e.order??0)-(t.order??0))}function aie(e,t){let n=[];for(let r of e)try{let e=r.renderPanel?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] panel render failed`,e)}return n.sort((e,t)=>(e.order??0)-(t.order??0))}function oie(e,t){let n=[];for(let r of e)try{let e=r.renderOverlay?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] overlay render failed`,e)}return n.sort((e,t)=>(e.layer??0)===(t.layer??0)?(e.order??0)-(t.order??0):(e.layer??0)-(t.layer??0))}function B9(e){let t=(0,u.c)(108),{nodeId:n,predictions:r,predictionType:i,onPredictionTypeChange:a,onRunPredictions:o,pathTargetId:s,onPathTargetChange:c,onTracePath:l,pathResult:d,onDownloadProvenance:f}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{style:{padding:32,textAlign:`center`},children:(0,G.jsx)(`p`,{style:{color:`#8b949e`,fontSize:14,margin:0},children:`Search for a node or click one in the canvas to inspect its properties.`})}),t[0]=e):e=t[0],e}let p,m,h,g,_,v,y,b,x,S,C;if(t[1]!==n||t[2]!==f||t[3]!==c||t[4]!==a||t[5]!==o||t[6]!==l||t[7]!==d||t[8]!==s||t[9]!==i||t[10]!==r){let e=dt.getNodeAttributes(n),u=e?.properties??{},w=nie(u),T=e?.color||`#58a6ff`,E=Object.entries(u).filter(uie),D,O;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(y={padding:24,display:`flex`,flexDirection:`column`,gap:18},D={borderBottom:`1px solid rgba(88, 166, 255, 0.2)`,paddingBottom:16},O={display:`flex`,alignItems:`center`,gap:10,marginBottom:8},t[22]=D,t[23]=O,t[24]=y):(D=t[22],O=t[23],y=t[24]);let ee=(0,G.jsxs)(`div`,{style:O,children:[(0,G.jsx)(`span`,{style:{background:T,boxShadow:`0 0 10px ${T}`,width:8,height:8,borderRadius:`50%`}}),(0,G.jsx)(`span`,{style:{color:T,fontSize:12,fontWeight:700},children:e?.nodeType||`Entity`})]}),k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k={margin:0,color:`#fff`,fontSize:20,fontWeight:700,wordBreak:`break-word`},t[25]=k):k=t[25];let A=String(e?.label??n),j;t[26]===A?j=t[27]:(j=(0,G.jsx)(`h3`,{style:k,children:A}),t[26]=A,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M={color:`#8b949e`,fontSize:12,marginTop:6},t[28]=M):M=t[28];let N;t[29]===n?N=t[30]:(N=(0,G.jsx)(`div`,{style:M,children:n}),t[29]=n,t[30]=N);let P;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(P={display:`flex`,gap:8,flexWrap:`wrap`,marginTop:12},t[31]=P):P=t[31];let te=e?.valid_from||e?.valid_until?(0,G.jsx)(`span`,{style:X9,children:`temporal`}):null,F=w.length?(0,G.jsxs)(`span`,{style:X9,children:[w.length,` source fields`]}):null,I;t[32]===r.length?I=t[33]:(I=r.length?(0,G.jsxs)(`span`,{style:X9,children:[r.length,` candidate links`]}):null,t[32]=r.length,t[33]=I);let ne;t[34]!==te||t[35]!==F||t[36]!==I?(ne=(0,G.jsxs)(`div`,{style:P,children:[te,F,I]}),t[34]=te,t[35]=F,t[36]=I,t[37]=ne):ne=t[37],t[38]!==ee||t[39]!==j||t[40]!==N||t[41]!==ne?(b=(0,G.jsxs)(`div`,{style:D,children:[ee,j,N,ne]}),t[38]=ee,t[39]=j,t[40]=N,t[41]=ne,t[42]=b):b=t[42],x=(e?.valid_from||e?.valid_until)&&(0,G.jsxs)(`div`,{style:{padding:`10px 12px`,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.2)`,borderRadius:8,fontSize:12,color:`#79c0ff`,fontFamily:`monospace`},children:[e?.valid_from?(0,G.jsxs)(`div`,{children:[`from: `,e.valid_from]}):null,e?.valid_until?(0,G.jsxs)(`div`,{children:[`until: `,e.valid_until]}):null]});let re,ie,ae;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,G.jsx)(`div`,{style:U9,children:`Actions`}),ie={display:`flex`,flexDirection:`column`,gap:10},ae={...G9,width:`100%`,justifyContent:`center`},t[43]=re,t[44]=ie,t[45]=ae):(re=t[43],ie=t[44],ae=t[45]);let oe;t[46]===o?oe=t[47]:(oe=(0,G.jsx)(`button`,{style:ae,onClick:o,children:`Run Link Prediction`}),t[46]=o,t[47]=oe);let se;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(se={display:`flex`,gap:8,flexWrap:`wrap`},t[48]=se):se=t[48];let ce;t[49]===f?ce=t[50]:(ce=(0,G.jsx)(`button`,{style:K9,onClick:()=>f(`json`),children:`Provenance JSON`}),t[49]=f,t[50]=ce);let L;t[51]===f?L=t[52]:(L=(0,G.jsx)(`button`,{style:K9,onClick:()=>f(`markdown`),children:`Provenance MD`}),t[51]=f,t[52]=L);let R;t[53]!==ce||t[54]!==L?(R=(0,G.jsxs)(`div`,{style:se,children:[ce,L]}),t[53]=ce,t[54]=L,t[55]=R):R=t[55];let le;t[56]!==oe||t[57]!==R?(le=(0,G.jsxs)(`div`,{style:ie,children:[oe,R]}),t[56]=oe,t[57]=R,t[58]=le):le=t[58];let z;t[59]===a?z=t[60]:(z=e=>a(e.target.value),t[59]=a,t[60]=z);let B;t[61]!==i||t[62]!==z?(B=(0,G.jsx)(`input`,{value:i,onChange:z,placeholder:`Optional candidate type filter, e.g. disease`,style:W9}),t[61]=i,t[62]=z,t[63]=B):B=t[63],t[64]!==le||t[65]!==B?(S=(0,G.jsxs)(`section`,{style:H9,children:[re,le,B]}),t[64]=le,t[65]=B,t[66]=S):S=t[66];let V;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,G.jsx)(`div`,{style:U9,children:`Trace Path`}),t[67]=V):V=t[67];let ue;t[68]===c?ue=t[69]:(ue=e=>c(e.target.value),t[68]=c,t[69]=ue);let de;t[70]!==s||t[71]!==ue?(de=(0,G.jsx)(`input`,{value:s,onChange:ue,placeholder:`Target node ID`,style:W9}),t[70]=s,t[71]=ue,t[72]=de):de=t[72];let fe;t[73]===l?fe=t[74]:(fe=(0,G.jsx)(`button`,{style:G9,onClick:l,children:`Trace Causal Path`}),t[73]=l,t[74]=fe);let pe;t[75]===d?pe=t[76]:(pe=d?.path?.length?(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:10},children:[d.path.map(lie),(0,G.jsxs)(`div`,{style:{color:`#79c0ff`,fontSize:12,marginTop:4},children:[`total weight: `,d.total_weight.toFixed(3)]})]}):(0,G.jsx)(`div`,{style:Y9,children:`Choose a target or click a candidate prediction to prepare a path trace.`}),t[75]=d,t[76]=pe),t[77]!==de||t[78]!==fe||t[79]!==pe?(C=(0,G.jsxs)(`section`,{style:H9,children:[V,de,fe,pe]}),t[77]=de,t[78]=fe,t[79]=pe,t[80]=C):C=t[80];let me=r.length>0,he;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Candidate Links`}),t[81]=he):he=t[81];let ge;t[82]!==c||t[83]!==r?(ge=(0,G.jsx)(`div`,{className:`node-panel-body`,children:r.length>0?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:r.map(e=>(0,G.jsxs)(`button`,{style:q9,onClick:()=>c(e.target),children:[(0,G.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.label||e.target}),(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.type}),(0,G.jsxs)(`div`,{style:{color:`#58a6ff`,fontSize:12,marginTop:4},children:[`confidence `,e.score.toFixed(3)]})]},`${e.target}-${e.type}`))}):(0,G.jsx)(`div`,{style:Y9,children:`Run link prediction to surface likely next-hop relationships.`})}),t[82]=c,t[83]=r,t[84]=ge):ge=t[84],t[85]!==me||t[86]!==ge?(m=(0,G.jsxs)(`details`,{className:`node-panel-collapse`,open:me,children:[he,ge]}),t[85]=me,t[86]=ge,t[87]=m):m=t[87];let _e;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Source Attribution`}),t[88]=_e):_e=t[88];let ve=w.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:w.map(cie)}):(0,G.jsx)(`div`,{style:Y9,children:`No explicit attribution metadata was found on this node.`});t[89]===ve?h=t[90]:(h=(0,G.jsxs)(`details`,{className:`node-panel-collapse`,children:[_e,(0,G.jsx)(`div`,{className:`node-panel-body`,children:ve})]}),t[89]=ve,t[90]=h),_=`node-panel-collapse`,t[91]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,G.jsx)(`summary`,{className:`node-panel-summary`,children:`Properties`}),t[91]=v):v=t[91],p=`node-panel-body`,g=E.length?(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:E.map(sie)}):(0,G.jsx)(`div`,{style:Y9,children:`No additional properties are attached to this node.`}),t[1]=n,t[2]=f,t[3]=c,t[4]=a,t[5]=o,t[6]=l,t[7]=d,t[8]=s,t[9]=i,t[10]=r,t[11]=p,t[12]=m,t[13]=h,t[14]=g,t[15]=_,t[16]=v,t[17]=y,t[18]=b,t[19]=x,t[20]=S,t[21]=C}else p=t[11],m=t[12],h=t[13],g=t[14],_=t[15],v=t[16],y=t[17],b=t[18],x=t[19],S=t[20],C=t[21];let w;t[92]!==p||t[93]!==g?(w=(0,G.jsx)(`div`,{className:p,children:g}),t[92]=p,t[93]=g,t[94]=w):w=t[94];let T;t[95]!==w||t[96]!==_||t[97]!==v?(T=(0,G.jsxs)(`details`,{className:_,children:[v,w]}),t[95]=w,t[96]=_,t[97]=v,t[98]=T):T=t[98];let E;return t[99]!==m||t[100]!==h||t[101]!==T||t[102]!==y||t[103]!==b||t[104]!==x||t[105]!==S||t[106]!==C?(E=(0,G.jsxs)(`aside`,{style:y,children:[b,x,S,C,m,h,T]}),t[99]=m,t[100]=h,t[101]=T,t[102]=y,t[103]=b,t[104]=x,t[105]=S,t[106]=C,t[107]=E):E=t[107],E}function sie(e){let[t,n]=e;return(0,G.jsxs)(`div`,{style:J9,children:[(0,G.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,G.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function cie(e){let{key:t,value:n}=e;return(0,G.jsxs)(`div`,{style:J9,children:[(0,G.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,G.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function lie(e,t){return(0,G.jsxs)(`div`,{style:fie,children:[t+1,`. `,e]},`${e}-${t}`)}function uie(e){let[t]=e;return![`x`,`y`,`valid_from`,`valid_until`,`content`,`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`].includes(t)}function die(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`focused`),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)([]),[d,f]=(0,l.useState)(``),[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(null),[ee,k]=(0,l.useState)({"legend-panel":!1,"neighborhood-panel":!1,"temporal-panel":!1}),[A,j]=(0,l.useState)(0),M=$re(T,150),N=(0,l.useRef)(new Set),P=(0,l.useRef)(null),te=(0,l.useRef)(null),F=(0,l.useRef)({hoveredNodeId:null,selectedNodeId:``,focusedNodeId:``,activePath:[],viewMode:`focused`,zoomTier:`overview`,isLayoutRunning:!1}),I=jre(),{data:ne,isLoading:re,isFetching:ie,isError:ae,error:oe}=Dre({enabled:!0,onGraphReady:()=>{r(!0),O(null)},onProgress:O});(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/temporal/bounds`);if(!t.ok||e)return;let n=await t.json();e||w(n)}catch{e||w(null)}})(),()=>{e=!0}},[ne?.nodeCount,ne?.edgeCount]),(0,l.useEffect)(()=>{if(!M||re)return;let e=!1;return(async()=>{try{let t=M.toISOString(),n=await fetch(`/api/temporal/snapshot?at=${encodeURIComponent(t)}`);if(!n.ok||e)return;let r=await n.json();if(e)return;let i=new Set(r.active_node_ids);requestAnimationFrame(()=>{e||(N.current.forEach(e=>{!i.has(e)&&dt.hasNode(e)&&dt.setNodeAttribute(e,`hidden`,!0)}),i.forEach(e=>{dt.hasNode(e)&&dt.setNodeAttribute(e,`hidden`,!1)}),N.current=i,S(r.active_node_count),P.current?.getSigma()?.refresh())})}catch(t){e||console.error(`[Temporal] Snapshot fetch failed`,t)}})(),()=>{e=!0}},[M,re]);let se=(0,l.useCallback)(e=>{t(e),b(null),e&&r(!1)},[]),ce=(0,l.useCallback)(async()=>{if(!o.trim()){u([]);return}f(``);try{let e=await fetch(`/api/graph/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:o,limit:8})});if(!e.ok)throw Error(`Search failed with status ${e.status}`);let t=await e.json();u(t.results||[]),t.results?.length&&se(t.results[0].node.id)}catch(e){f(e instanceof Error?e.message:`Search failed`)}},[se,o]),L=(0,l.useCallback)(async()=>{if(e)try{let t=await fetch(`/api/enrich/links`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({node_id:e,top_n:6,candidate_type:p||void 0,min_score:0})});if(!t.ok)throw Error(`Link prediction failed with status ${t.status}`);g((await t.json()).predictions||[])}catch(e){console.error(`[GraphWorkspace] prediction failed`,e),g([])}},[p,e]),R=(0,l.useCallback)(async()=>{if(!(!e||!_.trim()))try{let t=await fetch(`/api/graph/node/${encodeURIComponent(e)}/path?target=${encodeURIComponent(_.trim())}&algorithm=dijkstra`);if(!t.ok)throw Error(`Path lookup failed with status ${t.status}`);let n=await t.json();if(b(n),n.path?.length){let e=n.path[n.path.length-1];dt.hasNode(e)&&P.current?.focusNode(e)}}catch(e){console.error(`[GraphWorkspace] path trace failed`,e),b(null)}},[_,e]),le=(0,l.useCallback)(async t=>{if(!e)return;let n=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(e)}&format=${t===`markdown`?`markdown`:`json`}`);if(!n.ok)throw Error(`Provenance report failed with status ${n.status}`);let r=await n.blob(),i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${e}_provenance.${t===`markdown`?`md`:`json`}`,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)},[e]);(0,l.useEffect)(()=>{let e=window.location.protocol===`https:`?`wss:`:`ws:`,t=new WebSocket(`${e}//${window.location.host}/ws/graph-updates`);return t.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.event===`connection_ack`||t.event!==`graph_mutation`)return;let n=t.data?.event_type,r=t.data?.payload;n===`ADD_NODE`&&r?.id&&(ft([{id:r.id,attributes:{label:r.properties?.content||r.id,x:Number(r.properties?.x??Math.random()*1e3-500),y:Number(r.properties?.y??Math.random()*1e3-500),nodeType:r.type,content:r.properties?.content||r.id,valid_from:r.properties?.valid_from??null,valid_until:r.properties?.valid_until??null,properties:r.properties||{},size:8,baseSize:8,semanticGroup:r.type||`inferred`,color:W.palette.accent.path,baseColor:W.palette.accent.path,mutedColor:Qr(W.palette.accent.path,W.nodes.mutedAlpha),glowColor:Qr(W.palette.accent.path,.36),visualPriority:.82,labelPriority:.82,strokeColor:W.palette.background.nodeBorder,borderColor:W.palette.background.nodeBorder,borderSize:.85}}]),P.current?.getSigma()?.refresh()),n===`ADD_EDGE`&&(pt([{source:r.source_id,target:r.target_id,attributes:{weight:Number(r.weight??1),edgeType:r.type,properties:r.properties||{},size:1,baseSize:1,color:r.properties?.inferred?W.palette.accent.path:W.palette.muted.edgeStructure,baseColor:r.properties?.inferred?W.palette.accent.path:W.palette.muted.edgeStructure,mutedColor:W.palette.muted.edgeOverview,visualPriority:r.properties?.inferred?.95:.5,isBidirectional:dt.hasDirectedEdge(r.target_id,r.source_id),edgeFamily:r.properties?.inferred?`path`:dt.hasDirectedEdge(r.target_id,r.source_id)?`bidirectional`:`line`,curveGroup:dt.hasDirectedEdge(r.target_id,r.source_id)?[r.source_id,r.target_id].sort().join(`::`):null,type:r.properties?.inferred?`arrow`:`line`}}]),P.current?.getSigma()?.refresh())}catch(e){console.error(`[GraphWorkspace] websocket update failed`,e)}},()=>{t.close()}},[]);let z=(0,l.useMemo)(()=>c.length?`${c.length} search result${c.length===1?``:`s`}`:null,[c.length]),B=(0,l.useMemo)(()=>{if(!e||!dt.hasNode(e))return null;let t=dt.neighbors(e).length;return i===`focused`?`${Math.min(t,16)+1} nodes in focused view`:`${t} direct neighbors highlighted`},[e,i]),V=re||ie,ue=!!ne?.nodeCount,de=y?.path??[],fe=ne,pe=(0,l.useMemo)(()=>rie(e),[e,ne?.nodeCount,ne?.edgeCount]),me=(0,l.useMemo)(()=>({currentTime:T,activeNodeCount:x,minDate:C?.min??void 0,maxDate:C?.max??void 0}),[x,T,C?.max,C?.min]),he=(0,l.useMemo)(()=>[{plugin:Nre,enabled:!0},{plugin:Hre,enabled:!0},{plugin:Xre,enabled:!0}],[]),ge=(0,l.useMemo)(()=>he.filter(e=>e.enabled!==!1).map(e=>e.plugin),[he]),_e=(0,l.useCallback)(e=>{switch(e.type){case`fitView`:P.current?.fitView();return;case`focusNode`:P.current?.focusNode(e.nodeId);return;case`selectNode`:se(e.nodeId);return;case`setViewMode`:a(e.viewMode);return;case`togglePanel`:k(t=>({...t,[e.panelId]:!t[e.panelId]}));return;case`openPanel`:k(t=>({...t,[e.panelId]:!0}));return;case`closePanel`:k(t=>({...t,[e.panelId]:!1}));return}},[se]),ve=(0,l.useMemo)(()=>({get sigma(){return te.current?.sigma??null},get graph(){return dt},get displayGraph(){return te.current?.displayGraph??dt},theme:W,getInteractionState:()=>F.current,getSelectedNodeState:()=>pe,getGraphSummary:()=>fe,getTemporalState:()=>me,isPanelOpen:e=>!!ee[e],dispatchAction:_e}),[fe,_e,ee,pe,me]),ye=(0,l.useCallback)(e=>{te.current=e,j(e=>e+1)},[]),be=(0,l.useCallback)(e=>{F.current=e;for(let t of ge)try{t.onStateChange(ve,e)}catch(e){console.error(`[GraphPlugin:${t.id}] state update failed`,e)}},[ge,ve]);(0,l.useEffect)(()=>{if(!te.current)return;let e=[];for(let t of ge)try{t.mount(ve),e.push(t)}catch(e){console.error(`[GraphPlugin:${t.id}] mount failed`,e)}return()=>{for(let t of e.reverse())try{t.unmount(ve)}catch(e){console.error(`[GraphPlugin:${t.id}] unmount failed`,e)}}},[ge,ve,A]);let xe=(0,l.useMemo)(()=>iie(ge,ve),[ge,ve]),Se=(0,l.useMemo)(()=>aie(ge,ve),[ge,ve]),Ce=(0,l.useMemo)(()=>oie(ge,ve),[ge,ve]),we=Se.filter(e=>e.placement===`side`),Te=Se.filter(e=>e.placement===`bottom`);return(0,G.jsxs)(`div`,{className:`palantir-bg`,style:{position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,G.jsx)(`style`,{children:eie}),(0,G.jsx)(`div`,{className:`palantir-grid`}),(0,G.jsx)(`div`,{className:`palantir-vignette`}),(0,G.jsxs)(`div`,{style:{flex:1,position:`relative`,zIndex:3,minHeight:0},children:[(0,G.jsx)(xee,{ref:P,onNodeClick:se,selectedNodeId:e,activePath:de,isLayoutRunning:n,viewMode:i,pluginOverlays:Ce.map(e=>e.element),onPluginRuntimeChange:ye,onInteractionStateChange:be}),V?(0,G.jsx)(tie,{progress:D,showGraphBehind:ue}):null]}),(0,G.jsx)(xre,{onTimeChange:E,minDate:C?.min??void 0,maxDate:C?.max??void 0}),(0,G.jsxs)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,zIndex:10},children:[(0,G.jsxs)(`header`,{className:`glass-header`,style:{pointerEvents:`auto`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`14px 24px`,gap:20},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`,flexWrap:`wrap`},children:[V&&D?(0,G.jsx)(`span`,{style:{color:`rgba(127, 208, 255, 0.9)`,fontSize:13},children:z9(D.phase)}):null,ne?(0,G.jsxs)(`span`,{style:V9,children:[ne.nodeCount.toLocaleString(),` nodes · `,ne.edgeCount.toLocaleString(),` edges`]}):null,x===null?null:(0,G.jsxs)(`span`,{style:{...V9,color:`#3fb950`,borderColor:`rgba(63, 185, 80, 0.25)`},children:[x.toLocaleString(),` active at selected time`]}),z?(0,G.jsx)(`span`,{style:V9,children:z}):null,B?(0,G.jsx)(`span`,{style:{...V9,color:`#f2b66d`,borderColor:`rgba(242, 182, 109, 0.24)`},children:B}):null,ae?(0,G.jsx)(`span`,{style:{color:`#ff7b72`,fontSize:13},children:oe.message}):null]}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,flexWrap:`wrap`,justifyContent:`flex-end`},children:[e?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,G.jsx)(`button`,{onClick:()=>a(`focused`),style:{...G9,background:i===`focused`?`rgba(31, 111, 235, 0.38)`:G9.background,borderColor:i===`focused`?`rgba(127, 208, 255, 0.42)`:`rgba(88, 166, 255, 0.3)`},title:`Inspect the selected node in a local focused graph`,children:`Focused View`}),(0,G.jsx)(`button`,{onClick:()=>a(`full`),style:{...G9,background:i===`full`?`rgba(31, 111, 235, 0.38)`:G9.background,borderColor:i===`full`?`rgba(127, 208, 255, 0.42)`:`rgba(88, 166, 255, 0.3)`},children:`Full Graph`})]}):null,(0,G.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&ce()},placeholder:`Search a node, e.g. Metformin`,style:{...W9,minWidth:280,margin:0}}),(0,G.jsx)(`button`,{onClick:()=>void ce(),style:G9,disabled:V,children:`Search`}),(0,G.jsx)(`button`,{onClick:()=>r(e=>!e),style:G9,disabled:V,children:n?`Pause Layout`:`Run Layout`}),(0,G.jsx)(`button`,{onClick:I,style:G9,disabled:V,children:`Reload`}),xe.length?(0,G.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:xe.map(e=>(0,G.jsx)(`button`,{onClick:e.onClick,title:e.title,style:{...K9,background:e.active?`rgba(31, 111, 235, 0.28)`:K9.background,borderColor:e.active?`rgba(127, 208, 255, 0.35)`:`rgba(255, 255, 255, 0.08)`,color:e.active?`#e6f2ff`:K9.color},children:e.label},e.id))}):null]})]}),d?(0,G.jsx)(`div`,{style:{position:`absolute`,top:70,left:24,color:`#ff7b72`,fontSize:12,pointerEvents:`auto`},children:d}):null,c.length?(0,G.jsxs)(`div`,{className:`glass-hud hud-scrollbar`,style:{position:`absolute`,top:72,left:24,width:320,maxHeight:280,overflowY:`auto`,pointerEvents:`auto`,borderRadius:12,border:`1px solid rgba(88, 166, 255, 0.14)`,padding:12},children:[(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12,marginBottom:8},children:`Search results`}),(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:c.map(e=>(0,G.jsxs)(`button`,{style:q9,onClick:()=>se(e.node.id),children:[(0,G.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.node.content||e.node.id}),(0,G.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.node.type}),(0,G.jsxs)(`div`,{style:{color:`#58a6ff`,fontSize:12,marginTop:4},children:[`score `,e.score.toFixed(3)]})]},e.node.id))})]}):null,we.length?(0,G.jsx)(`div`,{className:`glass-hud hud-scrollbar`,style:{pointerEvents:`auto`,position:`absolute`,left:24,top:c.length?370:72,width:320,maxHeight:e?280:340,overflowY:`auto`,borderRadius:14,border:`1px solid rgba(88, 166, 255, 0.14)`,padding:12,display:`flex`,flexDirection:`column`,gap:12},children:we.map(e=>(0,G.jsxs)(`div`,{style:Z9,children:[(0,G.jsx)(`div`,{style:Q9,children:e.title}),e.content]},e.id))}):null,Te.length?(0,G.jsx)(`div`,{style:{position:`absolute`,left:24,bottom:104,width:340,display:`flex`,flexDirection:`column`,gap:12,pointerEvents:`auto`},children:Te.map(e=>(0,G.jsxs)(`div`,{className:`glass-hud`,style:{...Z9,padding:14},children:[(0,G.jsx)(`div`,{style:Q9,children:e.title}),e.content]},e.id))}):null,(0,G.jsx)(`div`,{className:`glass-hud hud-scrollbar`,style:{pointerEvents:`auto`,position:`absolute`,right:0,top:52,bottom:90,width:380,overflowY:`auto`,transition:`transform 0.3s cubic-bezier(0.16,1,0.3,1)`,transform:e?`translateX(0)`:`translateX(100%)`},children:(0,G.jsx)(B9,{nodeId:e,predictions:h,predictionType:p,onPredictionTypeChange:m,onRunPredictions:()=>void L(),pathTargetId:_,onPathTargetChange:v,onTracePath:()=>void R(),pathResult:y,onDownloadProvenance:e=>void le(e)})})]})]})}var V9={background:`rgba(77, 157, 255, 0.09)`,color:`#7fc6ff`,padding:`4px 10px`,borderRadius:999,fontSize:11,border:`1px solid ${W.palette.background.shellBorder}`,backdropFilter:`blur(8px)`},H9={display:`flex`,flexDirection:`column`,gap:10,padding:14,background:`linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015))`,border:`1px solid rgba(255, 255, 255, 0.06)`,borderRadius:14},U9={color:`#8b949e`,fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.08em`},W9={width:`100%`,background:`rgba(4, 10, 18, 0.5)`,border:`1px solid ${W.palette.background.shellBorder}`,color:`#edf5ff`,borderRadius:12,padding:`11px 13px`,fontSize:13,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.03)`},G9={background:`linear-gradient(135deg, rgba(24, 63, 133, 0.42), rgba(35, 85, 176, 0.28))`,color:`#fff`,border:`1px solid ${W.palette.background.shellBorder}`,borderRadius:12,padding:`9px 12px`,cursor:`pointer`,fontWeight:700,fontSize:12,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 22px ${W.palette.background.shellGlow}`},K9={...G9,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.08)`,color:`#c6d4e3`,fontWeight:600},q9={textAlign:`left`,padding:12,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.12)`,borderRadius:10,cursor:`pointer`},fie={color:`#e6edf3`,fontSize:13,padding:`8px 10px`,background:`rgba(255, 255, 255, 0.03)`,borderRadius:8},J9={background:`rgba(0, 0, 0, 0.2)`,padding:`10px 12px`,borderRadius:10,border:`1px solid rgba(255, 255, 255, 0.05)`},Y9={color:`#8b949e`,fontSize:12,lineHeight:1.5},X9={background:`rgba(255, 255, 255, 0.04)`,color:`#9fb6d2`,padding:`4px 8px`,borderRadius:999,fontSize:11,border:`1px solid rgba(255, 255, 255, 0.06)`},Z9={borderRadius:14,border:`1px solid rgba(88, 166, 255, 0.14)`,background:`linear-gradient(180deg, rgba(7, 14, 25, 0.76), rgba(10, 18, 31, 0.66))`,boxShadow:`0 14px 38px rgba(0, 0, 0, 0.24)`,padding:14,display:`flex`,flexDirection:`column`,gap:12},Q9={color:`#f3f7fd`,fontSize:12,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},$9={background:`rgba(255, 255, 255, 0.04)`,color:`#cfe3ff`,padding:`6px 10px`,borderRadius:999,fontSize:12,border:`1px solid rgba(127, 208, 255, 0.12)`};export{die as GraphWorkspace};\ No newline at end of filediff --git a/semantica/static/assets/ImportExportWorkspace-DkIJ7P4B.js b/semantica/static/assets/ImportExportWorkspace-416NEz-m.jssimilarity index 98%rename from semantica/static/assets/ImportExportWorkspace-DkIJ7P4B.jsrename to semantica/static/assets/ImportExportWorkspace-416NEz-m.jsindex f8918dea..3f379a53 100644--- a/semantica/static/assets/ImportExportWorkspace-DkIJ7P4B.js+++ b/semantica/static/assets/ImportExportWorkspace-416NEz-m.js@@ -1,4 +1,4 @@-import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{a as r,i,n as a,r as o,t as s}from"./es-BlaQ22nu.js";import{t as c}from"./index-BaPyswgU.js";var l=c(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),u=c(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),d=c(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),f=t(e(),1),p=n(),m=`+import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{a as r,i,n as a,r as o,t as s}from"./es-BuB2EIkJ.js";import{t as c}from"./index-Ba72GzGt.js";var l=c(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),u=c(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),d=c(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),f=t(e(),1),p=n(),m=`.glass-panel {background: linear-gradient(135deg, rgba(13,17,23,0.75), rgba(22,27,34,0.6));backdrop-filter: blur(16px) saturate(1.2);diff --git a/semantica/static/assets/LineageDiagram-ConWITgS.js b/semantica/static/assets/LineageDiagram-Ya8919Yq.jssimilarity index 99%rename from semantica/static/assets/LineageDiagram-ConWITgS.jsrename to semantica/static/assets/LineageDiagram-Ya8919Yq.jsindex c399fdf1..ba249b1b 100644--- a/semantica/static/assets/LineageDiagram-ConWITgS.js+++ b/semantica/static/assets/LineageDiagram-Ya8919Yq.js@@ -1,4 +1,4 @@-import{n as e,o as t,r as n,t as r}from"./jsx-runtime-B3dmMxJS.js";import{a as i}from"./index-BaPyswgU.js";import{t as a}from"./shim-s-9Axq3H.js";var o=t(e(),1),s=r();function c(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=c(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var l={value:()=>{}};function u(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new d(n)}function d(e){this._=e}function f(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}d.prototype=u.prototype={constructor:d,on:function(e,t){var n=this._,r=f(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=p(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=m(n[i],e.name,t);else if(t==null)for(i in n)n[i]=m(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new d(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function p(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function m(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=l,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var h={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function g(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),h.hasOwnProperty(t)?{space:h[t],local:e}:e}function _(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function v(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function y(e){var t=g(e);return(t.local?v:_)(t)}function b(){}function x(e){return e==null?b:function(){return this.querySelector(e)}}function S(e){typeof e!=`function`&&(e=x(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new K(r,this._parents)}function C(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function w(){return[]}function T(e){return e==null?w:function(){return this.querySelectorAll(e)}}function E(e){return function(){return C(e.apply(this,arguments))}}function D(e){e=typeof e==`function`?E(e):T(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new K(r,i)}function O(e){return function(){return this.matches(e)}}function k(e){return function(t){return t.matches(e)}}var A=Array.prototype.find;function j(e){return function(){return A.call(this.children,e)}}function M(){return this.firstElementChild}function N(e){return this.select(e==null?M:j(typeof e==`function`?e:k(e)))}var P=Array.prototype.filter;function F(){return Array.from(this.children)}function I(e){return function(){return P.call(this.children,e)}}function L(e){return this.selectAll(e==null?F:I(typeof e==`function`?e:k(e)))}function R(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new K(r,this._parents)}function z(e){return Array(e.length)}function B(){return new K(this._enter||this._groups.map(z),this._parents)}function V(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}V.prototype={constructor:V,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function H(e){return function(){return e}}function U(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new V(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function W(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new V(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function G(e){return e.__data__}function ee(e,t){if(!arguments.length)return Array.from(this,G);var n=t?W:U,r=this._parents,i=this._groups;typeof e!=`function`&&(e=H(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=te(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new K(o,r),o._enter=s,o._exit=c,o}function te(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ne(){return new K(this._exit||this._groups.map(z),this._parents)}function re(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ie(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new K(s,this._parents)}function ae(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function oe(e){e||=se;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new K(i,this._parents).order()}function se(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function le(){return Array.from(this)}function ue(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function de(){let e=0;for(let t of this)++e;return e}function fe(){return!this.node()}function pe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function me(e){return function(){this.removeAttribute(e)}}function he(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ge(e,t){return function(){this.setAttribute(e,t)}}function _e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ve(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ye(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function be(e,t){var n=g(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?he:me:typeof t==`function`?n.local?ye:ve:n.local?_e:ge)(n,t))}function xe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Se(e){return function(){this.style.removeProperty(e)}}function Ce(e,t,n){return function(){this.style.setProperty(e,t,n)}}function we(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Te(e,t,n){return arguments.length>1?this.each((t==null?Se:typeof t==`function`?we:Ce)(e,t,n??``)):Ee(this.node(),e)}function Ee(e,t){return e.style.getPropertyValue(t)||xe(e).getComputedStyle(e,null).getPropertyValue(t)}function De(e){return function(){delete this[e]}}function Oe(e,t){return function(){this[e]=t}}function ke(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ae(e,t){return arguments.length>1?this.each((t==null?De:typeof t==`function`?ke:Oe)(e,t)):this.node()[e]}function je(e){return e.trim().split(/^|\s+/)}function Me(e){return e.classList||new Ne(e)}function Ne(e){this._node=e,this._names=je(e.getAttribute(`class`)||``)}Ne.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Pe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ie(e){return function(){Pe(this,e)}}function Le(e){return function(){Fe(this,e)}}function Re(e,t){return function(){(t.apply(this,arguments)?Pe:Fe)(this,e)}}function ze(e,t){var n=je(e+``);if(arguments.length<2){for(var r=Me(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Re:t?Ie:Le)(n,t))}function Be(){this.textContent=``}function Ve(e){return function(){this.textContent=e}}function He(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Ue(e){return arguments.length?this.each(e==null?Be:(typeof e==`function`?He:Ve)(e)):this.node().textContent}function We(){this.innerHTML=``}function Ge(e){return function(){this.innerHTML=e}}function Ke(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function qe(e){return arguments.length?this.each(e==null?We:(typeof e==`function`?Ke:Ge)(e)):this.node().innerHTML}function Je(){this.nextSibling&&this.parentNode.appendChild(this)}function Ye(){return this.each(Je)}function Xe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ze(){return this.each(Xe)}function Qe(e){var t=typeof e==`function`?e:y(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $e(){return null}function et(e,t){var n=typeof e==`function`?e:y(e),r=t==null?$e:typeof t==`function`?t:x(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function tt(){var e=this.parentNode;e&&e.removeChild(this)}function nt(){return this.each(tt)}function rt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function it(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function at(e){return this.select(e?it:rt)}function ot(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function st(e){return function(t){e.call(this,t,this.__data__)}}function ct(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function lt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function ut(e,t,n){return function(){var r=this.__on,i,a=st(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function dt(e,t,n){var r=ct(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?ut:lt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function ft(e,t,n){var r=xe(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function pt(e,t){return function(){return ft(this,e,t)}}function mt(e,t){return function(){return ft(this,e,t.apply(this,arguments))}}function ht(e,t){return this.each((typeof t==`function`?mt:pt)(e,t))}function*gt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var _t=[null];function K(e,t){this._groups=e,this._parents=t}function vt(){return new K([[document.documentElement]],_t)}function yt(){return this}K.prototype=vt.prototype={constructor:K,select:S,selectAll:D,selectChild:N,selectChildren:L,filter:R,data:ee,enter:B,exit:ne,join:re,merge:ie,selection:yt,order:ae,sort:oe,call:ce,nodes:le,node:ue,size:de,empty:fe,each:pe,attr:be,style:Te,property:Ae,classed:ze,text:Ue,html:qe,raise:Ye,lower:Ze,append:Qe,insert:et,remove:nt,clone:at,datum:ot,on:dt,dispatch:ht,[Symbol.iterator]:gt};function q(e){return typeof e==`string`?new K([[document.querySelector(e)]],[document.documentElement]):new K([[e]],_t)}function bt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function J(e,t){if(e=bt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var xt={passive:!1},St={capture:!0,passive:!1};function Ct(e){e.stopImmediatePropagation()}function wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Tt(e){var t=e.document.documentElement,n=q(e).on(`dragstart.drag`,wt,St);`onselectstart`in t?n.on(`selectstart.drag`,wt,St):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Et(e,t){var n=e.document.documentElement,r=q(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,wt,St),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Dt=e=>()=>e;function Ot(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Ot.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kt(e){return!e.ctrlKey&&!e.button}function At(){return this.parentNode}function jt(e,t){return t??{x:e.x,y:e.y}}function Mt(){return navigator.maxTouchPoints||`ontouchstart`in this}function Nt(){var e=kt,t=At,n=jt,r=Mt,i={},a=u(`start`,`drag`,`end`),o=0,s,c,l,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(r).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xt).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(n,r){if(!(d||!e.call(this,n,r))){var i=b(this,t.call(this,n,r),n,r,`mouse`);i&&(q(n.view).on(`mousemove.drag`,h,St).on(`mouseup.drag`,g,St),Tt(n.view),Ct(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function h(e){if(wt(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>f}i.mouse(`drag`,e)}function g(e){q(e.view).on(`mousemove.drag mouseup.drag`,null),Et(e.view,l),wt(e),i.mouse(`end`,e)}function _(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=b(this,a,n,r,i[s].identifier,i[s]))&&(Ct(n),c(`start`,n,i[s]))}}function v(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(wt(e),a(`drag`,e,t[r]))}function y(e){var t=e.changedTouches,n=t.length,r,a;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(Ct(e),a(`end`,e,t[r]))}function b(e,t,r,s,c,l){var u=a.copy(),d=J(l||r,t),f,m,h;if((h=n.call(e,new Ot(`beforestart`,{sourceEvent:r,target:p,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return f=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=J(l||a,t),_=o;break}u.call(r,e,new Ot(r,{sourceEvent:a,subject:h,target:p,identifier:c,active:_,x:d[0]+f,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return p.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Dt(!!t),p):e},p.container=function(e){return arguments.length?(t=typeof e==`function`?e:Dt(e),p):t},p.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Dt(e),p):n},p.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Dt(!!e),p):r},p.on=function(){var e=a.on.apply(a,arguments);return e===a?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Pt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ft(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function It(){}var Lt=.7,Rt=1/Lt,zt=`\\s*([+-]?\\d+)\\s*`,Bt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Vt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ht=/^#([0-9a-f]{3,8})$/,Ut=RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),Wt=RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Gt=RegExp(`^rgba\\(${zt},${zt},${zt},${Bt}\\)$`),Kt=RegExp(`^rgba\\(${Vt},${Vt},${Vt},${Bt}\\)$`),qt=RegExp(`^hsl\\(${Bt},${Vt},${Vt}\\)$`),Jt=RegExp(`^hsla\\(${Bt},${Vt},${Vt},${Bt}\\)$`),Yt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pt(It,en,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xt,formatHex:Xt,formatHex8:Zt,formatHsl:Qt,formatRgb:$t,toString:$t});function Xt(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatHex8()}function Qt(){return pn(this).formatHsl()}function $t(){return this.rgb().formatRgb()}function en(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ht.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tn(t):n===3?new Y(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ut.exec(e))?new Y(t[1],t[2],t[3],1):(t=Wt.exec(e))?new Y(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gt.exec(e))?nn(t[1],t[2],t[3],t[4]):(t=Kt.exec(e))?nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qt.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=Jt.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):Yt.hasOwnProperty(e)?tn(Yt[e]):e===`transparent`?new Y(NaN,NaN,NaN,0):null}function tn(e){return new Y(e>>16&255,e>>8&255,e&255,1)}function nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Y(e,t,n,r)}function rn(e){return e instanceof It||(e=en(e)),e?(e=e.rgb(),new Y(e.r,e.g,e.b,e.opacity)):new Y}function an(e,t,n,r){return arguments.length===1?rn(e):new Y(e,t,n,r??1)}function Y(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pt(Y,an,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Y(un(this.r),un(this.g),un(this.b),ln(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatHex8:sn,formatRgb:cn,toString:cn}));function on(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function sn(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function cn(){let e=ln(this.opacity);return`${e===1?`rgb(`:`rgba(`}${un(this.r)}, ${un(this.g)}, ${un(this.b)}${e===1?`)`:`, ${e})`}`}function ln(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function un(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dn(e){return e=un(e),(e<16?`0`:``)+e.toString(16)}function fn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hn(e,t,n,r)}function pn(e){if(e instanceof hn)return new hn(e.h,e.s,e.l,e.opacity);if(e instanceof It||(e=en(e)),!e)return new hn;if(e instanceof hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new hn(o,s,c,e.opacity)}function mn(e,t,n,r){return arguments.length===1?pn(e):new hn(e,t,n,r??1)}function hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pt(hn,mn,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Y(vn(e>=240?e-240:e+120,i,r),vn(e,i,r),vn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new hn(gn(this.h),_n(this.s),_n(this.l),ln(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ln(this.opacity);return`${e===1?`hsl(`:`hsla(`}${gn(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function gn(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function vn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var yn=e=>()=>e;function bn(e,t){return function(n){return e+n*t}}function xn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Sn(e){return(e=+e)==1?Cn:function(t,n){return n-t?xn(t,n,e):yn(isNaN(t)?n:t)}}function Cn(e,t){var n=t-e;return n?bn(e,n):yn(isNaN(e)?t:e)}var wn=(function e(t){var n=Sn(t);function r(e,t){var r=n((e=an(e)).r,(t=an(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Tn(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function En(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dn(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=In(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function On(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function An(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=In(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(jn.source,`g`);function Nn(e){return function(){return e}}function Pn(e){return function(t){return e(t)+``}}function Fn(e,t){var n=jn.lastIndex=Mn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=jn.exec(e))&&(i=Mn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:kn(r,i)})),n=Mn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Pn(c[0].x):Nn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function In(e,t){var n=typeof t,r;return t==null||n===`boolean`?yn(t):(n===`number`?kn:n===`string`?(r=en(t))?(t=r,wn):Fn:t instanceof en?wn:t instanceof Date?On:En(t)?Tn:Array.isArray(t)?Dn:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?An:kn)(e,t)}var Ln=180/Math.PI,Rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ln,skewX:Math.atan(c)*Ln,scaleX:o,scaleY:s}}var Bn;function Vn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Rn:zn(t.a,t.b,t.c,t.d,t.e,t.f)}function Hn(e){return e==null||(Bn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Bn.setAttribute(`transform`,e),!(e=Bn.transform.baseVal.consolidate()))?Rn:(e=e.matrix,zn(e.a,e.b,e.c,e.d,e.e,e.f))}function Un(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:kn(e,i)},{i:c-2,x:kn(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:kn(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:kn(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:kn(e,n)},{i:s-2,x:kn(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Wn=Un(Vn,`px, `,`px)`,`deg)`),Gn=Un(Hn,`, `,`)`,`)`),Kn=1e-12;function qn(e){return((e=Math.exp(e))+1/e)/2}function Jn(e){return((e=Math.exp(e))-1/e)/2}function Yn(e){return((e=Math.exp(2*e))-1)/(e+1)}var Xn=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Kn)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=qn(y),c=s/(n*g)*(i*Yn(t*r+y)-Jn(y));return[a+c*d,o+c*f,s*i/qn(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Zn=0,Qn=0,$n=0,er=1e3,tr,nr,rr=0,ir=0,ar=0,or=typeof performance==`object`&&performance.now?performance:Date,sr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cr(){return ir||=(sr(lr),or.now()+ar)}function lr(){ir=0}function ur(){this._call=this._time=this._next=null}ur.prototype=dr.prototype={constructor:ur,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?cr():+n)+(t==null?0:+t),!this._next&&nr!==this&&(nr?nr._next=this:tr=this,nr=this),this._call=e,this._time=n,gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,gr())}};function dr(e,t,n){var r=new ur;return r.restart(e,t,n),r}function fr(){cr(),++Zn;for(var e=tr,t;e;)(t=ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zn}function pr(){ir=(rr=or.now())+ar,Zn=Qn=0;try{fr()}finally{Zn=0,hr(),ir=0}}function mr(){var e=or.now(),t=e-rr;t>er&&(ar-=t,rr=e)}function hr(){for(var e,t=tr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tr=n);nr=e,gr(r)}function gr(e){Zn||(Qn&&=clearTimeout(Qn),e-ir>24?(e<1/0&&(Qn=setTimeout(pr,e-or.now()-ar)),$n&&=clearInterval($n)):($n||=(rr=or.now(),setInterval(mr,er)),Zn=1,sr(pr)))}function _r(e,t,n){var r=new ur;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var vr=u(`start`,`end`,`cancel`,`interrupt`),yr=[];function br(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;wr(e,n,{name:t,index:r,group:i,on:vr,tween:yr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function xr(e,t){var n=Cr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Sr(e,t){var n=Cr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Cr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function wr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=dr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return _r(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(_r(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Tr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Er(e){return this.each(function(){Tr(this,e)})}function Dr(e,t){var n,r;return function(){var i=Sr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Or(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Sr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function kr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Cr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Dr:Or)(n,e,t))}function Ar(e,t,n){var r=e._id;return e.each(function(){var e=Sr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Cr(e,r).value[t]}}function jr(e,t){var n;return(typeof t==`number`?kn:t instanceof en?wn:(n=en(t))?(t=n,wn):Fn)(e,t)}function Mr(e){return function(){this.removeAttribute(e)}}function Nr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ir(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Lr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Rr(e,t){var n=g(e),r=n===`transform`?Gn:jr;return this.attrTween(e,typeof t==`function`?(n.local?Lr:Ir)(n,r,Ar(this,`attr.`+e,t)):t==null?(n.local?Nr:Mr)(n):(n.local?Fr:Pr)(n,r,t))}function zr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Br(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Br(e,i)),n}return i._value=t,i}function Hr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zr(e,i)),n}return i._value=t,i}function Ur(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=g(e);return this.tween(n,(r.local?Vr:Hr)(r,t))}function Wr(e,t){return function(){xr(this,e).delay=+t.apply(this,arguments)}}function Gr(e,t){return t=+t,function(){xr(this,e).delay=t}}function Kr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Wr:Gr)(t,e)):Cr(this.node(),t).delay}function qr(e,t){return function(){Sr(this,e).duration=+t.apply(this,arguments)}}function Jr(e,t){return t=+t,function(){Sr(this,e).duration=t}}function Yr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qr:Jr)(t,e)):Cr(this.node(),t).duration}function Xr(e,t){if(typeof t!=`function`)throw Error();return function(){Sr(this,e).ease=t}}function Zr(e){var t=this._id;return arguments.length?this.each(Xr(t,e)):Cr(this.node(),t).ease}function Qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Sr(this,e).ease=n}}function $r(e){if(typeof e!=`function`)throw Error();return this.each(Qr(this._id,e))}function ei(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ki(r,this._parents,this._name,this._id)}function ti(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new ki(o,this._parents,this._name,this._id)}function ni(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ri(e,t,n){var r,i,a=ni(t)?xr:Sr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function ii(e,t){var n=this._id;return arguments.length<2?Cr(this.node(),n).on.on(e):this.each(ri(n,e,t))}function ai(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oi(){return this.on(`end.remove`,ai(this._id))}function si(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=x(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,br(l[f],t,n,f,l,Cr(u,n)));return new ki(a,this._parents,t,n)}function ci(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=T(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Cr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&br(p,t,n,h,f,m);a.push(f),o.push(u)}return new ki(a,o,t,n)}var li=vt.prototype.constructor;function ui(){return new li(this._groups,this._parents)}function di(e,t){var n,r,i;return function(){var a=Ee(this,e),o=(this.style.removeProperty(e),Ee(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function fi(e){return function(){this.style.removeProperty(e)}}function pi(e,t,n){var r,i=n+``,a;return function(){var o=Ee(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function mi(e,t,n){var r,i,a;return function(){var o=Ee(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ee(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function hi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Sr(this,e),l=c.on,u=c.value[a]==null?s||=fi(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function gi(e,t,n){var r=(e+=``)==`transform`?Wn:jr;return t==null?this.styleTween(e,di(e,r)).on(`end.style.`+e,fi(e)):typeof t==`function`?this.styleTween(e,mi(e,r,Ar(this,`style.`+e,t))).each(hi(this._id,e)):this.styleTween(e,pi(e,r,t),n).on(`end.style.`+e,null)}function _i(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&_i(e,a,n)),r}return a._value=t,a}function yi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,vi(e,t,n??``))}function bi(e){return function(){this.textContent=e}}function xi(e){return function(){this.textContent=e(this)??``}}function Si(e){return this.tween(`text`,typeof e==`function`?xi(Ar(this,`text`,e)):bi(e==null?``:e+``))}function Ci(e){return function(t){this.textContent=e.call(this,t)}}function wi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ci(r)),t}return r._value=e,r}function Ti(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,wi(e))}function Ei(){for(var e=this._name,t=this._id,n=ji(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Cr(c,t);br(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ki(r,this._parents,e,n)}function Di(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Sr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Oi=0;function ki(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ai(e){return vt().transition(e)}function ji(){return++Oi}var Mi=vt.prototype;ki.prototype=Ai.prototype={constructor:ki,select:si,selectAll:ci,selectChild:Mi.selectChild,selectChildren:Mi.selectChildren,filter:ei,merge:ti,selection:ui,transition:Ei,call:Mi.call,nodes:Mi.nodes,node:Mi.node,size:Mi.size,empty:Mi.empty,each:Mi.each,on:ii,attr:Rr,attrTween:Ur,style:gi,styleTween:yi,text:Si,textTween:Ti,remove:oi,tween:kr,delay:Kr,duration:Yr,ease:Zr,easeVarying:$r,end:Di,[Symbol.iterator]:Mi[Symbol.iterator]};function Ni(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pi={time:null,delay:0,duration:250,ease:Ni};function Fi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ii(e){var t,n;e instanceof ki?(t=e._id,e=e._name):(t=ji(),(n=Pi).time=cr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&br(c,e,t,l,o,n||Fi(c,t));return new ki(r,this._parents,e,t)}vt.prototype.interrupt=Er,vt.prototype.transition=Ii;var Li=e=>()=>e;function Ri(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function zi(e,t,n){this.k=e,this.x=t,this.y=n}zi.prototype={constructor:zi,scale:function(e){return e===1?this:new zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Bi=new zi(1,0,0);Vi.prototype=zi.prototype;function Vi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bi;return e.__zoom}function Hi(e){e.stopImmediatePropagation()}function Ui(e){e.preventDefault(),e.stopImmediatePropagation()}function Wi(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Gi(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ki(){return this.__zoom||Bi}function qi(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ji(){return navigator.maxTouchPoints||`ontouchstart`in this}function Yi(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Xi(){var e=Wi,t=Gi,n=Yi,r=qi,i=Ji,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Xn,l=u(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,Ki).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,D).filter(i).on(`touchstart.zoom`,O).on(`touchmove.zoom`,k).on(`touchend.zoom touchcancel.zoom`,A).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,Ki),e===i?i.interrupt().each(function(){C(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):S(e,t,n,r)},v.scaleBy=function(e,t,n,r){v.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},v.scaleTo=function(e,r,i,a){v.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?x(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(b(y(a,l),s,c),e,o)},i,a)},v.translateBy=function(e,r,i,a){v.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},v.translateTo=function(e,r,i,a,s){v.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a;return n(Bi.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function y(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new zi(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new zi(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,n,r,i){e.on(`start.zoom`,function(){C(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){C(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=C(e,a).event(i),s=t.apply(e,a),l=r==null?x(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new zi(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function C(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=q(this.that).datum();l.call(e,this.that,new Ri(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function T(t,...i){if(!e.apply(this,arguments))return;var s=C(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=J(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Tr(this),s.start();Ui(t),s.wheel=setTimeout(d,h),s.zoom(`mouse`,n(b(y(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function E(t,...r){if(p||!e.apply(this,arguments))return;var i=t.currentTarget,a=C(this,r,!0).event(t),s=q(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,f,!0),c=J(t,i),l=t.clientX,u=t.clientY;Tt(t.view),Hi(t),a.mouse=[c,this.__zoom.invert(c)],Tr(this),a.start();function d(e){if(Ui(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>g}a.event(e).zoom(`mouse`,n(b(a.that.__zoom,a.mouse[0]=J(e,i),a.mouse[1]),a.extent,o))}function f(e){s.on(`mousemove.zoom mouseup.zoom`,null),Et(e.view,a.moved),Ui(e),a.event(e).end()}}function D(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=J(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(b(y(a,u),c,l),t.apply(this,i),o);Ui(r),s>0?q(this).transition().duration(s).call(S,d,c,r):q(this).call(v.transform,d,c,r)}}function O(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=C(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(Hi(t),s=0;s<i;++s)c=r[s],l=J(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!d);d&&=clearTimeout(d),o&&(a.taps<2&&(f=l[0],d=setTimeout(function(){d=null},m)),Tr(this),a.start())}}function k(e,...t){if(this.__zooming){var r=C(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(Ui(e),s=0;s<a;++s)c=i[s],l=J(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=y(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(b(c,l,u),r.extent,o))}}function A(e,...t){if(this.__zooming){var n=C(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(Hi(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=J(o,this),Math.hypot(f[0]-o[0],f[1]-o[1])<_)){var s=q(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:Li(+e),v):r},v.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Li(!!t),v):e},v.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Li(!!e),v):i},v.extent=function(e){return arguments.length?(t=typeof e==`function`?e:Li([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):t},v.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],v):[a[0],a[1]]},v.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],v):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},v.constrain=function(e){return arguments.length?(n=e,v):n},v.duration=function(e){return arguments.length?(s=+e,v):s},v.interpolate=function(e){return arguments.length?(c=e,v):c},v.on=function(){var e=l.on.apply(l,arguments);return e===l?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}var Zi={error001:()=>`[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The React Flow parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`},Qi=[[-1/0,-1/0],[1/0,1/0]],$i=[`Enter`,` `,`Escape`],ea={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},ta;(function(e){e.Strict=`strict`,e.Loose=`loose`})(ta||={});var na;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(na||={});var ra;(function(e){e.Partial=`partial`,e.Full=`full`})(ra||={});var ia={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},aa;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(aa||={});var oa;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(oa||={});var X;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(X||={});var sa={[X.Left]:X.Right,[X.Right]:X.Left,[X.Top]:X.Bottom,[X.Bottom]:X.Top};function ca(e){return e===null?null:e?`valid`:`invalid`}var la=e=>`id`in e&&`source`in e&&`target`in e,ua=e=>`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),da=e=>`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),fa=(e,t=[0,0])=>{let{width:n,height:r}=Ga(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},pa=(e,t={nodeOrigin:[0,0]})=>e.length===0?{x:0,y:0,width:0,height:0}:Oa(e.reduce((e,n)=>{let r=typeof n==`string`,i=!t.nodeLookup&&!r?n:void 0;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):da(n)?n:t.nodeLookup.get(n.id)),Ea(e,i?Aa(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),ma=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=Ea(n,Aa(e)),r=!0)}),r?Oa(n):{x:0,y:0,width:0,height:0}},ha=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...La(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??null,l=e.height??t.height??t.initialHeight??null,u=Ma(s,ka(t)),d=(i??0)*(l??0),f=a&&u>0;(!t.internals.handleBounds||f||u>=d||t.dragging)&&c.push(t)}return c},ga=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function _a(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{e.measured.width&&e.measured.height&&(t?.includeHiddenNodes||!e.hidden)&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function va({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);let s=Ha(ma(_a(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)}function ya({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent)if(!s)a?.(`005`,Zi.error005());else{let e=s.measured.width,t=s.measured.height;e&&t&&(d=[[c,l],[c+e,l+t]])}else s&&Wa(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=Wa(d)?Sa(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,Zi.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function ba({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=ga(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var xa=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Sa=(e={x:0,y:0},t,n)=>({x:xa(e.x,t[0][0],t[1][0]-(n?.width??0)),y:xa(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ca(e,t,n){let{width:r,height:i}=Ga(n),{x:a,y:o}=n.internals.positionAbsolute;return Sa(e,[[a,o],[a+r,o+i]],t)}var wa=(e,t,n)=>e<t?xa(Math.abs(e-t),1,t)/t:e>n?-xa(Math.abs(e-n),1,t)/t:0,Ta=(e,t,n=15,r=40)=>[wa(e.x,r,t.width-r)*n,wa(e.y,r,t.height-r)*n],Ea=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Da=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Oa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ka=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Aa=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},ja=(e,t)=>Oa(Ea(Da(e),Da(t))),Ma=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Na=e=>Pa(e.width)&&Pa(e.height)&&Pa(e.x)&&Pa(e.y),Pa=e=>!isNaN(e)&&isFinite(e),Fa=(e,t)=>{},Ia=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),La=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?Ia(s,o):s},Ra=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function za(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ba(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=za(e,n),i=za(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=za(e.top??e.y??0,n),i=za(e.bottom??e.y??0,n),a=za(e.left??e.x??0,t),o=za(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Va(e,t,n,r,i,a){let{x:o,y:s}=Ra(e,[t,n,r]),{x:c,y:l}=Ra({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var Ha=(e,t,n,r,i,a)=>{let o=Ba(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=xa(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=Va(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},Ua=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function Wa(e){return e!=null&&e!==`parent`}function Ga(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ka(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function qa(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function Ja(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ya(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Xa(e){return{...ea,...e||{}}}function Za(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=ro(e),s=La({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?Ia(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Qa=e=>({width:e.offsetWidth,height:e.offsetHeight}),$a=e=>e?.getRootNode?.()||window?.document,eo=[`INPUT`,`SELECT`,`TEXTAREA`];function to(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?eo.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var no=e=>`clientX`in e,ro=(e,t)=>{let n=no(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},io=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Qa(t)}})};function ao({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function oo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function so({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case X.Left:return[t-oo(t-r,a),n];case X.Right:return[t+oo(r-t,a),n];case X.Top:return[t,n-oo(n-i,a)];case X.Bottom:return[t,n+oo(i-n,a)]}}function co({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,curvature:o=.25}){let[s,c]=so({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=so({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function lo({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function uo({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function fo({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=Ea(Aa(e),Aa(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),Ma({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},Oa(a))>0}var po=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,mo=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),ho=(e,t,n={})=>{if(!e.source||!e.target)return Zi.error006(),t;let r=n.getEdgeId||po,i;return i=la(e)?{...e}:{...e,id:r(e)},mo(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function go({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=lo({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var _o={[X.Left]:{x:-1,y:0},[X.Right]:{x:1,y:0},[X.Top]:{x:0,y:-1},[X.Bottom]:{x:0,y:1}},vo=({source:e,sourcePosition:t=X.Bottom,target:n})=>t===X.Left||t===X.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},yo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function bo({source:e,sourcePosition:t=X.Bottom,target:n,targetPosition:r=X.Top,center:i,offset:a,stepPosition:o}){let s=_o[t],c=_o[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=vo({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=lo({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function xo(e,t,n,r){let i=Math.min(yo(e,t)/2,yo(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function So({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=bo({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=xo(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Co(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function wo(e){let{sourceNode:t,targetNode:n}=e;if(!Co(t)||!Co(n))return null;let r=t.internals.handleBounds||To(t.handles),i=n.internals.handleBounds||To(n.handles),a=Do(r?.source??[],e.sourceHandle),o=Do(e.connectionMode===ta.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,Zi.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||X.Bottom,c=o?.position||X.Top,l=Eo(t,a,s),u=Eo(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function To(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function Eo(e,t,n=X.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??Ga(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case X.Top:return{x:i+o/2,y:a};case X.Right:return{x:i+o,y:a+s/2};case X.Bottom:return{x:i+o/2,y:a+s};case X.Left:return{x:i,y:a+s/2}}}function Do(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Oo(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function ko(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Oo(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var Ao=1e3,jo=10,Mo={nodeOrigin:[0,0],nodeExtent:Qi,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},No={...Mo,checkEquality:!0};function Po(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Fo(e,t,n){let r=Po(Mo,n);for(let n of e.values())if(n.parentId)Bo(n,e,t,r);else{let e=Sa(fa(n,r.nodeOrigin),Wa(n.extent)?n.extent:r.nodeExtent,Ga(n));n.internals.positionAbsolute=e}}function Io(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function Lo(e){return e===`manual`}function Ro(e,t,n,r={}){let i=Po(No,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!Lo(i.zIndexMode)?Ao:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=Sa(fa(u,i.nodeOrigin),Wa(u.extent)?u.extent:i.nodeExtent,Ga(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:Io(u,e),z:Vo(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}(e.measured===void 0||e.measured.width===void 0||e.measured.height===void 0)&&!e.hidden&&(c=!1),u.parentId&&Bo(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function zo(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Bo(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=Po(Mo,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zo(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*jo),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=Ho(e,u,o,s,a&&!Lo(c)?Ao:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function Vo(e,t,n){let r=Pa(e.zIndex)?e.zIndex:0;return Lo(n)?r:r+(e.selected?t:0)}function Ho(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=Ga(e),l=fa(e,n),u=Wa(e.extent)?Sa(l,e.extent,c):l,d=Sa({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=Ca(d,c,t));let f=Vo(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function Uo(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=ja(a.get(n.parentId)?.expandedRect??ka(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=Ga(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function Wo(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Qa(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=Wa(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&e.extent===`parent`?h=Ca(h,s,t.get(e.parentId)):m&&(h=Sa(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:io(`source`,r.nodeElement,p,d,e.id),target:io(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&Bo(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:ka(g,i)}))}}if(f.length>0){let e=Uo(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function Go({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function Ko(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function qo(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;Ko(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),Ko(`target`,s,c,e,i,o),t.set(r.id,r)}}function Jo(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Jo(n,t):!1}function Yo(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function Xo(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Jo(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function Zo({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function Qo({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=Ia(a,t);return{x:o.x-a.x,y:o.y-a.y}}function $o({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=q(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?Da(ma(s)):null,x=v&&l?Qo({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:Ia(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=ya({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=Ta(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,(!m||!y)&&!o&&b&&(i.get(b)?.selected||_()),y&&m&&b&&e?.(b);let v=Za(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=Xo(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=Nt().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=Za(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=ro(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=Za(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=ro(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=ro(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!(!d||p)&&(c=!1,d=!1,cancelAnimationFrame(o),s.size>0)){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=Zo({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!Yo(t,`.${g}`,v))&&(!_||Yo(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function es(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())Ma(i,ka(e))>0&&r.push(e);return r}var ts=250;function ns(e,t,n,r){let i=[],a=1/0,o=es(e,n,t+ts);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=Eo(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function rs(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...Eo(o,c,c.position,!0)}:c}function is(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function as(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var os=()=>!0;function ss(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=os,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=$a(e.target),E=0,D,{x:O,y:k}=ro(e),A=is(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=rs(i,A,r,c,t);if(!N)return;let P=ro(e,j),F=!1,I=null,L=!1,R=null;function z(){if(!u||!j)return;let[e,t]=Ta(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(z)}let B={...N,nodeId:i,type:A,position:N.position},V=c.get(i),H={inProgress:!0,isValid:null,from:Eo(V,B,X.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:V,to:P,toHandle:null,toPosition:sa[B.position],toNode:null,pointer:P};function U(){M=!0,y(H),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&U();function W(e){if(!M){let{x:t,y:n}=ro(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;U()}if(!x()||!B){G(e);return}let a=b();P=ro(e,j),D=ns(La(P,a,!1,[1,1]),n,c,B),F||=(z(),!0);let s=cs(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});R=s.handleDomNode,I=s.connection,L=as(!!D,s.isValid);let u=c.get(i),f=u?Eo(u,B,X.Left,!0):H.from,p={...H,from:f,isValid:L,to:s.toHandle&&L?Ra({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:L&&s.toHandle?s.toHandle.position:sa[B.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),H=p}function G(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||R)&&I&&L&&h?.(I);let{inProgress:t,...n}=H,r={...n,toPosition:H.toHandle?H.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,L=!1,I=null,R=null,T.removeEventListener(`mousemove`,W),T.removeEventListener(`mouseup`,G),T.removeEventListener(`touchmove`,W),T.removeEventListener(`touchend`,G)}}T.addEventListener(`mousemove`,W),T.addEventListener(`mouseup`,G),T.addEventListener(`touchmove`,W),T.addEventListener(`touchend`,G)}function cs(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=os,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=ro(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=is(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===ta.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=rs(t,e,a,u,n,!0)}return _}var ls={onPointerDown:ss,isValid:cs};function us({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=q(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&Ua()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=Xi().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:J}}var ds=e=>({x:e.x,y:e.y,zoom:e.k}),fs=({x:e,y:t,zoom:n})=>Bi.translate(e,t).scale(n),ps=(e,t)=>e.target.closest(`.${t}`),ms=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hs=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,gs=(e,t=0,n=hs,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},_s=e=>{let t=e.ctrlKey&&Ua()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function vs({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(ps(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=J(u),t=d*2**_s(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===na.Vertical?0:u.deltaX*f,m=i===na.Horizontal?0:u.deltaY*f;!Ua()&&u.shiftKey&&i!==na.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=ds(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(u,h),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(u,h))}}function ys({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=ps(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function bs({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=ds(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function xs({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&ms(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,ds(a.transform))}}function Ss({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&ms(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=ds(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function Cs({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:u}){return d=>{let f=e||t,p=n&&d.ctrlKey,m=d.type===`wheel`;if(d.button===1&&d.type===`mousedown`&&(ps(d,`${l}-flow__node`)||ps(d,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!a&&!n||o||u&&!m||ps(d,s)&&m||ps(d,c)&&(!m||i&&m&&!e)||!n&&d.ctrlKey&&m)return!1;if(!n&&d.type===`touchstart`&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!p&&m||!r&&(d.type===`mousedown`||d.type===`touchstart`)||Array.isArray(r)&&!r.includes(d.button)&&d.type===`mousedown`)return!1;let h=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||m)&&h}}function ws({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=Xi().scaleExtent([t,n]).translateExtent(r),f=q(e).call(d);v({x:i.x,y:i.y,zoom:xa(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let p=f.on(`wheel.zoom`),m=f.on(`dblclick.zoom`);d.wheelDelta(_s);function h(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).transform(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:g,preventScrolling:v,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneClickDistance:E,selectionOnDrag:D}){r&&!l.isZoomingOrPanning&&_();let O=i&&!S&&!r;d.clickDistance(D?1/0:!Pa(E)||E<0?0:E);let k=O?vs({zoomPanValues:l,noWheelClassName:e,d3Selection:f,d3Zoom:d,panOnScrollMode:h,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):ys({noWheelClassName:e,preventScrolling:v,d3ZoomHandler:p});if(f.on(`wheel.zoom`,k,{passive:!1}),!r){let e=bs({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});d.on(`start`,e);let t=xs({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:w});d.on(`zoom`,t);let r=Ss({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});d.on(`end`,r)}let A=Cs({zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});d.filter(A),x?f.on(`dblclick.zoom`,m):f.on(`dblclick.zoom`,null)}function _(){d.on(`zoom`,null)}async function v(e,t,n){let r=fs(e),i=d?.constrain()(r,t,n);return i&&await h(i),new Promise(e=>e(i))}async function y(e,t){let n=fs(e);return await h(n,t),new Promise(e=>e(n))}function b(e){if(f){let t=fs(e),n=f.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&d?.transform(f,t,null,{sync:!0})}}function x(){let e=f?Vi(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}function S(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleTo(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function C(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleBy(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function w(e){d?.scaleExtent(e)}function T(e){d?.translateExtent(e)}function E(e){let t=!Pa(e)||e<0?0:e;d?.clickDistance(t)}return{update:g,destroy:_,setViewport:y,setViewportConstrained:v,getViewport:x,scaleTo:S,scaleBy:C,setScaleExtent:w,setTranslateExtent:T,syncViewport:b,setClickDistance:E}}var Ts;(function(e){e.Line=`line`,e.Handle=`handle`})(Ts||={});function Es({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function Ds(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function Os(e,t){return Math.max(0,t-e)}function ks(e,t){return Math.max(0,e-t)}function As(e,t,n){return Math.max(0,t-e,e-n)}function js(e,t){return e?!t:t}function Ms(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=As(E,h,g),j=As(D,_,v);if(o){let e=0,t=0;c&&w<0?e=Os(y+w+O,o[0][0]):!c&&w>0&&(e=ks(y+E+O,o[1][0])),l&&T<0?t=Os(b+T+k,o[0][1]):!l&&T>0&&(t=ks(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=ks(y+w,s[0][0]):!c&&w<0&&(e=Os(y+E,s[1][0])),l&&T>0?t=ks(b+T,s[0][1]):!l&&T<0&&(t=Os(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=As(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?ks(b+k+E/C,o[1][1])*C:Os(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?Os(b+E/C,s[1][1])*C:ks(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=As(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?ks(y+D*C+O,o[1][0])/C:Os(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?Os(y+D*C,s[1][0])/C:ks(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(js(c,l)?-w:w)/C:w=(js(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var Ns={width:0,height:0,x:0,y:0},Ps={...Ns,pointerX:0,pointerY:0,aspectRatio:1};function Fs(e){return[[0,0],[e.measured.width,e.measured.height]]}function Is(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function Ls({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=q(e),o={controlDirection:Ds(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...Ns},h={...Ps};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:Ds(e)};let g,_=null,v=[],y,b,x,S=!1,C=Nt().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=Za(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId),b=y&&g.extent===`parent`?Fs(y):void 0),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=Is(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=Za(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:C,height:w}=m,T={},E=g.origin??s,{width:D,height:O,x:k,y:A}=Ms(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,E,b,x),j=D!==C,M=O!==w,N=k!==u&&j,P=A!==f&&M;if(!N&&!P&&!j&&!M)return;if((N||P||E[0]===1||E[1]===1)&&(T.x=N?k:m.x,T.y=P?A:m.y,m.x=T.x,m.y=T.y,v.length>0)){let e=k-u,t=A-f;for(let n of v)n.position={x:n.position.x-e+E[0]*(D-C),y:n.position.y-t+E[1]*(O-w)},l.push(n)}if((j||M)&&(T.width=j&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?D:m.width,T.height=M&&(!o.resizeDirection||o.resizeDirection===`vertical`)?O:m.height,m.width=T.width,m.height=T.height),y&&g.expandParent){let e=E[0]*(T.width??0);T.x&&T.x<e&&(m.x=e,h.x-=T.x-e);let t=E[1]*(T.height??0);T.y&&T.y<t&&(m.y=t,h.y-=T.y-t)}let F=Es({width:m.width,prevWidth:C,height:m.height,prevHeight:w,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)!==!1&&(S=!0,d?.(e,I),r(T,l))}).on(`end`,e=>{S&&=(f?.(e,{...m}),i?.({...m}),!1)});a.call(C)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var Rs=n((t=>{var n=e(),r=a();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:i,s=r.useSyncExternalStore,c=n.useRef,l=n.useEffect,u=n.useMemo,d=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),zs=t(n(((e,t)=>{t.exports=Rs()}))(),1),Bs=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},Vs=e=>e?Bs(e):Bs,{useDebugValue:Hs}=o.default,{useSyncExternalStoreWithSelector:Us}=zs.default,Ws=e=>e;function Gs(e,t=Ws,n){let r=Us(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Hs(r),r}var Ks=(e,t)=>{let n=Vs(e),r=(e,r=t)=>Gs(n,e,r);return Object.assign(r,n),r},qs=(e,t)=>e?Ks(e,t):Ks;function Z(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}i();var Js=(0,o.createContext)(null),Ys=Js.Provider,Xs=Zi.error001();function Q(e,t){let n=(0,o.useContext)(Js);if(n===null)throw Error(Xs);return Gs(n,e,t)}function $(){let e=(0,o.useContext)(Js);if(e===null)throw Error(Xs);return(0,o.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Zs={display:`none`},Qs={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},$s=`react-flow__node-desc`,ec=`react-flow__edge-desc`,tc=`react-flow__aria-live`,nc=e=>e.ariaLiveMessage,rc=e=>e.ariaLabelConfig;function ic({rfId:e}){let t=Q(nc);return(0,s.jsx)(`div`,{id:`${tc}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:Qs,children:t})}function ac({rfId:e,disableKeyboardA11y:t}){let n=Q(rc);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{id:`${$s}-${e}`,style:Zs,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,s.jsx)(`div`,{id:`${ec}-${e}`,style:Zs,children:n[`edge.a11yDescription.default`]}),!t&&(0,s.jsx)(ic,{rfId:e})]})}var oc=(0,o.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>(0,s.jsx)(`div`,{className:c([`react-flow__panel`,n,...`${e}`.split(`-`)]),style:r,ref:a,...i,children:t}));oc.displayName=`Panel`;function sc({proOptions:e,position:t=`bottom-right`}){return e?.hideAttribution?null:(0,s.jsx)(oc,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev`,children:(0,s.jsx)(`a`,{href:`https://reactflow.dev`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var cc=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},lc=e=>e.id;function uc(e,t){return Z(e.selectedNodes.map(lc),t.selectedNodes.map(lc))&&Z(e.selectedEdges.map(lc),t.selectedEdges.map(lc))}function dc({onSelectionChange:e}){let t=$(),{selectedNodes:n,selectedEdges:r}=Q(cc,uc);return(0,o.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var fc=e=>!!e.onSelectionChangeHandlers;function pc({onSelectionChange:e}){let t=Q(fc);return e||t?(0,s.jsx)(dc,{onSelectionChange:e}):null}var mc=typeof window<`u`?o.useLayoutEffect:o.useEffect,hc=[0,0],gc={x:0,y:0,zoom:1},_c=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],vc=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),yc={translateExtent:Qi,nodeOrigin:hc,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function bc(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:l}=Q(vc,Z),u=$();mc(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=yc,c()}),[]);let d=(0,o.useRef)(yc);return mc(()=>{for(let o of _c){let c=e[o];c!==d.current[o]&&e[o]!==void 0&&(o===`nodes`?t(c):o===`edges`?n(c):o===`minZoom`?r(c):o===`maxZoom`?i(c):o===`translateExtent`?a(c):o===`nodeExtent`?s(c):o===`ariaLabelConfig`?u.setState({ariaLabelConfig:Xa(c)}):o===`fitView`?u.setState({fitViewQueued:c}):o===`fitViewOptions`?u.setState({fitViewOptions:c}):u.setState({[o]:c}))}d.current=e},_c.map(t=>e[t])),null}function xc(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function Sc(e){let[t,n]=(0,o.useState)(e===`system`?null:e);return(0,o.useEffect)(()=>{if(e!==`system`){n(e);return}let t=xc(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?xc()?.matches?`dark`:`light`:t}var Cc=typeof document<`u`?document:null;function wc(e=null,t={target:Cc,actInsideInputWithModifier:!0}){let[n,r]=(0,o.useState)(!1),i=(0,o.useRef)(!1),a=(0,o.useRef)(new Set([])),[s,c]=(0,o.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(`+`,`+import{n as e,o as t,r as n,t as r}from"./jsx-runtime-B3dmMxJS.js";import{a as i}from"./index-Ba72GzGt.js";import{t as a}from"./shim-s-9Axq3H.js";var o=t(e(),1),s=r();function c(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=c(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var l={value:()=>{}};function u(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new d(n)}function d(e){this._=e}function f(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}d.prototype=u.prototype={constructor:d,on:function(e,t){var n=this._,r=f(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=p(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=m(n[i],e.name,t);else if(t==null)for(i in n)n[i]=m(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new d(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function p(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function m(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=l,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var h={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function g(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),h.hasOwnProperty(t)?{space:h[t],local:e}:e}function _(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function v(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function y(e){var t=g(e);return(t.local?v:_)(t)}function b(){}function x(e){return e==null?b:function(){return this.querySelector(e)}}function S(e){typeof e!=`function`&&(e=x(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new K(r,this._parents)}function C(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function w(){return[]}function T(e){return e==null?w:function(){return this.querySelectorAll(e)}}function E(e){return function(){return C(e.apply(this,arguments))}}function D(e){e=typeof e==`function`?E(e):T(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new K(r,i)}function O(e){return function(){return this.matches(e)}}function k(e){return function(t){return t.matches(e)}}var A=Array.prototype.find;function j(e){return function(){return A.call(this.children,e)}}function M(){return this.firstElementChild}function N(e){return this.select(e==null?M:j(typeof e==`function`?e:k(e)))}var P=Array.prototype.filter;function F(){return Array.from(this.children)}function I(e){return function(){return P.call(this.children,e)}}function L(e){return this.selectAll(e==null?F:I(typeof e==`function`?e:k(e)))}function R(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new K(r,this._parents)}function z(e){return Array(e.length)}function B(){return new K(this._enter||this._groups.map(z),this._parents)}function V(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}V.prototype={constructor:V,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function H(e){return function(){return e}}function U(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new V(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function W(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new V(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function G(e){return e.__data__}function ee(e,t){if(!arguments.length)return Array.from(this,G);var n=t?W:U,r=this._parents,i=this._groups;typeof e!=`function`&&(e=H(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=te(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new K(o,r),o._enter=s,o._exit=c,o}function te(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ne(){return new K(this._exit||this._groups.map(z),this._parents)}function re(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ie(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new K(s,this._parents)}function ae(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function oe(e){e||=se;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new K(i,this._parents).order()}function se(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function le(){return Array.from(this)}function ue(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function de(){let e=0;for(let t of this)++e;return e}function fe(){return!this.node()}function pe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function me(e){return function(){this.removeAttribute(e)}}function he(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ge(e,t){return function(){this.setAttribute(e,t)}}function _e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ve(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ye(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function be(e,t){var n=g(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?he:me:typeof t==`function`?n.local?ye:ve:n.local?_e:ge)(n,t))}function xe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Se(e){return function(){this.style.removeProperty(e)}}function Ce(e,t,n){return function(){this.style.setProperty(e,t,n)}}function we(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Te(e,t,n){return arguments.length>1?this.each((t==null?Se:typeof t==`function`?we:Ce)(e,t,n??``)):Ee(this.node(),e)}function Ee(e,t){return e.style.getPropertyValue(t)||xe(e).getComputedStyle(e,null).getPropertyValue(t)}function De(e){return function(){delete this[e]}}function Oe(e,t){return function(){this[e]=t}}function ke(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ae(e,t){return arguments.length>1?this.each((t==null?De:typeof t==`function`?ke:Oe)(e,t)):this.node()[e]}function je(e){return e.trim().split(/^|\s+/)}function Me(e){return e.classList||new Ne(e)}function Ne(e){this._node=e,this._names=je(e.getAttribute(`class`)||``)}Ne.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Pe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ie(e){return function(){Pe(this,e)}}function Le(e){return function(){Fe(this,e)}}function Re(e,t){return function(){(t.apply(this,arguments)?Pe:Fe)(this,e)}}function ze(e,t){var n=je(e+``);if(arguments.length<2){for(var r=Me(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Re:t?Ie:Le)(n,t))}function Be(){this.textContent=``}function Ve(e){return function(){this.textContent=e}}function He(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Ue(e){return arguments.length?this.each(e==null?Be:(typeof e==`function`?He:Ve)(e)):this.node().textContent}function We(){this.innerHTML=``}function Ge(e){return function(){this.innerHTML=e}}function Ke(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function qe(e){return arguments.length?this.each(e==null?We:(typeof e==`function`?Ke:Ge)(e)):this.node().innerHTML}function Je(){this.nextSibling&&this.parentNode.appendChild(this)}function Ye(){return this.each(Je)}function Xe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ze(){return this.each(Xe)}function Qe(e){var t=typeof e==`function`?e:y(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $e(){return null}function et(e,t){var n=typeof e==`function`?e:y(e),r=t==null?$e:typeof t==`function`?t:x(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function tt(){var e=this.parentNode;e&&e.removeChild(this)}function nt(){return this.each(tt)}function rt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function it(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function at(e){return this.select(e?it:rt)}function ot(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function st(e){return function(t){e.call(this,t,this.__data__)}}function ct(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function lt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function ut(e,t,n){return function(){var r=this.__on,i,a=st(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function dt(e,t,n){var r=ct(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?ut:lt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function ft(e,t,n){var r=xe(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function pt(e,t){return function(){return ft(this,e,t)}}function mt(e,t){return function(){return ft(this,e,t.apply(this,arguments))}}function ht(e,t){return this.each((typeof t==`function`?mt:pt)(e,t))}function*gt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var _t=[null];function K(e,t){this._groups=e,this._parents=t}function vt(){return new K([[document.documentElement]],_t)}function yt(){return this}K.prototype=vt.prototype={constructor:K,select:S,selectAll:D,selectChild:N,selectChildren:L,filter:R,data:ee,enter:B,exit:ne,join:re,merge:ie,selection:yt,order:ae,sort:oe,call:ce,nodes:le,node:ue,size:de,empty:fe,each:pe,attr:be,style:Te,property:Ae,classed:ze,text:Ue,html:qe,raise:Ye,lower:Ze,append:Qe,insert:et,remove:nt,clone:at,datum:ot,on:dt,dispatch:ht,[Symbol.iterator]:gt};function q(e){return typeof e==`string`?new K([[document.querySelector(e)]],[document.documentElement]):new K([[e]],_t)}function bt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function J(e,t){if(e=bt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var xt={passive:!1},St={capture:!0,passive:!1};function Ct(e){e.stopImmediatePropagation()}function wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Tt(e){var t=e.document.documentElement,n=q(e).on(`dragstart.drag`,wt,St);`onselectstart`in t?n.on(`selectstart.drag`,wt,St):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Et(e,t){var n=e.document.documentElement,r=q(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,wt,St),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Dt=e=>()=>e;function Ot(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Ot.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kt(e){return!e.ctrlKey&&!e.button}function At(){return this.parentNode}function jt(e,t){return t??{x:e.x,y:e.y}}function Mt(){return navigator.maxTouchPoints||`ontouchstart`in this}function Nt(){var e=kt,t=At,n=jt,r=Mt,i={},a=u(`start`,`drag`,`end`),o=0,s,c,l,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(r).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xt).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(n,r){if(!(d||!e.call(this,n,r))){var i=b(this,t.call(this,n,r),n,r,`mouse`);i&&(q(n.view).on(`mousemove.drag`,h,St).on(`mouseup.drag`,g,St),Tt(n.view),Ct(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function h(e){if(wt(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>f}i.mouse(`drag`,e)}function g(e){q(e.view).on(`mousemove.drag mouseup.drag`,null),Et(e.view,l),wt(e),i.mouse(`end`,e)}function _(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=b(this,a,n,r,i[s].identifier,i[s]))&&(Ct(n),c(`start`,n,i[s]))}}function v(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(wt(e),a(`drag`,e,t[r]))}function y(e){var t=e.changedTouches,n=t.length,r,a;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(Ct(e),a(`end`,e,t[r]))}function b(e,t,r,s,c,l){var u=a.copy(),d=J(l||r,t),f,m,h;if((h=n.call(e,new Ot(`beforestart`,{sourceEvent:r,target:p,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return f=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=J(l||a,t),_=o;break}u.call(r,e,new Ot(r,{sourceEvent:a,subject:h,target:p,identifier:c,active:_,x:d[0]+f,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return p.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Dt(!!t),p):e},p.container=function(e){return arguments.length?(t=typeof e==`function`?e:Dt(e),p):t},p.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Dt(e),p):n},p.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Dt(!!e),p):r},p.on=function(){var e=a.on.apply(a,arguments);return e===a?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Pt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ft(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function It(){}var Lt=.7,Rt=1/Lt,zt=`\\s*([+-]?\\d+)\\s*`,Bt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Vt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ht=/^#([0-9a-f]{3,8})$/,Ut=RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),Wt=RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Gt=RegExp(`^rgba\\(${zt},${zt},${zt},${Bt}\\)$`),Kt=RegExp(`^rgba\\(${Vt},${Vt},${Vt},${Bt}\\)$`),qt=RegExp(`^hsl\\(${Bt},${Vt},${Vt}\\)$`),Jt=RegExp(`^hsla\\(${Bt},${Vt},${Vt},${Bt}\\)$`),Yt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pt(It,en,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xt,formatHex:Xt,formatHex8:Zt,formatHsl:Qt,formatRgb:$t,toString:$t});function Xt(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatHex8()}function Qt(){return pn(this).formatHsl()}function $t(){return this.rgb().formatRgb()}function en(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ht.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tn(t):n===3?new Y(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ut.exec(e))?new Y(t[1],t[2],t[3],1):(t=Wt.exec(e))?new Y(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gt.exec(e))?nn(t[1],t[2],t[3],t[4]):(t=Kt.exec(e))?nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qt.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=Jt.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):Yt.hasOwnProperty(e)?tn(Yt[e]):e===`transparent`?new Y(NaN,NaN,NaN,0):null}function tn(e){return new Y(e>>16&255,e>>8&255,e&255,1)}function nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Y(e,t,n,r)}function rn(e){return e instanceof It||(e=en(e)),e?(e=e.rgb(),new Y(e.r,e.g,e.b,e.opacity)):new Y}function an(e,t,n,r){return arguments.length===1?rn(e):new Y(e,t,n,r??1)}function Y(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pt(Y,an,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Y(un(this.r),un(this.g),un(this.b),ln(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatHex8:sn,formatRgb:cn,toString:cn}));function on(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function sn(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function cn(){let e=ln(this.opacity);return`${e===1?`rgb(`:`rgba(`}${un(this.r)}, ${un(this.g)}, ${un(this.b)}${e===1?`)`:`, ${e})`}`}function ln(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function un(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dn(e){return e=un(e),(e<16?`0`:``)+e.toString(16)}function fn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hn(e,t,n,r)}function pn(e){if(e instanceof hn)return new hn(e.h,e.s,e.l,e.opacity);if(e instanceof It||(e=en(e)),!e)return new hn;if(e instanceof hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new hn(o,s,c,e.opacity)}function mn(e,t,n,r){return arguments.length===1?pn(e):new hn(e,t,n,r??1)}function hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pt(hn,mn,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Y(vn(e>=240?e-240:e+120,i,r),vn(e,i,r),vn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new hn(gn(this.h),_n(this.s),_n(this.l),ln(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ln(this.opacity);return`${e===1?`hsl(`:`hsla(`}${gn(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function gn(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function vn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var yn=e=>()=>e;function bn(e,t){return function(n){return e+n*t}}function xn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Sn(e){return(e=+e)==1?Cn:function(t,n){return n-t?xn(t,n,e):yn(isNaN(t)?n:t)}}function Cn(e,t){var n=t-e;return n?bn(e,n):yn(isNaN(e)?t:e)}var wn=(function e(t){var n=Sn(t);function r(e,t){var r=n((e=an(e)).r,(t=an(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Tn(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function En(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dn(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=In(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function On(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function An(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=In(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(jn.source,`g`);function Nn(e){return function(){return e}}function Pn(e){return function(t){return e(t)+``}}function Fn(e,t){var n=jn.lastIndex=Mn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=jn.exec(e))&&(i=Mn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:kn(r,i)})),n=Mn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Pn(c[0].x):Nn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function In(e,t){var n=typeof t,r;return t==null||n===`boolean`?yn(t):(n===`number`?kn:n===`string`?(r=en(t))?(t=r,wn):Fn:t instanceof en?wn:t instanceof Date?On:En(t)?Tn:Array.isArray(t)?Dn:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?An:kn)(e,t)}var Ln=180/Math.PI,Rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ln,skewX:Math.atan(c)*Ln,scaleX:o,scaleY:s}}var Bn;function Vn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Rn:zn(t.a,t.b,t.c,t.d,t.e,t.f)}function Hn(e){return e==null||(Bn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Bn.setAttribute(`transform`,e),!(e=Bn.transform.baseVal.consolidate()))?Rn:(e=e.matrix,zn(e.a,e.b,e.c,e.d,e.e,e.f))}function Un(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:kn(e,i)},{i:c-2,x:kn(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:kn(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:kn(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:kn(e,n)},{i:s-2,x:kn(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Wn=Un(Vn,`px, `,`px)`,`deg)`),Gn=Un(Hn,`, `,`)`,`)`),Kn=1e-12;function qn(e){return((e=Math.exp(e))+1/e)/2}function Jn(e){return((e=Math.exp(e))-1/e)/2}function Yn(e){return((e=Math.exp(2*e))-1)/(e+1)}var Xn=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Kn)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=qn(y),c=s/(n*g)*(i*Yn(t*r+y)-Jn(y));return[a+c*d,o+c*f,s*i/qn(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Zn=0,Qn=0,$n=0,er=1e3,tr,nr,rr=0,ir=0,ar=0,or=typeof performance==`object`&&performance.now?performance:Date,sr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cr(){return ir||=(sr(lr),or.now()+ar)}function lr(){ir=0}function ur(){this._call=this._time=this._next=null}ur.prototype=dr.prototype={constructor:ur,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?cr():+n)+(t==null?0:+t),!this._next&&nr!==this&&(nr?nr._next=this:tr=this,nr=this),this._call=e,this._time=n,gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,gr())}};function dr(e,t,n){var r=new ur;return r.restart(e,t,n),r}function fr(){cr(),++Zn;for(var e=tr,t;e;)(t=ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zn}function pr(){ir=(rr=or.now())+ar,Zn=Qn=0;try{fr()}finally{Zn=0,hr(),ir=0}}function mr(){var e=or.now(),t=e-rr;t>er&&(ar-=t,rr=e)}function hr(){for(var e,t=tr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tr=n);nr=e,gr(r)}function gr(e){Zn||(Qn&&=clearTimeout(Qn),e-ir>24?(e<1/0&&(Qn=setTimeout(pr,e-or.now()-ar)),$n&&=clearInterval($n)):($n||=(rr=or.now(),setInterval(mr,er)),Zn=1,sr(pr)))}function _r(e,t,n){var r=new ur;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var vr=u(`start`,`end`,`cancel`,`interrupt`),yr=[];function br(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;wr(e,n,{name:t,index:r,group:i,on:vr,tween:yr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function xr(e,t){var n=Cr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Sr(e,t){var n=Cr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Cr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function wr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=dr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return _r(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(_r(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Tr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Er(e){return this.each(function(){Tr(this,e)})}function Dr(e,t){var n,r;return function(){var i=Sr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Or(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Sr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function kr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Cr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Dr:Or)(n,e,t))}function Ar(e,t,n){var r=e._id;return e.each(function(){var e=Sr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Cr(e,r).value[t]}}function jr(e,t){var n;return(typeof t==`number`?kn:t instanceof en?wn:(n=en(t))?(t=n,wn):Fn)(e,t)}function Mr(e){return function(){this.removeAttribute(e)}}function Nr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ir(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Lr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Rr(e,t){var n=g(e),r=n===`transform`?Gn:jr;return this.attrTween(e,typeof t==`function`?(n.local?Lr:Ir)(n,r,Ar(this,`attr.`+e,t)):t==null?(n.local?Nr:Mr)(n):(n.local?Fr:Pr)(n,r,t))}function zr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Br(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Br(e,i)),n}return i._value=t,i}function Hr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zr(e,i)),n}return i._value=t,i}function Ur(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=g(e);return this.tween(n,(r.local?Vr:Hr)(r,t))}function Wr(e,t){return function(){xr(this,e).delay=+t.apply(this,arguments)}}function Gr(e,t){return t=+t,function(){xr(this,e).delay=t}}function Kr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Wr:Gr)(t,e)):Cr(this.node(),t).delay}function qr(e,t){return function(){Sr(this,e).duration=+t.apply(this,arguments)}}function Jr(e,t){return t=+t,function(){Sr(this,e).duration=t}}function Yr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qr:Jr)(t,e)):Cr(this.node(),t).duration}function Xr(e,t){if(typeof t!=`function`)throw Error();return function(){Sr(this,e).ease=t}}function Zr(e){var t=this._id;return arguments.length?this.each(Xr(t,e)):Cr(this.node(),t).ease}function Qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Sr(this,e).ease=n}}function $r(e){if(typeof e!=`function`)throw Error();return this.each(Qr(this._id,e))}function ei(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ki(r,this._parents,this._name,this._id)}function ti(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new ki(o,this._parents,this._name,this._id)}function ni(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ri(e,t,n){var r,i,a=ni(t)?xr:Sr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function ii(e,t){var n=this._id;return arguments.length<2?Cr(this.node(),n).on.on(e):this.each(ri(n,e,t))}function ai(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oi(){return this.on(`end.remove`,ai(this._id))}function si(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=x(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,br(l[f],t,n,f,l,Cr(u,n)));return new ki(a,this._parents,t,n)}function ci(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=T(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Cr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&br(p,t,n,h,f,m);a.push(f),o.push(u)}return new ki(a,o,t,n)}var li=vt.prototype.constructor;function ui(){return new li(this._groups,this._parents)}function di(e,t){var n,r,i;return function(){var a=Ee(this,e),o=(this.style.removeProperty(e),Ee(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function fi(e){return function(){this.style.removeProperty(e)}}function pi(e,t,n){var r,i=n+``,a;return function(){var o=Ee(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function mi(e,t,n){var r,i,a;return function(){var o=Ee(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ee(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function hi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Sr(this,e),l=c.on,u=c.value[a]==null?s||=fi(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function gi(e,t,n){var r=(e+=``)==`transform`?Wn:jr;return t==null?this.styleTween(e,di(e,r)).on(`end.style.`+e,fi(e)):typeof t==`function`?this.styleTween(e,mi(e,r,Ar(this,`style.`+e,t))).each(hi(this._id,e)):this.styleTween(e,pi(e,r,t),n).on(`end.style.`+e,null)}function _i(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&_i(e,a,n)),r}return a._value=t,a}function yi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,vi(e,t,n??``))}function bi(e){return function(){this.textContent=e}}function xi(e){return function(){this.textContent=e(this)??``}}function Si(e){return this.tween(`text`,typeof e==`function`?xi(Ar(this,`text`,e)):bi(e==null?``:e+``))}function Ci(e){return function(t){this.textContent=e.call(this,t)}}function wi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ci(r)),t}return r._value=e,r}function Ti(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,wi(e))}function Ei(){for(var e=this._name,t=this._id,n=ji(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Cr(c,t);br(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ki(r,this._parents,e,n)}function Di(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Sr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Oi=0;function ki(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ai(e){return vt().transition(e)}function ji(){return++Oi}var Mi=vt.prototype;ki.prototype=Ai.prototype={constructor:ki,select:si,selectAll:ci,selectChild:Mi.selectChild,selectChildren:Mi.selectChildren,filter:ei,merge:ti,selection:ui,transition:Ei,call:Mi.call,nodes:Mi.nodes,node:Mi.node,size:Mi.size,empty:Mi.empty,each:Mi.each,on:ii,attr:Rr,attrTween:Ur,style:gi,styleTween:yi,text:Si,textTween:Ti,remove:oi,tween:kr,delay:Kr,duration:Yr,ease:Zr,easeVarying:$r,end:Di,[Symbol.iterator]:Mi[Symbol.iterator]};function Ni(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pi={time:null,delay:0,duration:250,ease:Ni};function Fi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ii(e){var t,n;e instanceof ki?(t=e._id,e=e._name):(t=ji(),(n=Pi).time=cr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&br(c,e,t,l,o,n||Fi(c,t));return new ki(r,this._parents,e,t)}vt.prototype.interrupt=Er,vt.prototype.transition=Ii;var Li=e=>()=>e;function Ri(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function zi(e,t,n){this.k=e,this.x=t,this.y=n}zi.prototype={constructor:zi,scale:function(e){return e===1?this:new zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Bi=new zi(1,0,0);Vi.prototype=zi.prototype;function Vi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bi;return e.__zoom}function Hi(e){e.stopImmediatePropagation()}function Ui(e){e.preventDefault(),e.stopImmediatePropagation()}function Wi(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Gi(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ki(){return this.__zoom||Bi}function qi(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ji(){return navigator.maxTouchPoints||`ontouchstart`in this}function Yi(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Xi(){var e=Wi,t=Gi,n=Yi,r=qi,i=Ji,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Xn,l=u(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,Ki).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,D).filter(i).on(`touchstart.zoom`,O).on(`touchmove.zoom`,k).on(`touchend.zoom touchcancel.zoom`,A).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,Ki),e===i?i.interrupt().each(function(){C(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):S(e,t,n,r)},v.scaleBy=function(e,t,n,r){v.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},v.scaleTo=function(e,r,i,a){v.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?x(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(b(y(a,l),s,c),e,o)},i,a)},v.translateBy=function(e,r,i,a){v.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},v.translateTo=function(e,r,i,a,s){v.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a;return n(Bi.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function y(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new zi(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new zi(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,n,r,i){e.on(`start.zoom`,function(){C(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){C(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=C(e,a).event(i),s=t.apply(e,a),l=r==null?x(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new zi(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function C(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=q(this.that).datum();l.call(e,this.that,new Ri(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function T(t,...i){if(!e.apply(this,arguments))return;var s=C(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=J(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Tr(this),s.start();Ui(t),s.wheel=setTimeout(d,h),s.zoom(`mouse`,n(b(y(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function E(t,...r){if(p||!e.apply(this,arguments))return;var i=t.currentTarget,a=C(this,r,!0).event(t),s=q(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,f,!0),c=J(t,i),l=t.clientX,u=t.clientY;Tt(t.view),Hi(t),a.mouse=[c,this.__zoom.invert(c)],Tr(this),a.start();function d(e){if(Ui(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>g}a.event(e).zoom(`mouse`,n(b(a.that.__zoom,a.mouse[0]=J(e,i),a.mouse[1]),a.extent,o))}function f(e){s.on(`mousemove.zoom mouseup.zoom`,null),Et(e.view,a.moved),Ui(e),a.event(e).end()}}function D(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=J(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(b(y(a,u),c,l),t.apply(this,i),o);Ui(r),s>0?q(this).transition().duration(s).call(S,d,c,r):q(this).call(v.transform,d,c,r)}}function O(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=C(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(Hi(t),s=0;s<i;++s)c=r[s],l=J(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!d);d&&=clearTimeout(d),o&&(a.taps<2&&(f=l[0],d=setTimeout(function(){d=null},m)),Tr(this),a.start())}}function k(e,...t){if(this.__zooming){var r=C(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(Ui(e),s=0;s<a;++s)c=i[s],l=J(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=y(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(b(c,l,u),r.extent,o))}}function A(e,...t){if(this.__zooming){var n=C(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(Hi(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=J(o,this),Math.hypot(f[0]-o[0],f[1]-o[1])<_)){var s=q(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:Li(+e),v):r},v.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Li(!!t),v):e},v.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Li(!!e),v):i},v.extent=function(e){return arguments.length?(t=typeof e==`function`?e:Li([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):t},v.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],v):[a[0],a[1]]},v.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],v):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},v.constrain=function(e){return arguments.length?(n=e,v):n},v.duration=function(e){return arguments.length?(s=+e,v):s},v.interpolate=function(e){return arguments.length?(c=e,v):c},v.on=function(){var e=l.on.apply(l,arguments);return e===l?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}var Zi={error001:()=>`[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The React Flow parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`},Qi=[[-1/0,-1/0],[1/0,1/0]],$i=[`Enter`,` `,`Escape`],ea={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},ta;(function(e){e.Strict=`strict`,e.Loose=`loose`})(ta||={});var na;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(na||={});var ra;(function(e){e.Partial=`partial`,e.Full=`full`})(ra||={});var ia={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},aa;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(aa||={});var oa;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(oa||={});var X;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(X||={});var sa={[X.Left]:X.Right,[X.Right]:X.Left,[X.Top]:X.Bottom,[X.Bottom]:X.Top};function ca(e){return e===null?null:e?`valid`:`invalid`}var la=e=>`id`in e&&`source`in e&&`target`in e,ua=e=>`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),da=e=>`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),fa=(e,t=[0,0])=>{let{width:n,height:r}=Ga(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},pa=(e,t={nodeOrigin:[0,0]})=>e.length===0?{x:0,y:0,width:0,height:0}:Oa(e.reduce((e,n)=>{let r=typeof n==`string`,i=!t.nodeLookup&&!r?n:void 0;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):da(n)?n:t.nodeLookup.get(n.id)),Ea(e,i?Aa(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),ma=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=Ea(n,Aa(e)),r=!0)}),r?Oa(n):{x:0,y:0,width:0,height:0}},ha=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...La(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??null,l=e.height??t.height??t.initialHeight??null,u=Ma(s,ka(t)),d=(i??0)*(l??0),f=a&&u>0;(!t.internals.handleBounds||f||u>=d||t.dragging)&&c.push(t)}return c},ga=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function _a(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{e.measured.width&&e.measured.height&&(t?.includeHiddenNodes||!e.hidden)&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function va({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);let s=Ha(ma(_a(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)}function ya({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent)if(!s)a?.(`005`,Zi.error005());else{let e=s.measured.width,t=s.measured.height;e&&t&&(d=[[c,l],[c+e,l+t]])}else s&&Wa(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=Wa(d)?Sa(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,Zi.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function ba({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=ga(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var xa=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Sa=(e={x:0,y:0},t,n)=>({x:xa(e.x,t[0][0],t[1][0]-(n?.width??0)),y:xa(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ca(e,t,n){let{width:r,height:i}=Ga(n),{x:a,y:o}=n.internals.positionAbsolute;return Sa(e,[[a,o],[a+r,o+i]],t)}var wa=(e,t,n)=>e<t?xa(Math.abs(e-t),1,t)/t:e>n?-xa(Math.abs(e-n),1,t)/t:0,Ta=(e,t,n=15,r=40)=>[wa(e.x,r,t.width-r)*n,wa(e.y,r,t.height-r)*n],Ea=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Da=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Oa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ka=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Aa=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},ja=(e,t)=>Oa(Ea(Da(e),Da(t))),Ma=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Na=e=>Pa(e.width)&&Pa(e.height)&&Pa(e.x)&&Pa(e.y),Pa=e=>!isNaN(e)&&isFinite(e),Fa=(e,t)=>{},Ia=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),La=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?Ia(s,o):s},Ra=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function za(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ba(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=za(e,n),i=za(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=za(e.top??e.y??0,n),i=za(e.bottom??e.y??0,n),a=za(e.left??e.x??0,t),o=za(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Va(e,t,n,r,i,a){let{x:o,y:s}=Ra(e,[t,n,r]),{x:c,y:l}=Ra({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var Ha=(e,t,n,r,i,a)=>{let o=Ba(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=xa(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=Va(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},Ua=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function Wa(e){return e!=null&&e!==`parent`}function Ga(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ka(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function qa(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function Ja(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ya(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Xa(e){return{...ea,...e||{}}}function Za(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=ro(e),s=La({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?Ia(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Qa=e=>({width:e.offsetWidth,height:e.offsetHeight}),$a=e=>e?.getRootNode?.()||window?.document,eo=[`INPUT`,`SELECT`,`TEXTAREA`];function to(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?eo.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var no=e=>`clientX`in e,ro=(e,t)=>{let n=no(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},io=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Qa(t)}})};function ao({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function oo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function so({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case X.Left:return[t-oo(t-r,a),n];case X.Right:return[t+oo(r-t,a),n];case X.Top:return[t,n-oo(n-i,a)];case X.Bottom:return[t,n+oo(i-n,a)]}}function co({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,curvature:o=.25}){let[s,c]=so({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=so({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function lo({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function uo({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function fo({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=Ea(Aa(e),Aa(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),Ma({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},Oa(a))>0}var po=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,mo=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),ho=(e,t,n={})=>{if(!e.source||!e.target)return Zi.error006(),t;let r=n.getEdgeId||po,i;return i=la(e)?{...e}:{...e,id:r(e)},mo(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function go({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=lo({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var _o={[X.Left]:{x:-1,y:0},[X.Right]:{x:1,y:0},[X.Top]:{x:0,y:-1},[X.Bottom]:{x:0,y:1}},vo=({source:e,sourcePosition:t=X.Bottom,target:n})=>t===X.Left||t===X.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},yo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function bo({source:e,sourcePosition:t=X.Bottom,target:n,targetPosition:r=X.Top,center:i,offset:a,stepPosition:o}){let s=_o[t],c=_o[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=vo({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=lo({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function xo(e,t,n,r){let i=Math.min(yo(e,t)/2,yo(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function So({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=bo({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=xo(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Co(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function wo(e){let{sourceNode:t,targetNode:n}=e;if(!Co(t)||!Co(n))return null;let r=t.internals.handleBounds||To(t.handles),i=n.internals.handleBounds||To(n.handles),a=Do(r?.source??[],e.sourceHandle),o=Do(e.connectionMode===ta.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,Zi.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||X.Bottom,c=o?.position||X.Top,l=Eo(t,a,s),u=Eo(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function To(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function Eo(e,t,n=X.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??Ga(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case X.Top:return{x:i+o/2,y:a};case X.Right:return{x:i+o,y:a+s/2};case X.Bottom:return{x:i+o/2,y:a+s};case X.Left:return{x:i,y:a+s/2}}}function Do(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Oo(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function ko(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Oo(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var Ao=1e3,jo=10,Mo={nodeOrigin:[0,0],nodeExtent:Qi,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},No={...Mo,checkEquality:!0};function Po(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Fo(e,t,n){let r=Po(Mo,n);for(let n of e.values())if(n.parentId)Bo(n,e,t,r);else{let e=Sa(fa(n,r.nodeOrigin),Wa(n.extent)?n.extent:r.nodeExtent,Ga(n));n.internals.positionAbsolute=e}}function Io(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function Lo(e){return e===`manual`}function Ro(e,t,n,r={}){let i=Po(No,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!Lo(i.zIndexMode)?Ao:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=Sa(fa(u,i.nodeOrigin),Wa(u.extent)?u.extent:i.nodeExtent,Ga(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:Io(u,e),z:Vo(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}(e.measured===void 0||e.measured.width===void 0||e.measured.height===void 0)&&!e.hidden&&(c=!1),u.parentId&&Bo(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function zo(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Bo(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=Po(Mo,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zo(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*jo),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=Ho(e,u,o,s,a&&!Lo(c)?Ao:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function Vo(e,t,n){let r=Pa(e.zIndex)?e.zIndex:0;return Lo(n)?r:r+(e.selected?t:0)}function Ho(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=Ga(e),l=fa(e,n),u=Wa(e.extent)?Sa(l,e.extent,c):l,d=Sa({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=Ca(d,c,t));let f=Vo(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function Uo(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=ja(a.get(n.parentId)?.expandedRect??ka(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=Ga(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function Wo(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Qa(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=Wa(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&e.extent===`parent`?h=Ca(h,s,t.get(e.parentId)):m&&(h=Sa(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:io(`source`,r.nodeElement,p,d,e.id),target:io(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&Bo(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:ka(g,i)}))}}if(f.length>0){let e=Uo(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function Go({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function Ko(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function qo(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;Ko(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),Ko(`target`,s,c,e,i,o),t.set(r.id,r)}}function Jo(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Jo(n,t):!1}function Yo(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function Xo(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Jo(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function Zo({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function Qo({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=Ia(a,t);return{x:o.x-a.x,y:o.y-a.y}}function $o({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=q(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?Da(ma(s)):null,x=v&&l?Qo({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:Ia(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=ya({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=Ta(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,(!m||!y)&&!o&&b&&(i.get(b)?.selected||_()),y&&m&&b&&e?.(b);let v=Za(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=Xo(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=Nt().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=Za(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=ro(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=Za(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=ro(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=ro(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!(!d||p)&&(c=!1,d=!1,cancelAnimationFrame(o),s.size>0)){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=Zo({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!Yo(t,`.${g}`,v))&&(!_||Yo(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function es(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())Ma(i,ka(e))>0&&r.push(e);return r}var ts=250;function ns(e,t,n,r){let i=[],a=1/0,o=es(e,n,t+ts);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=Eo(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function rs(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...Eo(o,c,c.position,!0)}:c}function is(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function as(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var os=()=>!0;function ss(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=os,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=$a(e.target),E=0,D,{x:O,y:k}=ro(e),A=is(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=rs(i,A,r,c,t);if(!N)return;let P=ro(e,j),F=!1,I=null,L=!1,R=null;function z(){if(!u||!j)return;let[e,t]=Ta(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(z)}let B={...N,nodeId:i,type:A,position:N.position},V=c.get(i),H={inProgress:!0,isValid:null,from:Eo(V,B,X.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:V,to:P,toHandle:null,toPosition:sa[B.position],toNode:null,pointer:P};function U(){M=!0,y(H),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&U();function W(e){if(!M){let{x:t,y:n}=ro(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;U()}if(!x()||!B){G(e);return}let a=b();P=ro(e,j),D=ns(La(P,a,!1,[1,1]),n,c,B),F||=(z(),!0);let s=cs(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});R=s.handleDomNode,I=s.connection,L=as(!!D,s.isValid);let u=c.get(i),f=u?Eo(u,B,X.Left,!0):H.from,p={...H,from:f,isValid:L,to:s.toHandle&&L?Ra({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:L&&s.toHandle?s.toHandle.position:sa[B.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),H=p}function G(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||R)&&I&&L&&h?.(I);let{inProgress:t,...n}=H,r={...n,toPosition:H.toHandle?H.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,L=!1,I=null,R=null,T.removeEventListener(`mousemove`,W),T.removeEventListener(`mouseup`,G),T.removeEventListener(`touchmove`,W),T.removeEventListener(`touchend`,G)}}T.addEventListener(`mousemove`,W),T.addEventListener(`mouseup`,G),T.addEventListener(`touchmove`,W),T.addEventListener(`touchend`,G)}function cs(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=os,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=ro(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=is(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===ta.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=rs(t,e,a,u,n,!0)}return _}var ls={onPointerDown:ss,isValid:cs};function us({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=q(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&Ua()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=Xi().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:J}}var ds=e=>({x:e.x,y:e.y,zoom:e.k}),fs=({x:e,y:t,zoom:n})=>Bi.translate(e,t).scale(n),ps=(e,t)=>e.target.closest(`.${t}`),ms=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hs=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,gs=(e,t=0,n=hs,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},_s=e=>{let t=e.ctrlKey&&Ua()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function vs({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(ps(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=J(u),t=d*2**_s(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===na.Vertical?0:u.deltaX*f,m=i===na.Horizontal?0:u.deltaY*f;!Ua()&&u.shiftKey&&i!==na.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=ds(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(u,h),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(u,h))}}function ys({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=ps(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function bs({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=ds(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function xs({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&ms(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,ds(a.transform))}}function Ss({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&ms(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=ds(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function Cs({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:u}){return d=>{let f=e||t,p=n&&d.ctrlKey,m=d.type===`wheel`;if(d.button===1&&d.type===`mousedown`&&(ps(d,`${l}-flow__node`)||ps(d,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!a&&!n||o||u&&!m||ps(d,s)&&m||ps(d,c)&&(!m||i&&m&&!e)||!n&&d.ctrlKey&&m)return!1;if(!n&&d.type===`touchstart`&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!p&&m||!r&&(d.type===`mousedown`||d.type===`touchstart`)||Array.isArray(r)&&!r.includes(d.button)&&d.type===`mousedown`)return!1;let h=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||m)&&h}}function ws({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=Xi().scaleExtent([t,n]).translateExtent(r),f=q(e).call(d);v({x:i.x,y:i.y,zoom:xa(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let p=f.on(`wheel.zoom`),m=f.on(`dblclick.zoom`);d.wheelDelta(_s);function h(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).transform(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:g,preventScrolling:v,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneClickDistance:E,selectionOnDrag:D}){r&&!l.isZoomingOrPanning&&_();let O=i&&!S&&!r;d.clickDistance(D?1/0:!Pa(E)||E<0?0:E);let k=O?vs({zoomPanValues:l,noWheelClassName:e,d3Selection:f,d3Zoom:d,panOnScrollMode:h,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):ys({noWheelClassName:e,preventScrolling:v,d3ZoomHandler:p});if(f.on(`wheel.zoom`,k,{passive:!1}),!r){let e=bs({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});d.on(`start`,e);let t=xs({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:w});d.on(`zoom`,t);let r=Ss({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});d.on(`end`,r)}let A=Cs({zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});d.filter(A),x?f.on(`dblclick.zoom`,m):f.on(`dblclick.zoom`,null)}function _(){d.on(`zoom`,null)}async function v(e,t,n){let r=fs(e),i=d?.constrain()(r,t,n);return i&&await h(i),new Promise(e=>e(i))}async function y(e,t){let n=fs(e);return await h(n,t),new Promise(e=>e(n))}function b(e){if(f){let t=fs(e),n=f.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&d?.transform(f,t,null,{sync:!0})}}function x(){let e=f?Vi(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}function S(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleTo(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function C(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleBy(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function w(e){d?.scaleExtent(e)}function T(e){d?.translateExtent(e)}function E(e){let t=!Pa(e)||e<0?0:e;d?.clickDistance(t)}return{update:g,destroy:_,setViewport:y,setViewportConstrained:v,getViewport:x,scaleTo:S,scaleBy:C,setScaleExtent:w,setTranslateExtent:T,syncViewport:b,setClickDistance:E}}var Ts;(function(e){e.Line=`line`,e.Handle=`handle`})(Ts||={});function Es({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function Ds(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function Os(e,t){return Math.max(0,t-e)}function ks(e,t){return Math.max(0,e-t)}function As(e,t,n){return Math.max(0,t-e,e-n)}function js(e,t){return e?!t:t}function Ms(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=As(E,h,g),j=As(D,_,v);if(o){let e=0,t=0;c&&w<0?e=Os(y+w+O,o[0][0]):!c&&w>0&&(e=ks(y+E+O,o[1][0])),l&&T<0?t=Os(b+T+k,o[0][1]):!l&&T>0&&(t=ks(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=ks(y+w,s[0][0]):!c&&w<0&&(e=Os(y+E,s[1][0])),l&&T>0?t=ks(b+T,s[0][1]):!l&&T<0&&(t=Os(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=As(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?ks(b+k+E/C,o[1][1])*C:Os(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?Os(b+E/C,s[1][1])*C:ks(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=As(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?ks(y+D*C+O,o[1][0])/C:Os(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?Os(y+D*C,s[1][0])/C:ks(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(js(c,l)?-w:w)/C:w=(js(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var Ns={width:0,height:0,x:0,y:0},Ps={...Ns,pointerX:0,pointerY:0,aspectRatio:1};function Fs(e){return[[0,0],[e.measured.width,e.measured.height]]}function Is(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function Ls({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=q(e),o={controlDirection:Ds(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...Ns},h={...Ps};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:Ds(e)};let g,_=null,v=[],y,b,x,S=!1,C=Nt().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=Za(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId),b=y&&g.extent===`parent`?Fs(y):void 0),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=Is(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=Za(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:C,height:w}=m,T={},E=g.origin??s,{width:D,height:O,x:k,y:A}=Ms(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,E,b,x),j=D!==C,M=O!==w,N=k!==u&&j,P=A!==f&&M;if(!N&&!P&&!j&&!M)return;if((N||P||E[0]===1||E[1]===1)&&(T.x=N?k:m.x,T.y=P?A:m.y,m.x=T.x,m.y=T.y,v.length>0)){let e=k-u,t=A-f;for(let n of v)n.position={x:n.position.x-e+E[0]*(D-C),y:n.position.y-t+E[1]*(O-w)},l.push(n)}if((j||M)&&(T.width=j&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?D:m.width,T.height=M&&(!o.resizeDirection||o.resizeDirection===`vertical`)?O:m.height,m.width=T.width,m.height=T.height),y&&g.expandParent){let e=E[0]*(T.width??0);T.x&&T.x<e&&(m.x=e,h.x-=T.x-e);let t=E[1]*(T.height??0);T.y&&T.y<t&&(m.y=t,h.y-=T.y-t)}let F=Es({width:m.width,prevWidth:C,height:m.height,prevHeight:w,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)!==!1&&(S=!0,d?.(e,I),r(T,l))}).on(`end`,e=>{S&&=(f?.(e,{...m}),i?.({...m}),!1)});a.call(C)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var Rs=n((t=>{var n=e(),r=a();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:i,s=r.useSyncExternalStore,c=n.useRef,l=n.useEffect,u=n.useMemo,d=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),zs=t(n(((e,t)=>{t.exports=Rs()}))(),1),Bs=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},Vs=e=>e?Bs(e):Bs,{useDebugValue:Hs}=o.default,{useSyncExternalStoreWithSelector:Us}=zs.default,Ws=e=>e;function Gs(e,t=Ws,n){let r=Us(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Hs(r),r}var Ks=(e,t)=>{let n=Vs(e),r=(e,r=t)=>Gs(n,e,r);return Object.assign(r,n),r},qs=(e,t)=>e?Ks(e,t):Ks;function Z(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}i();var Js=(0,o.createContext)(null),Ys=Js.Provider,Xs=Zi.error001();function Q(e,t){let n=(0,o.useContext)(Js);if(n===null)throw Error(Xs);return Gs(n,e,t)}function $(){let e=(0,o.useContext)(Js);if(e===null)throw Error(Xs);return(0,o.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Zs={display:`none`},Qs={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},$s=`react-flow__node-desc`,ec=`react-flow__edge-desc`,tc=`react-flow__aria-live`,nc=e=>e.ariaLiveMessage,rc=e=>e.ariaLabelConfig;function ic({rfId:e}){let t=Q(nc);return(0,s.jsx)(`div`,{id:`${tc}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:Qs,children:t})}function ac({rfId:e,disableKeyboardA11y:t}){let n=Q(rc);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{id:`${$s}-${e}`,style:Zs,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,s.jsx)(`div`,{id:`${ec}-${e}`,style:Zs,children:n[`edge.a11yDescription.default`]}),!t&&(0,s.jsx)(ic,{rfId:e})]})}var oc=(0,o.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>(0,s.jsx)(`div`,{className:c([`react-flow__panel`,n,...`${e}`.split(`-`)]),style:r,ref:a,...i,children:t}));oc.displayName=`Panel`;function sc({proOptions:e,position:t=`bottom-right`}){return e?.hideAttribution?null:(0,s.jsx)(oc,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev`,children:(0,s.jsx)(`a`,{href:`https://reactflow.dev`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var cc=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},lc=e=>e.id;function uc(e,t){return Z(e.selectedNodes.map(lc),t.selectedNodes.map(lc))&&Z(e.selectedEdges.map(lc),t.selectedEdges.map(lc))}function dc({onSelectionChange:e}){let t=$(),{selectedNodes:n,selectedEdges:r}=Q(cc,uc);return(0,o.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var fc=e=>!!e.onSelectionChangeHandlers;function pc({onSelectionChange:e}){let t=Q(fc);return e||t?(0,s.jsx)(dc,{onSelectionChange:e}):null}var mc=typeof window<`u`?o.useLayoutEffect:o.useEffect,hc=[0,0],gc={x:0,y:0,zoom:1},_c=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],vc=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),yc={translateExtent:Qi,nodeOrigin:hc,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function bc(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:l}=Q(vc,Z),u=$();mc(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=yc,c()}),[]);let d=(0,o.useRef)(yc);return mc(()=>{for(let o of _c){let c=e[o];c!==d.current[o]&&e[o]!==void 0&&(o===`nodes`?t(c):o===`edges`?n(c):o===`minZoom`?r(c):o===`maxZoom`?i(c):o===`translateExtent`?a(c):o===`nodeExtent`?s(c):o===`ariaLabelConfig`?u.setState({ariaLabelConfig:Xa(c)}):o===`fitView`?u.setState({fitViewQueued:c}):o===`fitViewOptions`?u.setState({fitViewOptions:c}):u.setState({[o]:c}))}d.current=e},_c.map(t=>e[t])),null}function xc(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function Sc(e){let[t,n]=(0,o.useState)(e===`system`?null:e);return(0,o.useEffect)(()=>{if(e!==`system`){n(e);return}let t=xc(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?xc()?.matches?`dark`:`light`:t}var Cc=typeof document<`u`?document:null;function wc(e=null,t={target:Cc,actInsideInputWithModifier:!0}){let[n,r]=(0,o.useState)(!1),i=(0,o.useRef)(!1),a=(0,o.useRef)(new Set([])),[s,c]=(0,o.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(`+`,``).replace(``,`diff --git a/semantica/static/assets/ReasoningWorkspace-IX_GWHR8.js b/semantica/static/assets/ReasoningWorkspace-Rq0mhU8j.jssimilarity index 97%rename from semantica/static/assets/ReasoningWorkspace-IX_GWHR8.jsrename to semantica/static/assets/ReasoningWorkspace-Rq0mhU8j.jsindex 7588c9e2..e0c67407 100644--- a/semantica/static/assets/ReasoningWorkspace-IX_GWHR8.js+++ b/semantica/static/assets/ReasoningWorkspace-Rq0mhU8j.js@@ -1,2 +1,2 @@-import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{n as r}from"./index-BaPyswgU.js";var i=t(e(),1),a=n(),o=`inhibits(Metformin, mTOR)+import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{n as r}from"./index-Ba72GzGt.js";var i=t(e(),1),a=n(),o=`inhibits(Metformin, mTOR)causes(mTOR, Neurodegeneration)`,s=`IF inhibits(Metformin, mTOR) AND causes(mTOR, Neurodegeneration) THEN candidate(Metformin, Alzheimer's)`;function c(){let e=r(),[t,n]=(0,i.useState)(o),[c,g]=(0,i.useState)(s),[_,v]=(0,i.useState)(!0),[y,b]=(0,i.useState)(null),[x,S]=(0,i.useState)(!1),[C,w]=(0,i.useState)(``);async function T(){S(!0),w(``),b(null);try{let n=await fetch(`/api/reason`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({facts:t.split(/\r?\n/).map(e=>e.trim()).filter(Boolean),rules:c.split(/\r?\n/).map(e=>e.trim()).filter(Boolean),mode:`forward`,apply_to_graph:_})}),r=await n.json();if(!n.ok)throw Error(r.detail||`Reasoning failed with status ${n.status}`);b(r),r.mutated&&e.invalidateQueries({queryKey:[`graph`,`full-load`]})}catch(e){w(e instanceof Error?e.message:`Reasoning failed`)}finally{S(!1)}}return(0,a.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1.2fr 1fr`,gap:24,height:`100%`,padding:24,boxSizing:`border-box`,background:`#0d1117`},children:[(0,a.jsxs)(`div`,{style:l,children:[(0,a.jsx)(`h3`,{style:u,children:`Facts`}),(0,a.jsx)(`p`,{style:d,children:"Enter one fact per line using `predicate(subject, object)` form."}),(0,a.jsx)(`textarea`,{value:t,onChange:e=>n(e.target.value),style:f}),(0,a.jsx)(`h3`,{style:{...u,marginTop:18},children:`Rules`}),(0,a.jsx)(`p`,{style:d,children:"Write rules in `IF ... AND ... THEN ...` format. If the advanced reasoner is unavailable, the explorer falls back to an internal rule matcher for this format."}),(0,a.jsx)(`textarea`,{value:c,onChange:e=>g(e.target.value),style:{...f,minHeight:160}}),(0,a.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:10,color:`#c9d1d9`,fontSize:13,marginTop:16},children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),`Write inferred binary facts back into the graph as inferred edges`]}),(0,a.jsx)(`button`,{onClick:T,disabled:x,style:p,children:x?`Running...`:`Run Reasoning`})]}),(0,a.jsxs)(`div`,{style:l,children:[(0,a.jsx)(`h3`,{style:u,children:`Inference Results`}),C?(0,a.jsx)(`div`,{style:{color:`#ff7b72`,marginBottom:12},children:C}):null,y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`,marginBottom:14},children:[(0,a.jsxs)(`span`,{style:m,children:[`rules fired: `,y.rules_fired??0]}),(0,a.jsxs)(`span`,{style:m,children:[`edges added: `,y.added_edges??0]}),(0,a.jsx)(`span`,{style:m,children:y.mutated?`graph updated`:`preview only`})]}),(0,a.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:(y.inferred_facts||[]).length?y.inferred_facts?.map(e=>(0,a.jsx)(`div`,{style:h,children:e},e)):(0,a.jsx)(`div`,{style:{color:`#8b949e`,fontSize:13},children:`No inferred facts were produced.`})})]}):(0,a.jsx)(`div`,{style:{color:`#8b949e`,fontSize:13},children:`Run a rule set to inspect inferred statements here.`})]})]})}var l={background:`linear-gradient(135deg, rgba(13, 17, 23, 0.78), rgba(22, 27, 34, 0.64))`,border:`1px solid rgba(88, 166, 255, 0.18)`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`},u={color:`#fff`,margin:0,fontSize:18,fontWeight:700},d={color:`#8b949e`,fontSize:13,lineHeight:1.5,margin:`8px 0 14px`},f={width:`100%`,minHeight:120,resize:`vertical`,borderRadius:12,border:`1px solid rgba(88, 166, 255, 0.18)`,background:`rgba(0, 0, 0, 0.25)`,color:`#e6edf3`,padding:12,fontFamily:`Consolas, monospace`,fontSize:13,boxSizing:`border-box`},p={marginTop:18,border:`1px solid rgba(88, 166, 255, 0.3)`,background:`rgba(31, 111, 235, 0.2)`,color:`#fff`,borderRadius:12,padding:`11px 14px`,fontWeight:700,cursor:`pointer`},m={color:`#79c0ff`,border:`1px solid rgba(88, 166, 255, 0.2)`,background:`rgba(88, 166, 255, 0.08)`,borderRadius:999,padding:`5px 10px`,fontSize:12},h={color:`#e6edf3`,background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.06)`,borderRadius:10,padding:`10px 12px`,fontFamily:`Consolas, monospace`,fontSize:13};export{c as ReasoningWorkspace};\ No newline at end of filediff --git a/semantica/static/assets/VocabularyWorkspace-Bwqfb1tG.js b/semantica/static/assets/VocabularyWorkspace-B6-y7wgc.jssimilarity index 99%rename from semantica/static/assets/VocabularyWorkspace-Bwqfb1tG.jsrename to semantica/static/assets/VocabularyWorkspace-B6-y7wgc.jsindex beabf866..7280178e 100644--- a/semantica/static/assets/VocabularyWorkspace-Bwqfb1tG.js+++ b/semantica/static/assets/VocabularyWorkspace-B6-y7wgc.js@@ -1,4 +1,4 @@-import{i as e,n as t,o as n,r,t as i}from"./jsx-runtime-B3dmMxJS.js";import{A as a,T as o,m as s,o as c,w as l,y as u}from"./query-vnlTpYnf.js";import{t as d}from"./useQuery-DY70wuIi.js";import{a as f,i as p,n as m,r as h,t as g}from"./es-BlaQ22nu.js";import{i as _,n as v,r as y,t as b}from"./index-BaPyswgU.js";import{t as x}from"./shim-s-9Axq3H.js";var S=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&s(t.mutationKey)!==s(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??y();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){c.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},C=n(t(),1);function w(e,t){let n=v(t),[r]=C.useState(()=>new S(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);let i=C.useSyncExternalStore(C.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((e,t)=>{r.mutate(e,t).catch(u)},[r]);if(i.error&&o(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var T=b(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),E=b(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),D=b(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),O=_(),ee=async()=>{let e=await fetch(`/api/vocabulary/schemes`);if(!e.ok)throw Error(`Failed to fetch vocabularies`);return e.json()},te=async e=>{let t=await fetch(`/api/vocabulary/hierarchy?scheme=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to fetch hierarchy`);return t.json()},ne=async e=>{let t=new FormData;t.append(`file`,e);let n=await fetch(`/api/vocabulary/import`,{method:`POST`,body:t});if(!n.ok)throw Error(`Failed to import vocabulary`);return n.json()},re=()=>{let e=(0,O.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`vocabularies`],queryFn:ee},e[0]=t):t=e[0],d(t)},ie=e=>{let t=(0,O.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`hierarchy`,e],r=()=>te(e),t[0]=e,t[1]=n,t[2]=r);let i=!!e,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a={queryKey:n,queryFn:r,enabled:i},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],d(a)},ae=()=>{let e=(0,O.c)(2),t=v(),n;return e[0]===t?n=e[1]:(n={mutationFn:ne,onSuccess:()=>{t.invalidateQueries({queryKey:[`vocabularies`]})}},e[0]=t,e[1]=n),w(n)},oe=(0,C.createContext)(null);function k(){let e=(0,C.useContext)(oe);if(e===null)throw Error(`No Tree Api Provided`);return e}var se=(0,C.createContext)(null);function ce(){let e=(0,C.useContext)(se);if(e===null)throw Error(`Provide a NodesContext`);return e}var le=(0,C.createContext)(null);function ue(){let e=(0,C.useContext)(le);if(e===null)throw Error(`Provide a DnDContext`);return e}var de=(0,C.createContext)(0);function fe(){(0,C.useContext)(de)}var pe=e({access:()=>Oe,bound:()=>me,dfs:()=>xe,focusNextElement:()=>Ce,focusPrevElement:()=>we,getInsertIndex:()=>Ne,getInsertParentId:()=>Pe,identify:()=>A,identifyNull:()=>ke,indexOf:()=>ye,isClosed:()=>ge,isDescendant:()=>ve,isItem:()=>he,isOpenWithEmptyChildren:()=>_e,mergeRefs:()=>Ae,noop:()=>be,safeRun:()=>je,waitFor:()=>Me,walk:()=>Se});function me(e,t,n){return Math.max(Math.min(e,n),t)}function he(e){return e&&e.isLeaf}function ge(e){return e&&e.isInternal&&!e.isOpen}function _e(e){return e&&e.isOpen&&!e.children?.length}var ve=(e,t)=>{let n=e;for(;n;){if(n.id===t.id)return!0;n=n.parent}return!1},ye=e=>{if(!e.parent)throw Error(`Node does not have a parent`);return e.parent.children.findIndex(t=>t.id===e.id)};function be(){}function xe(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let n of e.children){let e=xe(n,t);if(e)return e}return null}function Se(e,t){if(t(e),e.children)for(let n of e.children)Se(n,t)}function Ce(e){let t=De(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=Te(t,r);break}n?.focus()}function we(e){let t=De(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=Ee(t,r);break}n?.focus()}function Te(e,t){return t+1<e.length?e[t+1]:e[0]}function Ee(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function De(e){return Array.from(document.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)`)).filter(t=>t===e||!e.contains(t))}function Oe(e,t){return typeof t==`boolean`?t:typeof t==`string`?e[t]:t(e)}function ke(e){return e===null?null:A(e)}function A(e){return typeof e==`string`?e:e.id}function Ae(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}function je(e,...t){if(e)return e(...t)}function Me(e){return new Promise((t,n)=>{let r=0;function i(){r+=1,r===100&&n(),e()?t():setTimeout(i,10)}i()})}function Ne(e){let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:e.root.children?.length??0}function Pe(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var j=i(),Fe={display:`flex`,alignItems:`center`,zIndex:1},Ie={flex:1,height:`2px`,background:`#4B91E2`,borderRadius:`1px`},Le={width:`4px`,height:`4px`,boxShadow:`0 0 0 3px #4B91E2`,borderRadius:`50%`},Re=C.memo(function({top:e,left:t,indent:n}){let r={position:`absolute`,pointerEvents:`none`,top:e-2+`px`,left:t+`px`,right:n+`px`};return(0,j.jsxs)(`div`,{style:Object.assign(Object.assign({},Fe),r),children:[(0,j.jsx)(`div`,{style:Object.assign({},Le)}),(0,j.jsx)(`div`,{style:Object.assign({},Ie)})]})});function ze({node:e,attrs:t,innerRef:n,children:r}){return(0,j.jsx)(`div`,Object.assign({},t,{ref:n,onFocus:e=>e.stopPropagation(),onClick:e.handleClick,children:r}))}function Be(e){return(0,j.jsxs)(`div`,{ref:e.dragHandle,style:e.style,children:[(0,j.jsx)(`span`,{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?`🌳`:e.node.isOpen?`🗁`:`🗀`}),` `,e.node.isEditing?(0,j.jsx)(He,Object.assign({},e)):(0,j.jsx)(Ve,Object.assign({},e))]})}function Ve(e){return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(`span`,{children:e.node.data.name})})}function He({node:e}){let t=(0,C.useRef)();return(0,C.useEffect)(()=>{var e,n;(e=t.current)==null||e.focus(),(n=t.current)==null||n.select()},[]),(0,j.jsx)(`input`,{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:n=>{n.key===`Escape`&&e.reset(),n.key===`Enter`&&e.submit(t.current?.value||``)}})}function Ue(e){return{type:`EDIT`,id:e}}function We(e={id:null},t){return t.type===`EDIT`?Object.assign(Object.assign({},e),{id:t.id}):e}function M(e){return{type:`FOCUS`,id:e}}function Ge(){return{type:`TREE_BLUR`}}function Ke(e={id:null,treeFocused:!1},t){return t.type===`FOCUS`?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type===`TREE_BLUR`?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var qe=class e{constructor(e){this.handleClick=e=>{e.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():e.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===Je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){return this.isSelected&&!this.prev?.isSelected}get isSelectedEnd(){return this.isSelected&&!this.next?.isSelected}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){let e=this.childIndex;return this.parent?.children[e+1]??null}isAncestorOf(e){if(!e)return!1;let t=e;for(;t;){if(t.id===this.id)return!0;t=t.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new e(Object.assign({},this))}edit(){return this.tree.edit(this)}},Je=`__REACT_ARBORIST_INTERNAL_ROOT__`;function Ye(e){function t(n,r,i){let a=new qe({tree:e,data:n,level:r,parent:i,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),o=e.accessChildren(n);return o&&(a.children=o.map(e=>t(e,r+1,a))),a}let n=new qe({tree:e,id:Je,data:{id:Je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return n.children=(e.props.data??[]).map(e=>t(e,0,n)),n}var Xe={open(e,t){return{type:`VISIBILITY_OPEN`,id:e,filtered:t}},close(e,t){return{type:`VISIBILITY_CLOSE`,id:e,filtered:t}},toggle(e,t){return{type:`VISIBILITY_TOGGLE`,id:e,filtered:t}},clear(e){return{type:`VISIBILITY_CLEAR`,filtered:e}}};function Ze(e={},t){if(t.type===`VISIBILITY_OPEN`)return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type===`VISIBILITY_CLOSE`)return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type===`VISIBILITY_TOGGLE`){let n=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!n})}else if(t.type===`VISIBILITY_CLEAR`)return{};else return e}function Qe(e={filtered:{},unfiltered:{}},t){return t.type.startsWith(`VISIBILITY`)?t.filtered?Object.assign(Object.assign({},e),{filtered:Ze(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Ze(e.unfiltered,t)}):e}var N=e=>({nodes:{open:{filtered:{},unfiltered:e?.initialOpenState??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:`none`},dragId:null,dragIds:[],parentId:null,index:-1}}),P={clear:()=>({type:`SELECTION_CLEAR`}),only:e=>({type:`SELECTION_ONLY`,id:A(e)}),add:e=>({type:`SELECTION_ADD`,ids:(Array.isArray(e)?e:[e]).map(A)}),remove:e=>({type:`SELECTION_REMOVE`,ids:(Array.isArray(e)?e:[e]).map(A)}),set:e=>Object.assign({type:`SELECTION_SET`},e),mostRecent:e=>({type:`SELECTION_MOST_RECENT`,id:e===null?null:A(e)}),anchor:e=>({type:`SELECTION_ANCHOR`,id:e===null?null:A(e)})};function $e(e=N().nodes.selection,t){let n=e.ids;switch(t.type){case`SELECTION_CLEAR`:return Object.assign(Object.assign({},e),{ids:new Set});case`SELECTION_ONLY`:return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case`SELECTION_ADD`:return t.ids.length===0?e:(t.ids.forEach(e=>n.add(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_REMOVE`:return t.ids.length===0?e:(t.ids.forEach(e=>n.delete(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_SET`:return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case`SELECTION_MOST_RECENT`:return Object.assign(Object.assign({},e),{mostRecent:t.id});case`SELECTION_ANCHOR`:return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}var F={cursor(e){return{type:`DND_CURSOR`,cursor:e}},dragStart(e,t){return{type:`DND_DRAG_START`,id:e,dragIds:t}},dragEnd(){return{type:`DND_DRAG_END`}},hovering(e,t){return{type:`DND_HOVERING`,parentId:e,index:t}}};function et(e=N().dnd,t){switch(t.type){case`DND_CURSOR`:return Object.assign(Object.assign({},e),{cursor:t.cursor});case`DND_DRAG_START`:return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case`DND_DRAG_END`:return N().dnd;case`DND_HOVERING`:return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var tt={position:`fixed`,pointerEvents:`none`,zIndex:100,left:0,top:0,width:`100%`,height:`100%`},nt=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t}px, ${n}px)`}},rt=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t+10}px, ${n+10}px)`}};function it({offset:e,mouse:t,id:n,dragIds:r,isDragging:i}){return(0,j.jsxs)(at,{isDragging:i,children:[(0,j.jsx)(ot,{offset:e,children:(0,j.jsx)(ct,{id:n,dragIds:r})}),(0,j.jsx)(st,{mouse:t,count:r.length})]})}var at=(0,C.memo)(function(e){return e.isDragging?(0,j.jsx)(`div`,{style:tt,children:e.children}):null});function ot(e){return(0,j.jsx)(`div`,{className:`row preview`,style:nt(e.offset),children:e.children})}function st(e){let{count:t,mouse:n}=e;return t>1?(0,j.jsx)(`div`,{className:`selected-count`,style:rt(n),children:t}):null}var ct=(0,C.memo)(function(e){let t=k(),n=t.get(e.id);return n?(0,j.jsx)(t.renderNode,{preview:!0,node:n,style:{paddingLeft:n.level*t.indent,opacity:.2,background:`transparent`},tree:t}):null});function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}function ut(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function ft(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dt(e,t)}var pt=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function mt(e,t){return!!(e===t||pt(e)&&pt(t))}function ht(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function gt(e,t){t===void 0&&(t=ht);var n,r=[],i,a=!1;function o(){var o=[...arguments];return a&&n===this&&t(o,r)?i:(i=e.apply(this,o),a=!0,n=this,r=o,i)}return o}var _t=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function vt(e){cancelAnimationFrame(e.id)}function yt(e,t){var n=_t();function r(){_t()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var bt=-1;function xt(e){if(e===void 0&&(e=!1),bt===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),bt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return bt}var I=null;function St(e){if(e===void 0&&(e=!1),I===null||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,n.direction=`rtl`;var r=document.createElement(`div`),i=r.style;return i.width=`100px`,i.height=`100px`,t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?I=`positive-descending`:(t.scrollLeft=1,I=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),I}return I}var Ct=150,wt=function(e,t){return e};function Tt(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){ft(t,e);function t(t){var r=e.call(this,t)||this;return r._instanceProps=c(r.props,ut(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ut(r),isScrolling:!1,scrollDirection:`forward`,scrollOffset:typeof r.props.initialScrollOffset==`number`?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=gt(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=gt(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t=r.props,a=t.direction,o=t.itemSize,s=t.layout,c=r._getItemStyleCache(l&&o,l&&s,l&&a),u;if(c.hasOwnProperty(e))u=c[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p=a===`horizontal`||s===`horizontal`,m=a===`rtl`,h=p?d:0;c[e]=u={position:`absolute`,left:m?void 0:h,right:m?h:void 0,top:p?0:d,height:p?`100%`:f,width:p?f:`100%`}}return u},r._getItemStyleCache=void 0,r._getItemStyleCache=gt(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if(t===`rtl`)switch(St()){case`negative`:o=-i;break;case`positive-descending`:o=a-n-i;break}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?`forward`:`backward`,scrollOffset:o,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState(function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?`forward`:`backward`,scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,typeof t==`function`?t(e):typeof t==`object`&&t&&t.hasOwnProperty(`current`)&&(t.current=e)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&vt(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=yt(r._resetIsScrolling,Ct)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return Et(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?`forward`:`backward`,scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){t===void 0&&(t=`auto`);var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var c=this._outerRef;s=i===`vertical`?c.scrollWidth>c.clientWidth?xt():0:c.scrollHeight>c.clientHeight?xt():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if(typeof n==`number`&&this._outerRef!=null){var i=this._outerRef;t===`horizontal`||r===`horizontal`?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&this._outerRef!=null){var a=this._outerRef;if(t===`horizontal`||n===`horizontal`)if(t===`rtl`)switch(St()){case`negative`:a.scrollLeft=-i;break;case`positive-ascending`:a.scrollLeft=i;break;default:var o=a.clientWidth;a.scrollLeft=a.scrollWidth-o-i;break}else a.scrollLeft=i;else a.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&vt(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,u=e.itemData,d=e.itemKey,f=d===void 0?wt:d,p=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,_=e.useIsScrolling,v=e.width,y=this.state.isScrolling,b=i===`horizontal`||p===`horizontal`,x=b?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),w=S[0],T=S[1],E=[];if(l>0)for(var D=w;D<=T;D++)E.push((0,C.createElement)(t,{data:u,key:f(D,u),index:D,isScrolling:_?y:void 0,style:this._getItemStyle(D)}));var O=r(this.props,this._instanceProps);return(0,C.createElement)(m||h||`div`,{className:n,onScroll:x,ref:this._outerRefSetter,style:lt({position:`relative`,height:a,width:v,overflow:`auto`,WebkitOverflowScrolling:`touch`,willChange:`transform`,direction:i},g)},(0,C.createElement)(s||c||`div`,{children:E,ref:o,style:{height:b?`100%`:O,pointerEvents:y?`none`:void 0,width:b?O:`100%`}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered==`function`&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if(typeof this.props.onScroll==`function`){var a=this.state,o=a.scrollDirection,s=a.scrollOffset,c=a.scrollUpdateWasRequested;this._callOnScroll(o,s,c)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,c=r.scrollOffset;if(t===0)return[0,0,0,0];var l=o(this.props,c,this._instanceProps),u=s(this.props,l,c,this._instanceProps),d=!i||a===`backward`?Math.max(1,n):1,f=!i||a===`forward`?Math.max(1,n):1;return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+f)),l,u]},t}(C.PureComponent),t.defaultProps={direction:`ltr`,itemData:void 0,layout:`vertical`,overscanCount:2,useIsScrolling:!1},t}var Et=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Dt=Tt({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,c=e.itemCount,l=e.itemSize,u=e.layout,d=e.width,f=o===`horizontal`||u===`horizontal`?d:s,p=Math.max(0,c*l-f),m=Math.min(p,t*l),h=Math.max(0,t*l-f+l+a);switch(n===`smart`&&(n=r>=h-f&&r<=m+f?`auto`:`center`),n){case`start`:return m;case`end`:return h;case`center`:var g=Math.round(h+(m-h)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;default:return r>=h&&r<=m?r:r<h?h:m}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,c=e.width,l=r===`horizontal`||s===`horizontal`,u=t*o,d=Math.ceil(((l?c:i)+n-u)/o);return Math.max(0,Math.min(a-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function Ot(){let e=k(),t=ue().cursor;if(!t||t.type!==`line`)return null;let n=e.indent,r=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=n*t.level,a=e.renderCursor;return(0,j.jsx)(a,{top:r,left:i,indent:n})}var kt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},At=(0,C.forwardRef)(function(e,t){let{children:n}=e,r=kt(e,[`children`]),i=k();return(0,j.jsxs)(`div`,Object.assign({ref:t},r,{onClick:e=>{e.currentTarget===e.target&&i.deselectAll()},children:[(0,j.jsx)(jt,{}),n]}))}),jt=()=>{let e=k();return(0,j.jsx)(`div`,{style:{height:e.visibleNodes.length*e.rowHeight,width:`100%`,position:`absolute`,left:`0`,right:`0`},children:(0,j.jsx)(Ot,{})})},Mt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Nt=(0,C.forwardRef)(function(e,t){var{style:n}=e,r=Mt(e,[`style`]);let i=k(),a=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,j.jsx)(`div`,Object.assign({ref:t,style:Object.assign(Object.assign({},n),{height:`${parseFloat(n.height)+a+o}px`})},r))}),Pt=(0,C.createContext)({dragDropManager:void 0}),L;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(L||={});function R(e,t){var n=[...arguments].slice(2);if(!e){var r;if(t===void 0)r=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var i=0;r=Error(t.replace(/%s/g,function(){return n[i++]})),r.name=`Invariant Violation`}throw r.framesToPop=1,r}}var Ft=`dnd-core/INIT_COORDS`,It=`dnd-core/BEGIN_DRAG`,Lt=`dnd-core/PUBLISH_DRAG_SOURCE`,Rt=`dnd-core/HOVER`,zt=`dnd-core/DROP`,Bt=`dnd-core/END_DRAG`;function Vt(e,t){return{type:Ft,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ht(e)}function Ut(e,t,n){return t.split(`.`).reduce(function(e,t){return e&&e[t]?e[t]:n||null},e)}function Wt(e,t){return e.filter(function(e){return e!==t})}function Gt(e){return Ht(e)===`object`}function Kt(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach(function(e,t){e===1&&i.push(t)}),i}function qt(e,t){return e.filter(function(e){return t.indexOf(e)>-1})}var Jt={type:Ft,payload:{clientOffset:null,sourceClientOffset:null}};function Yt(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},r=n.publishSource,i=r===void 0?!0:r,a=n.clientOffset,o=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(Vt(a)),Xt(t,s,c);var l=$t(t,s);if(l===null){e.dispatch(Jt);return}var u=null;if(a){if(!o)throw Error(`getSourceClientOffset must be defined`);Zt(o),u=o(l)}e.dispatch(Vt(a,u));var d=c.getSource(l).beginDrag(s,l);if(d!=null)return Qt(d),c.pinSource(l),{type:It,payload:{itemType:c.getSourceType(l),item:d,sourceId:l,clientOffset:a||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Xt(e,t,n){R(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){R(n.getSource(e),`Expected sourceIds to be registered.`)})}function Zt(e){R(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Qt(e){R(Gt(e),`Item must be an object.`)}function $t(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function en(e){return function(){if(e.getMonitor().isDragging())return{type:Lt}}}function tn(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(e){return e===t}):e===t}function nn(e){return function(t){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).clientOffset;rn(t);var r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return an(r,i,a),on(r,a,i.getItemType()),sn(r,i,a),{type:Rt,payload:{targetIds:r,clientOffset:n||null}}}}function rn(e){R(Array.isArray(e),`Expected targetIds to be an array.`)}function an(e,t,n){R(t.isDragging(),`Cannot call hover while not dragging.`),R(!t.didDrop(),`Cannot call hover after drop.`);for(var r=0;r<e.length;r++){var i=e[r];R(e.lastIndexOf(i)===r,`Expected targetIds to be unique in the passed array.`),R(n.getTarget(i),`Expected targetIds to be registered.`)}}function on(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];tn(t.getTargetType(i),n)||e.splice(r,1)}}function sn(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cn(Object(n),!0).forEach(function(t){un(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();fn(n),hn(n).forEach(function(i,a){var o=pn(i,a,r,n),s={type:zt,payload:{dropResult:ln(ln({},t),o)}};e.dispatch(s)})}}function fn(e){R(e.isDragging(),`Cannot call drop while not dragging.`),R(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function pn(e,t,n,r){var i=n.getTarget(e),a=i?i.drop(r,e):void 0;return mn(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function mn(e){R(e===void 0||Gt(e),`Drop result must either be an object or undefined.`)}function hn(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function gn(e){return function(){var t=e.getMonitor(),n=e.getRegistry();_n(t);var r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Bt}}}function _n(e){R(e.isDragging(),`Cannot call endDrag while not dragging.`)}function vn(e){return{beginDrag:Yt(e),publishDragSource:en(e),hover:nn(e),drop:dn(e),endDrag:gn(e)}}function yn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xn(e,t,n){return t&&bn(e.prototype,t),n&&bn(e,n),e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sn=function(){function e(t,n){var r=this;yn(this,e),z(this,`store`,void 0),z(this,`monitor`,void 0),z(this,`backend`,void 0),z(this,`isSetUp`,!1),z(this,`handleRefCountChange`,function(){var e=r.store.getState().refCount>0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}return xn(e,[{key:`receiveBackend`,value:function(e){this.backend=e}},{key:`getMonitor`,value:function(){return this.monitor}},{key:`getBackend`,value:function(){return this.backend}},{key:`getRegistry`,value:function(){return this.monitor.registry}},{key:`getActions`,value:function(){var e=this,t=this.store.dispatch;function n(n){return function(){var r=[...arguments],i=n.apply(e,r);i!==void 0&&t(i)}}var r=vn(this);return Object.keys(r).reduce(function(e,t){var i=r[t];return e[t]=n(i),e},{})}},{key:`dispatch`,value:function(e){this.store.dispatch(e)}}]),e}();function B(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var Cn=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),wn=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},Tn={INIT:`@@redux/INIT`+wn(),REPLACE:`@@redux/REPLACE`+wn(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+wn()}};function En(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Dn(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(B(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(B(1));return n(Dn)(e,t)}if(typeof e!=`function`)throw Error(B(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(B(3));return a}function d(e){if(typeof e!=`function`)throw Error(B(4));if(c)throw Error(B(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(B(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!En(e))throw Error(B(7));if(e.type===void 0)throw Error(B(8));if(c)throw Error(B(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(B(10));i=e,f({type:Tn.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(B(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[Cn]=function(){return this},e}return f({type:Tn.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[Cn]=m,r}var On=function(e,t){return e===t};function kn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function An(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:On;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jn(Object(n),!0).forEach(function(t){Nn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Fn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pn,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case Ft:case It:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Rt:return kn(e.clientOffset,n.clientOffset)?e:Mn(Mn({},e),{},{clientOffset:n.clientOffset});case Bt:case zt:return Pn;default:return e}}var In=`dnd-core/ADD_SOURCE`,Ln=`dnd-core/ADD_TARGET`,Rn=`dnd-core/REMOVE_SOURCE`,zn=`dnd-core/REMOVE_TARGET`;function Bn(e){return{type:In,payload:{sourceId:e}}}function Vn(e){return{type:Ln,payload:{targetId:e}}}function Hn(e){return{type:Rn,payload:{sourceId:e}}}function Un(e){return{type:zn,payload:{targetId:e}}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wn(Object(n),!0).forEach(function(t){Gn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function qn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kn,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case It:return V(V({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Lt:return V(V({},e),{},{isSourcePublic:!0});case Rt:return V(V({},e),{},{targetIds:n.targetIds});case zn:return e.targetIds.indexOf(n.targetId)===-1?e:V(V({},e),{},{targetIds:Wt(e.targetIds,n.targetId)});case zt:return V(V({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Bt:return V(V({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Jn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case In:case Ln:return e+1;case Rn:case zn:return e-1;default:return e}}var Yn=[],Xn=[];Yn.__IS_NONE__=!0,Xn.__IS_ALL__=!0;function Zn(e,t){return e===Yn?!1:e===Xn||t===void 0?!0:qt(t,e).length>0}function Qn(){arguments.length>0&&arguments[0]!==void 0&&arguments[0];var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Rt:break;case In:case Ln:case zn:case Rn:return Yn;case It:case Lt:case Bt:case zt:default:return Xn}var t=e.payload,n=t.targetIds,r=n===void 0?[]:n,i=t.prevTargetIds,a=i===void 0?[]:i,o=Kt(r,a);if(!(o.length>0||!An(r,a)))return Yn;var s=a[a.length-1],c=r[r.length-1];return s!==c&&(s&&o.push(s),c&&o.push(c)),o}function $n(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:0)+1}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?er(Object(n),!0).forEach(function(t){nr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Qn(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:Ut(e,`dragOperation.targetIds`,[])})}),dragOffset:Fn(e.dragOffset,t),refCount:Jn(e.refCount,t),dragOperation:qn(e.dragOperation,t),stateId:$n(e.stateId)}}function ir(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function or(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return!t||!n||!r?null:ar(ir(t,r),n)}function sr(e){var t=e.clientOffset,n=e.initialClientOffset;return!t||!n?null:ar(t,n)}function cr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ur(e,t,n){return t&&lr(e.prototype,t),n&&lr(e,n),e}function dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fr=function(){function e(t,n){cr(this,e),dr(this,`store`,void 0),dr(this,`registry`,void 0),this.store=t,this.registry=n}return ur(e,[{key:`subscribeToStateChange`,value:function(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0}).handlerIds;R(typeof e==`function`,`listener must be a function.`),R(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);var r=this.store.getState().stateId;return this.store.subscribe(function(){var i=t.store.getState(),a=i.stateId;try{a===r||a===r+1&&!Zn(i.dirtyHandlerIds,n)||e()}finally{r=a}})}},{key:`subscribeToOffsetChange`,value:function(e){var t=this;R(typeof e==`function`,`listener must be a function.`);var n=this.store.getState().dragOffset;return this.store.subscribe(function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())})}},{key:`canDragSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return R(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}},{key:`canDropOnTarget`,value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return R(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:tn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:`isDragging`,value:function(){return!!this.getItemType()}},{key:`isDraggingSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return R(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}},{key:`isOverTarget`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!tn(r,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var o=a.indexOf(e);return n?o===a.length-1:o>-1}},{key:`getItemType`,value:function(){return this.store.getState().dragOperation.itemType}},{key:`getItem`,value:function(){return this.store.getState().dragOperation.item}},{key:`getSourceId`,value:function(){return this.store.getState().dragOperation.sourceId}},{key:`getTargetIds`,value:function(){return this.store.getState().dragOperation.targetIds}},{key:`getDropResult`,value:function(){return this.store.getState().dragOperation.dropResult}},{key:`didDrop`,value:function(){return this.store.getState().dragOperation.didDrop}},{key:`isSourcePublic`,value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:`getInitialClientOffset`,value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:`getInitialSourceClientOffset`,value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:`getClientOffset`,value:function(){return this.store.getState().dragOffset.clientOffset}},{key:`getSourceClientOffset`,value:function(){return or(this.store.getState().dragOffset)}},{key:`getDifferenceFromInitialOffset`,value:function(){return sr(this.store.getState().dragOffset)}}]),e}(),pr=0;function mr(){return pr++}function hr(e){"@babel/helpers - typeof";return hr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hr(e)}function gr(e){R(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),R(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),R(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function _r(e){R(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),R(typeof e.hover==`function`,`Expected hover to be a function.`),R(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function vr(e,t){if(t&&Array.isArray(e)){e.forEach(function(e){return vr(e,!1)});return}R(typeof e==`string`||hr(e)===`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var yr=typeof global<`u`?global:self,br=yr.MutationObserver||yr.WebKitMutationObserver;function xr(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function Sr(e){let t=1,n=new br(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var Cr=typeof br==`function`?Sr:xr,wr=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Cr(this.flush),this.requestErrorThrow=xr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Tr=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},Er=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new Tr(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Dr=new wr,Or=new Er(Dr.registerPendingError);function kr(e){Dr.enqueueTask(Or.create(e))}function Ar(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mr(e,t,n){return t&&jr(e.prototype,t),n&&jr(e,n),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nr(e,t){return Rr(e)||Lr(e,t)||Fr(e,t)||Pr()}function Pr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.+import{i as e,n as t,o as n,r,t as i}from"./jsx-runtime-B3dmMxJS.js";import{A as a,T as o,m as s,o as c,w as l,y as u}from"./query-vnlTpYnf.js";import{t as d}from"./useQuery-BCnvbVXe.js";import{a as f,i as p,n as m,r as h,t as g}from"./es-BuB2EIkJ.js";import{i as _,n as v,r as y,t as b}from"./index-Ba72GzGt.js";import{t as x}from"./shim-s-9Axq3H.js";var S=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&s(t.mutationKey)!==s(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??y();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){c.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},C=n(t(),1);function w(e,t){let n=v(t),[r]=C.useState(()=>new S(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);let i=C.useSyncExternalStore(C.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((e,t)=>{r.mutate(e,t).catch(u)},[r]);if(i.error&&o(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var T=b(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),E=b(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),D=b(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),O=_(),ee=async()=>{let e=await fetch(`/api/vocabulary/schemes`);if(!e.ok)throw Error(`Failed to fetch vocabularies`);return e.json()},te=async e=>{let t=await fetch(`/api/vocabulary/hierarchy?scheme=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to fetch hierarchy`);return t.json()},ne=async e=>{let t=new FormData;t.append(`file`,e);let n=await fetch(`/api/vocabulary/import`,{method:`POST`,body:t});if(!n.ok)throw Error(`Failed to import vocabulary`);return n.json()},re=()=>{let e=(0,O.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`vocabularies`],queryFn:ee},e[0]=t):t=e[0],d(t)},ie=e=>{let t=(0,O.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`hierarchy`,e],r=()=>te(e),t[0]=e,t[1]=n,t[2]=r);let i=!!e,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a={queryKey:n,queryFn:r,enabled:i},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],d(a)},ae=()=>{let e=(0,O.c)(2),t=v(),n;return e[0]===t?n=e[1]:(n={mutationFn:ne,onSuccess:()=>{t.invalidateQueries({queryKey:[`vocabularies`]})}},e[0]=t,e[1]=n),w(n)},oe=(0,C.createContext)(null);function k(){let e=(0,C.useContext)(oe);if(e===null)throw Error(`No Tree Api Provided`);return e}var se=(0,C.createContext)(null);function ce(){let e=(0,C.useContext)(se);if(e===null)throw Error(`Provide a NodesContext`);return e}var le=(0,C.createContext)(null);function ue(){let e=(0,C.useContext)(le);if(e===null)throw Error(`Provide a DnDContext`);return e}var de=(0,C.createContext)(0);function fe(){(0,C.useContext)(de)}var pe=e({access:()=>Oe,bound:()=>me,dfs:()=>xe,focusNextElement:()=>Ce,focusPrevElement:()=>we,getInsertIndex:()=>Ne,getInsertParentId:()=>Pe,identify:()=>A,identifyNull:()=>ke,indexOf:()=>ye,isClosed:()=>ge,isDescendant:()=>ve,isItem:()=>he,isOpenWithEmptyChildren:()=>_e,mergeRefs:()=>Ae,noop:()=>be,safeRun:()=>je,waitFor:()=>Me,walk:()=>Se});function me(e,t,n){return Math.max(Math.min(e,n),t)}function he(e){return e&&e.isLeaf}function ge(e){return e&&e.isInternal&&!e.isOpen}function _e(e){return e&&e.isOpen&&!e.children?.length}var ve=(e,t)=>{let n=e;for(;n;){if(n.id===t.id)return!0;n=n.parent}return!1},ye=e=>{if(!e.parent)throw Error(`Node does not have a parent`);return e.parent.children.findIndex(t=>t.id===e.id)};function be(){}function xe(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let n of e.children){let e=xe(n,t);if(e)return e}return null}function Se(e,t){if(t(e),e.children)for(let n of e.children)Se(n,t)}function Ce(e){let t=De(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=Te(t,r);break}n?.focus()}function we(e){let t=De(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=Ee(t,r);break}n?.focus()}function Te(e,t){return t+1<e.length?e[t+1]:e[0]}function Ee(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function De(e){return Array.from(document.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)`)).filter(t=>t===e||!e.contains(t))}function Oe(e,t){return typeof t==`boolean`?t:typeof t==`string`?e[t]:t(e)}function ke(e){return e===null?null:A(e)}function A(e){return typeof e==`string`?e:e.id}function Ae(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}function je(e,...t){if(e)return e(...t)}function Me(e){return new Promise((t,n)=>{let r=0;function i(){r+=1,r===100&&n(),e()?t():setTimeout(i,10)}i()})}function Ne(e){let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:e.root.children?.length??0}function Pe(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var j=i(),Fe={display:`flex`,alignItems:`center`,zIndex:1},Ie={flex:1,height:`2px`,background:`#4B91E2`,borderRadius:`1px`},Le={width:`4px`,height:`4px`,boxShadow:`0 0 0 3px #4B91E2`,borderRadius:`50%`},Re=C.memo(function({top:e,left:t,indent:n}){let r={position:`absolute`,pointerEvents:`none`,top:e-2+`px`,left:t+`px`,right:n+`px`};return(0,j.jsxs)(`div`,{style:Object.assign(Object.assign({},Fe),r),children:[(0,j.jsx)(`div`,{style:Object.assign({},Le)}),(0,j.jsx)(`div`,{style:Object.assign({},Ie)})]})});function ze({node:e,attrs:t,innerRef:n,children:r}){return(0,j.jsx)(`div`,Object.assign({},t,{ref:n,onFocus:e=>e.stopPropagation(),onClick:e.handleClick,children:r}))}function Be(e){return(0,j.jsxs)(`div`,{ref:e.dragHandle,style:e.style,children:[(0,j.jsx)(`span`,{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?`🌳`:e.node.isOpen?`🗁`:`🗀`}),` `,e.node.isEditing?(0,j.jsx)(He,Object.assign({},e)):(0,j.jsx)(Ve,Object.assign({},e))]})}function Ve(e){return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(`span`,{children:e.node.data.name})})}function He({node:e}){let t=(0,C.useRef)();return(0,C.useEffect)(()=>{var e,n;(e=t.current)==null||e.focus(),(n=t.current)==null||n.select()},[]),(0,j.jsx)(`input`,{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:n=>{n.key===`Escape`&&e.reset(),n.key===`Enter`&&e.submit(t.current?.value||``)}})}function Ue(e){return{type:`EDIT`,id:e}}function We(e={id:null},t){return t.type===`EDIT`?Object.assign(Object.assign({},e),{id:t.id}):e}function M(e){return{type:`FOCUS`,id:e}}function Ge(){return{type:`TREE_BLUR`}}function Ke(e={id:null,treeFocused:!1},t){return t.type===`FOCUS`?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type===`TREE_BLUR`?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var qe=class e{constructor(e){this.handleClick=e=>{e.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():e.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===Je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){return this.isSelected&&!this.prev?.isSelected}get isSelectedEnd(){return this.isSelected&&!this.next?.isSelected}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){let e=this.childIndex;return this.parent?.children[e+1]??null}isAncestorOf(e){if(!e)return!1;let t=e;for(;t;){if(t.id===this.id)return!0;t=t.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new e(Object.assign({},this))}edit(){return this.tree.edit(this)}},Je=`__REACT_ARBORIST_INTERNAL_ROOT__`;function Ye(e){function t(n,r,i){let a=new qe({tree:e,data:n,level:r,parent:i,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),o=e.accessChildren(n);return o&&(a.children=o.map(e=>t(e,r+1,a))),a}let n=new qe({tree:e,id:Je,data:{id:Je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return n.children=(e.props.data??[]).map(e=>t(e,0,n)),n}var Xe={open(e,t){return{type:`VISIBILITY_OPEN`,id:e,filtered:t}},close(e,t){return{type:`VISIBILITY_CLOSE`,id:e,filtered:t}},toggle(e,t){return{type:`VISIBILITY_TOGGLE`,id:e,filtered:t}},clear(e){return{type:`VISIBILITY_CLEAR`,filtered:e}}};function Ze(e={},t){if(t.type===`VISIBILITY_OPEN`)return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type===`VISIBILITY_CLOSE`)return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type===`VISIBILITY_TOGGLE`){let n=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!n})}else if(t.type===`VISIBILITY_CLEAR`)return{};else return e}function Qe(e={filtered:{},unfiltered:{}},t){return t.type.startsWith(`VISIBILITY`)?t.filtered?Object.assign(Object.assign({},e),{filtered:Ze(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Ze(e.unfiltered,t)}):e}var N=e=>({nodes:{open:{filtered:{},unfiltered:e?.initialOpenState??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:`none`},dragId:null,dragIds:[],parentId:null,index:-1}}),P={clear:()=>({type:`SELECTION_CLEAR`}),only:e=>({type:`SELECTION_ONLY`,id:A(e)}),add:e=>({type:`SELECTION_ADD`,ids:(Array.isArray(e)?e:[e]).map(A)}),remove:e=>({type:`SELECTION_REMOVE`,ids:(Array.isArray(e)?e:[e]).map(A)}),set:e=>Object.assign({type:`SELECTION_SET`},e),mostRecent:e=>({type:`SELECTION_MOST_RECENT`,id:e===null?null:A(e)}),anchor:e=>({type:`SELECTION_ANCHOR`,id:e===null?null:A(e)})};function $e(e=N().nodes.selection,t){let n=e.ids;switch(t.type){case`SELECTION_CLEAR`:return Object.assign(Object.assign({},e),{ids:new Set});case`SELECTION_ONLY`:return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case`SELECTION_ADD`:return t.ids.length===0?e:(t.ids.forEach(e=>n.add(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_REMOVE`:return t.ids.length===0?e:(t.ids.forEach(e=>n.delete(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_SET`:return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case`SELECTION_MOST_RECENT`:return Object.assign(Object.assign({},e),{mostRecent:t.id});case`SELECTION_ANCHOR`:return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}var F={cursor(e){return{type:`DND_CURSOR`,cursor:e}},dragStart(e,t){return{type:`DND_DRAG_START`,id:e,dragIds:t}},dragEnd(){return{type:`DND_DRAG_END`}},hovering(e,t){return{type:`DND_HOVERING`,parentId:e,index:t}}};function et(e=N().dnd,t){switch(t.type){case`DND_CURSOR`:return Object.assign(Object.assign({},e),{cursor:t.cursor});case`DND_DRAG_START`:return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case`DND_DRAG_END`:return N().dnd;case`DND_HOVERING`:return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var tt={position:`fixed`,pointerEvents:`none`,zIndex:100,left:0,top:0,width:`100%`,height:`100%`},nt=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t}px, ${n}px)`}},rt=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t+10}px, ${n+10}px)`}};function it({offset:e,mouse:t,id:n,dragIds:r,isDragging:i}){return(0,j.jsxs)(at,{isDragging:i,children:[(0,j.jsx)(ot,{offset:e,children:(0,j.jsx)(ct,{id:n,dragIds:r})}),(0,j.jsx)(st,{mouse:t,count:r.length})]})}var at=(0,C.memo)(function(e){return e.isDragging?(0,j.jsx)(`div`,{style:tt,children:e.children}):null});function ot(e){return(0,j.jsx)(`div`,{className:`row preview`,style:nt(e.offset),children:e.children})}function st(e){let{count:t,mouse:n}=e;return t>1?(0,j.jsx)(`div`,{className:`selected-count`,style:rt(n),children:t}):null}var ct=(0,C.memo)(function(e){let t=k(),n=t.get(e.id);return n?(0,j.jsx)(t.renderNode,{preview:!0,node:n,style:{paddingLeft:n.level*t.indent,opacity:.2,background:`transparent`},tree:t}):null});function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}function ut(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function ft(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dt(e,t)}var pt=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function mt(e,t){return!!(e===t||pt(e)&&pt(t))}function ht(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function gt(e,t){t===void 0&&(t=ht);var n,r=[],i,a=!1;function o(){var o=[...arguments];return a&&n===this&&t(o,r)?i:(i=e.apply(this,o),a=!0,n=this,r=o,i)}return o}var _t=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function vt(e){cancelAnimationFrame(e.id)}function yt(e,t){var n=_t();function r(){_t()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var bt=-1;function xt(e){if(e===void 0&&(e=!1),bt===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),bt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return bt}var I=null;function St(e){if(e===void 0&&(e=!1),I===null||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,n.direction=`rtl`;var r=document.createElement(`div`),i=r.style;return i.width=`100px`,i.height=`100px`,t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?I=`positive-descending`:(t.scrollLeft=1,I=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),I}return I}var Ct=150,wt=function(e,t){return e};function Tt(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){ft(t,e);function t(t){var r=e.call(this,t)||this;return r._instanceProps=c(r.props,ut(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ut(r),isScrolling:!1,scrollDirection:`forward`,scrollOffset:typeof r.props.initialScrollOffset==`number`?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=gt(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=gt(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t=r.props,a=t.direction,o=t.itemSize,s=t.layout,c=r._getItemStyleCache(l&&o,l&&s,l&&a),u;if(c.hasOwnProperty(e))u=c[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p=a===`horizontal`||s===`horizontal`,m=a===`rtl`,h=p?d:0;c[e]=u={position:`absolute`,left:m?void 0:h,right:m?h:void 0,top:p?0:d,height:p?`100%`:f,width:p?f:`100%`}}return u},r._getItemStyleCache=void 0,r._getItemStyleCache=gt(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if(t===`rtl`)switch(St()){case`negative`:o=-i;break;case`positive-descending`:o=a-n-i;break}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?`forward`:`backward`,scrollOffset:o,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState(function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?`forward`:`backward`,scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,typeof t==`function`?t(e):typeof t==`object`&&t&&t.hasOwnProperty(`current`)&&(t.current=e)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&vt(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=yt(r._resetIsScrolling,Ct)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return Et(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?`forward`:`backward`,scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){t===void 0&&(t=`auto`);var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var c=this._outerRef;s=i===`vertical`?c.scrollWidth>c.clientWidth?xt():0:c.scrollHeight>c.clientHeight?xt():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if(typeof n==`number`&&this._outerRef!=null){var i=this._outerRef;t===`horizontal`||r===`horizontal`?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&this._outerRef!=null){var a=this._outerRef;if(t===`horizontal`||n===`horizontal`)if(t===`rtl`)switch(St()){case`negative`:a.scrollLeft=-i;break;case`positive-ascending`:a.scrollLeft=i;break;default:var o=a.clientWidth;a.scrollLeft=a.scrollWidth-o-i;break}else a.scrollLeft=i;else a.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&vt(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,u=e.itemData,d=e.itemKey,f=d===void 0?wt:d,p=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,_=e.useIsScrolling,v=e.width,y=this.state.isScrolling,b=i===`horizontal`||p===`horizontal`,x=b?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),w=S[0],T=S[1],E=[];if(l>0)for(var D=w;D<=T;D++)E.push((0,C.createElement)(t,{data:u,key:f(D,u),index:D,isScrolling:_?y:void 0,style:this._getItemStyle(D)}));var O=r(this.props,this._instanceProps);return(0,C.createElement)(m||h||`div`,{className:n,onScroll:x,ref:this._outerRefSetter,style:lt({position:`relative`,height:a,width:v,overflow:`auto`,WebkitOverflowScrolling:`touch`,willChange:`transform`,direction:i},g)},(0,C.createElement)(s||c||`div`,{children:E,ref:o,style:{height:b?`100%`:O,pointerEvents:y?`none`:void 0,width:b?O:`100%`}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered==`function`&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if(typeof this.props.onScroll==`function`){var a=this.state,o=a.scrollDirection,s=a.scrollOffset,c=a.scrollUpdateWasRequested;this._callOnScroll(o,s,c)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,c=r.scrollOffset;if(t===0)return[0,0,0,0];var l=o(this.props,c,this._instanceProps),u=s(this.props,l,c,this._instanceProps),d=!i||a===`backward`?Math.max(1,n):1,f=!i||a===`forward`?Math.max(1,n):1;return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+f)),l,u]},t}(C.PureComponent),t.defaultProps={direction:`ltr`,itemData:void 0,layout:`vertical`,overscanCount:2,useIsScrolling:!1},t}var Et=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Dt=Tt({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,c=e.itemCount,l=e.itemSize,u=e.layout,d=e.width,f=o===`horizontal`||u===`horizontal`?d:s,p=Math.max(0,c*l-f),m=Math.min(p,t*l),h=Math.max(0,t*l-f+l+a);switch(n===`smart`&&(n=r>=h-f&&r<=m+f?`auto`:`center`),n){case`start`:return m;case`end`:return h;case`center`:var g=Math.round(h+(m-h)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;default:return r>=h&&r<=m?r:r<h?h:m}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,c=e.width,l=r===`horizontal`||s===`horizontal`,u=t*o,d=Math.ceil(((l?c:i)+n-u)/o);return Math.max(0,Math.min(a-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function Ot(){let e=k(),t=ue().cursor;if(!t||t.type!==`line`)return null;let n=e.indent,r=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=n*t.level,a=e.renderCursor;return(0,j.jsx)(a,{top:r,left:i,indent:n})}var kt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},At=(0,C.forwardRef)(function(e,t){let{children:n}=e,r=kt(e,[`children`]),i=k();return(0,j.jsxs)(`div`,Object.assign({ref:t},r,{onClick:e=>{e.currentTarget===e.target&&i.deselectAll()},children:[(0,j.jsx)(jt,{}),n]}))}),jt=()=>{let e=k();return(0,j.jsx)(`div`,{style:{height:e.visibleNodes.length*e.rowHeight,width:`100%`,position:`absolute`,left:`0`,right:`0`},children:(0,j.jsx)(Ot,{})})},Mt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Nt=(0,C.forwardRef)(function(e,t){var{style:n}=e,r=Mt(e,[`style`]);let i=k(),a=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,j.jsx)(`div`,Object.assign({ref:t,style:Object.assign(Object.assign({},n),{height:`${parseFloat(n.height)+a+o}px`})},r))}),Pt=(0,C.createContext)({dragDropManager:void 0}),L;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(L||={});function R(e,t){var n=[...arguments].slice(2);if(!e){var r;if(t===void 0)r=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var i=0;r=Error(t.replace(/%s/g,function(){return n[i++]})),r.name=`Invariant Violation`}throw r.framesToPop=1,r}}var Ft=`dnd-core/INIT_COORDS`,It=`dnd-core/BEGIN_DRAG`,Lt=`dnd-core/PUBLISH_DRAG_SOURCE`,Rt=`dnd-core/HOVER`,zt=`dnd-core/DROP`,Bt=`dnd-core/END_DRAG`;function Vt(e,t){return{type:Ft,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ht(e)}function Ut(e,t,n){return t.split(`.`).reduce(function(e,t){return e&&e[t]?e[t]:n||null},e)}function Wt(e,t){return e.filter(function(e){return e!==t})}function Gt(e){return Ht(e)===`object`}function Kt(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach(function(e,t){e===1&&i.push(t)}),i}function qt(e,t){return e.filter(function(e){return t.indexOf(e)>-1})}var Jt={type:Ft,payload:{clientOffset:null,sourceClientOffset:null}};function Yt(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},r=n.publishSource,i=r===void 0?!0:r,a=n.clientOffset,o=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(Vt(a)),Xt(t,s,c);var l=$t(t,s);if(l===null){e.dispatch(Jt);return}var u=null;if(a){if(!o)throw Error(`getSourceClientOffset must be defined`);Zt(o),u=o(l)}e.dispatch(Vt(a,u));var d=c.getSource(l).beginDrag(s,l);if(d!=null)return Qt(d),c.pinSource(l),{type:It,payload:{itemType:c.getSourceType(l),item:d,sourceId:l,clientOffset:a||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Xt(e,t,n){R(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){R(n.getSource(e),`Expected sourceIds to be registered.`)})}function Zt(e){R(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Qt(e){R(Gt(e),`Item must be an object.`)}function $t(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function en(e){return function(){if(e.getMonitor().isDragging())return{type:Lt}}}function tn(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(e){return e===t}):e===t}function nn(e){return function(t){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).clientOffset;rn(t);var r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return an(r,i,a),on(r,a,i.getItemType()),sn(r,i,a),{type:Rt,payload:{targetIds:r,clientOffset:n||null}}}}function rn(e){R(Array.isArray(e),`Expected targetIds to be an array.`)}function an(e,t,n){R(t.isDragging(),`Cannot call hover while not dragging.`),R(!t.didDrop(),`Cannot call hover after drop.`);for(var r=0;r<e.length;r++){var i=e[r];R(e.lastIndexOf(i)===r,`Expected targetIds to be unique in the passed array.`),R(n.getTarget(i),`Expected targetIds to be registered.`)}}function on(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];tn(t.getTargetType(i),n)||e.splice(r,1)}}function sn(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cn(Object(n),!0).forEach(function(t){un(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();fn(n),hn(n).forEach(function(i,a){var o=pn(i,a,r,n),s={type:zt,payload:{dropResult:ln(ln({},t),o)}};e.dispatch(s)})}}function fn(e){R(e.isDragging(),`Cannot call drop while not dragging.`),R(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function pn(e,t,n,r){var i=n.getTarget(e),a=i?i.drop(r,e):void 0;return mn(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function mn(e){R(e===void 0||Gt(e),`Drop result must either be an object or undefined.`)}function hn(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function gn(e){return function(){var t=e.getMonitor(),n=e.getRegistry();_n(t);var r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Bt}}}function _n(e){R(e.isDragging(),`Cannot call endDrag while not dragging.`)}function vn(e){return{beginDrag:Yt(e),publishDragSource:en(e),hover:nn(e),drop:dn(e),endDrag:gn(e)}}function yn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xn(e,t,n){return t&&bn(e.prototype,t),n&&bn(e,n),e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sn=function(){function e(t,n){var r=this;yn(this,e),z(this,`store`,void 0),z(this,`monitor`,void 0),z(this,`backend`,void 0),z(this,`isSetUp`,!1),z(this,`handleRefCountChange`,function(){var e=r.store.getState().refCount>0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}return xn(e,[{key:`receiveBackend`,value:function(e){this.backend=e}},{key:`getMonitor`,value:function(){return this.monitor}},{key:`getBackend`,value:function(){return this.backend}},{key:`getRegistry`,value:function(){return this.monitor.registry}},{key:`getActions`,value:function(){var e=this,t=this.store.dispatch;function n(n){return function(){var r=[...arguments],i=n.apply(e,r);i!==void 0&&t(i)}}var r=vn(this);return Object.keys(r).reduce(function(e,t){var i=r[t];return e[t]=n(i),e},{})}},{key:`dispatch`,value:function(e){this.store.dispatch(e)}}]),e}();function B(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var Cn=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),wn=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},Tn={INIT:`@@redux/INIT`+wn(),REPLACE:`@@redux/REPLACE`+wn(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+wn()}};function En(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Dn(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(B(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(B(1));return n(Dn)(e,t)}if(typeof e!=`function`)throw Error(B(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(B(3));return a}function d(e){if(typeof e!=`function`)throw Error(B(4));if(c)throw Error(B(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(B(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!En(e))throw Error(B(7));if(e.type===void 0)throw Error(B(8));if(c)throw Error(B(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(B(10));i=e,f({type:Tn.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(B(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[Cn]=function(){return this},e}return f({type:Tn.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[Cn]=m,r}var On=function(e,t){return e===t};function kn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function An(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:On;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jn(Object(n),!0).forEach(function(t){Nn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Fn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pn,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case Ft:case It:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Rt:return kn(e.clientOffset,n.clientOffset)?e:Mn(Mn({},e),{},{clientOffset:n.clientOffset});case Bt:case zt:return Pn;default:return e}}var In=`dnd-core/ADD_SOURCE`,Ln=`dnd-core/ADD_TARGET`,Rn=`dnd-core/REMOVE_SOURCE`,zn=`dnd-core/REMOVE_TARGET`;function Bn(e){return{type:In,payload:{sourceId:e}}}function Vn(e){return{type:Ln,payload:{targetId:e}}}function Hn(e){return{type:Rn,payload:{sourceId:e}}}function Un(e){return{type:zn,payload:{targetId:e}}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wn(Object(n),!0).forEach(function(t){Gn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function qn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kn,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case It:return V(V({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Lt:return V(V({},e),{},{isSourcePublic:!0});case Rt:return V(V({},e),{},{targetIds:n.targetIds});case zn:return e.targetIds.indexOf(n.targetId)===-1?e:V(V({},e),{},{targetIds:Wt(e.targetIds,n.targetId)});case zt:return V(V({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Bt:return V(V({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Jn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case In:case Ln:return e+1;case Rn:case zn:return e-1;default:return e}}var Yn=[],Xn=[];Yn.__IS_NONE__=!0,Xn.__IS_ALL__=!0;function Zn(e,t){return e===Yn?!1:e===Xn||t===void 0?!0:qt(t,e).length>0}function Qn(){arguments.length>0&&arguments[0]!==void 0&&arguments[0];var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Rt:break;case In:case Ln:case zn:case Rn:return Yn;case It:case Lt:case Bt:case zt:default:return Xn}var t=e.payload,n=t.targetIds,r=n===void 0?[]:n,i=t.prevTargetIds,a=i===void 0?[]:i,o=Kt(r,a);if(!(o.length>0||!An(r,a)))return Yn;var s=a[a.length-1],c=r[r.length-1];return s!==c&&(s&&o.push(s),c&&o.push(c)),o}function $n(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:0)+1}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?er(Object(n),!0).forEach(function(t){nr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Qn(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:Ut(e,`dragOperation.targetIds`,[])})}),dragOffset:Fn(e.dragOffset,t),refCount:Jn(e.refCount,t),dragOperation:qn(e.dragOperation,t),stateId:$n(e.stateId)}}function ir(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function or(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return!t||!n||!r?null:ar(ir(t,r),n)}function sr(e){var t=e.clientOffset,n=e.initialClientOffset;return!t||!n?null:ar(t,n)}function cr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ur(e,t,n){return t&&lr(e.prototype,t),n&&lr(e,n),e}function dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fr=function(){function e(t,n){cr(this,e),dr(this,`store`,void 0),dr(this,`registry`,void 0),this.store=t,this.registry=n}return ur(e,[{key:`subscribeToStateChange`,value:function(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0}).handlerIds;R(typeof e==`function`,`listener must be a function.`),R(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);var r=this.store.getState().stateId;return this.store.subscribe(function(){var i=t.store.getState(),a=i.stateId;try{a===r||a===r+1&&!Zn(i.dirtyHandlerIds,n)||e()}finally{r=a}})}},{key:`subscribeToOffsetChange`,value:function(e){var t=this;R(typeof e==`function`,`listener must be a function.`);var n=this.store.getState().dragOffset;return this.store.subscribe(function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())})}},{key:`canDragSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return R(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}},{key:`canDropOnTarget`,value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return R(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:tn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:`isDragging`,value:function(){return!!this.getItemType()}},{key:`isDraggingSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return R(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}},{key:`isOverTarget`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!tn(r,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var o=a.indexOf(e);return n?o===a.length-1:o>-1}},{key:`getItemType`,value:function(){return this.store.getState().dragOperation.itemType}},{key:`getItem`,value:function(){return this.store.getState().dragOperation.item}},{key:`getSourceId`,value:function(){return this.store.getState().dragOperation.sourceId}},{key:`getTargetIds`,value:function(){return this.store.getState().dragOperation.targetIds}},{key:`getDropResult`,value:function(){return this.store.getState().dragOperation.dropResult}},{key:`didDrop`,value:function(){return this.store.getState().dragOperation.didDrop}},{key:`isSourcePublic`,value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:`getInitialClientOffset`,value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:`getInitialSourceClientOffset`,value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:`getClientOffset`,value:function(){return this.store.getState().dragOffset.clientOffset}},{key:`getSourceClientOffset`,value:function(){return or(this.store.getState().dragOffset)}},{key:`getDifferenceFromInitialOffset`,value:function(){return sr(this.store.getState().dragOffset)}}]),e}(),pr=0;function mr(){return pr++}function hr(e){"@babel/helpers - typeof";return hr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hr(e)}function gr(e){R(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),R(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),R(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function _r(e){R(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),R(typeof e.hover==`function`,`Expected hover to be a function.`),R(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function vr(e,t){if(t&&Array.isArray(e)){e.forEach(function(e){return vr(e,!1)});return}R(typeof e==`string`||hr(e)===`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var yr=typeof global<`u`?global:self,br=yr.MutationObserver||yr.WebKitMutationObserver;function xr(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function Sr(e){let t=1,n=new br(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var Cr=typeof br==`function`?Sr:xr,wr=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Cr(this.flush),this.requestErrorThrow=xr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Tr=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},Er=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new Tr(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Dr=new wr,Or=new Er(Dr.registerPendingError);function kr(e){Dr.enqueueTask(Or.create(e))}function Ar(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mr(e,t,n){return t&&jr(e.prototype,t),n&&jr(e,n),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nr(e,t){return Rr(e)||Lr(e,t)||Fr(e,t)||Pr()}function Pr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fr(e,t){if(e){if(typeof e==`string`)return Ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ir(e,t)}}function Ir(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Lr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Rr(e){if(Array.isArray(e))return e}function zr(e){var t=mr().toString();switch(e){case L.SOURCE:return`S${t}`;case L.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Br(e){switch(e[0]){case`S`:return L.SOURCE;case`T`:return L.TARGET;default:R(!1,`Cannot parse handler ID: ${e}`)}}function Vr(e,t){var n=e.entries(),r=!1;do{var i=n.next(),a=i.done;if(Nr(i.value,2)[1]===t)return!0;r=!!a}while(!r);return!1}var Hr=function(){function e(t){Ar(this,e),H(this,`types`,new Map),H(this,`dragSources`,new Map),H(this,`dropTargets`,new Map),H(this,`pinnedSourceId`,null),H(this,`pinnedSource`,null),H(this,`store`,void 0),this.store=t}return Mr(e,[{key:`addSource`,value:function(e,t){vr(e),gr(t);var n=this.addHandler(L.SOURCE,e,t);return this.store.dispatch(Bn(n)),n}},{key:`addTarget`,value:function(e,t){vr(e,!0),_r(t);var n=this.addHandler(L.TARGET,e,t);return this.store.dispatch(Vn(n)),n}},{key:`containsHandler`,value:function(e){return Vr(this.dragSources,e)||Vr(this.dropTargets,e)}},{key:`getSource`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return R(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:`getTarget`,value:function(e){return R(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}},{key:`getSourceType`,value:function(e){return R(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}},{key:`getTargetType`,value:function(e){return R(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}},{key:`isSourceId`,value:function(e){return Br(e)===L.SOURCE}},{key:`isTargetId`,value:function(e){return Br(e)===L.TARGET}},{key:`removeSource`,value:function(e){var t=this;R(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Hn(e)),kr(function(){t.dragSources.delete(e),t.types.delete(e)})}},{key:`removeTarget`,value:function(e){R(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Un(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:`pinSource`,value:function(e){var t=this.getSource(e);R(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}},{key:`unpinSource`,value:function(){R(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}},{key:`addHandler`,value:function(e,t,n){var r=zr(e);return this.types.set(r,t),e===L.SOURCE?this.dragSources.set(r,n):e===L.TARGET&&this.dropTargets.set(r,n),r}}]),e}();function Ur(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Wr(arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1),i=new Sn(r,new fr(r,new Hr(r))),a=e(i,t,n);return i.receiveBackend(a),i}function Wr(e){var t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Dn(rr,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}var Gr=[`children`];function Kr(e,t){return Zr(e)||Xr(e,t)||Jr(e,t)||qr()}function qr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jr(e,t){if(e){if(typeof e==`string`)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yr(e,t)}}function Yr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Zr(e){if(Array.isArray(e))return e}function Qr(e,t){if(e==null)return{};var n=$r(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $r(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ei=0,ti=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),ni=(0,C.memo)(function(e){var t=e.children,n=Kr(ri(Qr(e,Gr)),2),r=n[0],i=n[1];return(0,C.useEffect)(function(){if(i){var e=ai();return++ei,function(){--ei===0&&(e[ti]=null)}}},[]),(0,j.jsx)(Pt.Provider,Object.assign({value:r},{children:t}),void 0)});function ri(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[ii(e.backend,e.context,e.options,e.debugMode),!e.context]}function ii(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ai(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t;return i[ti]||(i[ti]={dragDropManager:Ur(e,t,n,r)}),i[ti]}function ai(){return typeof global<`u`?global:window}function oi(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ci(e,t,n){return t&&si(e.prototype,t),n&&si(e,n),e}function li(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ui=!1,di=!1,fi=function(){function e(t){oi(this,e),li(this,`internalMonitor`,void 0),li(this,`sourceId`,null),this.internalMonitor=t.getMonitor()}return ci(e,[{key:`receiveHandlerId`,value:function(e){this.sourceId=e}},{key:`getHandlerId`,value:function(){return this.sourceId}},{key:`canDrag`,value:function(){R(!ui,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return ui=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ui=!1}}},{key:`isDragging`,value:function(){if(!this.sourceId)return!1;R(!di,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return di=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{di=!1}}},{key:`subscribeToStateChange`,value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:`isDraggingSource`,value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:`isOverTarget`,value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:`getTargetIds`,value:function(){return this.internalMonitor.getTargetIds()}},{key:`isSourcePublic`,value:function(){return this.internalMonitor.isSourcePublic()}},{key:`getSourceId`,value:function(){return this.internalMonitor.getSourceId()}},{key:`subscribeToOffsetChange`,value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:`canDragSource`,value:function(e){return this.internalMonitor.canDragSource(e)}},{key:`canDropOnTarget`,value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:`getItemType`,value:function(){return this.internalMonitor.getItemType()}},{key:`getItem`,value:function(){return this.internalMonitor.getItem()}},{key:`getDropResult`,value:function(){return this.internalMonitor.getDropResult()}},{key:`didDrop`,value:function(){return this.internalMonitor.didDrop()}},{key:`getInitialClientOffset`,value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:`getInitialSourceClientOffset`,value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:`getSourceClientOffset`,value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:`getClientOffset`,value:function(){return this.internalMonitor.getClientOffset()}},{key:`getDifferenceFromInitialOffset`,value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();function pi(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hi(e,t,n){return t&&mi(e.prototype,t),n&&mi(e,n),e}function gi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _i=!1,vi=function(){function e(t){pi(this,e),gi(this,`internalMonitor`,void 0),gi(this,`targetId`,null),this.internalMonitor=t.getMonitor()}return hi(e,[{key:`receiveHandlerId`,value:function(e){this.targetId=e}},{key:`getHandlerId`,value:function(){return this.targetId}},{key:`subscribeToStateChange`,value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:`canDrop`,value:function(){if(!this.targetId)return!1;R(!_i,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return _i=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{_i=!1}}},{key:`isOver`,value:function(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}},{key:`getItemType`,value:function(){return this.internalMonitor.getItemType()}},{key:`getItem`,value:function(){return this.internalMonitor.getItem()}},{key:`getDropResult`,value:function(){return this.internalMonitor.getDropResult()}},{key:`didDrop`,value:function(){return this.internalMonitor.didDrop()}},{key:`getInitialClientOffset`,value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:`getInitialSourceClientOffset`,value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:`getSourceClientOffset`,value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:`getClientOffset`,value:function(){return this.internalMonitor.getClientOffset()}},{key:`getDifferenceFromInitialOffset`,value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();function yi(e){if(typeof e.type!=`string`){var t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}}function bi(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!(0,C.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;return yi(i),Ci(i,n?function(t){return e(t,n)}:e)}}function xi(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{var i=bi(r);t[n]=function(){return i}}}),t}function Si(e,t){typeof e==`function`?e(t):e.current=t}function Ci(e,t){var n=e.ref;return R(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?(0,C.cloneElement)(e,{ref:function(e){Si(n,e),Si(t,e)}}):(0,C.cloneElement)(e,{ref:t})}function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},wi(e)}function Ti(e){return e!==null&&wi(e)===`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ei(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}function Di(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ki(e,t,n){return t&&Oi(e.prototype,t),n&&Oi(e,n),e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ai=function(){function e(t){var n=this;Di(this,e),U(this,`hooks`,xi({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,Ti(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,Ti(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}})),U(this,`handlerId`,null),U(this,`dragSourceRef`,null),U(this,`dragSourceNode`,void 0),U(this,`dragSourceOptionsInternal`,null),U(this,`dragSourceUnsubscribe`,void 0),U(this,`dragPreviewRef`,null),U(this,`dragPreviewNode`,void 0),U(this,`dragPreviewOptionsInternal`,null),U(this,`dragPreviewUnsubscribe`,void 0),U(this,`lastConnectedHandlerId`,null),U(this,`lastConnectedDragSource`,null),U(this,`lastConnectedDragSourceOptions`,null),U(this,`lastConnectedDragPreview`,null),U(this,`lastConnectedDragPreviewOptions`,null),U(this,`backend`,void 0),this.backend=t}return ki(e,[{key:`receiveHandlerId`,value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:`connectTarget`,get:function(){return this.dragSource}},{key:`dragSourceOptions`,get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:`dragPreviewOptions`,get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:`reconnect`,value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:`reconnectDragSource`,value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(t&&this.disconnectDragSource(),this.handlerId){if(!e){this.lastConnectedDragSource=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions))}}},{key:`reconnectDragPreview`,value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(t&&this.disconnectDragPreview(),this.handlerId){if(!e){this.lastConnectedDragPreview=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions))}}},{key:`didHandlerIdChange`,value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:`didConnectedDragSourceChange`,value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:`didConnectedDragPreviewChange`,value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:`didDragSourceOptionsChange`,value:function(){return!Ei(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:`didDragPreviewOptionsChange`,value:function(){return!Ei(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:`disconnectDragSource`,value:function(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}},{key:`disconnectDragPreview`,value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:`dragSource`,get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:`dragPreview`,get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:`clearDragSource`,value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:`clearDragPreview`,value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),e}();function ji(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ni(e,t,n){return t&&Mi(e.prototype,t),n&&Mi(e,n),e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pi=function(){function e(t){var n=this;ji(this,e),W(this,`hooks`,xi({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,Ti(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}})),W(this,`handlerId`,null),W(this,`dropTargetRef`,null),W(this,`dropTargetNode`,void 0),W(this,`dropTargetOptionsInternal`,null),W(this,`unsubscribeDropTarget`,void 0),W(this,`lastConnectedHandlerId`,null),W(this,`lastConnectedDropTarget`,null),W(this,`lastConnectedDropTargetOptions`,null),W(this,`backend`,void 0),this.backend=t}return Ni(e,[{key:`connectTarget`,get:function(){return this.dropTarget}},{key:`reconnect`,value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}},{key:`receiveHandlerId`,value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:`dropTargetOptions`,get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:`didHandlerIdChange`,value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:`didDropTargetChange`,value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:`didOptionsChange`,value:function(){return!Ei(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:`disconnectDropTarget`,value:function(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}},{key:`dropTarget`,get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:`clearDropTarget`,value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),e}();function Fi(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}function Ii(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}var G=typeof window<`u`?C.useLayoutEffect:C.useEffect;function Li(e){"@babel/helpers - typeof";return Li=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Li(e)}function Ri(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bi(e,t,n){return t&&zi(e.prototype,t),n&&zi(e,n),e}function Vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hi=function(){function e(t,n,r){Ri(this,e),Vi(this,`spec`,void 0),Vi(this,`monitor`,void 0),Vi(this,`connector`,void 0),this.spec=t,this.monitor=n,this.connector=r}return Bi(e,[{key:`beginDrag`,value:function(){var e=this.spec,t=this.monitor,n=null;return n=Li(e.item)===`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}},{key:`canDrag`,value:function(){var e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag==`function`?e.canDrag(t):!0}},{key:`isDragging`,value:function(e,t){var n=this.spec,r=this.monitor,i=n.isDragging;return i?i(r):t===e.getSourceId()}},{key:`endDrag`,value:function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()}}]),e}();function Ui(e,t,n){var r=(0,C.useMemo)(function(){return new Hi(e,t,n)},[t,n]);return(0,C.useEffect)(function(){r.spec=e},[e]),r}function K(){var e=(0,C.useContext)(Pt).dragDropManager;return R(e!=null,`Expected drag drop context`),e}function Wi(e){return(0,C.useMemo)(function(){var t=e.type;return R(t!=null,`spec.type must be defined`),t},[e])}function Gi(e,t){return Xi(e)||Yi(e,t)||qi(e,t)||Ki()}function Ki(){throw TypeError(`Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qi(e,t){if(e){if(typeof e==`string`)return Ji(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ji(e,t)}}function Ji(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yi(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Xi(e){if(Array.isArray(e))return e}function Zi(e,t,n){var r=K(),i=Ui(e,t,n),a=Wi(e);G(function(){if(a!=null){var e=Gi(Ii(a,i,r),2),o=e[0],s=e[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),s}},[r,t,n,i,a])}function Qi(e){return na(e)||ta(e)||ea(e)||$i()}function $i(){throw TypeError(`Invalid attempt to spread non-iterable instance.diff --git a/semantica/static/assets/es-BlaQ22nu.js b/semantica/static/assets/es-BuB2EIkJ.jssimilarity index 99%rename from semantica/static/assets/es-BlaQ22nu.jsrename to semantica/static/assets/es-BuB2EIkJ.jsindex 1b9425af..47cbf365 100644--- a/semantica/static/assets/es-BlaQ22nu.js+++ b/semantica/static/assets/es-BuB2EIkJ.js@@ -1,4 +1,4 @@-import{n as e,o as t,r as n}from"./jsx-runtime-B3dmMxJS.js";import{t as r}from"./index-BaPyswgU.js";var i=r(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),a=r(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),o=r(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),s=r(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),c=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),l=n(((e,t)=>{var n=c();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),u=n(((e,t)=>{t.exports=l()()}));function d(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var f=new Map([[`1km`,`application/vnd.1000minds.decision-model+xml`],[`3dml`,`text/vnd.in3d.3dml`],[`3ds`,`image/x-3ds`],[`3g2`,`video/3gpp2`],[`3gp`,`video/3gp`],[`3gpp`,`video/3gpp`],[`3mf`,`model/3mf`],[`7z`,`application/x-7z-compressed`],[`7zip`,`application/x-7z-compressed`],[`123`,`application/vnd.lotus-1-2-3`],[`aab`,`application/x-authorware-bin`],[`aac`,`audio/x-acc`],[`aam`,`application/x-authorware-map`],[`aas`,`application/x-authorware-seg`],[`abw`,`application/x-abiword`],[`ac`,`application/vnd.nokia.n-gage.ac+xml`],[`ac3`,`audio/ac3`],[`acc`,`application/vnd.americandynamics.acc`],[`ace`,`application/x-ace-compressed`],[`acu`,`application/vnd.acucobol`],[`acutc`,`application/vnd.acucorp`],[`adp`,`audio/adpcm`],[`aep`,`application/vnd.audiograph`],[`afm`,`application/x-font-type1`],[`afp`,`application/vnd.ibm.modcap`],[`ahead`,`application/vnd.ahead.space`],[`ai`,`application/pdf`],[`aif`,`audio/x-aiff`],[`aifc`,`audio/x-aiff`],[`aiff`,`audio/x-aiff`],[`air`,`application/vnd.adobe.air-application-installer-package+zip`],[`ait`,`application/vnd.dvb.ait`],[`ami`,`application/vnd.amiga.ami`],[`amr`,`audio/amr`],[`apk`,`application/vnd.android.package-archive`],[`apng`,`image/apng`],[`appcache`,`text/cache-manifest`],[`application`,`application/x-ms-application`],[`apr`,`application/vnd.lotus-approach`],[`arc`,`application/x-freearc`],[`arj`,`application/x-arj`],[`asc`,`application/pgp-signature`],[`asf`,`video/x-ms-asf`],[`asm`,`text/x-asm`],[`aso`,`application/vnd.accpac.simply.aso`],[`asx`,`video/x-ms-asf`],[`atc`,`application/vnd.acucorp`],[`atom`,`application/atom+xml`],[`atomcat`,`application/atomcat+xml`],[`atomdeleted`,`application/atomdeleted+xml`],[`atomsvc`,`application/atomsvc+xml`],[`atx`,`application/vnd.antix.game-component`],[`au`,`audio/x-au`],[`avi`,`video/x-msvideo`],[`avif`,`image/avif`],[`aw`,`application/applixware`],[`azf`,`application/vnd.airzip.filesecure.azf`],[`azs`,`application/vnd.airzip.filesecure.azs`],[`azv`,`image/vnd.airzip.accelerator.azv`],[`azw`,`application/vnd.amazon.ebook`],[`b16`,`image/vnd.pco.b16`],[`bat`,`application/x-msdownload`],[`bcpio`,`application/x-bcpio`],[`bdf`,`application/x-font-bdf`],[`bdm`,`application/vnd.syncml.dm+wbxml`],[`bdoc`,`application/x-bdoc`],[`bed`,`application/vnd.realvnc.bed`],[`bh2`,`application/vnd.fujitsu.oasysprs`],[`bin`,`application/octet-stream`],[`blb`,`application/x-blorb`],[`blorb`,`application/x-blorb`],[`bmi`,`application/vnd.bmi`],[`bmml`,`application/vnd.balsamiq.bmml+xml`],[`bmp`,`image/bmp`],[`book`,`application/vnd.framemaker`],[`box`,`application/vnd.previewsystems.box`],[`boz`,`application/x-bzip2`],[`bpk`,`application/octet-stream`],[`bpmn`,`application/octet-stream`],[`bsp`,`model/vnd.valve.source.compiled-map`],[`btif`,`image/prs.btif`],[`buffer`,`application/octet-stream`],[`bz`,`application/x-bzip`],[`bz2`,`application/x-bzip2`],[`c`,`text/x-c`],[`c4d`,`application/vnd.clonk.c4group`],[`c4f`,`application/vnd.clonk.c4group`],[`c4g`,`application/vnd.clonk.c4group`],[`c4p`,`application/vnd.clonk.c4group`],[`c4u`,`application/vnd.clonk.c4group`],[`c11amc`,`application/vnd.cluetrust.cartomobile-config`],[`c11amz`,`application/vnd.cluetrust.cartomobile-config-pkg`],[`cab`,`application/vnd.ms-cab-compressed`],[`caf`,`audio/x-caf`],[`cap`,`application/vnd.tcpdump.pcap`],[`car`,`application/vnd.curl.car`],[`cat`,`application/vnd.ms-pki.seccat`],[`cb7`,`application/x-cbr`],[`cba`,`application/x-cbr`],[`cbr`,`application/x-cbr`],[`cbt`,`application/x-cbr`],[`cbz`,`application/x-cbr`],[`cc`,`text/x-c`],[`cco`,`application/x-cocoa`],[`cct`,`application/x-director`],[`ccxml`,`application/ccxml+xml`],[`cdbcmsg`,`application/vnd.contact.cmsg`],[`cda`,`application/x-cdf`],[`cdf`,`application/x-netcdf`],[`cdfx`,`application/cdfx+xml`],[`cdkey`,`application/vnd.mediastation.cdkey`],[`cdmia`,`application/cdmi-capability`],[`cdmic`,`application/cdmi-container`],[`cdmid`,`application/cdmi-domain`],[`cdmio`,`application/cdmi-object`],[`cdmiq`,`application/cdmi-queue`],[`cdr`,`application/cdr`],[`cdx`,`chemical/x-cdx`],[`cdxml`,`application/vnd.chemdraw+xml`],[`cdy`,`application/vnd.cinderella`],[`cer`,`application/pkix-cert`],[`cfs`,`application/x-cfs-compressed`],[`cgm`,`image/cgm`],[`chat`,`application/x-chat`],[`chm`,`application/vnd.ms-htmlhelp`],[`chrt`,`application/vnd.kde.kchart`],[`cif`,`chemical/x-cif`],[`cii`,`application/vnd.anser-web-certificate-issue-initiation`],[`cil`,`application/vnd.ms-artgalry`],[`cjs`,`application/node`],[`cla`,`application/vnd.claymore`],[`class`,`application/octet-stream`],[`clkk`,`application/vnd.crick.clicker.keyboard`],[`clkp`,`application/vnd.crick.clicker.palette`],[`clkt`,`application/vnd.crick.clicker.template`],[`clkw`,`application/vnd.crick.clicker.wordbank`],[`clkx`,`application/vnd.crick.clicker`],[`clp`,`application/x-msclip`],[`cmc`,`application/vnd.cosmocaller`],[`cmdf`,`chemical/x-cmdf`],[`cml`,`chemical/x-cml`],[`cmp`,`application/vnd.yellowriver-custom-menu`],[`cmx`,`image/x-cmx`],[`cod`,`application/vnd.rim.cod`],[`coffee`,`text/coffeescript`],[`com`,`application/x-msdownload`],[`conf`,`text/plain`],[`cpio`,`application/x-cpio`],[`cpp`,`text/x-c`],[`cpt`,`application/mac-compactpro`],[`crd`,`application/x-mscardfile`],[`crl`,`application/pkix-crl`],[`crt`,`application/x-x509-ca-cert`],[`crx`,`application/x-chrome-extension`],[`cryptonote`,`application/vnd.rig.cryptonote`],[`csh`,`application/x-csh`],[`csl`,`application/vnd.citationstyles.style+xml`],[`csml`,`chemical/x-csml`],[`csp`,`application/vnd.commonspace`],[`csr`,`application/octet-stream`],[`css`,`text/css`],[`cst`,`application/x-director`],[`csv`,`text/csv`],[`cu`,`application/cu-seeme`],[`curl`,`text/vnd.curl`],[`cww`,`application/prs.cww`],[`cxt`,`application/x-director`],[`cxx`,`text/x-c`],[`dae`,`model/vnd.collada+xml`],[`daf`,`application/vnd.mobius.daf`],[`dart`,`application/vnd.dart`],[`dataless`,`application/vnd.fdsn.seed`],[`davmount`,`application/davmount+xml`],[`dbf`,`application/vnd.dbf`],[`dbk`,`application/docbook+xml`],[`dcr`,`application/x-director`],[`dcurl`,`text/vnd.curl.dcurl`],[`dd2`,`application/vnd.oma.dd2+xml`],[`ddd`,`application/vnd.fujixerox.ddd`],[`ddf`,`application/vnd.syncml.dmddf+xml`],[`dds`,`image/vnd.ms-dds`],[`deb`,`application/x-debian-package`],[`def`,`text/plain`],[`deploy`,`application/octet-stream`],[`der`,`application/x-x509-ca-cert`],[`dfac`,`application/vnd.dreamfactory`],[`dgc`,`application/x-dgc-compressed`],[`dic`,`text/x-c`],[`dir`,`application/x-director`],[`dis`,`application/vnd.mobius.dis`],[`disposition-notification`,`message/disposition-notification`],[`dist`,`application/octet-stream`],[`distz`,`application/octet-stream`],[`djv`,`image/vnd.djvu`],[`djvu`,`image/vnd.djvu`],[`dll`,`application/octet-stream`],[`dmg`,`application/x-apple-diskimage`],[`dmn`,`application/octet-stream`],[`dmp`,`application/vnd.tcpdump.pcap`],[`dms`,`application/octet-stream`],[`dna`,`application/vnd.dna`],[`doc`,`application/msword`],[`docm`,`application/vnd.ms-word.template.macroEnabled.12`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`dot`,`application/msword`],[`dotm`,`application/vnd.ms-word.template.macroEnabled.12`],[`dotx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.template`],[`dp`,`application/vnd.osgi.dp`],[`dpg`,`application/vnd.dpgraph`],[`dra`,`audio/vnd.dra`],[`drle`,`image/dicom-rle`],[`dsc`,`text/prs.lines.tag`],[`dssc`,`application/dssc+der`],[`dtb`,`application/x-dtbook+xml`],[`dtd`,`application/xml-dtd`],[`dts`,`audio/vnd.dts`],[`dtshd`,`audio/vnd.dts.hd`],[`dump`,`application/octet-stream`],[`dvb`,`video/vnd.dvb.file`],[`dvi`,`application/x-dvi`],[`dwd`,`application/atsc-dwd+xml`],[`dwf`,`model/vnd.dwf`],[`dwg`,`image/vnd.dwg`],[`dxf`,`image/vnd.dxf`],[`dxp`,`application/vnd.spotfire.dxp`],[`dxr`,`application/x-director`],[`ear`,`application/java-archive`],[`ecelp4800`,`audio/vnd.nuera.ecelp4800`],[`ecelp7470`,`audio/vnd.nuera.ecelp7470`],[`ecelp9600`,`audio/vnd.nuera.ecelp9600`],[`ecma`,`application/ecmascript`],[`edm`,`application/vnd.novadigm.edm`],[`edx`,`application/vnd.novadigm.edx`],[`efif`,`application/vnd.picsel`],[`ei6`,`application/vnd.pg.osasli`],[`elc`,`application/octet-stream`],[`emf`,`image/emf`],[`eml`,`message/rfc822`],[`emma`,`application/emma+xml`],[`emotionml`,`application/emotionml+xml`],[`emz`,`application/x-msmetafile`],[`eol`,`audio/vnd.digital-winds`],[`eot`,`application/vnd.ms-fontobject`],[`eps`,`application/postscript`],[`epub`,`application/epub+zip`],[`es`,`application/ecmascript`],[`es3`,`application/vnd.eszigno3+xml`],[`esa`,`application/vnd.osgi.subsystem`],[`esf`,`application/vnd.epson.esf`],[`et3`,`application/vnd.eszigno3+xml`],[`etx`,`text/x-setext`],[`eva`,`application/x-eva`],[`evy`,`application/x-envoy`],[`exe`,`application/octet-stream`],[`exi`,`application/exi`],[`exp`,`application/express`],[`exr`,`image/aces`],[`ext`,`application/vnd.novadigm.ext`],[`ez`,`application/andrew-inset`],[`ez2`,`application/vnd.ezpix-album`],[`ez3`,`application/vnd.ezpix-package`],[`f`,`text/x-fortran`],[`f4v`,`video/mp4`],[`f77`,`text/x-fortran`],[`f90`,`text/x-fortran`],[`fbs`,`image/vnd.fastbidsheet`],[`fcdt`,`application/vnd.adobe.formscentral.fcdt`],[`fcs`,`application/vnd.isac.fcs`],[`fdf`,`application/vnd.fdf`],[`fdt`,`application/fdt+xml`],[`fe_launch`,`application/vnd.denovo.fcselayout-link`],[`fg5`,`application/vnd.fujitsu.oasysgp`],[`fgd`,`application/x-director`],[`fh`,`image/x-freehand`],[`fh4`,`image/x-freehand`],[`fh5`,`image/x-freehand`],[`fh7`,`image/x-freehand`],[`fhc`,`image/x-freehand`],[`fig`,`application/x-xfig`],[`fits`,`image/fits`],[`flac`,`audio/x-flac`],[`fli`,`video/x-fli`],[`flo`,`application/vnd.micrografx.flo`],[`flv`,`video/x-flv`],[`flw`,`application/vnd.kde.kivio`],[`flx`,`text/vnd.fmi.flexstor`],[`fly`,`text/vnd.fly`],[`fm`,`application/vnd.framemaker`],[`fnc`,`application/vnd.frogans.fnc`],[`fo`,`application/vnd.software602.filler.form+xml`],[`for`,`text/x-fortran`],[`fpx`,`image/vnd.fpx`],[`frame`,`application/vnd.framemaker`],[`fsc`,`application/vnd.fsc.weblaunch`],[`fst`,`image/vnd.fst`],[`ftc`,`application/vnd.fluxtime.clip`],[`fti`,`application/vnd.anser-web-funds-transfer-initiation`],[`fvt`,`video/vnd.fvt`],[`fxp`,`application/vnd.adobe.fxp`],[`fxpl`,`application/vnd.adobe.fxp`],[`fzs`,`application/vnd.fuzzysheet`],[`g2w`,`application/vnd.geoplan`],[`g3`,`image/g3fax`],[`g3w`,`application/vnd.geospace`],[`gac`,`application/vnd.groove-account`],[`gam`,`application/x-tads`],[`gbr`,`application/rpki-ghostbusters`],[`gca`,`application/x-gca-compressed`],[`gdl`,`model/vnd.gdl`],[`gdoc`,`application/vnd.google-apps.document`],[`geo`,`application/vnd.dynageo`],[`geojson`,`application/geo+json`],[`gex`,`application/vnd.geometry-explorer`],[`ggb`,`application/vnd.geogebra.file`],[`ggt`,`application/vnd.geogebra.tool`],[`ghf`,`application/vnd.groove-help`],[`gif`,`image/gif`],[`gim`,`application/vnd.groove-identity-message`],[`glb`,`model/gltf-binary`],[`gltf`,`model/gltf+json`],[`gml`,`application/gml+xml`],[`gmx`,`application/vnd.gmx`],[`gnumeric`,`application/x-gnumeric`],[`gpg`,`application/gpg-keys`],[`gph`,`application/vnd.flographit`],[`gpx`,`application/gpx+xml`],[`gqf`,`application/vnd.grafeq`],[`gqs`,`application/vnd.grafeq`],[`gram`,`application/srgs`],[`gramps`,`application/x-gramps-xml`],[`gre`,`application/vnd.geometry-explorer`],[`grv`,`application/vnd.groove-injector`],[`grxml`,`application/srgs+xml`],[`gsf`,`application/x-font-ghostscript`],[`gsheet`,`application/vnd.google-apps.spreadsheet`],[`gslides`,`application/vnd.google-apps.presentation`],[`gtar`,`application/x-gtar`],[`gtm`,`application/vnd.groove-tool-message`],[`gtw`,`model/vnd.gtw`],[`gv`,`text/vnd.graphviz`],[`gxf`,`application/gxf`],[`gxt`,`application/vnd.geonext`],[`gz`,`application/gzip`],[`gzip`,`application/gzip`],[`h`,`text/x-c`],[`h261`,`video/h261`],[`h263`,`video/h263`],[`h264`,`video/h264`],[`hal`,`application/vnd.hal+xml`],[`hbci`,`application/vnd.hbci`],[`hbs`,`text/x-handlebars-template`],[`hdd`,`application/x-virtualbox-hdd`],[`hdf`,`application/x-hdf`],[`heic`,`image/heic`],[`heics`,`image/heic-sequence`],[`heif`,`image/heif`],[`heifs`,`image/heif-sequence`],[`hej2`,`image/hej2k`],[`held`,`application/atsc-held+xml`],[`hh`,`text/x-c`],[`hjson`,`application/hjson`],[`hlp`,`application/winhlp`],[`hpgl`,`application/vnd.hp-hpgl`],[`hpid`,`application/vnd.hp-hpid`],[`hps`,`application/vnd.hp-hps`],[`hqx`,`application/mac-binhex40`],[`hsj2`,`image/hsj2`],[`htc`,`text/x-component`],[`htke`,`application/vnd.kenameaapp`],[`htm`,`text/html`],[`html`,`text/html`],[`hvd`,`application/vnd.yamaha.hv-dic`],[`hvp`,`application/vnd.yamaha.hv-voice`],[`hvs`,`application/vnd.yamaha.hv-script`],[`i2g`,`application/vnd.intergeo`],[`icc`,`application/vnd.iccprofile`],[`ice`,`x-conference/x-cooltalk`],[`icm`,`application/vnd.iccprofile`],[`ico`,`image/x-icon`],[`ics`,`text/calendar`],[`ief`,`image/ief`],[`ifb`,`text/calendar`],[`ifm`,`application/vnd.shana.informed.formdata`],[`iges`,`model/iges`],[`igl`,`application/vnd.igloader`],[`igm`,`application/vnd.insors.igm`],[`igs`,`model/iges`],[`igx`,`application/vnd.micrografx.igx`],[`iif`,`application/vnd.shana.informed.interchange`],[`img`,`application/octet-stream`],[`imp`,`application/vnd.accpac.simply.imp`],[`ims`,`application/vnd.ms-ims`],[`in`,`text/plain`],[`ini`,`text/plain`],[`ink`,`application/inkml+xml`],[`inkml`,`application/inkml+xml`],[`install`,`application/x-install-instructions`],[`iota`,`application/vnd.astraea-software.iota`],[`ipfix`,`application/ipfix`],[`ipk`,`application/vnd.shana.informed.package`],[`irm`,`application/vnd.ibm.rights-management`],[`irp`,`application/vnd.irepository.package+xml`],[`iso`,`application/x-iso9660-image`],[`itp`,`application/vnd.shana.informed.formtemplate`],[`its`,`application/its+xml`],[`ivp`,`application/vnd.immervision-ivp`],[`ivu`,`application/vnd.immervision-ivu`],[`jad`,`text/vnd.sun.j2me.app-descriptor`],[`jade`,`text/jade`],[`jam`,`application/vnd.jam`],[`jar`,`application/java-archive`],[`jardiff`,`application/x-java-archive-diff`],[`java`,`text/x-java-source`],[`jhc`,`image/jphc`],[`jisp`,`application/vnd.jisp`],[`jls`,`image/jls`],[`jlt`,`application/vnd.hp-jlyt`],[`jng`,`image/x-jng`],[`jnlp`,`application/x-java-jnlp-file`],[`joda`,`application/vnd.joost.joda-archive`],[`jp2`,`image/jp2`],[`jpe`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`jpf`,`image/jpx`],[`jpg`,`image/jpeg`],[`jpg2`,`image/jp2`],[`jpgm`,`video/jpm`],[`jpgv`,`video/jpeg`],[`jph`,`image/jph`],[`jpm`,`video/jpm`],[`jpx`,`image/jpx`],[`js`,`application/javascript`],[`json`,`application/json`],[`json5`,`application/json5`],[`jsonld`,`application/ld+json`],[`jsonl`,`application/jsonl`],[`jsonml`,`application/jsonml+json`],[`jsx`,`text/jsx`],[`jxr`,`image/jxr`],[`jxra`,`image/jxra`],[`jxrs`,`image/jxrs`],[`jxs`,`image/jxs`],[`jxsc`,`image/jxsc`],[`jxsi`,`image/jxsi`],[`jxss`,`image/jxss`],[`kar`,`audio/midi`],[`karbon`,`application/vnd.kde.karbon`],[`kdb`,`application/octet-stream`],[`kdbx`,`application/x-keepass2`],[`key`,`application/x-iwork-keynote-sffkey`],[`kfo`,`application/vnd.kde.kformula`],[`kia`,`application/vnd.kidspiration`],[`kml`,`application/vnd.google-earth.kml+xml`],[`kmz`,`application/vnd.google-earth.kmz`],[`kne`,`application/vnd.kinar`],[`knp`,`application/vnd.kinar`],[`kon`,`application/vnd.kde.kontour`],[`kpr`,`application/vnd.kde.kpresenter`],[`kpt`,`application/vnd.kde.kpresenter`],[`kpxx`,`application/vnd.ds-keypoint`],[`ksp`,`application/vnd.kde.kspread`],[`ktr`,`application/vnd.kahootz`],[`ktx`,`image/ktx`],[`ktx2`,`image/ktx2`],[`ktz`,`application/vnd.kahootz`],[`kwd`,`application/vnd.kde.kword`],[`kwt`,`application/vnd.kde.kword`],[`lasxml`,`application/vnd.las.las+xml`],[`latex`,`application/x-latex`],[`lbd`,`application/vnd.llamagraphics.life-balance.desktop`],[`lbe`,`application/vnd.llamagraphics.life-balance.exchange+xml`],[`les`,`application/vnd.hhe.lesson-player`],[`less`,`text/less`],[`lgr`,`application/lgr+xml`],[`lha`,`application/octet-stream`],[`link66`,`application/vnd.route66.link66+xml`],[`list`,`text/plain`],[`list3820`,`application/vnd.ibm.modcap`],[`listafp`,`application/vnd.ibm.modcap`],[`litcoffee`,`text/coffeescript`],[`lnk`,`application/x-ms-shortcut`],[`log`,`text/plain`],[`lostxml`,`application/lost+xml`],[`lrf`,`application/octet-stream`],[`lrm`,`application/vnd.ms-lrm`],[`ltf`,`application/vnd.frogans.ltf`],[`lua`,`text/x-lua`],[`luac`,`application/x-lua-bytecode`],[`lvp`,`audio/vnd.lucent.voice`],[`lwp`,`application/vnd.lotus-wordpro`],[`lzh`,`application/octet-stream`],[`m1v`,`video/mpeg`],[`m2a`,`audio/mpeg`],[`m2v`,`video/mpeg`],[`m3a`,`audio/mpeg`],[`m3u`,`text/plain`],[`m3u8`,`application/vnd.apple.mpegurl`],[`m4a`,`audio/x-m4a`],[`m4p`,`application/mp4`],[`m4s`,`video/iso.segment`],[`m4u`,`application/vnd.mpegurl`],[`m4v`,`video/x-m4v`],[`m13`,`application/x-msmediaview`],[`m14`,`application/x-msmediaview`],[`m21`,`application/mp21`],[`ma`,`application/mathematica`],[`mads`,`application/mads+xml`],[`maei`,`application/mmt-aei+xml`],[`mag`,`application/vnd.ecowin.chart`],[`maker`,`application/vnd.framemaker`],[`man`,`text/troff`],[`manifest`,`text/cache-manifest`],[`map`,`application/json`],[`mar`,`application/octet-stream`],[`markdown`,`text/markdown`],[`mathml`,`application/mathml+xml`],[`mb`,`application/mathematica`],[`mbk`,`application/vnd.mobius.mbk`],[`mbox`,`application/mbox`],[`mc1`,`application/vnd.medcalcdata`],[`mcd`,`application/vnd.mcd`],[`mcurl`,`text/vnd.curl.mcurl`],[`md`,`text/markdown`],[`mdb`,`application/x-msaccess`],[`mdi`,`image/vnd.ms-modi`],[`mdx`,`text/mdx`],[`me`,`text/troff`],[`mesh`,`model/mesh`],[`meta4`,`application/metalink4+xml`],[`metalink`,`application/metalink+xml`],[`mets`,`application/mets+xml`],[`mfm`,`application/vnd.mfmp`],[`mft`,`application/rpki-manifest`],[`mgp`,`application/vnd.osgeo.mapguide.package`],[`mgz`,`application/vnd.proteus.magazine`],[`mid`,`audio/midi`],[`midi`,`audio/midi`],[`mie`,`application/x-mie`],[`mif`,`application/vnd.mif`],[`mime`,`message/rfc822`],[`mj2`,`video/mj2`],[`mjp2`,`video/mj2`],[`mjs`,`application/javascript`],[`mk3d`,`video/x-matroska`],[`mka`,`audio/x-matroska`],[`mkd`,`text/x-markdown`],[`mks`,`video/x-matroska`],[`mkv`,`video/x-matroska`],[`mlp`,`application/vnd.dolby.mlp`],[`mmd`,`application/vnd.chipnuts.karaoke-mmd`],[`mmf`,`application/vnd.smaf`],[`mml`,`text/mathml`],[`mmr`,`image/vnd.fujixerox.edmics-mmr`],[`mng`,`video/x-mng`],[`mny`,`application/x-msmoney`],[`mobi`,`application/x-mobipocket-ebook`],[`mods`,`application/mods+xml`],[`mov`,`video/quicktime`],[`movie`,`video/x-sgi-movie`],[`mp2`,`audio/mpeg`],[`mp2a`,`audio/mpeg`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`mp4a`,`audio/mp4`],[`mp4s`,`application/mp4`],[`mp4v`,`video/mp4`],[`mp21`,`application/mp21`],[`mpc`,`application/vnd.mophun.certificate`],[`mpd`,`application/dash+xml`],[`mpe`,`video/mpeg`],[`mpeg`,`video/mpeg`],[`mpg`,`video/mpeg`],[`mpg4`,`video/mp4`],[`mpga`,`audio/mpeg`],[`mpkg`,`application/vnd.apple.installer+xml`],[`mpm`,`application/vnd.blueice.multipass`],[`mpn`,`application/vnd.mophun.application`],[`mpp`,`application/vnd.ms-project`],[`mpt`,`application/vnd.ms-project`],[`mpy`,`application/vnd.ibm.minipay`],[`mqy`,`application/vnd.mobius.mqy`],[`mrc`,`application/marc`],[`mrcx`,`application/marcxml+xml`],[`ms`,`text/troff`],[`mscml`,`application/mediaservercontrol+xml`],[`mseed`,`application/vnd.fdsn.mseed`],[`mseq`,`application/vnd.mseq`],[`msf`,`application/vnd.epson.msf`],[`msg`,`application/vnd.ms-outlook`],[`msh`,`model/mesh`],[`msi`,`application/x-msdownload`],[`msl`,`application/vnd.mobius.msl`],[`msm`,`application/octet-stream`],[`msp`,`application/octet-stream`],[`msty`,`application/vnd.muvee.style`],[`mtl`,`model/mtl`],[`mts`,`model/vnd.mts`],[`mus`,`application/vnd.musician`],[`musd`,`application/mmt-usd+xml`],[`musicxml`,`application/vnd.recordare.musicxml+xml`],[`mvb`,`application/x-msmediaview`],[`mvt`,`application/vnd.mapbox-vector-tile`],[`mwf`,`application/vnd.mfer`],[`mxf`,`application/mxf`],[`mxl`,`application/vnd.recordare.musicxml`],[`mxmf`,`audio/mobile-xmf`],[`mxml`,`application/xv+xml`],[`mxs`,`application/vnd.triscape.mxs`],[`mxu`,`video/vnd.mpegurl`],[`n-gage`,`application/vnd.nokia.n-gage.symbian.install`],[`n3`,`text/n3`],[`nb`,`application/mathematica`],[`nbp`,`application/vnd.wolfram.player`],[`nc`,`application/x-netcdf`],[`ncx`,`application/x-dtbncx+xml`],[`nfo`,`text/x-nfo`],[`ngdat`,`application/vnd.nokia.n-gage.data`],[`nitf`,`application/vnd.nitf`],[`nlu`,`application/vnd.neurolanguage.nlu`],[`nml`,`application/vnd.enliven`],[`nnd`,`application/vnd.noblenet-directory`],[`nns`,`application/vnd.noblenet-sealer`],[`nnw`,`application/vnd.noblenet-web`],[`npx`,`image/vnd.net-fpx`],[`nq`,`application/n-quads`],[`nsc`,`application/x-conference`],[`nsf`,`application/vnd.lotus-notes`],[`nt`,`application/n-triples`],[`ntf`,`application/vnd.nitf`],[`numbers`,`application/x-iwork-numbers-sffnumbers`],[`nzb`,`application/x-nzb`],[`oa2`,`application/vnd.fujitsu.oasys2`],[`oa3`,`application/vnd.fujitsu.oasys3`],[`oas`,`application/vnd.fujitsu.oasys`],[`obd`,`application/x-msbinder`],[`obgx`,`application/vnd.openblox.game+xml`],[`obj`,`model/obj`],[`oda`,`application/oda`],[`odb`,`application/vnd.oasis.opendocument.database`],[`odc`,`application/vnd.oasis.opendocument.chart`],[`odf`,`application/vnd.oasis.opendocument.formula`],[`odft`,`application/vnd.oasis.opendocument.formula-template`],[`odg`,`application/vnd.oasis.opendocument.graphics`],[`odi`,`application/vnd.oasis.opendocument.image`],[`odm`,`application/vnd.oasis.opendocument.text-master`],[`odp`,`application/vnd.oasis.opendocument.presentation`],[`ods`,`application/vnd.oasis.opendocument.spreadsheet`],[`odt`,`application/vnd.oasis.opendocument.text`],[`oga`,`audio/ogg`],[`ogex`,`model/vnd.opengex`],[`ogg`,`audio/ogg`],[`ogv`,`video/ogg`],[`ogx`,`application/ogg`],[`omdoc`,`application/omdoc+xml`],[`onepkg`,`application/onenote`],[`onetmp`,`application/onenote`],[`onetoc`,`application/onenote`],[`onetoc2`,`application/onenote`],[`opf`,`application/oebps-package+xml`],[`opml`,`text/x-opml`],[`oprc`,`application/vnd.palm`],[`opus`,`audio/ogg`],[`org`,`text/x-org`],[`osf`,`application/vnd.yamaha.openscoreformat`],[`osfpvg`,`application/vnd.yamaha.openscoreformat.osfpvg+xml`],[`osm`,`application/vnd.openstreetmap.data+xml`],[`otc`,`application/vnd.oasis.opendocument.chart-template`],[`otf`,`font/otf`],[`otg`,`application/vnd.oasis.opendocument.graphics-template`],[`oth`,`application/vnd.oasis.opendocument.text-web`],[`oti`,`application/vnd.oasis.opendocument.image-template`],[`otp`,`application/vnd.oasis.opendocument.presentation-template`],[`ots`,`application/vnd.oasis.opendocument.spreadsheet-template`],[`ott`,`application/vnd.oasis.opendocument.text-template`],[`ova`,`application/x-virtualbox-ova`],[`ovf`,`application/x-virtualbox-ovf`],[`owl`,`application/rdf+xml`],[`oxps`,`application/oxps`],[`oxt`,`application/vnd.openofficeorg.extension`],[`p`,`text/x-pascal`],[`p7a`,`application/x-pkcs7-signature`],[`p7b`,`application/x-pkcs7-certificates`],[`p7c`,`application/pkcs7-mime`],[`p7m`,`application/pkcs7-mime`],[`p7r`,`application/x-pkcs7-certreqresp`],[`p7s`,`application/pkcs7-signature`],[`p8`,`application/pkcs8`],[`p10`,`application/x-pkcs10`],[`p12`,`application/x-pkcs12`],[`pac`,`application/x-ns-proxy-autoconfig`],[`pages`,`application/x-iwork-pages-sffpages`],[`pas`,`text/x-pascal`],[`paw`,`application/vnd.pawaafile`],[`pbd`,`application/vnd.powerbuilder6`],[`pbm`,`image/x-portable-bitmap`],[`pcap`,`application/vnd.tcpdump.pcap`],[`pcf`,`application/x-font-pcf`],[`pcl`,`application/vnd.hp-pcl`],[`pclxl`,`application/vnd.hp-pclxl`],[`pct`,`image/x-pict`],[`pcurl`,`application/vnd.curl.pcurl`],[`pcx`,`image/x-pcx`],[`pdb`,`application/x-pilot`],[`pde`,`text/x-processing`],[`pdf`,`application/pdf`],[`pem`,`application/x-x509-user-cert`],[`pfa`,`application/x-font-type1`],[`pfb`,`application/x-font-type1`],[`pfm`,`application/x-font-type1`],[`pfr`,`application/font-tdpfr`],[`pfx`,`application/x-pkcs12`],[`pgm`,`image/x-portable-graymap`],[`pgn`,`application/x-chess-pgn`],[`pgp`,`application/pgp`],[`php`,`application/x-httpd-php`],[`php3`,`application/x-httpd-php`],[`php4`,`application/x-httpd-php`],[`phps`,`application/x-httpd-php-source`],[`phtml`,`application/x-httpd-php`],[`pic`,`image/x-pict`],[`pkg`,`application/octet-stream`],[`pki`,`application/pkixcmp`],[`pkipath`,`application/pkix-pkipath`],[`pkpass`,`application/vnd.apple.pkpass`],[`pl`,`application/x-perl`],[`plb`,`application/vnd.3gpp.pic-bw-large`],[`plc`,`application/vnd.mobius.plc`],[`plf`,`application/vnd.pocketlearn`],[`pls`,`application/pls+xml`],[`pm`,`application/x-perl`],[`pml`,`application/vnd.ctc-posml`],[`png`,`image/png`],[`pnm`,`image/x-portable-anymap`],[`portpkg`,`application/vnd.macports.portpkg`],[`pot`,`application/vnd.ms-powerpoint`],[`potm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`potx`,`application/vnd.openxmlformats-officedocument.presentationml.template`],[`ppa`,`application/vnd.ms-powerpoint`],[`ppam`,`application/vnd.ms-powerpoint.addin.macroEnabled.12`],[`ppd`,`application/vnd.cups-ppd`],[`ppm`,`image/x-portable-pixmap`],[`pps`,`application/vnd.ms-powerpoint`],[`ppsm`,`application/vnd.ms-powerpoint.slideshow.macroEnabled.12`],[`ppsx`,`application/vnd.openxmlformats-officedocument.presentationml.slideshow`],[`ppt`,`application/powerpoint`],[`pptm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`pqa`,`application/vnd.palm`],[`prc`,`application/x-pilot`],[`pre`,`application/vnd.lotus-freelance`],[`prf`,`application/pics-rules`],[`provx`,`application/provenance+xml`],[`ps`,`application/postscript`],[`psb`,`application/vnd.3gpp.pic-bw-small`],[`psd`,`application/x-photoshop`],[`psf`,`application/x-font-linux-psf`],[`pskcxml`,`application/pskc+xml`],[`pti`,`image/prs.pti`],[`ptid`,`application/vnd.pvi.ptid1`],[`pub`,`application/x-mspublisher`],[`pvb`,`application/vnd.3gpp.pic-bw-var`],[`pwn`,`application/vnd.3m.post-it-notes`],[`pya`,`audio/vnd.ms-playready.media.pya`],[`pyv`,`video/vnd.ms-playready.media.pyv`],[`qam`,`application/vnd.epson.quickanime`],[`qbo`,`application/vnd.intu.qbo`],[`qfx`,`application/vnd.intu.qfx`],[`qps`,`application/vnd.publishare-delta-tree`],[`qt`,`video/quicktime`],[`qwd`,`application/vnd.quark.quarkxpress`],[`qwt`,`application/vnd.quark.quarkxpress`],[`qxb`,`application/vnd.quark.quarkxpress`],[`qxd`,`application/vnd.quark.quarkxpress`],[`qxl`,`application/vnd.quark.quarkxpress`],[`qxt`,`application/vnd.quark.quarkxpress`],[`ra`,`audio/x-realaudio`],[`ram`,`audio/x-pn-realaudio`],[`raml`,`application/raml+yaml`],[`rapd`,`application/route-apd+xml`],[`rar`,`application/x-rar`],[`ras`,`image/x-cmu-raster`],[`rcprofile`,`application/vnd.ipunplugged.rcprofile`],[`rdf`,`application/rdf+xml`],[`rdz`,`application/vnd.data-vision.rdz`],[`relo`,`application/p2p-overlay+xml`],[`rep`,`application/vnd.businessobjects`],[`res`,`application/x-dtbresource+xml`],[`rgb`,`image/x-rgb`],[`rif`,`application/reginfo+xml`],[`rip`,`audio/vnd.rip`],[`ris`,`application/x-research-info-systems`],[`rl`,`application/resource-lists+xml`],[`rlc`,`image/vnd.fujixerox.edmics-rlc`],[`rld`,`application/resource-lists-diff+xml`],[`rm`,`audio/x-pn-realaudio`],[`rmi`,`audio/midi`],[`rmp`,`audio/x-pn-realaudio-plugin`],[`rms`,`application/vnd.jcp.javame.midlet-rms`],[`rmvb`,`application/vnd.rn-realmedia-vbr`],[`rnc`,`application/relax-ng-compact-syntax`],[`rng`,`application/xml`],[`roa`,`application/rpki-roa`],[`roff`,`text/troff`],[`rp9`,`application/vnd.cloanto.rp9`],[`rpm`,`audio/x-pn-realaudio-plugin`],[`rpss`,`application/vnd.nokia.radio-presets`],[`rpst`,`application/vnd.nokia.radio-preset`],[`rq`,`application/sparql-query`],[`rs`,`application/rls-services+xml`],[`rsa`,`application/x-pkcs7`],[`rsat`,`application/atsc-rsat+xml`],[`rsd`,`application/rsd+xml`],[`rsheet`,`application/urc-ressheet+xml`],[`rss`,`application/rss+xml`],[`rtf`,`text/rtf`],[`rtx`,`text/richtext`],[`run`,`application/x-makeself`],[`rusd`,`application/route-usd+xml`],[`rv`,`video/vnd.rn-realvideo`],[`s`,`text/x-asm`],[`s3m`,`audio/s3m`],[`saf`,`application/vnd.yamaha.smaf-audio`],[`sass`,`text/x-sass`],[`sbml`,`application/sbml+xml`],[`sc`,`application/vnd.ibm.secure-container`],[`scd`,`application/x-msschedule`],[`scm`,`application/vnd.lotus-screencam`],[`scq`,`application/scvp-cv-request`],[`scs`,`application/scvp-cv-response`],[`scss`,`text/x-scss`],[`scurl`,`text/vnd.curl.scurl`],[`sda`,`application/vnd.stardivision.draw`],[`sdc`,`application/vnd.stardivision.calc`],[`sdd`,`application/vnd.stardivision.impress`],[`sdkd`,`application/vnd.solent.sdkm+xml`],[`sdkm`,`application/vnd.solent.sdkm+xml`],[`sdp`,`application/sdp`],[`sdw`,`application/vnd.stardivision.writer`],[`sea`,`application/octet-stream`],[`see`,`application/vnd.seemail`],[`seed`,`application/vnd.fdsn.seed`],[`sema`,`application/vnd.sema`],[`semd`,`application/vnd.semd`],[`semf`,`application/vnd.semf`],[`senmlx`,`application/senml+xml`],[`sensmlx`,`application/sensml+xml`],[`ser`,`application/java-serialized-object`],[`setpay`,`application/set-payment-initiation`],[`setreg`,`application/set-registration-initiation`],[`sfd-hdstx`,`application/vnd.hydrostatix.sof-data`],[`sfs`,`application/vnd.spotfire.sfs`],[`sfv`,`text/x-sfv`],[`sgi`,`image/sgi`],[`sgl`,`application/vnd.stardivision.writer-global`],[`sgm`,`text/sgml`],[`sgml`,`text/sgml`],[`sh`,`application/x-sh`],[`shar`,`application/x-shar`],[`shex`,`text/shex`],[`shf`,`application/shf+xml`],[`shtml`,`text/html`],[`sid`,`image/x-mrsid-image`],[`sieve`,`application/sieve`],[`sig`,`application/pgp-signature`],[`sil`,`audio/silk`],[`silo`,`model/mesh`],[`sis`,`application/vnd.symbian.install`],[`sisx`,`application/vnd.symbian.install`],[`sit`,`application/x-stuffit`],[`sitx`,`application/x-stuffitx`],[`siv`,`application/sieve`],[`skd`,`application/vnd.koan`],[`skm`,`application/vnd.koan`],[`skp`,`application/vnd.koan`],[`skt`,`application/vnd.koan`],[`sldm`,`application/vnd.ms-powerpoint.slide.macroenabled.12`],[`sldx`,`application/vnd.openxmlformats-officedocument.presentationml.slide`],[`slim`,`text/slim`],[`slm`,`text/slim`],[`sls`,`application/route-s-tsid+xml`],[`slt`,`application/vnd.epson.salt`],[`sm`,`application/vnd.stepmania.stepchart`],[`smf`,`application/vnd.stardivision.math`],[`smi`,`application/smil`],[`smil`,`application/smil`],[`smv`,`video/x-smv`],[`smzip`,`application/vnd.stepmania.package`],[`snd`,`audio/basic`],[`snf`,`application/x-font-snf`],[`so`,`application/octet-stream`],[`spc`,`application/x-pkcs7-certificates`],[`spdx`,`text/spdx`],[`spf`,`application/vnd.yamaha.smaf-phrase`],[`spl`,`application/x-futuresplash`],[`spot`,`text/vnd.in3d.spot`],[`spp`,`application/scvp-vp-response`],[`spq`,`application/scvp-vp-request`],[`spx`,`audio/ogg`],[`sql`,`application/x-sql`],[`src`,`application/x-wais-source`],[`srt`,`application/x-subrip`],[`sru`,`application/sru+xml`],[`srx`,`application/sparql-results+xml`],[`ssdl`,`application/ssdl+xml`],[`sse`,`application/vnd.kodak-descriptor`],[`ssf`,`application/vnd.epson.ssf`],[`ssml`,`application/ssml+xml`],[`sst`,`application/octet-stream`],[`st`,`application/vnd.sailingtracker.track`],[`stc`,`application/vnd.sun.xml.calc.template`],[`std`,`application/vnd.sun.xml.draw.template`],[`stf`,`application/vnd.wt.stf`],[`sti`,`application/vnd.sun.xml.impress.template`],[`stk`,`application/hyperstudio`],[`stl`,`model/stl`],[`stpx`,`model/step+xml`],[`stpxz`,`model/step-xml+zip`],[`stpz`,`model/step+zip`],[`str`,`application/vnd.pg.format`],[`stw`,`application/vnd.sun.xml.writer.template`],[`styl`,`text/stylus`],[`stylus`,`text/stylus`],[`sub`,`text/vnd.dvb.subtitle`],[`sus`,`application/vnd.sus-calendar`],[`susp`,`application/vnd.sus-calendar`],[`sv4cpio`,`application/x-sv4cpio`],[`sv4crc`,`application/x-sv4crc`],[`svc`,`application/vnd.dvb.service`],[`svd`,`application/vnd.svd`],[`svg`,`image/svg+xml`],[`svgz`,`image/svg+xml`],[`swa`,`application/x-director`],[`swf`,`application/x-shockwave-flash`],[`swi`,`application/vnd.aristanetworks.swi`],[`swidtag`,`application/swid+xml`],[`sxc`,`application/vnd.sun.xml.calc`],[`sxd`,`application/vnd.sun.xml.draw`],[`sxg`,`application/vnd.sun.xml.writer.global`],[`sxi`,`application/vnd.sun.xml.impress`],[`sxm`,`application/vnd.sun.xml.math`],[`sxw`,`application/vnd.sun.xml.writer`],[`t`,`text/troff`],[`t3`,`application/x-t3vm-image`],[`t38`,`image/t38`],[`taglet`,`application/vnd.mynfc`],[`tao`,`application/vnd.tao.intent-module-archive`],[`tap`,`image/vnd.tencent.tap`],[`tar`,`application/x-tar`],[`tcap`,`application/vnd.3gpp2.tcap`],[`tcl`,`application/x-tcl`],[`td`,`application/urc-targetdesc+xml`],[`teacher`,`application/vnd.smart.teacher`],[`tei`,`application/tei+xml`],[`teicorpus`,`application/tei+xml`],[`tex`,`application/x-tex`],[`texi`,`application/x-texinfo`],[`texinfo`,`application/x-texinfo`],[`text`,`text/plain`],[`tfi`,`application/thraud+xml`],[`tfm`,`application/x-tex-tfm`],[`tfx`,`image/tiff-fx`],[`tga`,`image/x-tga`],[`tgz`,`application/x-tar`],[`thmx`,`application/vnd.ms-officetheme`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`tk`,`application/x-tcl`],[`tmo`,`application/vnd.tmobile-livetv`],[`toml`,`application/toml`],[`torrent`,`application/x-bittorrent`],[`tpl`,`application/vnd.groove-tool-template`],[`tpt`,`application/vnd.trid.tpt`],[`tr`,`text/troff`],[`tra`,`application/vnd.trueapp`],[`trig`,`application/trig`],[`trm`,`application/x-msterminal`],[`ts`,`video/mp2t`],[`tsd`,`application/timestamped-data`],[`tsv`,`text/tab-separated-values`],[`ttc`,`font/collection`],[`ttf`,`font/ttf`],[`ttl`,`text/turtle`],[`ttml`,`application/ttml+xml`],[`twd`,`application/vnd.simtech-mindmapper`],[`twds`,`application/vnd.simtech-mindmapper`],[`txd`,`application/vnd.genomatix.tuxedo`],[`txf`,`application/vnd.mobius.txf`],[`txt`,`text/plain`],[`u8dsn`,`message/global-delivery-status`],[`u8hdr`,`message/global-headers`],[`u8mdn`,`message/global-disposition-notification`],[`u8msg`,`message/global`],[`u32`,`application/x-authorware-bin`],[`ubj`,`application/ubjson`],[`udeb`,`application/x-debian-package`],[`ufd`,`application/vnd.ufdl`],[`ufdl`,`application/vnd.ufdl`],[`ulx`,`application/x-glulx`],[`umj`,`application/vnd.umajin`],[`unityweb`,`application/vnd.unity`],[`uoml`,`application/vnd.uoml+xml`],[`uri`,`text/uri-list`],[`uris`,`text/uri-list`],[`urls`,`text/uri-list`],[`usdz`,`model/vnd.usdz+zip`],[`ustar`,`application/x-ustar`],[`utz`,`application/vnd.uiq.theme`],[`uu`,`text/x-uuencode`],[`uva`,`audio/vnd.dece.audio`],[`uvd`,`application/vnd.dece.data`],[`uvf`,`application/vnd.dece.data`],[`uvg`,`image/vnd.dece.graphic`],[`uvh`,`video/vnd.dece.hd`],[`uvi`,`image/vnd.dece.graphic`],[`uvm`,`video/vnd.dece.mobile`],[`uvp`,`video/vnd.dece.pd`],[`uvs`,`video/vnd.dece.sd`],[`uvt`,`application/vnd.dece.ttml+xml`],[`uvu`,`video/vnd.uvvu.mp4`],[`uvv`,`video/vnd.dece.video`],[`uvva`,`audio/vnd.dece.audio`],[`uvvd`,`application/vnd.dece.data`],[`uvvf`,`application/vnd.dece.data`],[`uvvg`,`image/vnd.dece.graphic`],[`uvvh`,`video/vnd.dece.hd`],[`uvvi`,`image/vnd.dece.graphic`],[`uvvm`,`video/vnd.dece.mobile`],[`uvvp`,`video/vnd.dece.pd`],[`uvvs`,`video/vnd.dece.sd`],[`uvvt`,`application/vnd.dece.ttml+xml`],[`uvvu`,`video/vnd.uvvu.mp4`],[`uvvv`,`video/vnd.dece.video`],[`uvvx`,`application/vnd.dece.unspecified`],[`uvvz`,`application/vnd.dece.zip`],[`uvx`,`application/vnd.dece.unspecified`],[`uvz`,`application/vnd.dece.zip`],[`vbox`,`application/x-virtualbox-vbox`],[`vbox-extpack`,`application/x-virtualbox-vbox-extpack`],[`vcard`,`text/vcard`],[`vcd`,`application/x-cdlink`],[`vcf`,`text/x-vcard`],[`vcg`,`application/vnd.groove-vcard`],[`vcs`,`text/x-vcalendar`],[`vcx`,`application/vnd.vcx`],[`vdi`,`application/x-virtualbox-vdi`],[`vds`,`model/vnd.sap.vds`],[`vhd`,`application/x-virtualbox-vhd`],[`vis`,`application/vnd.visionary`],[`viv`,`video/vnd.vivo`],[`vlc`,`application/videolan`],[`vmdk`,`application/x-virtualbox-vmdk`],[`vob`,`video/x-ms-vob`],[`vor`,`application/vnd.stardivision.writer`],[`vox`,`application/x-authorware-bin`],[`vrml`,`model/vrml`],[`vsd`,`application/vnd.visio`],[`vsf`,`application/vnd.vsf`],[`vss`,`application/vnd.visio`],[`vst`,`application/vnd.visio`],[`vsw`,`application/vnd.visio`],[`vtf`,`image/vnd.valve.source.texture`],[`vtt`,`text/vtt`],[`vtu`,`model/vnd.vtu`],[`vxml`,`application/voicexml+xml`],[`w3d`,`application/x-director`],[`wad`,`application/x-doom`],[`wadl`,`application/vnd.sun.wadl+xml`],[`war`,`application/java-archive`],[`wasm`,`application/wasm`],[`wav`,`audio/x-wav`],[`wax`,`audio/x-ms-wax`],[`wbmp`,`image/vnd.wap.wbmp`],[`wbs`,`application/vnd.criticaltools.wbs+xml`],[`wbxml`,`application/wbxml`],[`wcm`,`application/vnd.ms-works`],[`wdb`,`application/vnd.ms-works`],[`wdp`,`image/vnd.ms-photo`],[`weba`,`audio/webm`],[`webapp`,`application/x-web-app-manifest+json`],[`webm`,`video/webm`],[`webmanifest`,`application/manifest+json`],[`webp`,`image/webp`],[`wg`,`application/vnd.pmi.widget`],[`wgt`,`application/widget`],[`wks`,`application/vnd.ms-works`],[`wm`,`video/x-ms-wm`],[`wma`,`audio/x-ms-wma`],[`wmd`,`application/x-ms-wmd`],[`wmf`,`image/wmf`],[`wml`,`text/vnd.wap.wml`],[`wmlc`,`application/wmlc`],[`wmls`,`text/vnd.wap.wmlscript`],[`wmlsc`,`application/vnd.wap.wmlscriptc`],[`wmv`,`video/x-ms-wmv`],[`wmx`,`video/x-ms-wmx`],[`wmz`,`application/x-msmetafile`],[`woff`,`font/woff`],[`woff2`,`font/woff2`],[`word`,`application/msword`],[`wpd`,`application/vnd.wordperfect`],[`wpl`,`application/vnd.ms-wpl`],[`wps`,`application/vnd.ms-works`],[`wqd`,`application/vnd.wqd`],[`wri`,`application/x-mswrite`],[`wrl`,`model/vrml`],[`wsc`,`message/vnd.wfa.wsc`],[`wsdl`,`application/wsdl+xml`],[`wspolicy`,`application/wspolicy+xml`],[`wtb`,`application/vnd.webturbo`],[`wvx`,`video/x-ms-wvx`],[`x3d`,`model/x3d+xml`],[`x3db`,`model/x3d+fastinfoset`],[`x3dbz`,`model/x3d+binary`],[`x3dv`,`model/x3d-vrml`],[`x3dvz`,`model/x3d+vrml`],[`x3dz`,`model/x3d+xml`],[`x32`,`application/x-authorware-bin`],[`x_b`,`model/vnd.parasolid.transmit.binary`],[`x_t`,`model/vnd.parasolid.transmit.text`],[`xaml`,`application/xaml+xml`],[`xap`,`application/x-silverlight-app`],[`xar`,`application/vnd.xara`],[`xav`,`application/xcap-att+xml`],[`xbap`,`application/x-ms-xbap`],[`xbd`,`application/vnd.fujixerox.docuworks.binder`],[`xbm`,`image/x-xbitmap`],[`xca`,`application/xcap-caps+xml`],[`xcs`,`application/calendar+xml`],[`xdf`,`application/xcap-diff+xml`],[`xdm`,`application/vnd.syncml.dm+xml`],[`xdp`,`application/vnd.adobe.xdp+xml`],[`xdssc`,`application/dssc+xml`],[`xdw`,`application/vnd.fujixerox.docuworks`],[`xel`,`application/xcap-el+xml`],[`xenc`,`application/xenc+xml`],[`xer`,`application/patch-ops-error+xml`],[`xfdf`,`application/vnd.adobe.xfdf`],[`xfdl`,`application/vnd.xfdl`],[`xht`,`application/xhtml+xml`],[`xhtml`,`application/xhtml+xml`],[`xhvml`,`application/xv+xml`],[`xif`,`image/vnd.xiff`],[`xl`,`application/excel`],[`xla`,`application/vnd.ms-excel`],[`xlam`,`application/vnd.ms-excel.addin.macroEnabled.12`],[`xlc`,`application/vnd.ms-excel`],[`xlf`,`application/xliff+xml`],[`xlm`,`application/vnd.ms-excel`],[`xls`,`application/vnd.ms-excel`],[`xlsb`,`application/vnd.ms-excel.sheet.binary.macroEnabled.12`],[`xlsm`,`application/vnd.ms-excel.sheet.macroEnabled.12`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xlt`,`application/vnd.ms-excel`],[`xltm`,`application/vnd.ms-excel.template.macroEnabled.12`],[`xltx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.template`],[`xlw`,`application/vnd.ms-excel`],[`xm`,`audio/xm`],[`xml`,`application/xml`],[`xns`,`application/xcap-ns+xml`],[`xo`,`application/vnd.olpc-sugar`],[`xop`,`application/xop+xml`],[`xpi`,`application/x-xpinstall`],[`xpl`,`application/xproc+xml`],[`xpm`,`image/x-xpixmap`],[`xpr`,`application/vnd.is-xpr`],[`xps`,`application/vnd.ms-xpsdocument`],[`xpw`,`application/vnd.intercon.formnet`],[`xpx`,`application/vnd.intercon.formnet`],[`xsd`,`application/xml`],[`xsl`,`application/xml`],[`xslt`,`application/xslt+xml`],[`xsm`,`application/vnd.syncml+xml`],[`xspf`,`application/xspf+xml`],[`xul`,`application/vnd.mozilla.xul+xml`],[`xvm`,`application/xv+xml`],[`xvml`,`application/xv+xml`],[`xwd`,`image/x-xwindowdump`],[`xyz`,`chemical/x-xyz`],[`xz`,`application/x-xz`],[`yaml`,`text/yaml`],[`yang`,`application/yang`],[`yin`,`application/yin+xml`],[`yml`,`text/yaml`],[`ymp`,`text/x-suse-ymp`],[`z`,`application/x-compress`],[`z1`,`application/x-zmachine`],[`z2`,`application/x-zmachine`],[`z3`,`application/x-zmachine`],[`z4`,`application/x-zmachine`],[`z5`,`application/x-zmachine`],[`z6`,`application/x-zmachine`],[`z7`,`application/x-zmachine`],[`z8`,`application/x-zmachine`],[`zaz`,`application/vnd.zzazz.deck+xml`],[`zip`,`application/zip`],[`zir`,`application/vnd.zul`],[`zirz`,`application/vnd.zul`],[`zmm`,`application/vnd.handheld-entertainment+xml`],[`zsh`,`text/x-scriptzsh`]]);function p(e,t,n){let r=m(e),{webkitRelativePath:i}=e,a=typeof t==`string`?t:typeof i==`string`&&i.length>0?i:`./${e.name}`;return typeof r.path!=`string`&&h(r,`path`,a),n!==void 0&&Object.defineProperty(r,`handle`,{value:n,writable:!1,configurable:!1,enumerable:!0}),h(r,`relativePath`,a),r}function m(e){let{name:t}=e;if(t&&t.lastIndexOf(`.`)!==-1&&!e.type){let n=t.split(`.`).pop().toLowerCase(),r=f.get(n);r&&Object.defineProperty(e,`type`,{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}var g=[`.DS_Store`,`Thumbs.db`];function ee(e){return d(this,void 0,void 0,function*(){return v(e)&&te(e.dataTransfer)?b(e.dataTransfer,e.type):_(e)?y(e):Array.isArray(e)&&e.every(e=>`getFile`in e&&typeof e.getFile==`function`)?ne(e):[]})}function te(e){return v(e)}function _(e){return v(e)&&v(e.target)}function v(e){return typeof e==`object`&&!!e}function y(e){return S(e.target.files).map(e=>p(e))}function ne(e){return d(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>p(e))})}function b(e,t){return d(this,void 0,void 0,function*(){if(e.items){let n=S(e.items).filter(e=>e.kind===`file`);return t===`drop`?x(w(yield Promise.all(n.map(C)))):n}return x(S(e.files).map(e=>p(e)))})}function x(e){return e.filter(e=>g.indexOf(e.name)===-1)}function S(e){if(e===null)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n];t.push(r)}return t}function C(e){if(typeof e.webkitGetAsEntry!=`function`)return T(e);let t=e.webkitGetAsEntry();return t&&t.isDirectory?D(t):T(e,t)}function w(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?w(t):[t]],[])}function T(e,t){return d(this,void 0,void 0,function*(){if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle==`function`){let t=yield e.getAsFileSystemHandle();if(t===null)throw Error(`${e} is not a File`);if(t!==void 0){let e=yield t.getFile();return e.handle=t,p(e)}}let n=e.getAsFile();if(!n)throw Error(`${e} is not a File`);return p(n,t?.fullPath??void 0)})}function E(e){return d(this,void 0,void 0,function*(){return e.isDirectory?D(e):O(e)})}function D(e){let t=e.createReader();return new Promise((e,n)=>{let r=[];function i(){t.readEntries(t=>d(this,void 0,void 0,function*(){if(t.length){let e=Promise.all(t.map(E));r.push(e),i()}else try{e(yield Promise.all(r))}catch(e){n(e)}}),e=>{n(e)})}i()})}function O(e){return d(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(n=>{t(p(n,e.fullPath))},e=>{n(e)})})})}var k=t(n((e=>{e.__esModule=!0,e.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;var r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(function(e){var t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}}))());function A(e){return ie(e)||re(e)||I(e)||j()}function j(){throw TypeError(`Invalid attempt to spread non-iterable instance.+import{n as e,o as t,r as n}from"./jsx-runtime-B3dmMxJS.js";import{t as r}from"./index-Ba72GzGt.js";var i=r(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),a=r(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),o=r(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),s=r(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),c=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),l=n(((e,t)=>{var n=c();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),u=n(((e,t)=>{t.exports=l()()}));function d(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var f=new Map([[`1km`,`application/vnd.1000minds.decision-model+xml`],[`3dml`,`text/vnd.in3d.3dml`],[`3ds`,`image/x-3ds`],[`3g2`,`video/3gpp2`],[`3gp`,`video/3gp`],[`3gpp`,`video/3gpp`],[`3mf`,`model/3mf`],[`7z`,`application/x-7z-compressed`],[`7zip`,`application/x-7z-compressed`],[`123`,`application/vnd.lotus-1-2-3`],[`aab`,`application/x-authorware-bin`],[`aac`,`audio/x-acc`],[`aam`,`application/x-authorware-map`],[`aas`,`application/x-authorware-seg`],[`abw`,`application/x-abiword`],[`ac`,`application/vnd.nokia.n-gage.ac+xml`],[`ac3`,`audio/ac3`],[`acc`,`application/vnd.americandynamics.acc`],[`ace`,`application/x-ace-compressed`],[`acu`,`application/vnd.acucobol`],[`acutc`,`application/vnd.acucorp`],[`adp`,`audio/adpcm`],[`aep`,`application/vnd.audiograph`],[`afm`,`application/x-font-type1`],[`afp`,`application/vnd.ibm.modcap`],[`ahead`,`application/vnd.ahead.space`],[`ai`,`application/pdf`],[`aif`,`audio/x-aiff`],[`aifc`,`audio/x-aiff`],[`aiff`,`audio/x-aiff`],[`air`,`application/vnd.adobe.air-application-installer-package+zip`],[`ait`,`application/vnd.dvb.ait`],[`ami`,`application/vnd.amiga.ami`],[`amr`,`audio/amr`],[`apk`,`application/vnd.android.package-archive`],[`apng`,`image/apng`],[`appcache`,`text/cache-manifest`],[`application`,`application/x-ms-application`],[`apr`,`application/vnd.lotus-approach`],[`arc`,`application/x-freearc`],[`arj`,`application/x-arj`],[`asc`,`application/pgp-signature`],[`asf`,`video/x-ms-asf`],[`asm`,`text/x-asm`],[`aso`,`application/vnd.accpac.simply.aso`],[`asx`,`video/x-ms-asf`],[`atc`,`application/vnd.acucorp`],[`atom`,`application/atom+xml`],[`atomcat`,`application/atomcat+xml`],[`atomdeleted`,`application/atomdeleted+xml`],[`atomsvc`,`application/atomsvc+xml`],[`atx`,`application/vnd.antix.game-component`],[`au`,`audio/x-au`],[`avi`,`video/x-msvideo`],[`avif`,`image/avif`],[`aw`,`application/applixware`],[`azf`,`application/vnd.airzip.filesecure.azf`],[`azs`,`application/vnd.airzip.filesecure.azs`],[`azv`,`image/vnd.airzip.accelerator.azv`],[`azw`,`application/vnd.amazon.ebook`],[`b16`,`image/vnd.pco.b16`],[`bat`,`application/x-msdownload`],[`bcpio`,`application/x-bcpio`],[`bdf`,`application/x-font-bdf`],[`bdm`,`application/vnd.syncml.dm+wbxml`],[`bdoc`,`application/x-bdoc`],[`bed`,`application/vnd.realvnc.bed`],[`bh2`,`application/vnd.fujitsu.oasysprs`],[`bin`,`application/octet-stream`],[`blb`,`application/x-blorb`],[`blorb`,`application/x-blorb`],[`bmi`,`application/vnd.bmi`],[`bmml`,`application/vnd.balsamiq.bmml+xml`],[`bmp`,`image/bmp`],[`book`,`application/vnd.framemaker`],[`box`,`application/vnd.previewsystems.box`],[`boz`,`application/x-bzip2`],[`bpk`,`application/octet-stream`],[`bpmn`,`application/octet-stream`],[`bsp`,`model/vnd.valve.source.compiled-map`],[`btif`,`image/prs.btif`],[`buffer`,`application/octet-stream`],[`bz`,`application/x-bzip`],[`bz2`,`application/x-bzip2`],[`c`,`text/x-c`],[`c4d`,`application/vnd.clonk.c4group`],[`c4f`,`application/vnd.clonk.c4group`],[`c4g`,`application/vnd.clonk.c4group`],[`c4p`,`application/vnd.clonk.c4group`],[`c4u`,`application/vnd.clonk.c4group`],[`c11amc`,`application/vnd.cluetrust.cartomobile-config`],[`c11amz`,`application/vnd.cluetrust.cartomobile-config-pkg`],[`cab`,`application/vnd.ms-cab-compressed`],[`caf`,`audio/x-caf`],[`cap`,`application/vnd.tcpdump.pcap`],[`car`,`application/vnd.curl.car`],[`cat`,`application/vnd.ms-pki.seccat`],[`cb7`,`application/x-cbr`],[`cba`,`application/x-cbr`],[`cbr`,`application/x-cbr`],[`cbt`,`application/x-cbr`],[`cbz`,`application/x-cbr`],[`cc`,`text/x-c`],[`cco`,`application/x-cocoa`],[`cct`,`application/x-director`],[`ccxml`,`application/ccxml+xml`],[`cdbcmsg`,`application/vnd.contact.cmsg`],[`cda`,`application/x-cdf`],[`cdf`,`application/x-netcdf`],[`cdfx`,`application/cdfx+xml`],[`cdkey`,`application/vnd.mediastation.cdkey`],[`cdmia`,`application/cdmi-capability`],[`cdmic`,`application/cdmi-container`],[`cdmid`,`application/cdmi-domain`],[`cdmio`,`application/cdmi-object`],[`cdmiq`,`application/cdmi-queue`],[`cdr`,`application/cdr`],[`cdx`,`chemical/x-cdx`],[`cdxml`,`application/vnd.chemdraw+xml`],[`cdy`,`application/vnd.cinderella`],[`cer`,`application/pkix-cert`],[`cfs`,`application/x-cfs-compressed`],[`cgm`,`image/cgm`],[`chat`,`application/x-chat`],[`chm`,`application/vnd.ms-htmlhelp`],[`chrt`,`application/vnd.kde.kchart`],[`cif`,`chemical/x-cif`],[`cii`,`application/vnd.anser-web-certificate-issue-initiation`],[`cil`,`application/vnd.ms-artgalry`],[`cjs`,`application/node`],[`cla`,`application/vnd.claymore`],[`class`,`application/octet-stream`],[`clkk`,`application/vnd.crick.clicker.keyboard`],[`clkp`,`application/vnd.crick.clicker.palette`],[`clkt`,`application/vnd.crick.clicker.template`],[`clkw`,`application/vnd.crick.clicker.wordbank`],[`clkx`,`application/vnd.crick.clicker`],[`clp`,`application/x-msclip`],[`cmc`,`application/vnd.cosmocaller`],[`cmdf`,`chemical/x-cmdf`],[`cml`,`chemical/x-cml`],[`cmp`,`application/vnd.yellowriver-custom-menu`],[`cmx`,`image/x-cmx`],[`cod`,`application/vnd.rim.cod`],[`coffee`,`text/coffeescript`],[`com`,`application/x-msdownload`],[`conf`,`text/plain`],[`cpio`,`application/x-cpio`],[`cpp`,`text/x-c`],[`cpt`,`application/mac-compactpro`],[`crd`,`application/x-mscardfile`],[`crl`,`application/pkix-crl`],[`crt`,`application/x-x509-ca-cert`],[`crx`,`application/x-chrome-extension`],[`cryptonote`,`application/vnd.rig.cryptonote`],[`csh`,`application/x-csh`],[`csl`,`application/vnd.citationstyles.style+xml`],[`csml`,`chemical/x-csml`],[`csp`,`application/vnd.commonspace`],[`csr`,`application/octet-stream`],[`css`,`text/css`],[`cst`,`application/x-director`],[`csv`,`text/csv`],[`cu`,`application/cu-seeme`],[`curl`,`text/vnd.curl`],[`cww`,`application/prs.cww`],[`cxt`,`application/x-director`],[`cxx`,`text/x-c`],[`dae`,`model/vnd.collada+xml`],[`daf`,`application/vnd.mobius.daf`],[`dart`,`application/vnd.dart`],[`dataless`,`application/vnd.fdsn.seed`],[`davmount`,`application/davmount+xml`],[`dbf`,`application/vnd.dbf`],[`dbk`,`application/docbook+xml`],[`dcr`,`application/x-director`],[`dcurl`,`text/vnd.curl.dcurl`],[`dd2`,`application/vnd.oma.dd2+xml`],[`ddd`,`application/vnd.fujixerox.ddd`],[`ddf`,`application/vnd.syncml.dmddf+xml`],[`dds`,`image/vnd.ms-dds`],[`deb`,`application/x-debian-package`],[`def`,`text/plain`],[`deploy`,`application/octet-stream`],[`der`,`application/x-x509-ca-cert`],[`dfac`,`application/vnd.dreamfactory`],[`dgc`,`application/x-dgc-compressed`],[`dic`,`text/x-c`],[`dir`,`application/x-director`],[`dis`,`application/vnd.mobius.dis`],[`disposition-notification`,`message/disposition-notification`],[`dist`,`application/octet-stream`],[`distz`,`application/octet-stream`],[`djv`,`image/vnd.djvu`],[`djvu`,`image/vnd.djvu`],[`dll`,`application/octet-stream`],[`dmg`,`application/x-apple-diskimage`],[`dmn`,`application/octet-stream`],[`dmp`,`application/vnd.tcpdump.pcap`],[`dms`,`application/octet-stream`],[`dna`,`application/vnd.dna`],[`doc`,`application/msword`],[`docm`,`application/vnd.ms-word.template.macroEnabled.12`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`dot`,`application/msword`],[`dotm`,`application/vnd.ms-word.template.macroEnabled.12`],[`dotx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.template`],[`dp`,`application/vnd.osgi.dp`],[`dpg`,`application/vnd.dpgraph`],[`dra`,`audio/vnd.dra`],[`drle`,`image/dicom-rle`],[`dsc`,`text/prs.lines.tag`],[`dssc`,`application/dssc+der`],[`dtb`,`application/x-dtbook+xml`],[`dtd`,`application/xml-dtd`],[`dts`,`audio/vnd.dts`],[`dtshd`,`audio/vnd.dts.hd`],[`dump`,`application/octet-stream`],[`dvb`,`video/vnd.dvb.file`],[`dvi`,`application/x-dvi`],[`dwd`,`application/atsc-dwd+xml`],[`dwf`,`model/vnd.dwf`],[`dwg`,`image/vnd.dwg`],[`dxf`,`image/vnd.dxf`],[`dxp`,`application/vnd.spotfire.dxp`],[`dxr`,`application/x-director`],[`ear`,`application/java-archive`],[`ecelp4800`,`audio/vnd.nuera.ecelp4800`],[`ecelp7470`,`audio/vnd.nuera.ecelp7470`],[`ecelp9600`,`audio/vnd.nuera.ecelp9600`],[`ecma`,`application/ecmascript`],[`edm`,`application/vnd.novadigm.edm`],[`edx`,`application/vnd.novadigm.edx`],[`efif`,`application/vnd.picsel`],[`ei6`,`application/vnd.pg.osasli`],[`elc`,`application/octet-stream`],[`emf`,`image/emf`],[`eml`,`message/rfc822`],[`emma`,`application/emma+xml`],[`emotionml`,`application/emotionml+xml`],[`emz`,`application/x-msmetafile`],[`eol`,`audio/vnd.digital-winds`],[`eot`,`application/vnd.ms-fontobject`],[`eps`,`application/postscript`],[`epub`,`application/epub+zip`],[`es`,`application/ecmascript`],[`es3`,`application/vnd.eszigno3+xml`],[`esa`,`application/vnd.osgi.subsystem`],[`esf`,`application/vnd.epson.esf`],[`et3`,`application/vnd.eszigno3+xml`],[`etx`,`text/x-setext`],[`eva`,`application/x-eva`],[`evy`,`application/x-envoy`],[`exe`,`application/octet-stream`],[`exi`,`application/exi`],[`exp`,`application/express`],[`exr`,`image/aces`],[`ext`,`application/vnd.novadigm.ext`],[`ez`,`application/andrew-inset`],[`ez2`,`application/vnd.ezpix-album`],[`ez3`,`application/vnd.ezpix-package`],[`f`,`text/x-fortran`],[`f4v`,`video/mp4`],[`f77`,`text/x-fortran`],[`f90`,`text/x-fortran`],[`fbs`,`image/vnd.fastbidsheet`],[`fcdt`,`application/vnd.adobe.formscentral.fcdt`],[`fcs`,`application/vnd.isac.fcs`],[`fdf`,`application/vnd.fdf`],[`fdt`,`application/fdt+xml`],[`fe_launch`,`application/vnd.denovo.fcselayout-link`],[`fg5`,`application/vnd.fujitsu.oasysgp`],[`fgd`,`application/x-director`],[`fh`,`image/x-freehand`],[`fh4`,`image/x-freehand`],[`fh5`,`image/x-freehand`],[`fh7`,`image/x-freehand`],[`fhc`,`image/x-freehand`],[`fig`,`application/x-xfig`],[`fits`,`image/fits`],[`flac`,`audio/x-flac`],[`fli`,`video/x-fli`],[`flo`,`application/vnd.micrografx.flo`],[`flv`,`video/x-flv`],[`flw`,`application/vnd.kde.kivio`],[`flx`,`text/vnd.fmi.flexstor`],[`fly`,`text/vnd.fly`],[`fm`,`application/vnd.framemaker`],[`fnc`,`application/vnd.frogans.fnc`],[`fo`,`application/vnd.software602.filler.form+xml`],[`for`,`text/x-fortran`],[`fpx`,`image/vnd.fpx`],[`frame`,`application/vnd.framemaker`],[`fsc`,`application/vnd.fsc.weblaunch`],[`fst`,`image/vnd.fst`],[`ftc`,`application/vnd.fluxtime.clip`],[`fti`,`application/vnd.anser-web-funds-transfer-initiation`],[`fvt`,`video/vnd.fvt`],[`fxp`,`application/vnd.adobe.fxp`],[`fxpl`,`application/vnd.adobe.fxp`],[`fzs`,`application/vnd.fuzzysheet`],[`g2w`,`application/vnd.geoplan`],[`g3`,`image/g3fax`],[`g3w`,`application/vnd.geospace`],[`gac`,`application/vnd.groove-account`],[`gam`,`application/x-tads`],[`gbr`,`application/rpki-ghostbusters`],[`gca`,`application/x-gca-compressed`],[`gdl`,`model/vnd.gdl`],[`gdoc`,`application/vnd.google-apps.document`],[`geo`,`application/vnd.dynageo`],[`geojson`,`application/geo+json`],[`gex`,`application/vnd.geometry-explorer`],[`ggb`,`application/vnd.geogebra.file`],[`ggt`,`application/vnd.geogebra.tool`],[`ghf`,`application/vnd.groove-help`],[`gif`,`image/gif`],[`gim`,`application/vnd.groove-identity-message`],[`glb`,`model/gltf-binary`],[`gltf`,`model/gltf+json`],[`gml`,`application/gml+xml`],[`gmx`,`application/vnd.gmx`],[`gnumeric`,`application/x-gnumeric`],[`gpg`,`application/gpg-keys`],[`gph`,`application/vnd.flographit`],[`gpx`,`application/gpx+xml`],[`gqf`,`application/vnd.grafeq`],[`gqs`,`application/vnd.grafeq`],[`gram`,`application/srgs`],[`gramps`,`application/x-gramps-xml`],[`gre`,`application/vnd.geometry-explorer`],[`grv`,`application/vnd.groove-injector`],[`grxml`,`application/srgs+xml`],[`gsf`,`application/x-font-ghostscript`],[`gsheet`,`application/vnd.google-apps.spreadsheet`],[`gslides`,`application/vnd.google-apps.presentation`],[`gtar`,`application/x-gtar`],[`gtm`,`application/vnd.groove-tool-message`],[`gtw`,`model/vnd.gtw`],[`gv`,`text/vnd.graphviz`],[`gxf`,`application/gxf`],[`gxt`,`application/vnd.geonext`],[`gz`,`application/gzip`],[`gzip`,`application/gzip`],[`h`,`text/x-c`],[`h261`,`video/h261`],[`h263`,`video/h263`],[`h264`,`video/h264`],[`hal`,`application/vnd.hal+xml`],[`hbci`,`application/vnd.hbci`],[`hbs`,`text/x-handlebars-template`],[`hdd`,`application/x-virtualbox-hdd`],[`hdf`,`application/x-hdf`],[`heic`,`image/heic`],[`heics`,`image/heic-sequence`],[`heif`,`image/heif`],[`heifs`,`image/heif-sequence`],[`hej2`,`image/hej2k`],[`held`,`application/atsc-held+xml`],[`hh`,`text/x-c`],[`hjson`,`application/hjson`],[`hlp`,`application/winhlp`],[`hpgl`,`application/vnd.hp-hpgl`],[`hpid`,`application/vnd.hp-hpid`],[`hps`,`application/vnd.hp-hps`],[`hqx`,`application/mac-binhex40`],[`hsj2`,`image/hsj2`],[`htc`,`text/x-component`],[`htke`,`application/vnd.kenameaapp`],[`htm`,`text/html`],[`html`,`text/html`],[`hvd`,`application/vnd.yamaha.hv-dic`],[`hvp`,`application/vnd.yamaha.hv-voice`],[`hvs`,`application/vnd.yamaha.hv-script`],[`i2g`,`application/vnd.intergeo`],[`icc`,`application/vnd.iccprofile`],[`ice`,`x-conference/x-cooltalk`],[`icm`,`application/vnd.iccprofile`],[`ico`,`image/x-icon`],[`ics`,`text/calendar`],[`ief`,`image/ief`],[`ifb`,`text/calendar`],[`ifm`,`application/vnd.shana.informed.formdata`],[`iges`,`model/iges`],[`igl`,`application/vnd.igloader`],[`igm`,`application/vnd.insors.igm`],[`igs`,`model/iges`],[`igx`,`application/vnd.micrografx.igx`],[`iif`,`application/vnd.shana.informed.interchange`],[`img`,`application/octet-stream`],[`imp`,`application/vnd.accpac.simply.imp`],[`ims`,`application/vnd.ms-ims`],[`in`,`text/plain`],[`ini`,`text/plain`],[`ink`,`application/inkml+xml`],[`inkml`,`application/inkml+xml`],[`install`,`application/x-install-instructions`],[`iota`,`application/vnd.astraea-software.iota`],[`ipfix`,`application/ipfix`],[`ipk`,`application/vnd.shana.informed.package`],[`irm`,`application/vnd.ibm.rights-management`],[`irp`,`application/vnd.irepository.package+xml`],[`iso`,`application/x-iso9660-image`],[`itp`,`application/vnd.shana.informed.formtemplate`],[`its`,`application/its+xml`],[`ivp`,`application/vnd.immervision-ivp`],[`ivu`,`application/vnd.immervision-ivu`],[`jad`,`text/vnd.sun.j2me.app-descriptor`],[`jade`,`text/jade`],[`jam`,`application/vnd.jam`],[`jar`,`application/java-archive`],[`jardiff`,`application/x-java-archive-diff`],[`java`,`text/x-java-source`],[`jhc`,`image/jphc`],[`jisp`,`application/vnd.jisp`],[`jls`,`image/jls`],[`jlt`,`application/vnd.hp-jlyt`],[`jng`,`image/x-jng`],[`jnlp`,`application/x-java-jnlp-file`],[`joda`,`application/vnd.joost.joda-archive`],[`jp2`,`image/jp2`],[`jpe`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`jpf`,`image/jpx`],[`jpg`,`image/jpeg`],[`jpg2`,`image/jp2`],[`jpgm`,`video/jpm`],[`jpgv`,`video/jpeg`],[`jph`,`image/jph`],[`jpm`,`video/jpm`],[`jpx`,`image/jpx`],[`js`,`application/javascript`],[`json`,`application/json`],[`json5`,`application/json5`],[`jsonld`,`application/ld+json`],[`jsonl`,`application/jsonl`],[`jsonml`,`application/jsonml+json`],[`jsx`,`text/jsx`],[`jxr`,`image/jxr`],[`jxra`,`image/jxra`],[`jxrs`,`image/jxrs`],[`jxs`,`image/jxs`],[`jxsc`,`image/jxsc`],[`jxsi`,`image/jxsi`],[`jxss`,`image/jxss`],[`kar`,`audio/midi`],[`karbon`,`application/vnd.kde.karbon`],[`kdb`,`application/octet-stream`],[`kdbx`,`application/x-keepass2`],[`key`,`application/x-iwork-keynote-sffkey`],[`kfo`,`application/vnd.kde.kformula`],[`kia`,`application/vnd.kidspiration`],[`kml`,`application/vnd.google-earth.kml+xml`],[`kmz`,`application/vnd.google-earth.kmz`],[`kne`,`application/vnd.kinar`],[`knp`,`application/vnd.kinar`],[`kon`,`application/vnd.kde.kontour`],[`kpr`,`application/vnd.kde.kpresenter`],[`kpt`,`application/vnd.kde.kpresenter`],[`kpxx`,`application/vnd.ds-keypoint`],[`ksp`,`application/vnd.kde.kspread`],[`ktr`,`application/vnd.kahootz`],[`ktx`,`image/ktx`],[`ktx2`,`image/ktx2`],[`ktz`,`application/vnd.kahootz`],[`kwd`,`application/vnd.kde.kword`],[`kwt`,`application/vnd.kde.kword`],[`lasxml`,`application/vnd.las.las+xml`],[`latex`,`application/x-latex`],[`lbd`,`application/vnd.llamagraphics.life-balance.desktop`],[`lbe`,`application/vnd.llamagraphics.life-balance.exchange+xml`],[`les`,`application/vnd.hhe.lesson-player`],[`less`,`text/less`],[`lgr`,`application/lgr+xml`],[`lha`,`application/octet-stream`],[`link66`,`application/vnd.route66.link66+xml`],[`list`,`text/plain`],[`list3820`,`application/vnd.ibm.modcap`],[`listafp`,`application/vnd.ibm.modcap`],[`litcoffee`,`text/coffeescript`],[`lnk`,`application/x-ms-shortcut`],[`log`,`text/plain`],[`lostxml`,`application/lost+xml`],[`lrf`,`application/octet-stream`],[`lrm`,`application/vnd.ms-lrm`],[`ltf`,`application/vnd.frogans.ltf`],[`lua`,`text/x-lua`],[`luac`,`application/x-lua-bytecode`],[`lvp`,`audio/vnd.lucent.voice`],[`lwp`,`application/vnd.lotus-wordpro`],[`lzh`,`application/octet-stream`],[`m1v`,`video/mpeg`],[`m2a`,`audio/mpeg`],[`m2v`,`video/mpeg`],[`m3a`,`audio/mpeg`],[`m3u`,`text/plain`],[`m3u8`,`application/vnd.apple.mpegurl`],[`m4a`,`audio/x-m4a`],[`m4p`,`application/mp4`],[`m4s`,`video/iso.segment`],[`m4u`,`application/vnd.mpegurl`],[`m4v`,`video/x-m4v`],[`m13`,`application/x-msmediaview`],[`m14`,`application/x-msmediaview`],[`m21`,`application/mp21`],[`ma`,`application/mathematica`],[`mads`,`application/mads+xml`],[`maei`,`application/mmt-aei+xml`],[`mag`,`application/vnd.ecowin.chart`],[`maker`,`application/vnd.framemaker`],[`man`,`text/troff`],[`manifest`,`text/cache-manifest`],[`map`,`application/json`],[`mar`,`application/octet-stream`],[`markdown`,`text/markdown`],[`mathml`,`application/mathml+xml`],[`mb`,`application/mathematica`],[`mbk`,`application/vnd.mobius.mbk`],[`mbox`,`application/mbox`],[`mc1`,`application/vnd.medcalcdata`],[`mcd`,`application/vnd.mcd`],[`mcurl`,`text/vnd.curl.mcurl`],[`md`,`text/markdown`],[`mdb`,`application/x-msaccess`],[`mdi`,`image/vnd.ms-modi`],[`mdx`,`text/mdx`],[`me`,`text/troff`],[`mesh`,`model/mesh`],[`meta4`,`application/metalink4+xml`],[`metalink`,`application/metalink+xml`],[`mets`,`application/mets+xml`],[`mfm`,`application/vnd.mfmp`],[`mft`,`application/rpki-manifest`],[`mgp`,`application/vnd.osgeo.mapguide.package`],[`mgz`,`application/vnd.proteus.magazine`],[`mid`,`audio/midi`],[`midi`,`audio/midi`],[`mie`,`application/x-mie`],[`mif`,`application/vnd.mif`],[`mime`,`message/rfc822`],[`mj2`,`video/mj2`],[`mjp2`,`video/mj2`],[`mjs`,`application/javascript`],[`mk3d`,`video/x-matroska`],[`mka`,`audio/x-matroska`],[`mkd`,`text/x-markdown`],[`mks`,`video/x-matroska`],[`mkv`,`video/x-matroska`],[`mlp`,`application/vnd.dolby.mlp`],[`mmd`,`application/vnd.chipnuts.karaoke-mmd`],[`mmf`,`application/vnd.smaf`],[`mml`,`text/mathml`],[`mmr`,`image/vnd.fujixerox.edmics-mmr`],[`mng`,`video/x-mng`],[`mny`,`application/x-msmoney`],[`mobi`,`application/x-mobipocket-ebook`],[`mods`,`application/mods+xml`],[`mov`,`video/quicktime`],[`movie`,`video/x-sgi-movie`],[`mp2`,`audio/mpeg`],[`mp2a`,`audio/mpeg`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`mp4a`,`audio/mp4`],[`mp4s`,`application/mp4`],[`mp4v`,`video/mp4`],[`mp21`,`application/mp21`],[`mpc`,`application/vnd.mophun.certificate`],[`mpd`,`application/dash+xml`],[`mpe`,`video/mpeg`],[`mpeg`,`video/mpeg`],[`mpg`,`video/mpeg`],[`mpg4`,`video/mp4`],[`mpga`,`audio/mpeg`],[`mpkg`,`application/vnd.apple.installer+xml`],[`mpm`,`application/vnd.blueice.multipass`],[`mpn`,`application/vnd.mophun.application`],[`mpp`,`application/vnd.ms-project`],[`mpt`,`application/vnd.ms-project`],[`mpy`,`application/vnd.ibm.minipay`],[`mqy`,`application/vnd.mobius.mqy`],[`mrc`,`application/marc`],[`mrcx`,`application/marcxml+xml`],[`ms`,`text/troff`],[`mscml`,`application/mediaservercontrol+xml`],[`mseed`,`application/vnd.fdsn.mseed`],[`mseq`,`application/vnd.mseq`],[`msf`,`application/vnd.epson.msf`],[`msg`,`application/vnd.ms-outlook`],[`msh`,`model/mesh`],[`msi`,`application/x-msdownload`],[`msl`,`application/vnd.mobius.msl`],[`msm`,`application/octet-stream`],[`msp`,`application/octet-stream`],[`msty`,`application/vnd.muvee.style`],[`mtl`,`model/mtl`],[`mts`,`model/vnd.mts`],[`mus`,`application/vnd.musician`],[`musd`,`application/mmt-usd+xml`],[`musicxml`,`application/vnd.recordare.musicxml+xml`],[`mvb`,`application/x-msmediaview`],[`mvt`,`application/vnd.mapbox-vector-tile`],[`mwf`,`application/vnd.mfer`],[`mxf`,`application/mxf`],[`mxl`,`application/vnd.recordare.musicxml`],[`mxmf`,`audio/mobile-xmf`],[`mxml`,`application/xv+xml`],[`mxs`,`application/vnd.triscape.mxs`],[`mxu`,`video/vnd.mpegurl`],[`n-gage`,`application/vnd.nokia.n-gage.symbian.install`],[`n3`,`text/n3`],[`nb`,`application/mathematica`],[`nbp`,`application/vnd.wolfram.player`],[`nc`,`application/x-netcdf`],[`ncx`,`application/x-dtbncx+xml`],[`nfo`,`text/x-nfo`],[`ngdat`,`application/vnd.nokia.n-gage.data`],[`nitf`,`application/vnd.nitf`],[`nlu`,`application/vnd.neurolanguage.nlu`],[`nml`,`application/vnd.enliven`],[`nnd`,`application/vnd.noblenet-directory`],[`nns`,`application/vnd.noblenet-sealer`],[`nnw`,`application/vnd.noblenet-web`],[`npx`,`image/vnd.net-fpx`],[`nq`,`application/n-quads`],[`nsc`,`application/x-conference`],[`nsf`,`application/vnd.lotus-notes`],[`nt`,`application/n-triples`],[`ntf`,`application/vnd.nitf`],[`numbers`,`application/x-iwork-numbers-sffnumbers`],[`nzb`,`application/x-nzb`],[`oa2`,`application/vnd.fujitsu.oasys2`],[`oa3`,`application/vnd.fujitsu.oasys3`],[`oas`,`application/vnd.fujitsu.oasys`],[`obd`,`application/x-msbinder`],[`obgx`,`application/vnd.openblox.game+xml`],[`obj`,`model/obj`],[`oda`,`application/oda`],[`odb`,`application/vnd.oasis.opendocument.database`],[`odc`,`application/vnd.oasis.opendocument.chart`],[`odf`,`application/vnd.oasis.opendocument.formula`],[`odft`,`application/vnd.oasis.opendocument.formula-template`],[`odg`,`application/vnd.oasis.opendocument.graphics`],[`odi`,`application/vnd.oasis.opendocument.image`],[`odm`,`application/vnd.oasis.opendocument.text-master`],[`odp`,`application/vnd.oasis.opendocument.presentation`],[`ods`,`application/vnd.oasis.opendocument.spreadsheet`],[`odt`,`application/vnd.oasis.opendocument.text`],[`oga`,`audio/ogg`],[`ogex`,`model/vnd.opengex`],[`ogg`,`audio/ogg`],[`ogv`,`video/ogg`],[`ogx`,`application/ogg`],[`omdoc`,`application/omdoc+xml`],[`onepkg`,`application/onenote`],[`onetmp`,`application/onenote`],[`onetoc`,`application/onenote`],[`onetoc2`,`application/onenote`],[`opf`,`application/oebps-package+xml`],[`opml`,`text/x-opml`],[`oprc`,`application/vnd.palm`],[`opus`,`audio/ogg`],[`org`,`text/x-org`],[`osf`,`application/vnd.yamaha.openscoreformat`],[`osfpvg`,`application/vnd.yamaha.openscoreformat.osfpvg+xml`],[`osm`,`application/vnd.openstreetmap.data+xml`],[`otc`,`application/vnd.oasis.opendocument.chart-template`],[`otf`,`font/otf`],[`otg`,`application/vnd.oasis.opendocument.graphics-template`],[`oth`,`application/vnd.oasis.opendocument.text-web`],[`oti`,`application/vnd.oasis.opendocument.image-template`],[`otp`,`application/vnd.oasis.opendocument.presentation-template`],[`ots`,`application/vnd.oasis.opendocument.spreadsheet-template`],[`ott`,`application/vnd.oasis.opendocument.text-template`],[`ova`,`application/x-virtualbox-ova`],[`ovf`,`application/x-virtualbox-ovf`],[`owl`,`application/rdf+xml`],[`oxps`,`application/oxps`],[`oxt`,`application/vnd.openofficeorg.extension`],[`p`,`text/x-pascal`],[`p7a`,`application/x-pkcs7-signature`],[`p7b`,`application/x-pkcs7-certificates`],[`p7c`,`application/pkcs7-mime`],[`p7m`,`application/pkcs7-mime`],[`p7r`,`application/x-pkcs7-certreqresp`],[`p7s`,`application/pkcs7-signature`],[`p8`,`application/pkcs8`],[`p10`,`application/x-pkcs10`],[`p12`,`application/x-pkcs12`],[`pac`,`application/x-ns-proxy-autoconfig`],[`pages`,`application/x-iwork-pages-sffpages`],[`pas`,`text/x-pascal`],[`paw`,`application/vnd.pawaafile`],[`pbd`,`application/vnd.powerbuilder6`],[`pbm`,`image/x-portable-bitmap`],[`pcap`,`application/vnd.tcpdump.pcap`],[`pcf`,`application/x-font-pcf`],[`pcl`,`application/vnd.hp-pcl`],[`pclxl`,`application/vnd.hp-pclxl`],[`pct`,`image/x-pict`],[`pcurl`,`application/vnd.curl.pcurl`],[`pcx`,`image/x-pcx`],[`pdb`,`application/x-pilot`],[`pde`,`text/x-processing`],[`pdf`,`application/pdf`],[`pem`,`application/x-x509-user-cert`],[`pfa`,`application/x-font-type1`],[`pfb`,`application/x-font-type1`],[`pfm`,`application/x-font-type1`],[`pfr`,`application/font-tdpfr`],[`pfx`,`application/x-pkcs12`],[`pgm`,`image/x-portable-graymap`],[`pgn`,`application/x-chess-pgn`],[`pgp`,`application/pgp`],[`php`,`application/x-httpd-php`],[`php3`,`application/x-httpd-php`],[`php4`,`application/x-httpd-php`],[`phps`,`application/x-httpd-php-source`],[`phtml`,`application/x-httpd-php`],[`pic`,`image/x-pict`],[`pkg`,`application/octet-stream`],[`pki`,`application/pkixcmp`],[`pkipath`,`application/pkix-pkipath`],[`pkpass`,`application/vnd.apple.pkpass`],[`pl`,`application/x-perl`],[`plb`,`application/vnd.3gpp.pic-bw-large`],[`plc`,`application/vnd.mobius.plc`],[`plf`,`application/vnd.pocketlearn`],[`pls`,`application/pls+xml`],[`pm`,`application/x-perl`],[`pml`,`application/vnd.ctc-posml`],[`png`,`image/png`],[`pnm`,`image/x-portable-anymap`],[`portpkg`,`application/vnd.macports.portpkg`],[`pot`,`application/vnd.ms-powerpoint`],[`potm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`potx`,`application/vnd.openxmlformats-officedocument.presentationml.template`],[`ppa`,`application/vnd.ms-powerpoint`],[`ppam`,`application/vnd.ms-powerpoint.addin.macroEnabled.12`],[`ppd`,`application/vnd.cups-ppd`],[`ppm`,`image/x-portable-pixmap`],[`pps`,`application/vnd.ms-powerpoint`],[`ppsm`,`application/vnd.ms-powerpoint.slideshow.macroEnabled.12`],[`ppsx`,`application/vnd.openxmlformats-officedocument.presentationml.slideshow`],[`ppt`,`application/powerpoint`],[`pptm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`pqa`,`application/vnd.palm`],[`prc`,`application/x-pilot`],[`pre`,`application/vnd.lotus-freelance`],[`prf`,`application/pics-rules`],[`provx`,`application/provenance+xml`],[`ps`,`application/postscript`],[`psb`,`application/vnd.3gpp.pic-bw-small`],[`psd`,`application/x-photoshop`],[`psf`,`application/x-font-linux-psf`],[`pskcxml`,`application/pskc+xml`],[`pti`,`image/prs.pti`],[`ptid`,`application/vnd.pvi.ptid1`],[`pub`,`application/x-mspublisher`],[`pvb`,`application/vnd.3gpp.pic-bw-var`],[`pwn`,`application/vnd.3m.post-it-notes`],[`pya`,`audio/vnd.ms-playready.media.pya`],[`pyv`,`video/vnd.ms-playready.media.pyv`],[`qam`,`application/vnd.epson.quickanime`],[`qbo`,`application/vnd.intu.qbo`],[`qfx`,`application/vnd.intu.qfx`],[`qps`,`application/vnd.publishare-delta-tree`],[`qt`,`video/quicktime`],[`qwd`,`application/vnd.quark.quarkxpress`],[`qwt`,`application/vnd.quark.quarkxpress`],[`qxb`,`application/vnd.quark.quarkxpress`],[`qxd`,`application/vnd.quark.quarkxpress`],[`qxl`,`application/vnd.quark.quarkxpress`],[`qxt`,`application/vnd.quark.quarkxpress`],[`ra`,`audio/x-realaudio`],[`ram`,`audio/x-pn-realaudio`],[`raml`,`application/raml+yaml`],[`rapd`,`application/route-apd+xml`],[`rar`,`application/x-rar`],[`ras`,`image/x-cmu-raster`],[`rcprofile`,`application/vnd.ipunplugged.rcprofile`],[`rdf`,`application/rdf+xml`],[`rdz`,`application/vnd.data-vision.rdz`],[`relo`,`application/p2p-overlay+xml`],[`rep`,`application/vnd.businessobjects`],[`res`,`application/x-dtbresource+xml`],[`rgb`,`image/x-rgb`],[`rif`,`application/reginfo+xml`],[`rip`,`audio/vnd.rip`],[`ris`,`application/x-research-info-systems`],[`rl`,`application/resource-lists+xml`],[`rlc`,`image/vnd.fujixerox.edmics-rlc`],[`rld`,`application/resource-lists-diff+xml`],[`rm`,`audio/x-pn-realaudio`],[`rmi`,`audio/midi`],[`rmp`,`audio/x-pn-realaudio-plugin`],[`rms`,`application/vnd.jcp.javame.midlet-rms`],[`rmvb`,`application/vnd.rn-realmedia-vbr`],[`rnc`,`application/relax-ng-compact-syntax`],[`rng`,`application/xml`],[`roa`,`application/rpki-roa`],[`roff`,`text/troff`],[`rp9`,`application/vnd.cloanto.rp9`],[`rpm`,`audio/x-pn-realaudio-plugin`],[`rpss`,`application/vnd.nokia.radio-presets`],[`rpst`,`application/vnd.nokia.radio-preset`],[`rq`,`application/sparql-query`],[`rs`,`application/rls-services+xml`],[`rsa`,`application/x-pkcs7`],[`rsat`,`application/atsc-rsat+xml`],[`rsd`,`application/rsd+xml`],[`rsheet`,`application/urc-ressheet+xml`],[`rss`,`application/rss+xml`],[`rtf`,`text/rtf`],[`rtx`,`text/richtext`],[`run`,`application/x-makeself`],[`rusd`,`application/route-usd+xml`],[`rv`,`video/vnd.rn-realvideo`],[`s`,`text/x-asm`],[`s3m`,`audio/s3m`],[`saf`,`application/vnd.yamaha.smaf-audio`],[`sass`,`text/x-sass`],[`sbml`,`application/sbml+xml`],[`sc`,`application/vnd.ibm.secure-container`],[`scd`,`application/x-msschedule`],[`scm`,`application/vnd.lotus-screencam`],[`scq`,`application/scvp-cv-request`],[`scs`,`application/scvp-cv-response`],[`scss`,`text/x-scss`],[`scurl`,`text/vnd.curl.scurl`],[`sda`,`application/vnd.stardivision.draw`],[`sdc`,`application/vnd.stardivision.calc`],[`sdd`,`application/vnd.stardivision.impress`],[`sdkd`,`application/vnd.solent.sdkm+xml`],[`sdkm`,`application/vnd.solent.sdkm+xml`],[`sdp`,`application/sdp`],[`sdw`,`application/vnd.stardivision.writer`],[`sea`,`application/octet-stream`],[`see`,`application/vnd.seemail`],[`seed`,`application/vnd.fdsn.seed`],[`sema`,`application/vnd.sema`],[`semd`,`application/vnd.semd`],[`semf`,`application/vnd.semf`],[`senmlx`,`application/senml+xml`],[`sensmlx`,`application/sensml+xml`],[`ser`,`application/java-serialized-object`],[`setpay`,`application/set-payment-initiation`],[`setreg`,`application/set-registration-initiation`],[`sfd-hdstx`,`application/vnd.hydrostatix.sof-data`],[`sfs`,`application/vnd.spotfire.sfs`],[`sfv`,`text/x-sfv`],[`sgi`,`image/sgi`],[`sgl`,`application/vnd.stardivision.writer-global`],[`sgm`,`text/sgml`],[`sgml`,`text/sgml`],[`sh`,`application/x-sh`],[`shar`,`application/x-shar`],[`shex`,`text/shex`],[`shf`,`application/shf+xml`],[`shtml`,`text/html`],[`sid`,`image/x-mrsid-image`],[`sieve`,`application/sieve`],[`sig`,`application/pgp-signature`],[`sil`,`audio/silk`],[`silo`,`model/mesh`],[`sis`,`application/vnd.symbian.install`],[`sisx`,`application/vnd.symbian.install`],[`sit`,`application/x-stuffit`],[`sitx`,`application/x-stuffitx`],[`siv`,`application/sieve`],[`skd`,`application/vnd.koan`],[`skm`,`application/vnd.koan`],[`skp`,`application/vnd.koan`],[`skt`,`application/vnd.koan`],[`sldm`,`application/vnd.ms-powerpoint.slide.macroenabled.12`],[`sldx`,`application/vnd.openxmlformats-officedocument.presentationml.slide`],[`slim`,`text/slim`],[`slm`,`text/slim`],[`sls`,`application/route-s-tsid+xml`],[`slt`,`application/vnd.epson.salt`],[`sm`,`application/vnd.stepmania.stepchart`],[`smf`,`application/vnd.stardivision.math`],[`smi`,`application/smil`],[`smil`,`application/smil`],[`smv`,`video/x-smv`],[`smzip`,`application/vnd.stepmania.package`],[`snd`,`audio/basic`],[`snf`,`application/x-font-snf`],[`so`,`application/octet-stream`],[`spc`,`application/x-pkcs7-certificates`],[`spdx`,`text/spdx`],[`spf`,`application/vnd.yamaha.smaf-phrase`],[`spl`,`application/x-futuresplash`],[`spot`,`text/vnd.in3d.spot`],[`spp`,`application/scvp-vp-response`],[`spq`,`application/scvp-vp-request`],[`spx`,`audio/ogg`],[`sql`,`application/x-sql`],[`src`,`application/x-wais-source`],[`srt`,`application/x-subrip`],[`sru`,`application/sru+xml`],[`srx`,`application/sparql-results+xml`],[`ssdl`,`application/ssdl+xml`],[`sse`,`application/vnd.kodak-descriptor`],[`ssf`,`application/vnd.epson.ssf`],[`ssml`,`application/ssml+xml`],[`sst`,`application/octet-stream`],[`st`,`application/vnd.sailingtracker.track`],[`stc`,`application/vnd.sun.xml.calc.template`],[`std`,`application/vnd.sun.xml.draw.template`],[`stf`,`application/vnd.wt.stf`],[`sti`,`application/vnd.sun.xml.impress.template`],[`stk`,`application/hyperstudio`],[`stl`,`model/stl`],[`stpx`,`model/step+xml`],[`stpxz`,`model/step-xml+zip`],[`stpz`,`model/step+zip`],[`str`,`application/vnd.pg.format`],[`stw`,`application/vnd.sun.xml.writer.template`],[`styl`,`text/stylus`],[`stylus`,`text/stylus`],[`sub`,`text/vnd.dvb.subtitle`],[`sus`,`application/vnd.sus-calendar`],[`susp`,`application/vnd.sus-calendar`],[`sv4cpio`,`application/x-sv4cpio`],[`sv4crc`,`application/x-sv4crc`],[`svc`,`application/vnd.dvb.service`],[`svd`,`application/vnd.svd`],[`svg`,`image/svg+xml`],[`svgz`,`image/svg+xml`],[`swa`,`application/x-director`],[`swf`,`application/x-shockwave-flash`],[`swi`,`application/vnd.aristanetworks.swi`],[`swidtag`,`application/swid+xml`],[`sxc`,`application/vnd.sun.xml.calc`],[`sxd`,`application/vnd.sun.xml.draw`],[`sxg`,`application/vnd.sun.xml.writer.global`],[`sxi`,`application/vnd.sun.xml.impress`],[`sxm`,`application/vnd.sun.xml.math`],[`sxw`,`application/vnd.sun.xml.writer`],[`t`,`text/troff`],[`t3`,`application/x-t3vm-image`],[`t38`,`image/t38`],[`taglet`,`application/vnd.mynfc`],[`tao`,`application/vnd.tao.intent-module-archive`],[`tap`,`image/vnd.tencent.tap`],[`tar`,`application/x-tar`],[`tcap`,`application/vnd.3gpp2.tcap`],[`tcl`,`application/x-tcl`],[`td`,`application/urc-targetdesc+xml`],[`teacher`,`application/vnd.smart.teacher`],[`tei`,`application/tei+xml`],[`teicorpus`,`application/tei+xml`],[`tex`,`application/x-tex`],[`texi`,`application/x-texinfo`],[`texinfo`,`application/x-texinfo`],[`text`,`text/plain`],[`tfi`,`application/thraud+xml`],[`tfm`,`application/x-tex-tfm`],[`tfx`,`image/tiff-fx`],[`tga`,`image/x-tga`],[`tgz`,`application/x-tar`],[`thmx`,`application/vnd.ms-officetheme`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`tk`,`application/x-tcl`],[`tmo`,`application/vnd.tmobile-livetv`],[`toml`,`application/toml`],[`torrent`,`application/x-bittorrent`],[`tpl`,`application/vnd.groove-tool-template`],[`tpt`,`application/vnd.trid.tpt`],[`tr`,`text/troff`],[`tra`,`application/vnd.trueapp`],[`trig`,`application/trig`],[`trm`,`application/x-msterminal`],[`ts`,`video/mp2t`],[`tsd`,`application/timestamped-data`],[`tsv`,`text/tab-separated-values`],[`ttc`,`font/collection`],[`ttf`,`font/ttf`],[`ttl`,`text/turtle`],[`ttml`,`application/ttml+xml`],[`twd`,`application/vnd.simtech-mindmapper`],[`twds`,`application/vnd.simtech-mindmapper`],[`txd`,`application/vnd.genomatix.tuxedo`],[`txf`,`application/vnd.mobius.txf`],[`txt`,`text/plain`],[`u8dsn`,`message/global-delivery-status`],[`u8hdr`,`message/global-headers`],[`u8mdn`,`message/global-disposition-notification`],[`u8msg`,`message/global`],[`u32`,`application/x-authorware-bin`],[`ubj`,`application/ubjson`],[`udeb`,`application/x-debian-package`],[`ufd`,`application/vnd.ufdl`],[`ufdl`,`application/vnd.ufdl`],[`ulx`,`application/x-glulx`],[`umj`,`application/vnd.umajin`],[`unityweb`,`application/vnd.unity`],[`uoml`,`application/vnd.uoml+xml`],[`uri`,`text/uri-list`],[`uris`,`text/uri-list`],[`urls`,`text/uri-list`],[`usdz`,`model/vnd.usdz+zip`],[`ustar`,`application/x-ustar`],[`utz`,`application/vnd.uiq.theme`],[`uu`,`text/x-uuencode`],[`uva`,`audio/vnd.dece.audio`],[`uvd`,`application/vnd.dece.data`],[`uvf`,`application/vnd.dece.data`],[`uvg`,`image/vnd.dece.graphic`],[`uvh`,`video/vnd.dece.hd`],[`uvi`,`image/vnd.dece.graphic`],[`uvm`,`video/vnd.dece.mobile`],[`uvp`,`video/vnd.dece.pd`],[`uvs`,`video/vnd.dece.sd`],[`uvt`,`application/vnd.dece.ttml+xml`],[`uvu`,`video/vnd.uvvu.mp4`],[`uvv`,`video/vnd.dece.video`],[`uvva`,`audio/vnd.dece.audio`],[`uvvd`,`application/vnd.dece.data`],[`uvvf`,`application/vnd.dece.data`],[`uvvg`,`image/vnd.dece.graphic`],[`uvvh`,`video/vnd.dece.hd`],[`uvvi`,`image/vnd.dece.graphic`],[`uvvm`,`video/vnd.dece.mobile`],[`uvvp`,`video/vnd.dece.pd`],[`uvvs`,`video/vnd.dece.sd`],[`uvvt`,`application/vnd.dece.ttml+xml`],[`uvvu`,`video/vnd.uvvu.mp4`],[`uvvv`,`video/vnd.dece.video`],[`uvvx`,`application/vnd.dece.unspecified`],[`uvvz`,`application/vnd.dece.zip`],[`uvx`,`application/vnd.dece.unspecified`],[`uvz`,`application/vnd.dece.zip`],[`vbox`,`application/x-virtualbox-vbox`],[`vbox-extpack`,`application/x-virtualbox-vbox-extpack`],[`vcard`,`text/vcard`],[`vcd`,`application/x-cdlink`],[`vcf`,`text/x-vcard`],[`vcg`,`application/vnd.groove-vcard`],[`vcs`,`text/x-vcalendar`],[`vcx`,`application/vnd.vcx`],[`vdi`,`application/x-virtualbox-vdi`],[`vds`,`model/vnd.sap.vds`],[`vhd`,`application/x-virtualbox-vhd`],[`vis`,`application/vnd.visionary`],[`viv`,`video/vnd.vivo`],[`vlc`,`application/videolan`],[`vmdk`,`application/x-virtualbox-vmdk`],[`vob`,`video/x-ms-vob`],[`vor`,`application/vnd.stardivision.writer`],[`vox`,`application/x-authorware-bin`],[`vrml`,`model/vrml`],[`vsd`,`application/vnd.visio`],[`vsf`,`application/vnd.vsf`],[`vss`,`application/vnd.visio`],[`vst`,`application/vnd.visio`],[`vsw`,`application/vnd.visio`],[`vtf`,`image/vnd.valve.source.texture`],[`vtt`,`text/vtt`],[`vtu`,`model/vnd.vtu`],[`vxml`,`application/voicexml+xml`],[`w3d`,`application/x-director`],[`wad`,`application/x-doom`],[`wadl`,`application/vnd.sun.wadl+xml`],[`war`,`application/java-archive`],[`wasm`,`application/wasm`],[`wav`,`audio/x-wav`],[`wax`,`audio/x-ms-wax`],[`wbmp`,`image/vnd.wap.wbmp`],[`wbs`,`application/vnd.criticaltools.wbs+xml`],[`wbxml`,`application/wbxml`],[`wcm`,`application/vnd.ms-works`],[`wdb`,`application/vnd.ms-works`],[`wdp`,`image/vnd.ms-photo`],[`weba`,`audio/webm`],[`webapp`,`application/x-web-app-manifest+json`],[`webm`,`video/webm`],[`webmanifest`,`application/manifest+json`],[`webp`,`image/webp`],[`wg`,`application/vnd.pmi.widget`],[`wgt`,`application/widget`],[`wks`,`application/vnd.ms-works`],[`wm`,`video/x-ms-wm`],[`wma`,`audio/x-ms-wma`],[`wmd`,`application/x-ms-wmd`],[`wmf`,`image/wmf`],[`wml`,`text/vnd.wap.wml`],[`wmlc`,`application/wmlc`],[`wmls`,`text/vnd.wap.wmlscript`],[`wmlsc`,`application/vnd.wap.wmlscriptc`],[`wmv`,`video/x-ms-wmv`],[`wmx`,`video/x-ms-wmx`],[`wmz`,`application/x-msmetafile`],[`woff`,`font/woff`],[`woff2`,`font/woff2`],[`word`,`application/msword`],[`wpd`,`application/vnd.wordperfect`],[`wpl`,`application/vnd.ms-wpl`],[`wps`,`application/vnd.ms-works`],[`wqd`,`application/vnd.wqd`],[`wri`,`application/x-mswrite`],[`wrl`,`model/vrml`],[`wsc`,`message/vnd.wfa.wsc`],[`wsdl`,`application/wsdl+xml`],[`wspolicy`,`application/wspolicy+xml`],[`wtb`,`application/vnd.webturbo`],[`wvx`,`video/x-ms-wvx`],[`x3d`,`model/x3d+xml`],[`x3db`,`model/x3d+fastinfoset`],[`x3dbz`,`model/x3d+binary`],[`x3dv`,`model/x3d-vrml`],[`x3dvz`,`model/x3d+vrml`],[`x3dz`,`model/x3d+xml`],[`x32`,`application/x-authorware-bin`],[`x_b`,`model/vnd.parasolid.transmit.binary`],[`x_t`,`model/vnd.parasolid.transmit.text`],[`xaml`,`application/xaml+xml`],[`xap`,`application/x-silverlight-app`],[`xar`,`application/vnd.xara`],[`xav`,`application/xcap-att+xml`],[`xbap`,`application/x-ms-xbap`],[`xbd`,`application/vnd.fujixerox.docuworks.binder`],[`xbm`,`image/x-xbitmap`],[`xca`,`application/xcap-caps+xml`],[`xcs`,`application/calendar+xml`],[`xdf`,`application/xcap-diff+xml`],[`xdm`,`application/vnd.syncml.dm+xml`],[`xdp`,`application/vnd.adobe.xdp+xml`],[`xdssc`,`application/dssc+xml`],[`xdw`,`application/vnd.fujixerox.docuworks`],[`xel`,`application/xcap-el+xml`],[`xenc`,`application/xenc+xml`],[`xer`,`application/patch-ops-error+xml`],[`xfdf`,`application/vnd.adobe.xfdf`],[`xfdl`,`application/vnd.xfdl`],[`xht`,`application/xhtml+xml`],[`xhtml`,`application/xhtml+xml`],[`xhvml`,`application/xv+xml`],[`xif`,`image/vnd.xiff`],[`xl`,`application/excel`],[`xla`,`application/vnd.ms-excel`],[`xlam`,`application/vnd.ms-excel.addin.macroEnabled.12`],[`xlc`,`application/vnd.ms-excel`],[`xlf`,`application/xliff+xml`],[`xlm`,`application/vnd.ms-excel`],[`xls`,`application/vnd.ms-excel`],[`xlsb`,`application/vnd.ms-excel.sheet.binary.macroEnabled.12`],[`xlsm`,`application/vnd.ms-excel.sheet.macroEnabled.12`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xlt`,`application/vnd.ms-excel`],[`xltm`,`application/vnd.ms-excel.template.macroEnabled.12`],[`xltx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.template`],[`xlw`,`application/vnd.ms-excel`],[`xm`,`audio/xm`],[`xml`,`application/xml`],[`xns`,`application/xcap-ns+xml`],[`xo`,`application/vnd.olpc-sugar`],[`xop`,`application/xop+xml`],[`xpi`,`application/x-xpinstall`],[`xpl`,`application/xproc+xml`],[`xpm`,`image/x-xpixmap`],[`xpr`,`application/vnd.is-xpr`],[`xps`,`application/vnd.ms-xpsdocument`],[`xpw`,`application/vnd.intercon.formnet`],[`xpx`,`application/vnd.intercon.formnet`],[`xsd`,`application/xml`],[`xsl`,`application/xml`],[`xslt`,`application/xslt+xml`],[`xsm`,`application/vnd.syncml+xml`],[`xspf`,`application/xspf+xml`],[`xul`,`application/vnd.mozilla.xul+xml`],[`xvm`,`application/xv+xml`],[`xvml`,`application/xv+xml`],[`xwd`,`image/x-xwindowdump`],[`xyz`,`chemical/x-xyz`],[`xz`,`application/x-xz`],[`yaml`,`text/yaml`],[`yang`,`application/yang`],[`yin`,`application/yin+xml`],[`yml`,`text/yaml`],[`ymp`,`text/x-suse-ymp`],[`z`,`application/x-compress`],[`z1`,`application/x-zmachine`],[`z2`,`application/x-zmachine`],[`z3`,`application/x-zmachine`],[`z4`,`application/x-zmachine`],[`z5`,`application/x-zmachine`],[`z6`,`application/x-zmachine`],[`z7`,`application/x-zmachine`],[`z8`,`application/x-zmachine`],[`zaz`,`application/vnd.zzazz.deck+xml`],[`zip`,`application/zip`],[`zir`,`application/vnd.zul`],[`zirz`,`application/vnd.zul`],[`zmm`,`application/vnd.handheld-entertainment+xml`],[`zsh`,`text/x-scriptzsh`]]);function p(e,t,n){let r=m(e),{webkitRelativePath:i}=e,a=typeof t==`string`?t:typeof i==`string`&&i.length>0?i:`./${e.name}`;return typeof r.path!=`string`&&h(r,`path`,a),n!==void 0&&Object.defineProperty(r,`handle`,{value:n,writable:!1,configurable:!1,enumerable:!0}),h(r,`relativePath`,a),r}function m(e){let{name:t}=e;if(t&&t.lastIndexOf(`.`)!==-1&&!e.type){let n=t.split(`.`).pop().toLowerCase(),r=f.get(n);r&&Object.defineProperty(e,`type`,{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}var g=[`.DS_Store`,`Thumbs.db`];function ee(e){return d(this,void 0,void 0,function*(){return v(e)&&te(e.dataTransfer)?b(e.dataTransfer,e.type):_(e)?y(e):Array.isArray(e)&&e.every(e=>`getFile`in e&&typeof e.getFile==`function`)?ne(e):[]})}function te(e){return v(e)}function _(e){return v(e)&&v(e.target)}function v(e){return typeof e==`object`&&!!e}function y(e){return S(e.target.files).map(e=>p(e))}function ne(e){return d(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>p(e))})}function b(e,t){return d(this,void 0,void 0,function*(){if(e.items){let n=S(e.items).filter(e=>e.kind===`file`);return t===`drop`?x(w(yield Promise.all(n.map(C)))):n}return x(S(e.files).map(e=>p(e)))})}function x(e){return e.filter(e=>g.indexOf(e.name)===-1)}function S(e){if(e===null)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n];t.push(r)}return t}function C(e){if(typeof e.webkitGetAsEntry!=`function`)return T(e);let t=e.webkitGetAsEntry();return t&&t.isDirectory?D(t):T(e,t)}function w(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?w(t):[t]],[])}function T(e,t){return d(this,void 0,void 0,function*(){if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle==`function`){let t=yield e.getAsFileSystemHandle();if(t===null)throw Error(`${e} is not a File`);if(t!==void 0){let e=yield t.getFile();return e.handle=t,p(e)}}let n=e.getAsFile();if(!n)throw Error(`${e} is not a File`);return p(n,t?.fullPath??void 0)})}function E(e){return d(this,void 0,void 0,function*(){return e.isDirectory?D(e):O(e)})}function D(e){let t=e.createReader();return new Promise((e,n)=>{let r=[];function i(){t.readEntries(t=>d(this,void 0,void 0,function*(){if(t.length){let e=Promise.all(t.map(E));r.push(e),i()}else try{e(yield Promise.all(r))}catch(e){n(e)}}),e=>{n(e)})}i()})}function O(e){return d(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(n=>{t(p(n,e.fullPath))},e=>{n(e)})})})}var k=t(n((e=>{e.__esModule=!0,e.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;var r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(function(e){var t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}}))());function A(e){return ie(e)||re(e)||I(e)||j()}function j(){throw TypeError(`Invalid attempt to spread non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ie(e){if(Array.isArray(e))return L(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?M(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){return se(e)||oe(e,t)||I(e,t)||ae()}function ae(){throw TypeError(`Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(e,t){if(e){if(typeof e==`string`)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function se(e){if(Array.isArray(e))return e}var R=typeof k.default==`function`?k.default:k.default.default,z=`file-invalid-type`,B=`file-too-large`,ce=`file-too-small`,le=`too-many-files`,ue=function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:``).split(`,`);return{code:z,message:`File type must be ${e.length>1?`one of ${e.join(`, `)}`:e[0]}`}},V=function(e){return{code:B,message:`File is larger than ${e} ${e===1?`byte`:`bytes`}`}},H=function(e){return{code:ce,message:`File is smaller than ${e} ${e===1?`byte`:`bytes`}`}},de={code:le,message:`Too many files`};function U(e){return e.type===``&&typeof e.getAsFile==`function`}function fe(e,t){var n=e.type===`application/x-moz-file`||R(e,t)||U(e);return[n,n?null:ue(t)]}function pe(e,t,n){if(W(e.size)){if(W(t)&&W(n)){if(e.size>n)return[!1,V(n)];if(e.size<t)return[!1,H(t)]}else if(W(t)&&e.size<t)return[!1,H(t)];else if(W(n)&&e.size>n)return[!1,V(n)]}return[!0,null]}function W(e){return e!=null}function me(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(e){var t=F(fe(e,n),1)[0],a=F(pe(e,r,i),1)[0],o=s?s(e):null;return t&&a&&!o})}function G(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble===void 0?!1:e.cancelBubble}function K(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return e===`Files`||e===`application/x-moz-file`}):!!e.target&&!!e.target.files}function he(e){e.preventDefault()}function q(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function ge(e){return e.indexOf(`Edge/`)!==-1}function _e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return q(e)||ge(e)}function J(){var e=[...arguments];return function(t){var n=[...arguments].slice(1);return e.some(function(e){return!G(t)&&e&&e.apply(void 0,[t].concat(n)),G(t)})}}function ve(){return`showOpenFilePicker`in window}function ye(e){return W(e)?[{description:`Files`,accept:Object.entries(e).filter(function(e){var t=F(e,2),n=t[0],r=t[1],i=!0;return Y(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),i=!1),(!Array.isArray(r)||!r.every(Ce))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),i=!1),i}).reduce(function(e,t){var n=F(t,2),r=n[0],i=n[1];return N(N({},e),{},P({},r,i))},{})}]:e}function be(e){if(W(e))return Object.entries(e).reduce(function(e,t){var n=F(t,2),r=n[0],i=n[1];return[].concat(A(e),[r],A(i))},[]).filter(function(e){return Y(e)||Ce(e)}).join(`,`)}function xe(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function Se(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function Y(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function Ce(e){return/^.*\.[\w]+$/.test(e)}var X=t(e()),Z=t(u()),we=[`children`],Te=[`open`],Ee=[`refKey`,`role`,`onKeyDown`,`onFocus`,`onBlur`,`onClick`,`onDragEnter`,`onDragOver`,`onDragLeave`,`onDrop`],De=[`refKey`,`onChange`,`onClick`];function Oe(e){return je(e)||Ae(e)||Pe(e)||ke()}function ke(){throw TypeError(`Invalid attempt to spread non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ae(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function je(e){if(Array.isArray(e))return Fe(e)}function Me(e,t){return Le(e)||Ie(e,t)||Pe(e,t)||Ne()}function Ne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.diff --git a/semantica/static/assets/index-BaPyswgU.js b/semantica/static/assets/index-Ba72GzGt.jssimilarity index 99%rename from semantica/static/assets/index-BaPyswgU.jsrename to semantica/static/assets/index-Ba72GzGt.jsindex 03669872..cf75ce30 100644--- a/semantica/static/assets/index-BaPyswgU.js+++ b/semantica/static/assets/index-Ba72GzGt.js@@ -1,4 +1,4 @@-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DecisionWorkspace-CktNCxAs.js","assets/jsx-runtime-B3dmMxJS.js","assets/DiffMergeWorkspace-DPjvufaw.js","assets/GraphWorkspace-G8ODR8eq.js","assets/useQuery-DY70wuIi.js","assets/query-vnlTpYnf.js","assets/GraphWorkspace-5-TIXSrZ.css","assets/ImportExportWorkspace-DkIJ7P4B.js","assets/es-BlaQ22nu.js","assets/LineageDiagram-ConWITgS.js","assets/shim-s-9Axq3H.js","assets/LineageDiagram-CHpVij2M.css","assets/ReasoningWorkspace-IX_GWHR8.js","assets/SparqlWorkspace-BBCNRJ1t.js","assets/VocabularyWorkspace-Bwqfb1tG.js"])))=>i.map(i=>d[i]);+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DecisionWorkspace-mGJIv1Kf.js","assets/jsx-runtime-B3dmMxJS.js","assets/DiffMergeWorkspace-QlDjz0gB.js","assets/GraphWorkspace-ByOhZMi1.js","assets/useQuery-BCnvbVXe.js","assets/query-vnlTpYnf.js","assets/GraphWorkspace-5-TIXSrZ.css","assets/ImportExportWorkspace-416NEz-m.js","assets/es-BuB2EIkJ.js","assets/LineageDiagram-Ya8919Yq.js","assets/shim-s-9Axq3H.js","assets/LineageDiagram-CHpVij2M.css","assets/ReasoningWorkspace-Rq0mhU8j.js","assets/SparqlWorkspace-BBCNRJ1t.js","assets/VocabularyWorkspace-B6-y7wgc.js"])))=>i.map(i=>d[i]);import{n as e,o as t,r as n,t as r}from"./jsx-runtime-B3dmMxJS.js";import{A as i,C as a,E as o,_ as s,a as c,b as l,d as u,f as d,h as f,i as p,k as m,l as h,m as g,o as _,p as v,r as y,t as b,u as x,v as ee,y as te}from"./query-vnlTpYnf.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ne=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,oe());else{var t=n(l);t!==null&&le(x,t.startTime-e)}}var ee=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,ee){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():ee=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,le(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),re=n(((e,t)=>{t.exports=ne()})),ie=n((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},t.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},t.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},t.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},t.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},t.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},t.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},t.useFormStatus=function(){return c.H.useHostTransitionStatus()},t.version=`19.2.4`})),ae=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ie()})),oe=n((t=>{var n=re(),r=e(),i=ae();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,S=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function w(e){return{current:e}}function T(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function E(e,t){ge++,he[ge]=e.current,e.current=t}var _e=w(null),ve=w(null),ye=w(null),be=w(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(_e),E(_e,e)}function Se(){T(_e),T(ve),T(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Hd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function we(e){ve.current===e&&(T(_e),T(ve)),be.current===e&&(T(be),Qf._currentValue=me)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return``+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`@@ -7,7 +7,7 @@ import{n as e,o as t,r as n,t as r}from"./jsx-runtime-B3dmMxJS.js";import{A as i`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`Error generating stack: `+e.message+``+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=n.unstable_scheduleCallback,Pe=n.unstable_cancelCallback,Fe=n.unstable_shouldYield,Ie=n.unstable_requestPaint,Le=n.unstable_now,Re=n.unstable_getCurrentPriorityLevel,ze=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,Ve=n.unstable_NormalPriority,He=n.unstable_LowPriority,Ue=n.unstable_IdlePriority,We=n.log,Ge=n.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function nt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function rt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ot(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function st(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ye(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ut(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function dt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ft(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function mt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ht(){var e=C.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function gt(e,t){var n=C.p;try{return C.p=e,t()}finally{C.p=n}}var _t=Math.random().toString(36).slice(2),vt=`__reactFiber$`+_t,yt=`__reactProps$`+_t,bt=`__reactContainer$`+_t,xt=`__reactEvents$`+_t,St=`__reactListeners$`+_t,Ct=`__reactHandles$`+_t,wt=`__reactResources$`+_t,Tt=`__reactMarker$`+_t;function Et(e){delete e[vt],delete e[yt],delete e[xt],delete e[St],delete e[Ct]}function Dt(e){var t=e[vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bt]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[vt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Ot(e){if(e=e[vt]||e[bt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function At(e){var t=e[wt];return t||=e[wt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function D(e){e[Tt]=!0}var jt=new Set,Mt={};function Nt(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Mt[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return Me.call(Lt,e)?!0:Me.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}function zt(e,t,n){if(Rt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ht(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gt(e){if(!e._valueTracker){var t=Ut(e)?`checked`:`value`;e._valueTracker=Wt(e,t,``+e[t])}}function Kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ut(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function qt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Jt=/[\n"\\]/g;function Yt(e){return e.replace(Jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Xt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ht(t)):e.value!==``+Ht(t)&&(e.value=``+Ht(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Qt(e,o,Ht(n)):Qt(e,o,Ht(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ht(s):e.removeAttribute(`name`)}function Zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Gt(e);return}n=n==null?``:``+Ht(n),t=t==null?n:``+Ht(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Gt(e)}function Qt(e,t,n){t===`number`&&qt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function $t(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function en(e,t,n){if(t!=null&&(t=``+Ht(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ht(n)}function tn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(pe(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ht(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Gt(e)}function nn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function an(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||rn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function on(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&an(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&an(e,o,t[o])}function sn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var cn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function un(e){return ln.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function dn(){}var fn=null;function pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mn=null,hn=null;function gn(e){var t=Ot(e);if(t&&(e=t.stateNode)){var n=e[yt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Yt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[yt]||null;if(!i)throw Error(a(90));Xt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Kt(r)}break a;case`textarea`:en(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}}}var _n=!1;function vn(e,t,n){if(_n)return e(t,n);_n=!0;try{return e(t)}finally{if(_n=!1,(mn!==null||hn!==null)&&(bu(),mn&&(t=mn,e=hn,hn=mn=null,gn(t),e)))for(t=0;t<e.length;t++)gn(e[t])}}function yn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[yt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var bn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,`passive`,{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var Cn=null,wn=null,Tn=null;function En(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Tn=i.slice(e,1<r?1-r:void 0)}function Dn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function On(){return!0}function kn(){return!1}function An(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?On:kn,this.isPropagationStopped=kn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=On)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=On)},persist:function(){},isPersistent:On}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=An(jn),Nn=p({},jn,{view:0,detail:0}),Pn=An(Nn),Fn,In,Ln,Rn=p({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Ln&&(Ln&&e.type===`mousemove`?(Fn=e.screenX-Ln.screenX,In=e.screenY-Ln.screenY):In=Fn=0,Ln=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:In}}),zn=An(Rn),Bn=An(p({},Rn,{dataTransfer:0})),Vn=An(p({},Nn,{relatedTarget:0})),Hn=An(p({},jn,{animationName:0,elapsedTime:0,pseudoElement:0})),Un=An(p({},jn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Wn=An(p({},jn,{data:0})),Gn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Kn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qn[e])?!!t[e]:!1}function Yn(){return Jn}var Xn=An(p({},Nn,{key:function(e){if(e.key){var t=Gn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yn,charCode:function(e){return e.type===`keypress`?Dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Zn=An(p({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Qn=An(p({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yn})),$n=An(p({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0})),er=An(p({},Rn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),tr=An(p({},jn,{newState:0,oldState:0})),nr=[9,13,27,32],rr=bn&&`CompositionEvent`in window,ir=null;bn&&`documentMode`in document&&(ir=document.documentMode);var ar=bn&&`TextEvent`in window&&!ir,or=bn&&(!rr||ir&&8<ir&&11>=ir),sr=` `,cr=!1;function lr(e,t){switch(e){case`keyup`:return nr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ur(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var dr=!1;function fr(e,t){switch(e){case`compositionend`:return ur(t);case`keypress`:return t.which===32?(cr=!0,sr):null;case`textInput`:return e=t.data,e===sr&&cr?null:e;default:return null}}function pr(e,t){if(dr)return e===`compositionend`||!rr&&lr(e,t)?(e=En(),Tn=wn=Cn=null,dr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return or&&t.locale!==`ko`?null:t.data;default:return null}}var mr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!mr[e.type]:t===`textarea`}function gr(e,t,n,r){mn?hn?hn.push(r):hn=[r]:mn=r,t=Ed(t,`onChange`),0<t.length&&(n=new Mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var _r=null,vr=null;function yr(e){yd(e,0)}function br(e){if(Kt(kt(e)))return e}function xr(e,t){if(e===`change`)return t}var Sr=!1;if(bn){var Cr;if(bn){var wr=`oninput`in document;if(!wr){var Tr=document.createElement(`div`);Tr.setAttribute(`oninput`,`return;`),wr=typeof Tr.oninput==`function`}Cr=wr}else Cr=!1;Sr=Cr&&(!document.documentMode||9<document.documentMode)}function Er(){_r&&(_r.detachEvent(`onpropertychange`,Dr),vr=_r=null)}function Dr(e){if(e.propertyName===`value`&&br(vr)){var t=[];gr(t,vr,e,pn(e)),vn(yr,t)}}function Or(e,t,n){e===`focusin`?(Er(),_r=t,vr=n,_r.attachEvent(`onpropertychange`,Dr)):e===`focusout`&&Er()}function kr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return br(vr)}function Ar(e,t){if(e===`click`)return br(t)}function jr(e,t){if(e===`input`||e===`change`)return br(t)}function Mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Nr=typeof Object.is==`function`?Object.is:Mr;function Pr(e,t){if(Nr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Me.call(t,i)||!Nr(e[i],t[i]))return!1}return!0}function Fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ir(e,t){var n=Fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Fr(n)}}function Lr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qt(e.document)}return t}function zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Br=bn&&`documentMode`in document&&11>=document.documentMode,Vr=null,Hr=null,Ur=null,Wr=!1;function Gr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wr||Vr==null||Vr!==qt(r)||(r=Vr,`selectionStart`in r&&zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ur&&Pr(Ur,r)||(Ur=r,r=Ed(Hr,`onSelect`),0<r.length&&(t=new Mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Vr)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var qr={animationend:Kr(`Animation`,`AnimationEnd`),animationiteration:Kr(`Animation`,`AnimationIteration`),animationstart:Kr(`Animation`,`AnimationStart`),transitionrun:Kr(`Transition`,`TransitionRun`),transitionstart:Kr(`Transition`,`TransitionStart`),transitioncancel:Kr(`Transition`,`TransitionCancel`),transitionend:Kr(`Transition`,`TransitionEnd`)},Jr={},Yr={};bn&&(Yr=document.createElement(`div`).style,`AnimationEvent`in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),`TransitionEvent`in window||delete qr.transitionend.transition);function Xr(e){if(Jr[e])return Jr[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yr)return Jr[e]=t[n];return e}var Zr=Xr(`animationend`),Qr=Xr(`animationiteration`),$r=Xr(`animationstart`),ei=Xr(`transitionrun`),ti=Xr(`transitionstart`),ni=Xr(`transitioncancel`),ri=Xr(`transitionend`),ii=new Map,ai=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ai.push(`scrollEnd`);function oi(e,t){ii.set(e,t),Nt(t,[e])}var si=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ci=[],li=0,ui=0;function di(){for(var e=li,t=ui=li=0;t<e;){var n=ci[t];ci[t++]=null;var r=ci[t];ci[t++]=null;var i=ci[t];ci[t++]=null;var a=ci[t];if(ci[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&hi(n,i,a)}}function fi(e,t,n,r){ci[li++]=e,ci[li++]=t,ci[li++]=n,ci[li++]=r,ui|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function pi(e,t,n,r){return fi(e,t,n,r),gi(e)}function mi(e,t){return fi(e,null,null,t),gi(e)}function hi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function gi(e){if(50<du)throw du=0,fu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _i={};function vi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(e,t,n,r){return new vi(e,t,n,r)}function bi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xi(e,t){var n=e.alternate;return n===null?(n=yi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Si(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ci(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)bi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=yi(31,n,t,i),e.elementType=se,e.lanes=o,e;case _:return wi(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=yi(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case te:return e=yi(13,n,t,i),e.elementType=te,e.lanes=o,e;case ne:return e=yi(19,n,t,i),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case ee:s=11;break a;case ie:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=yi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function wi(e,t,n,r){return e=yi(7,e,r,t),e.lanes=n,e}function Ti(e,t,n){return e=yi(6,e,null,t),e.lanes=n,e}function Ei(e){var t=yi(18,null,null,0);return t.stateNode=e,t}function Di(e,t,n){return t=yi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oi=new WeakMap;function ki(e,t){if(typeof e==`object`&&e){var n=Oi.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Oi.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Ai=[],ji=0,Mi=null,Ni=0,Pi=[],Fi=0,Ii=null,Li=1,Ri=``;function zi(e,t){Ai[ji++]=Ni,Ai[ji++]=Mi,Mi=e,Ni=t}function Bi(e,t,n){Pi[Fi++]=Li,Pi[Fi++]=Ri,Pi[Fi++]=Ii,Ii=e;var r=Li;e=Ri;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Li=1<<32-Ye(t)+i|n<<i|r,Ri=a+e}else Li=1<<a|n<<i|r,Ri=e}function Vi(e){e.return!==null&&(zi(e,1),Bi(e,1,0))}function Hi(e){for(;e===Mi;)Mi=Ai[--ji],Ai[ji]=null,Ni=Ai[--ji],Ai[ji]=null;for(;e===Ii;)Ii=Pi[--Fi],Pi[Fi]=null,Ri=Pi[--Fi],Pi[Fi]=null,Li=Pi[--Fi],Pi[Fi]=null}function Ui(e,t){Pi[Fi++]=Li,Pi[Fi++]=Ri,Pi[Fi++]=Ii,Li=t.id,Ri=t.overflow,Ii=e}var O=null,k=null,A=!1,Wi=null,Gi=!1,Ki=Error(a(519));function qi(e){throw $i(ki(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ki}function Ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[vt]=e,t[yt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),tn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||qi(e,!0)}function Yi(e){for(O=e.return;O;)switch(O.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:O=O.return}}function Xi(e){if(e!==O)return!1;if(!A)return Yi(e),A=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&k&&qi(e),Yi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));k=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));k=uf(e)}else t===27?(t=k,Zd(e.type)?(e=lf,lf=null,k=e):k=t):k=O?cf(e.stateNode.nextSibling):null;return!0}function Zi(){k=O=null,A=!1}function Qi(){var e=Wi;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Wi=null),e}function $i(e){Wi===null?Wi=[e]:Wi.push(e)}var ea=w(null),ta=null,na=null;function ra(e,t,n){E(ea,t._currentValue),t._currentValue=n}function ia(e){e._currentValue=ea.current,T(ea)}function aa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function oa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),aa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),aa(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function sa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Nr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===be.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&oa(t,e,n,r),t.flags|=262144}function ca(e){for(e=e.firstContext;e!==null;){if(!Nr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ta=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function j(e){return da(ta,e)}function ua(e,t){return ta===null&&la(e),da(e,t)}function da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(a(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},pa=n.unstable_scheduleCallback,ma=n.unstable_NormalPriority,M={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ha(){return{controller:new fa,data:new Map,refCount:0}}function ga(e){e.refCount--,e.refCount===0&&pa(ma,function(){e.controller.abort()})}var _a=null,va=0,ya=0,ba=null;function xa(e,t){if(_a===null){var n=_a=[];va=0,ya=dd(),ba={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return va++,t.then(Sa,Sa),t}function Sa(){if(--va===0&&_a!==null){ba!==null&&(ba.status=`fulfilled`);var e=_a;_a=null,ya=0,ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var wa=S.S;S.S=function(e,t){tu=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&xa(e,t),wa!==null&&wa(e,t)};var Ta=w(null);function Ea(){var e=Ta.current;return e===null?G.pooledCache:e}function Da(e,t){t===null?E(Ta,Ta.current):E(Ta,t.pool)}function Oa(){var e=Ea();return e===null?null:{parent:M._currentValue,pool:e}}var ka=Error(a(460)),Aa=Error(a(474)),ja=Error(a(542)),Ma={then:function(){}};function Na(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Pa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dn,dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e;default:if(typeof t.status==`string`)t.then(dn,dn);else{if(e=G,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e}throw Ia=t,ka}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ia=e,ka):e}}var Ia=null;function La(){if(Ia===null)throw Error(a(459));var e=Ia;return Ia=null,e}function Ra(e){if(e===ka||e===ja)throw Error(a(483))}var za=null,Ba=0;function Va(e){var t=Ba;return Ba+=1,za===null&&(za=[]),Pa(za,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ua(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=xi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ti(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===oe&&Fa(a)===t.type)?(t=i(t,n.props),Ha(t,n),t.return=e,t):(t=Ci(n.type,n.key,n.props,null,e.mode,r),Ha(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Di(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=wi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ti(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ci(t.type,t.key,t.props,null,e.mode,n),Ha(n,t),n.return=e,n;case g:return t=Di(t,e.mode,n),t.return=e,t;case oe:return t=Fa(t),f(e,t,n)}if(pe(t)||ue(t))return t=wi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Va(t),n);if(t.$$typeof===x)return f(e,ua(e,t),n);Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Fa(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Va(n),r);if(n.$$typeof===x)return p(e,t,ua(e,n),r);Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Fa(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Va(r),i);if(r.$$typeof===x)return m(e,t,n,ua(t,r),i);Ua(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),A&&zi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return A&&zi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),A&&zi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),A&&zi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return A&&zi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),A&&zi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Fa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ha(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=wi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ci(o.type,o.key,o.props,null,e.mode,c),Ha(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Di(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Fa(o),b(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Va(o),c);if(o.$$typeof===x)return b(e,r,ua(e,o),c);Ua(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Ti(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ba=0;var i=b(e,t,n,r);return za=null,i}catch(t){if(t===ka||t===ja)throw t;var a=yi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ga=Wa(!0),Ka=Wa(!1),qa=!1;function Ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ya(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=gi(e),hi(e,null,n),t}return fi(e,r,t,n),gi(e)}function Qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var eo=!1;function to(){if(eo){var e=ba;if(e!==null)throw e}}function no(e,t,n,r){eo=!1;var i=e.updateQueue;qa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(q&f)===f:(r&f)===f){f!==0&&f===ya&&(eo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:qa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function ro(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function io(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ro(n[e],t)}var ao=w(null),oo=w(0);function so(e,t){e=Gl,E(oo,e),E(ao,t),Gl=e|t.baseLanes}function co(){E(oo,Gl),E(ao,ao.current)}function lo(){Gl=oo.current,T(ao),T(oo)}var uo=w(null),fo=null;function po(e){var t=e.alternate;E(N,N.current&1),E(uo,e),fo===null&&(t===null||ao.current!==null||t.memoizedState!==null)&&(fo=e)}function mo(e){E(N,N.current),E(uo,e),fo===null&&(fo=e)}function ho(e){e.tag===22?(E(N,N.current),E(uo,e),fo===null&&(fo=e)):go(e)}function go(){E(N,N.current),E(uo,uo.current)}function _o(e){T(uo),fo===e&&(fo=null),T(N)}var N=w(0);function vo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yo=0,P=null,F=null,I=null,bo=!1,xo=!1,So=!1,Co=0,wo=0,To=null,Eo=0;function L(){throw Error(a(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nr(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return yo=a,P=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?Ws:Gs,So=!1,a=n(r,i),So=!1,xo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){S.H=Us;var t=F!==null&&F.next!==null;if(yo=0,I=F=P=null,bo=!1,wo=0,To=null,t)throw Error(a(300));e===null||z||(e=e.dependencies,e!==null&&ca(e)&&(z=!0))}function Ao(e,t,n,r){P=e;var i=0;do{if(xo&&(To=null),wo=0,xo=!1,25<=i)throw Error(a(301));if(i+=1,I=F=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}S.H=Ks,o=t(n,r)}while(xo);return o}function jo(){var e=S.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(F===null?null:F.memoizedState)!==e&&(P.flags|=1024),t}function Mo(){var e=Co!==0;return Co=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bo=!1}yo=0,I=F=P=null,xo=!1,wo=Co=0,To=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return I===null?P.memoizedState=I=e:I=I.next=e,I}function R(){if(F===null){var e=P.alternate;e=e===null?null:e.memoizedState}else e=F.next;var t=I===null?P.memoizedState:I.next;if(t!==null)I=t,F=e;else{if(e===null)throw P.alternate===null?Error(a(467)):Error(a(310));F=e,e={memoizedState:F.memoizedState,baseState:F.baseState,baseQueue:F.baseQueue,queue:F.queue,next:null},I===null?P.memoizedState=I=e:I=I.next=e}return I}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=wo;return wo+=1,To===null&&(To=[]),e=Pa(To,e,t),t=P,(I===null?t.memoizedState:I.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===x)return j(e)}throw Error(a(438,String(e)))}function zo(e){var t=null,n=P.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=P.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),P.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(R(),F,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(yo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ya&&(d=!0);else if((yo&p)===p){u=u.next,p===ya&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,P.lanes|=p,Kl|=p;f=u.action,So&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,P.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Nr(o,e.memoizedState)&&(z=!0,d&&(n=ba,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=R(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Nr(o,t.memoizedState)||(z=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=P,i=R(),o=A;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Nr((F||i).memoizedState,n);if(s&&(i.memoizedState=n,z=!0),i=i.queue,hs(qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||I!==null&&I.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,i,n,t),null),G===null)throw Error(a(349));o||yo&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=P.updateQueue,t===null?(t=Io(),P.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nr(e,n)}catch{return!0}}function Yo(e){var t=mi(e,2);t!==null&&hu(t,e,2)}function Xo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),So){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,F,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,i){if(Bs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};S.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=S.T,o={};S.T=o;try{var s=n(i,r),c=S.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),S.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(A){var n=G.formState;if(n!==null){a:{var r=P;if(A){if(k){b:{for(var i=k,a=Gi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){k=cf(i.nextSibling),r=i.data===`F!`;break a}}qi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,P,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,P,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,P,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(R(),F,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===ka?ja:e}else r=t;t=R();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(P.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=R(),n=F;if(n!==null)return ss(t,n,e);R(),t=t.memoizedState,n=R();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=P.updateQueue,t===null&&(t=Io(),P.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ds(){return R().memoizedState}function fs(e,t,n,r){var i=Fo();P.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=R();r=r===void 0?null:r;var a=i.memoizedState.inst;F!==null&&r!==null&&Do(r,F.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(P.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){P.flags|=4;var t=P.updateQueue;if(t===null)t=Io(),P.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=R().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(W&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),So){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||yo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),P.lanes|=e,Kl|=e,n)}function Es(e,t,n,r){return Nr(n,t)?n:ao.current===null?!(yo&42)||yo&1073741824&&!(q&261930)?(z=!0,e.memoizedState=n):(e=mu(),P.lanes|=e,Kl|=e,t):(e=Ts(e,n,r),Nr(e,t)||(z=!0),e)}function Ds(e,t,n,r,i){var a=C.p;C.p=a!==0&&8>a?a:8;var o=S.T,s={};S.T=s,zs(e,!1,t,n);try{var c=i(),l=S.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,Ca(c,r),pu(e)):Rs(e,t,r,pu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{C.p=a,o!==null&&s.types!==null&&(o.types=s.types),S.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=As(e).queue;Ds(e,i,t,me,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},pu())}function Ms(){return j(Qf)}function Ns(){return R().memoizedState}function Ps(){return R().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Xa(n);var r=Za(t,e,n);r!==null&&(hu(r,t,n),Qa(r,t,n)),t={cache:ha()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=pi(e,t,n,r),n!==null&&(hu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,pu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Nr(s,o))return fi(e,t,i,0),G===null&&di(),!1}catch{}if(n=pi(e,t,i,r),n!==null)return hu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(a(479))}else t=pi(e,n,r,2),t!==null&&hu(t,e,2)}function Bs(e){var t=e.alternate;return e===P||t!==null&&t===P}function Vs(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}var Us={readContext:j,use:Ro,useCallback:L,useContext:L,useEffect:L,useImperativeHandle:L,useLayoutEffect:L,useInsertionEffect:L,useMemo:L,useReducer:L,useRef:L,useState:L,useDebugValue:L,useDeferredValue:L,useTransition:L,useSyncExternalStore:L,useId:L,useHostTransitionStatus:L,useFormState:L,useActionState:L,useOptimistic:L,useMemoCache:L,useCacheRefresh:L};Us.useEffectEvent=L;var Ws={readContext:j,use:Ro,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:j,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(So){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(So){Je(!0);try{n(t)}finally{Je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,P,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,P,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Fo(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,P,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=P,i=Fo();if(A){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),G===null)throw Error(a(349));q&127||Go(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=G.identifierPrefix;if(A){var n=Ri,r=Li;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Eo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,P,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Fo().memoizedState=Fs.bind(null,P)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:j,use:Ro,useCallback:Cs,useContext:j,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(R(),F.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(R(),F,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:j,use:Ro,useCallback:Cs,useContext:j,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=R();return F===null?Ts(n,e,t):Es(n,F.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=R();return F===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,F,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Xa(r);i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(hu(t,e,r),Qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Xa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(hu(t,e,r),Qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Xa(n);r.tag=2,t!=null&&(r.callback=t),t=Za(e,r,n),t!==null&&(hu(t,e,n),Qa(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Pr(n,r)||!Pr(i,a):!0}function Xs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){si(e)}function $s(e){console.error(e)}function ec(e){si(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Xa(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Xa(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&sa(t,n,i,!0),n=uo.current,n!==null){switch(n.tag){case 31:case 13:return fo===null?Du():n.alternate===null&&Y===0&&(Y=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Du(),!1}if(A)return t=uo.current,t===null?(r!==Ki&&(t=Error(a(423),{cause:r}),$i(ki(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ki(r,n),i=rc(e.stateNode,r,i),$a(e,i),Y!==4&&(Y=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ki&&(e=Error(a(422),{cause:r}),$i(ki(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=ki(o,n),Zl===null?Zl=[o]:Zl.push(o),Y!==4&&(Y=2),t===null)return!0;r=ki(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=rc(n.stateNode,r,e),$a(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ic(i),ac(i,e,n,r),$a(n,i),!1}n=n.return}while(n!==null);return!1}var sc=Error(a(461)),z=!1;function cc(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return la(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!z?(No(e,t,i),Nc(e,t,i)):(A&&s&&Vi(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!bi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=Ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Pr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=xi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Pr(a,r)&&e.ref===t.ref)if(z=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(z=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Da(t,a===null?null:a.cachePool),a===null?co():so(t,a),ho(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Da(t,null),co(),go(t)):(Da(t,a.cachePool),so(t,a),go(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=Ea();return a=a===null?null:{parent:M._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Da(t,null),co(),ho(t),e!==null&&sa(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ga(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,_o(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(A){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(mo(t),(e=k)?(e=rf(e,Gi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ii===null?null:{id:Li,overflow:Ri},retryLane:536870912,hydrationErrors:null},n=Ei(e),n.return=t,t.child=n,O=t,k=null)):e=null,e===null)throw qi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(mo(t),i)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(z||sa(e,t,n,!1),i=(n&e.childLanes)!==0,z||i){if(r=G,r!==null&&(s=ft(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,mi(e,s),hu(r,e,s),sc;Du(),t=gc(e,t,n)}else e=o.treeContext,k=cf(s.nextSibling),O=t,A=!0,Wi=null,Gi=!1,e!==null&&Ui(t,e),t=hc(t,r),t.flags|=4096;return t}return e=xi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return la(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!z?(No(e,t,i),Nc(e,t,i)):(A&&r&&Vi(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return la(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!z?(No(e,t,a),Nc(e,t,a)):(A&&r&&Vi(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(la(t),t.stateNode===null){var a=_i,o=n.contextType;typeof o==`object`&&o&&(a=j(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ja(t),o=n.contextType,a.context=typeof o==`object`&&o?j(o):_i,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),no(t,r,a,i),to(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=_i,typeof u==`object`&&u&&(o=j(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),qa=!1;var f=t.memoizedState;a.state=f,no(t,r,a,i),to(),l=t.memoizedState,s||f!==l||qa?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=qa||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ya(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=_i,typeof l==`object`&&l&&(c=j(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),qa=!1,f=t.memoizedState,a.state=f,no(t,r,a,i),to();var p=t.memoizedState;o!==d||f!==p||qa||e!==null&&e.dependencies!==null&&ca(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=qa||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ca(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ga(t,e.child,null,i),t.child=Ga(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Zi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Oa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function Ec(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(N.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(A){if(i?po(t):go(t),(e=k)?(e=rf(e,Gi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ii===null?null:{id:Li,overflow:Ri},retryLane:536870912,hydrationErrors:null},n=Ei(e),n.return=t,t.child=n,O=t,k=null)):e=null,e===null)throw qi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(go(t),i=t.mode,c=Oc({mode:`hidden`,children:c},i),r=wi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(po(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(po(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(go(t),c=r.fallback,i=t.mode,r=Oc({mode:`visible`,children:r.children},i),c=wi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ga(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(go(t),t.child=e.child,t.flags|=128,t=null);else if(po(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,$i({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(z||sa(e,t,n,!1),s=(n&e.childLanes)!==0,z||s){if(s=G,s!==null&&(r=ft(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,mi(e,r),hu(s,e,r),sc;af(c)||Du(),t=kc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,k=cf(c.nextSibling),O=t,A=!0,Wi=null,Gi=!1,e!==null&&Ui(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return i?(go(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=xi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=wi(c,i,n,null),c.flags|=2):c=xi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(i=c.cachePool,i===null?i=Oa():(l=M._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(po(t),n=e.child,e=n.sibling,n=xi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=yi(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ga(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),aa(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=N.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,E(N,o),cc(e,t,r,n),r=A?Ni:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&vo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&vo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(sa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=xi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ca(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ra(t,M,e.memoizedState.cache),Zi();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(po(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(po(t),t.flags|=128,null);po(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(sa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),E(N,N.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:ra(t,M,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)z=!0;else{if(!Pc(e,n)&&!(t.flags&128))return z=!1,Fc(e,t,n);z=!!(e.flags&131072)}else z=!1,A&&t.flags&1048576&&Bi(t,Ni,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e==`function`)bi(e)?(r=Zs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=lc(null,t,e,r,n);break a}else if(i===ie){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(a(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Zs(r,t.pendingProps),xc(e,t,r,i,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ya(e,t),no(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ra(t,M,r),r!==o.cache&&oa(t,[M],n,!0),to(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==i){i=ki(Error(a(424)),t),$i(i),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(k=cf(e.firstChild),O=t,A=!0,Wi=null,Gi=!0,n=Ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Zi(),r===i){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:A||(n=t.type,e=t.pendingProps,r=Bd(ye.current).createElement(n),r[vt]=t,r[yt]=e,Pd(r,n,e),D(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&A&&(r=t.stateNode=ff(t.type,t.pendingProps,ye.current),O=t,Gi=!0,i=k,Zd(t.type)?(lf=i,k=cf(r.firstChild)):k=i),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&A&&((i=r=k)&&(r=tf(r,t.type,t.pendingProps,Gi),r===null?i=!1:(t.stateNode=r,O=t,k=cf(r.firstChild),Gi=!1,i=!0)),i||qi(t)),Ce(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Oo(e,t,jo,null,null,n),Qf._currentValue=i),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&A&&((e=n=k)&&(n=nf(n,t.pendingProps,Gi),n===null?e=!1:(t.stateNode=n,O=t,k=null,e=!0)),e||qi(t)),null;case 13:return Ec(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ra(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,la(t),i=j(i),r=r(i),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return la(t),r=j(M),e===null?(i=Ea(),i===null&&(i=G,o=ha(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ja(t),ra(t,M,i)):((e.lanes&n)!==0&&(Ya(e,t),no(t,null,null,n),to()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,ra(t,M,r),r!==i.cache&&oa(t,[M],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ra(t,M,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ia=Ma,Aa}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ia=Ma,Aa}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ot(),e.lanes|=t,Xl|=t)}function Vc(e,t){if(!A)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function B(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hc(e,t,n){var r=t.pendingProps;switch(Hi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ia(M),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qi())),B(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,i,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,i,e,r,n)),null;case 27:if(we(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return B(t),null}e=_e.current,Xi(t)?Ji(t,e):(e=ff(i,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return B(t),null}if(o=_e.current,Xi(t))Ji(t,o);else{var s=Bd(ye.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[vt]=t,o[yt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ye.current,Xi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=O,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||qi(t,!0)}else e=Bd(e).createTextNode(r),e[vt]=t,t.stateNode=e}return B(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Xi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[vt]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_o(t),t):(_o(t),null);if(t.flags&128)throw Error(a(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[vt]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),i=!1}else i=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(_o(t),t):(_o(t),null)}return _o(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return Se(),e===null&&Sd(t.stateNode.containerInfo),B(t),null;case 10:return ia(t.type),B(t),null;case 19:if(T(N),r=t.memoizedState,r===null)return B(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Vc(r,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=vo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Si(n,e),n=n.sibling;return E(N,N.current&1|2),A&&zi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>nu&&(t.flags|=128,i=!0,Vc(r,!1),t.lanes=4194304)}else{if(!i)if(e=vo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!A)return B(t),null}else 2*Le()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,n=N.current,E(N,i?n&1|2:n&1),A&&zi(t,r.treeForkCount),e);case 22:case 23:return _o(t),lo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&T(Ta),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ia(M),B(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Uc(e,t){switch(Hi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(M),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(_o(t),t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_o(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return T(N),null;case 4:return Se(),null;case 10:return ia(t.type),null;case 22:case 23:return _o(t),lo(),e!==null&&T(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(M),null;case 25:return null;default:return null}}function Wc(e,t){switch(Hi(t),t.tag){case 3:ia(M),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&_o(t);break;case 13:_o(t);break;case 19:T(N);break;case 10:ia(t.type);break;case 22:case 23:_o(t),lo(),e!==null&&T(Ta);break;case 24:ia(M)}}function Gc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Kc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{io(t,n)}catch(t){Z(e,e.return,t)}}}function Jc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Yc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[yt]=t}catch(t){Z(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[vt]=e,t[yt]=n}catch(t){Z(e,e.return,t)}}var il=!1,V=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,H=null;function sl(e,t){if(e=e.containerInfo,Rd=sp,e=Rr(e),zr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){switch(t=H,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Gc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{io(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||V,i=il;var a=V;il=r,(V=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),il=i,V=a}break;case 30:break;default:Sl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Et(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var U=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:V||Xc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:V||Xc(n,t);var r=U,i=ul;Zd(n.type)&&(U=n.stateNode,ul=!1),dl(e,t,n),pf(n.stateNode),U=r,ul=i;break;case 5:V||Xc(n,t);case 6:if(r=U,i=ul,U=null,dl(e,t,n),U=r,ul=i,U!==null)if(ul)try{(U.nodeType===9?U.body:U.nodeName===`HTML`?U.ownerDocument.body:U).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{U.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:U!==null&&(ul?(e=U,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(U,n.stateNode));break;case 4:r=U,i=ul,U=n.stateNode.containerInfo,ul=!0,dl(e,t,n),U=r,ul=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),V||Kc(4,n,t),dl(e,t,n);break;case 1:V||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:V=(r=V)||n.memoizedState!==null,dl(e,t,n),V=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(a(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){U=c.stateNode,ul=!1;break a}break;case 5:U=c.stateNode,ul=!1;break a;case 3:case 4:U=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(U===null)throw Error(a(160));fl(o,s,i),U=null,ul=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),r&64&&il&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=vl;if(_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[Tt]||o[vt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[vt]=e,D(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[vt]=e,D(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),e.flags&32){i=e.stateNode;try{nn(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=vl,vl=gf(t.containerInfo),_l(t,e),vl=i,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}al&&(al=!1,xl(e));break;case 4:r=vl,vl=gf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=Le()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=V;if(il=u||i,V=d||l,_l(t,e),V=d,il=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||il||V||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;nl(e,el(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(nn(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),Cl(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),Cl(t);break;case 27:pf(t.stateNode);case 26:case 5:Xc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Gc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)ro(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Yc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ga(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Gf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=gf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];H=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];H=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;H!==null;){var n=H;switch(n.tag){case 0:case 11:case 15:Kc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ga(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,H=r;else a:for(n=e;H!==null;){r=H;var i=r.sibling,a=r.return;if(ll(r),r===n){H=null;break a}if(i!==null){i.return=a,H=i;break a}H=a}}}var zl={getCacheForType:function(e){var t=j(M),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return j(M).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,W=0,G=null,K=null,q=0,J=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Y=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,X=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return W&2&&q!==0?q&-q:S.T===null?ht():dd()}function mu(){if(Yl===0)if(!(q&536870912)||A){var e=et;et<<=1,!(et&3932160)&&(et=262144),Yl=e}else Yl=536870912;return e=uo.current,e!==null&&(e.flags|=32),Yl}function hu(e,t,n){(e===G&&(J===2||J===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,q,Yl,!1)),ct(e,n),(!(W&2)||e!==G)&&(e===G&&(!(W&2)&&(ql|=n),Y===4&&yu(e,q,Yl,!1)),rd(e))}function gu(e,t,n){if(W&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||it(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Ul&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,i=4;break a}o=Ql,Ql=i,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Yl,!Hl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=eu+300-Le(),10<i)){if(yu(r,t,Yl,!Hl),rt(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Hl,o,`Throttled`,-0,0),i);break a}_u(r,n,Ql,ru,$l,t,Yl,ql,Xl,Hl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Nl(t,a,d);var m=(a&62914560)===a?eu-Le():(a&4194048)===a?tu-Le():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Nr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ut(e,n,t)}function bu(){return W&6?!0:(id(0,!1),!1)}function xu(){if(K!==null){if(J===0)var e=K.return;else e=K,na=ta=null,Po(e),za=null,Ba=0,e=K;for(;e!==null;)Wc(e.alternate,e),e=e.return;K=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),G=e,K=n=xi(e.current,null),q=t,J=0,Vl=null,Hl=!1,Ul=it(e,t),Wl=!1,Xl=Yl=Jl=ql=Kl=Y=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ye(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,di(),n}function Cu(e,t){P=null,S.H=Us,t===ka||t===ja?(t=La(),J=3):t===Aa?(t=La(),J=4):J=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,K===null&&(Y=1,tc(e,ki(t,e.current)))}function wu(){var e=uo.current;return e===null?!0:(q&4194048)===q?fo===null:(q&62914560)===q||q&536870912?e===fo:!1}function Tu(){var e=S.H;return S.H=Us,e===null?Us:e}function Eu(){var e=S.A;return S.A=zl,e}function Du(){Y=4,Hl||(q&4194048)!==q&&uo.current!==null||(Ul=!0),!(Kl&134217727)&&!(ql&134217727)||G===null||yu(G,q,Yl,!1)}function Ou(e,t,n){var r=W;W|=2;var i=Tu(),a=Eu();(G!==e||q!==t)&&(ru=null,Su(e,t)),t=!1;var o=Y;a:do try{if(J!==0&&K!==null){var s=K,c=Vl;switch(J){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:uo.current===null&&(t=!0);var l=J;if(J=0,Vl=null,Pu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=J,J=0,Vl=null,Pu(e,s,c,l)}}ku(),o=Y;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,na=ta=null,W=r,S.H=i,S.A=a,K===null&&(G=null,q=0,di()),o}function ku(){for(;K!==null;)Mu(K)}function Au(e,t){var n=W;W|=2;var r=Tu(),i=Eu();G!==e||q!==t?(ru=null,nu=Le()+500,Su(e,t)):Ul=it(e,t);a:do try{if(J!==0&&K!==null){t=K;var o=Vl;b:switch(J){case 1:J=0,Vl=null,Pu(e,t,o,1);break;case 2:case 9:if(Na(o)){J=0,Vl=null,Nu(t);break}t=function(){J!==2&&J!==9||G!==e||(J=7),rd(e)},o.then(t,t);break a;case 3:J=7;break a;case 4:J=5;break a;case 7:Na(o)?(J=0,Vl=null,Nu(t)):(J=0,Vl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Wf(s):c.stateNode.complete){J=0,Vl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Fu(u))}break b}}J=0,Vl=null,Pu(e,t,o,5);break;case 6:J=0,Vl=null,Pu(e,t,o,6);break;case 8:xu(),Y=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return na=ta=null,S.H=r,S.A=i,W=n,K===null?(G=null,q=0,di(),Y):0}function ju(){for(;K!==null&&!Fe();)Mu(K)}function Mu(e){var t=Ic(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:Po(t);default:Wc(n,t),t=K=Si(t,Gl),t=Ic(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Pu(e,t,n,r){na=ta=null,Po(t),za=null,Ba=0;var i=t.return;try{if(oc(e,i,t,n,q)){Y=1,tc(e,ki(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;Y=1,tc(e,ki(n,e.current)),K=null;return}t.flags&32768?(A||r===1?e=!0:Ul||q&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=uo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Hl);return}e=t.return;var n=Hc(t.alternate,t,Gl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);Y===0&&(Y=5)}function Iu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);Y=6,K=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(X!==0);if(W&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ui,lt(e,n,o,s,c,l),e===G&&(K=G=null,q=0),ou=t,au=e,su=n,cu=o,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ve,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=S.T,S.T=null,i=C.p,C.p=2,s=W,W|=4;try{sl(e,t,n)}finally{W=s,C.p=i,S.T=r}}X=1,Ru(),zu(),Bu()}}function Ru(){if(X===1){X=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=W;W|=4;try{yl(t,e);var a=zd,o=Rr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Lr(s.ownerDocument.documentElement,s)){if(c!==null&&zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ir(s,h),v=Ir(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{W=i,C.p=r,S.T=n}}e.current=t,X=2}}function zu(){if(X===2){X=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=W;W|=4;try{cl(e,t.alternate,t)}finally{W=i,C.p=r,S.T=n}}X=3}}function Bu(){if(X===4||X===3){X=0,Ie();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?X=5:(X=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),mt(n),t=t.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=S.T,i=C.p,C.p=2,S.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{S.T=t,C.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ga(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(X!==5)return!1;var e=au,t=cu;cu=0;var n=mt(su),r=S.T,i=C.p;try{C.p=32>n?32:n,S.T=null,n=lu,lu=null;var o=au,s=su;if(X=0,ou=au=null,su=0,W&6)throw Error(a(331));var c=W;if(W|=4,Il(o.current),Ol(o,o.current,s,n),W=c,id(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{C.p=i,S.T=r,Vu(e,t)}}function Wu(e,t,n){t=ki(n,t),t=rc(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(ct(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=ki(n,e),n=ic(2),r=Za(t,n,2),r!==null&&(ac(n,r,t,e),ct(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Y===4||Y===3&&(q&62914560)===q&&300>Le()-eu?!(W&2)&&Su(e,0):Jl|=n,Xl===q&&(Xl=0)),rd(e)}function qu(e,t){t===0&&(t=ot()),e=mi(e,t),e!==null&&(ct(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ne(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=q,a=rt(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Le(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}X!==0&&X!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=at(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=G,n=q,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(J===2||J===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),mt(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=cd.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(X!==0&&X!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=q;return r=rt(e,e===G?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Le()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){W&6?Ne(ze,ad):od()})}function dd(){if(nd===0){var e=ya;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:un(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[yt]||null).action),o=r.submitter;o&&(t=(t=o[yt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ai.length;hd++){var gd=ai[hd];oi(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}oi(Zr,`onAnimationEnd`),oi(Qr,`onAnimationIteration`),oi($r,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ei,`onTransitionRun`),oi(ti,`onTransitionStart`),oi(ni,`onTransitionCancel`),oi(ri,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),Nt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Nt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Nt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Nt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){si(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){si(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[xt];n===void 0&&(n=t[xt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,jt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!xn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Dt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}vn(function(){var r=a,i=pn(n),o=[];a:{var c=ii.get(e);if(c!==void 0){var l=Mn,u=e;switch(e){case`keypress`:if(Dn(n)===0)break a;case`keydown`:case`keyup`:l=Xn;break;case`focusin`:u=`focus`,l=Vn;break;case`focusout`:u=`blur`,l=Vn;break;case`beforeblur`:case`afterblur`:l=Vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Qn;break;case Zr:case Qr:case $r:l=Hn;break;case ri:l=$n;break;case`scroll`:case`scrollend`:l=Pn;break;case`wheel`:l=er;break;case`copy`:case`cut`:case`paste`:l=Un;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Zn;break;case`toggle`:case`beforetoggle`:l=tr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=yn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==fn&&(u=n.relatedTarget||n.fromElement)&&(Dt(u)||u[bt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Dt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=zn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:kt(l),h=u==null?c:kt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Dt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?kt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=xr;else if(hr(c))if(Sr)v=jr;else{v=kr;var y=Or}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&sn(r.elementType)&&(v=xr):v=Ar;if(v&&=v(e,r)){gr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Qt(c,`number`,c.value)}switch(y=r?kt(r):window,e){case`focusin`:(hr(y)||y.contentEditable===`true`)&&(Vr=y,Hr=r,Ur=null);break;case`focusout`:Ur=Hr=Vr=null;break;case`mousedown`:Wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Wr=!1,Gr(o,n,i);break;case`selectionchange`:if(Br)break;case`keydown`:case`keyup`:Gr(o,n,i)}var b;if(rr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else dr?lr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(or&&n.locale!==`ko`&&(dr||x!==`onCompositionStart`?x===`onCompositionEnd`&&dr&&(b=En()):(Cn=i,wn=`value`in Cn?Cn.value:Cn.textContent,dr=!0)),y=Ed(r,x),0<y.length&&(x=new Wn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=ur(n),b!==null&&(x.data=b)))),(b=ar?fr(e,n):pr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Wn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=yn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=yn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=yn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=yn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`-`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&nn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:on(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=cn.get(n)||n,zt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:on(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&nn(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[yt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}tn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=C.d;C.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?js(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),D(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),D(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),D(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=At(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);D(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=At(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),D(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=At(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),D(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ye.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=At(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=At(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=At(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Yt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),D(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Yt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,D(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),D(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,D(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),D(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,D(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),D(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tt]||a[vt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,D(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),D(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=yi(3,null,null,t),e.current=a,a.stateNode=e,t=ha(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ja(a),e}function tp(e){return e?(e=_i,e):_i}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Xa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Za(e,r,t),n!==null&&(hu(n,e,t),Qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=mi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=pt(t);var n=mi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=2,up(e,t,n,r)}finally{C.p=a,S.T=i}}function lp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=8,up(e,t,n,r)}finally{C.p=a,S.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}rd(a),!(W&6)&&(nu=Le()+500,id(0,!1))}}break;case 31:case 13:s=mi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=pn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Dt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ot(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Dt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,gt(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,gt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Ot(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[yt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[yt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[bt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.4`)throw Error(a(527,Lp,`19.2.4`));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:S,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ke=zp.inject(Rp),qe=zp}catch{}}t.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[bt]=t.current,Sd(e),new Fp(t)}})),se=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=oe()}))(),ce=n((t=>{var n=e().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return n.H.useMemoCache(e)}})),le=n(((e,t)=>{t.exports=ce()}));function ue(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{h(e,()=>t.signal,()=>n=!0)},f=d(t.options,t.fetchOptions),p=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await f((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?u:x;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?fe:de,n={pages:a,pageParams:o};s=await p(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:de(r,s);if(c>0&&e==null)break;s=await p(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function de(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var pe=class extends y{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||S(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=p({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function S(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var C=class extends i{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new pe({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=me(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=me(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=me(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=me(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){_.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>s(t,e))}findAll(e={}){return this.getAll().filter(t=>s(e,t))}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return _.batch(()=>Promise.all(e.map(e=>e.continue().catch(te))))}};function me(e){return e.options.scope?.id}var he=class extends i{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??f(r,t),a=this.get(i);return a||(a=new b({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){_.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ee(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ee(e,t)):t}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ge=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new he,this.#t=e.mutationCache||new C,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(a(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=v(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return _.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(te).catch(te)}invalidateQueries(e,t={}){return _.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=_.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(te)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(te)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(a(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(te).catch(te)}fetchInfiniteQuery(e){return e.behavior=ue(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(te).catch(te)}ensureInfiniteQueryData(e){return e.behavior=ue(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(g(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{l(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(g(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{l(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=f(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===o&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},w=t(e(),1),T=r(),E=w.createContext(void 0),_e=e=>{let t=w.useContext(E);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ve=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,T.jsx)(E.Provider,{value:e,children:t})),ye=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),be=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),xe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Se=e=>{let t=xe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ce={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},we=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Te=(0,w.createContext)({}),Ee=()=>(0,w.useContext)(Te),De=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ee()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...Ce,width:t??l??Ce.width,height:t??l??Ce.height,stroke:e??f,strokeWidth:m,className:ye(`lucide`,p,i),...!a&&!we(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Oe=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(De,{ref:i,iconNode:t,className:ye(`lucide-${be(Se(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Se(e),n},ke=Oe(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ae=Oe(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),je=Oe(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Me=Oe(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),Ne=Oe(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Pe=le(),Fe=`modulepreload`,Ie=function(e){return`/`+e},Le={},Re=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ie(t,n),t in Le)return;Le[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Fe,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ze=(0,w.lazy)(()=>Re(()=>import(`./DecisionWorkspace-CktNCxAs.js`).then(e=>({default:e.DecisionWorkspace})),__vite__mapDeps([0,1]))),Be=(0,w.lazy)(()=>Re(()=>import(`./DiffMergeWorkspace-DPjvufaw.js`).then(e=>({default:e.DiffMergeWorkspace})),__vite__mapDeps([2,1]))),Ve=(0,w.lazy)(()=>Re(()=>import(`./GraphWorkspace-G8ODR8eq.js`).then(e=>({default:e.GraphWorkspace})),__vite__mapDeps([3,1,4,5,6]))),He=(0,w.lazy)(()=>Re(()=>import(`./ImportExportWorkspace-DkIJ7P4B.js`).then(e=>({default:e.ImportExportWorkspace})),__vite__mapDeps([7,1,8]))),Ue=(0,w.lazy)(()=>Re(()=>import(`./LineageDiagram-ConWITgS.js`).then(e=>({default:e.LineageDiagram})),__vite__mapDeps([9,1,10,11]))),We=(0,w.lazy)(()=>Re(()=>import(`./ReasoningWorkspace-IX_GWHR8.js`).then(e=>({default:e.ReasoningWorkspace})),__vite__mapDeps([12,1]))),Ge=(0,w.lazy)(()=>Re(()=>import(`./SparqlWorkspace-BBCNRJ1t.js`).then(e=>({default:e.SparqlWorkspace})),__vite__mapDeps([13,1]))),Ke=(0,w.lazy)(()=>Re(()=>import(`./VocabularyWorkspace-Bwqfb1tG.js`).then(e=>({default:e.VocabularyWorkspace})),__vite__mapDeps([14,1,5,4,8,10]))),qe=new ge,Je=[{id:`explore`,label:`Explore`,hint:`Graph and vocabulary browsing`,icon:ke},{id:`analyze`,label:`Analyze`,hint:`Query and inspect the dataset`,icon:Ae},{id:`decisions`,label:`Decisions`,hint:`Decision chains and precedent review`,icon:Me},{id:`enrich`,label:`Enrich`,hint:`Import, export, and merge workflows`,icon:je},{id:`manage`,label:`Manage`,hint:`Lineage and governance tooling`,icon:Ne}],Ye=`+`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&nn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:on(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=cn.get(n)||n,zt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:on(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&nn(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[yt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}tn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=C.d;C.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?js(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),D(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),D(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),D(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=At(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);D(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=At(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),D(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=At(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),D(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ye.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=At(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=At(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=At(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Yt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),D(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Yt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,D(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),D(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,D(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),D(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,D(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),D(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tt]||a[vt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,D(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),D(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=yi(3,null,null,t),e.current=a,a.stateNode=e,t=ha(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ja(a),e}function tp(e){return e?(e=_i,e):_i}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Xa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Za(e,r,t),n!==null&&(hu(n,e,t),Qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=mi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=pt(t);var n=mi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=2,up(e,t,n,r)}finally{C.p=a,S.T=i}}function lp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=8,up(e,t,n,r)}finally{C.p=a,S.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}rd(a),!(W&6)&&(nu=Le()+500,id(0,!1))}}break;case 31:case 13:s=mi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=pn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Dt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ot(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Dt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,gt(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,gt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Ot(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[yt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[yt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[bt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.4`)throw Error(a(527,Lp,`19.2.4`));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:S,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ke=zp.inject(Rp),qe=zp}catch{}}t.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[bt]=t.current,Sd(e),new Fp(t)}})),se=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=oe()}))(),ce=n((t=>{var n=e().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return n.H.useMemoCache(e)}})),le=n(((e,t)=>{t.exports=ce()}));function ue(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{h(e,()=>t.signal,()=>n=!0)},f=d(t.options,t.fetchOptions),p=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await f((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?u:x;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?fe:de,n={pages:a,pageParams:o};s=await p(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:de(r,s);if(c>0&&e==null)break;s=await p(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function de(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var pe=class extends y{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||S(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=p({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function S(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var C=class extends i{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new pe({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=me(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=me(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=me(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=me(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){_.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>s(t,e))}findAll(e={}){return this.getAll().filter(t=>s(e,t))}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return _.batch(()=>Promise.all(e.map(e=>e.continue().catch(te))))}};function me(e){return e.options.scope?.id}var he=class extends i{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??f(r,t),a=this.get(i);return a||(a=new b({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){_.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ee(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ee(e,t)):t}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ge=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new he,this.#t=e.mutationCache||new C,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(a(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=v(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return _.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(te).catch(te)}invalidateQueries(e,t={}){return _.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=_.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(te)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(te)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(a(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(te).catch(te)}fetchInfiniteQuery(e){return e.behavior=ue(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(te).catch(te)}ensureInfiniteQueryData(e){return e.behavior=ue(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(g(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{l(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(g(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{l(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=f(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===o&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},w=t(e(),1),T=r(),E=w.createContext(void 0),_e=e=>{let t=w.useContext(E);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ve=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,T.jsx)(E.Provider,{value:e,children:t})),ye=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),be=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),xe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Se=e=>{let t=xe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ce={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},we=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Te=(0,w.createContext)({}),Ee=()=>(0,w.useContext)(Te),De=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ee()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...Ce,width:t??l??Ce.width,height:t??l??Ce.height,stroke:e??f,strokeWidth:m,className:ye(`lucide`,p,i),...!a&&!we(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Oe=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(De,{ref:i,iconNode:t,className:ye(`lucide-${be(Se(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Se(e),n},ke=Oe(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ae=Oe(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),je=Oe(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Me=Oe(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),Ne=Oe(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Pe=le(),Fe=`modulepreload`,Ie=function(e){return`/`+e},Le={},Re=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ie(t,n),t in Le)return;Le[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Fe,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ze=(0,w.lazy)(()=>Re(()=>import(`./DecisionWorkspace-mGJIv1Kf.js`).then(e=>({default:e.DecisionWorkspace})),__vite__mapDeps([0,1]))),Be=(0,w.lazy)(()=>Re(()=>import(`./DiffMergeWorkspace-QlDjz0gB.js`).then(e=>({default:e.DiffMergeWorkspace})),__vite__mapDeps([2,1]))),Ve=(0,w.lazy)(()=>Re(()=>import(`./GraphWorkspace-ByOhZMi1.js`).then(e=>({default:e.GraphWorkspace})),__vite__mapDeps([3,1,4,5,6]))),He=(0,w.lazy)(()=>Re(()=>import(`./ImportExportWorkspace-416NEz-m.js`).then(e=>({default:e.ImportExportWorkspace})),__vite__mapDeps([7,1,8]))),Ue=(0,w.lazy)(()=>Re(()=>import(`./LineageDiagram-Ya8919Yq.js`).then(e=>({default:e.LineageDiagram})),__vite__mapDeps([9,1,10,11]))),We=(0,w.lazy)(()=>Re(()=>import(`./ReasoningWorkspace-Rq0mhU8j.js`).then(e=>({default:e.ReasoningWorkspace})),__vite__mapDeps([12,1]))),Ge=(0,w.lazy)(()=>Re(()=>import(`./SparqlWorkspace-BBCNRJ1t.js`).then(e=>({default:e.SparqlWorkspace})),__vite__mapDeps([13,1]))),Ke=(0,w.lazy)(()=>Re(()=>import(`./VocabularyWorkspace-B6-y7wgc.js`).then(e=>({default:e.VocabularyWorkspace})),__vite__mapDeps([14,1,5,4,8,10]))),qe=new ge,Je=[{id:`explore`,label:`Explore`,hint:`Graph and vocabulary browsing`,icon:ke},{id:`analyze`,label:`Analyze`,hint:`Query and inspect the dataset`,icon:Ae},{id:`decisions`,label:`Decisions`,hint:`Decision chains and precedent review`,icon:Me},{id:`enrich`,label:`Enrich`,hint:`Import, export, and merge workflows`,icon:je},{id:`manage`,label:`Manage`,hint:`Lineage and governance tooling`,icon:Ne}],Ye=`:root {--app-bg: #07111f;--panel-bg: rgba(7, 17, 31, 0.82);diff --git a/semantica/static/assets/useQuery-DY70wuIi.js b/semantica/static/assets/useQuery-BCnvbVXe.jssimilarity index 99%rename from semantica/static/assets/useQuery-DY70wuIi.jsrename to semantica/static/assets/useQuery-BCnvbVXe.jsindex 7ddca049..328878bd 100644--- a/semantica/static/assets/useQuery-DY70wuIi.js+++ b/semantica/static/assets/useQuery-BCnvbVXe.js@@ -1 +1 @@-import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{A as r,C as i,D as a,O as o,S as s,T as c,c as l,g as u,k as d,n as f,o as p,s as m,w as h,x as g,y as _}from"./query-vnlTpYnf.js";import{n as v}from"./index-BaPyswgU.js";var y=class extends r{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=m(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),x(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof s(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!h(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&C(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||i(this.options.staleTime,this.#t)!==i(t.staleTime,this.#t))&&this.#g();let a=this.#_();r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||a!==this.#p)&&this.#v(a)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return T(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(_)),t}#g(){this.#b();let e=i(this.options.staleTime,this.#t);if(l.isServer()||this.#r.isStale||!u(e))return;let t=a(this.#r.dataUpdatedAt,e)+1;this.#d=o.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(l.isServer()||s(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=o.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(o.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(o.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&x(e,t),o=i&&C(e,n,t,r);(a||o)&&(u={...u,...f(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:_,status:v}=u;p=u.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,p=g(i?.data,e,t),d=!0)}if(t.select&&p!==void 0&&!y)if(i&&p===a?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=g(i?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}this.#s&&(h=this.#s,p=this.#l,_=Date.now(),v=`error`);let b=u.fetchStatus===`fetching`,S=v===`pending`,T=v===`error`,E=S&&b,D=p!==void 0,O={status:v,fetchStatus:u.fetchStatus,isPending:S,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:_,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!D,isPaused:u.fetchStatus===`paused`,isPlaceholderData:d,isRefetchError:T&&D,isStale:w(e,t),refetch:this.refetch,promise:this.#o,isEnabled:s(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=m())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!h(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){p.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function b(e,t){return s(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function x(e,t){return b(e,t)||e.state.data!==void 0&&S(e,t,t.refetchOnMount)}function S(e,t,n){if(s(t.enabled,e)!==!1&&i(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&w(e,t)}return!1}function C(e,t,n,r){return(e!==t||s(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&w(e,n)}function w(e,t){return s(t.enabled,e)!==!1&&e.isStaleByTime(i(t.staleTime,e))}function T(e,t){return!h(e.getCurrentResult(),t)}var E=t(e(),1),D=E.createContext(!1),O=()=>E.useContext(D);D.Provider,n();function k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A=E.createContext(k()),j=()=>E.useContext(A),M=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?c(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N=e=>{E.useEffect(()=>{e.clearReset()},[e])},P=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||c(n,[e.error,r])),F=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},I=(e,t)=>e.isLoading&&e.isFetching&&!t,L=(e,t)=>e?.suspense&&t.isPending,R=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z(e,t,n){let r=O(),i=j(),a=v(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,F(o),M(o,i,s),N(i);let c=!a.getQueryCache().get(o.queryHash),[u]=E.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(e=>{let t=f?u.subscribe(p.batchCalls(e)):_;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),E.useEffect(()=>{u.setOptions(o)},[o,u]),L(o,d))throw R(o,u,i);if(P({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!l.isServer()&&I(d,r)&&(c?R(o,u,i):s?.promise)?.catch(_).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function B(e,t){return z(e,y,t)}export{B as t};\ No newline at end of file+import{n as e,o as t,t as n}from"./jsx-runtime-B3dmMxJS.js";import{A as r,C as i,D as a,O as o,S as s,T as c,c as l,g as u,k as d,n as f,o as p,s as m,w as h,x as g,y as _}from"./query-vnlTpYnf.js";import{n as v}from"./index-Ba72GzGt.js";var y=class extends r{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=m(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),x(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof s(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!h(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&C(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||i(this.options.staleTime,this.#t)!==i(t.staleTime,this.#t))&&this.#g();let a=this.#_();r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||a!==this.#p)&&this.#v(a)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return T(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(_)),t}#g(){this.#b();let e=i(this.options.staleTime,this.#t);if(l.isServer()||this.#r.isStale||!u(e))return;let t=a(this.#r.dataUpdatedAt,e)+1;this.#d=o.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(l.isServer()||s(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=o.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(o.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(o.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&x(e,t),o=i&&C(e,n,t,r);(a||o)&&(u={...u,...f(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:_,status:v}=u;p=u.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,p=g(i?.data,e,t),d=!0)}if(t.select&&p!==void 0&&!y)if(i&&p===a?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=g(i?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}this.#s&&(h=this.#s,p=this.#l,_=Date.now(),v=`error`);let b=u.fetchStatus===`fetching`,S=v===`pending`,T=v===`error`,E=S&&b,D=p!==void 0,O={status:v,fetchStatus:u.fetchStatus,isPending:S,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:_,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!D,isPaused:u.fetchStatus===`paused`,isPlaceholderData:d,isRefetchError:T&&D,isStale:w(e,t),refetch:this.refetch,promise:this.#o,isEnabled:s(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=m())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!h(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){p.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function b(e,t){return s(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function x(e,t){return b(e,t)||e.state.data!==void 0&&S(e,t,t.refetchOnMount)}function S(e,t,n){if(s(t.enabled,e)!==!1&&i(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&w(e,t)}return!1}function C(e,t,n,r){return(e!==t||s(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&w(e,n)}function w(e,t){return s(t.enabled,e)!==!1&&e.isStaleByTime(i(t.staleTime,e))}function T(e,t){return!h(e.getCurrentResult(),t)}var E=t(e(),1),D=E.createContext(!1),O=()=>E.useContext(D);D.Provider,n();function k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A=E.createContext(k()),j=()=>E.useContext(A),M=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?c(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N=e=>{E.useEffect(()=>{e.clearReset()},[e])},P=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||c(n,[e.error,r])),F=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},I=(e,t)=>e.isLoading&&e.isFetching&&!t,L=(e,t)=>e?.suspense&&t.isPending,R=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z(e,t,n){let r=O(),i=j(),a=v(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,F(o),M(o,i,s),N(i);let c=!a.getQueryCache().get(o.queryHash),[u]=E.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(e=>{let t=f?u.subscribe(p.batchCalls(e)):_;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),E.useEffect(()=>{u.setOptions(o)},[o,u]),L(o,d))throw R(o,u,i);if(P({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!l.isServer()&&I(d,r)&&(c?R(o,u,i):s?.promise)?.catch(_).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function B(e,t){return z(e,y,t)}export{B as t};\ No newline at end of filediff --git a/semantica/static/index.html b/semantica/static/index.htmlindex 68b13fda..8d5c4127 100644--- a/semantica/static/index.html+++ b/semantica/static/index.html@@ -5,7 +5,7 @@<link rel="icon" type="image/svg+xml" href="/favicon.svg" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>semantica-explorer</title>- <script type="module" crossorigin src="/assets/index-BaPyswgU.js"></script>+ <script type="module" crossorigin src="/assets/index-Ba72GzGt.js"></script><link rel="modulepreload" crossorigin href="/assets/jsx-runtime-B3dmMxJS.js"><link rel="modulepreload" crossorigin href="/assets/query-vnlTpYnf.js"><link rel="stylesheet" crossorigin href="/assets/index-Bw-pAf6p.css">